wangting
2023-08-07 db860f9c08a23fe916121a2c76001e05d2acee3e
Merge remote-tracking branch 'origin/master'
已修改4个文件
119 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/template/FlowPath.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -26,7 +26,7 @@
        <!--        树节点添加对话框-->
        <el-dialog :title="this.TreeFlag ? '添加分类' :'添加主题库'" :before-close="TreeEscHandler" :visible.sync="TreeAddFormVisible"  v-loading="AddLoading" append-to-body
                   style="width: 1700px;margin: auto">
          <el-form :model="TreeAddform" :rules="rules">
          <el-form ref="myForm" :model="TreeAddform" :rules="rules">
            <el-form-item :label="this.TreeFlag ? '分类编号:' :'主题库编号:'" label-width="150px" style="display: inline-block" prop="id">
              <el-input v-model="TreeAddform.id" autocomplete="off" style="width: 170px"></el-input>
            </el-form-item>
@@ -1041,34 +1041,40 @@
    //树节点取消事件
    TreeEscHandler(){
      this.TreeAddform={};
      this.TreeAddFormVisible=false
      this.TreeAddFormVisible=false;
      // 关闭弹窗清空校验
      this.$refs.myForm.clearValidate();
    },
    //树节点添加事件
    TreeAddHandler() {
      const data = this.TreeAddform;
      // data.btmtypename= this.TreeList.btmtypename
      this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid);
      TreeSave(data)
        .then(() => {
          this.$message({
            type: "success",
            message: "添加成功!",
      if ((!this.TreeAddform.id || !this.TreeAddform.name) || (this.TreeFlagCode && !this.TreeAddform.btmTypeName)) {
        this.$message.warning('请输入内容!');
      }else {
        const data = this.TreeAddform;
        // data.btmtypename= this.TreeList.btmtypename
        this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid);
        TreeSave(data)
          .then(() => {
            this.$message({
              type: "success",
              message: "添加成功!",
            });
            Object.keys(this.TreeAddform).forEach(key => {
              this.TreeAddform[key] = "";
            });
            this.getAttr();
            this.TreeAddFormVisible = false;
            //添加完成后右侧清空
            this.ProData=[];
            this.Formlist=[];
          })
          .catch((res) => {
            this.$message({
              type: "warning",
              message: res,
            });
          });
          Object.keys(this.TreeAddform).forEach(key => {
            this.TreeAddform[key] = "";
          });
          this.getAttr();
          this.TreeAddFormVisible = false;
          //添加完成后右侧清空
          this.ProData=[];
          this.Formlist=[];
        })
        .catch((res) => {
          this.$message({
            type: "warning",
            message: res,
          });
        });
      }
    },
    //树节点删除按钮
    TreeDel() {
Source/UBCS-WEB/src/components/template/FlowPath.vue
@@ -171,17 +171,19 @@
        // 新增
        async handleSave(row, done, loading) {
            console.log(row)
            const response = await flowpathSave({ ...row, ...{ templateId: this.code } })
            if (response.status === 200) {
                loading()
            await flowpathSave({ ...row, ...{ templateId: this.code } }).then(response=>{
              if (response.status === 200) {
                console.log(response)
                this.$message({
                    type: 'success',
                    message: '新增数据成功!'
                  type: 'success',
                  message: '新增数据成功!'
                })
                done()
                this.getDataList()
            }
              }
            }).catch(res=>{
              loading()
            })
        },
        // 编辑
@@ -189,16 +191,19 @@
            console.log(row)
            const { modelName, modelKey, buttonTypeKey, id ,description} = row
            let param = { modelName, modelKey, buttonTypeKey, id,description }
            const response = await flowpathSave({ ...param, ...{ templateId: this.code } })
            if (response.status === 200) {
                loading()
            await flowpathSave({ ...param, ...{ templateId: this.code } }).then(response=>{
              if (response.status === 200) {
                this.$message({
                    type: 'success',
                    message: '修改数据成功!'
                  type: 'success',
                  message: '修改数据成功!'
                })
                done()
                this.getDataList()
            }
              }
            }).catch(()=>{
              //loading控制禁用 默认是开启
              loading()
            })
        },
        // 删除单条
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/business/service/impl/FlowBusinessServiceImpl.java
@@ -82,9 +82,9 @@
            .includeProcessVariables().active().orderByTaskCreateTime().desc();
        // 构建列表数据
        buildFlowTaskList(bladeFlow, flowList, claimUserQuery, FlowEngineConstant.STATUS_CLAIM);
        buildFlowTaskList(bladeFlow, flowList, claimRoleWithTenantIdQuery, FlowEngineConstant.STATUS_CLAIM);
        buildFlowTaskList(bladeFlow, flowList, claimRoleWithoutTenantIdQuery, FlowEngineConstant.STATUS_CLAIM);
        buildFlowTaskList(bladeFlow, flowList, claimUserQuery, FlowEngineConstant.STATUS_CLAIM, page);
        buildFlowTaskList(bladeFlow, flowList, claimRoleWithTenantIdQuery, FlowEngineConstant.STATUS_CLAIM, page);
        buildFlowTaskList(bladeFlow, flowList, claimRoleWithoutTenantIdQuery, FlowEngineConstant.STATUS_CLAIM, page);
        // 计算总数
        long count = claimUserQuery.count() + claimRoleWithTenantIdQuery.count() + claimRoleWithoutTenantIdQuery.count();
@@ -107,7 +107,7 @@
            .includeProcessVariables().orderByTaskCreateTime().desc();
        // 构建列表数据
        buildFlowTaskList(bladeFlow, flowList, todoQuery, FlowEngineConstant.STATUS_TODO);
        buildFlowTaskList(bladeFlow, flowList, todoQuery, FlowEngineConstant.STATUS_TODO,page);
        // 计算总数
        long count = todoQuery.count();
@@ -299,8 +299,9 @@
     * @param flowList  流程列表
     * @param taskQuery 任务查询类
     * @param status    状态
     * @param page
     */
    private void buildFlowTaskList(BladeFlow bladeFlow, List<BladeFlow> flowList, TaskQuery taskQuery, String status) {
    private void buildFlowTaskList(BladeFlow bladeFlow, List<BladeFlow> flowList, TaskQuery taskQuery, String status, IPage<BladeFlow> page) {
//        if (bladeFlow.getCategory() != null) {
        if (StringUtils.isNotEmpty(bladeFlow.getCategory())) {
            taskQuery.processCategoryIn(Func.toStrList(bladeFlow.getCategory()));
@@ -314,7 +315,9 @@
        if (bladeFlow.getEndDate() != null) {
            taskQuery.taskCreatedBefore(bladeFlow.getEndDate());
        }
        taskQuery.list().forEach(task -> {
        int firstResult = (int) ((page.getCurrent()-1)* page.getSize());
        int maxResult = (int) page.getSize();
        taskQuery.listPage(firstResult,maxResult).forEach(task -> {
            BladeFlow flow = new BladeFlow();
            flow.setTaskId(task.getId());
            flow.setTaskDefinitionKey(task.getTaskDefinitionKey());
Source/UBCS/ubcs-ops/ubcs-flow/src/main/java/com/vci/ubcs/flow/engine/service/impl/VCIFlowserviceImpl.java
@@ -19,14 +19,17 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.vci.ubcs.flow.core.constant.ProcessConstant;
import com.vci.ubcs.flow.core.dto.FlowTaskDTO;
import com.vci.ubcs.flow.core.dto.ProcessStageAttrDTO;
import com.vci.ubcs.flow.core.entity.BladeFlow;
import com.vci.ubcs.flow.core.entity.FlowTaskUser;
import com.vci.ubcs.flow.core.entity.ProcessStageAttr;
import com.vci.ubcs.flow.core.utils.TaskUtil;
import com.vci.ubcs.flow.engine.entity.*;
import com.vci.ubcs.flow.engine.service.FlowEngineService;
import com.vci.ubcs.flow.engine.service.FlowTaskUserService;
import com.vci.ubcs.flow.engine.service.ProcessStageAttrService;
import com.vci.ubcs.flow.engine.service.VICFlowService;
import com.vci.ubcs.starter.web.util.BeanUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@@ -232,6 +235,22 @@
            flowTaskDTO.setVariables(variables);
        }
        //流程阶段
        Map<String, Object> m = new HashMap<>();
        String templateId = variables.get("templateId").toString();
        m.put("template_id", templateId);
        m.put("task_id", crruentActivityId);
        m.put("model_key", modelKey);
        QueryWrapper q = Condition.getQueryWrapper(m, ProcessStageAttr.class)
            .select("attr_id attrId,attr_name attrName,attr_group attrGroup");
        List<ProcessStageAttr> stageAttrs = processStageAttrService.list(q);
        List<ProcessStageAttrDTO> stageAttrsDto = new ArrayList<>();
        stageAttrs.stream().forEach(e->{
            ProcessStageAttrDTO dto = new ProcessStageAttrDTO();
            BeanUtil.convert(e,dto);
            stageAttrsDto.add(dto);
        });
        flowTaskDTO.setStageAttrs(stageAttrsDto);
        //放入流程阶段、流程modelkey
        variables.put(TASKID,crruentActivityId);