فهرست منبع

财务代码提交

wangqiang 1 سال پیش
والد
کامیت
39a3a2985f
25فایلهای تغییر یافته به همراه1160 افزوده شده و 193 حذف شده
  1. 22 4
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/FlowableApiFallbackFactory.java
  2. 19 6
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IFlowableApi.java
  3. 73 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/domain/Cert.java
  4. 0 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/common/flowable/dto/CommitParamDTO.java
  5. 0 69
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/util/FlowTaskUtil.java
  6. 3 4
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportSignatureCallBackController.java
  7. 10 87
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java
  8. 6 6
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/service/CwProjectReportArchiveService.java
  9. 12 3
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/service/CwWorkClientService.java
  10. 28 6
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableTaskController.java
  11. 283 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/model/CwWorkClientBaseDtoTest.java
  12. 59 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/model/CwWorkClientBillingDTOTest.java
  13. 74 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/model/CwWorkClientContactDTOTest.java
  14. 134 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/model/CwWorkClientTypeDTOTest.java
  15. 1 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/model/Flow.java
  16. 20 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/model/WorkAttachmentDtoTest.java
  17. 238 2
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowTaskService.java
  18. 16 4
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java
  19. 14 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/CertMapper.java
  20. 3 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java
  21. 46 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/CertMapper.xml
  22. 27 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml
  23. 22 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/CertService.java
  24. 37 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java
  25. 13 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/mapstruct/CertWrapper.java

+ 22 - 4
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/FlowableApiFallbackFactory.java

@@ -7,7 +7,9 @@ import lombok.extern.slf4j.Slf4j;
 import org.flowable.bpmn.model.FlowNode;
 //import org.flowable.task.api.Task;
 import org.springframework.cloud.openfeign.FallbackFactory;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
 
 import java.util.List;
 import java.util.Map;
@@ -24,10 +26,25 @@ public class FlowableApiFallbackFactory implements FallbackFactory <IFlowableApi
         log.error ( "流程服务调用失败:{}", throwable.getMessage ( ) );
         return new IFlowableApi() {
 
-//            @Override
-//            public List<Task> getRecords() {
-//                return null;
-//            }
+            @Override
+            public Map historicTaskList3(String procInsId) {
+                return null;
+            }
+
+            @Override
+            public Map historicTaskList2(String procInsId) {
+                return null;
+            }
+
+            @Override
+            public String add(Map<String, String> map) {
+                return null;
+            }
+
+            @Override
+            public String taskDispose(String list) {
+                return null;
+            }
 
             @Override
             public FlowNode getCurrentTask(String processInstanceId) {
@@ -44,6 +61,7 @@ public class FlowableApiFallbackFactory implements FallbackFactory <IFlowableApi
                 return null;
             }
 
+            @GetMapping("/flowable/task/getCurrentTaskName")
             @Override
             public String getCurrentTaskName(String processInstanceId) {
                 return null;

+ 19 - 6
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IFlowableApi.java

@@ -5,9 +5,9 @@ import com.jeeplus.flowable.factory.FlowableApiFallbackFactory;
 import org.flowable.bpmn.model.FlowNode;
 //import org.flowable.task.api.Task;
 import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.cloud.openfeign.SpringQueryMap;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.*;
 //import org.flowable.task.api.Task;
 
 import java.util.List;
@@ -17,12 +17,25 @@ import java.util.Map;
 @FeignClient(contextId = "flowableApi", name = AppNameConstants.APP_FLOWABLE_SERVICE, fallbackFactory = FlowableApiFallbackFactory.class)
 public interface IFlowableApi {
 
+    @GetMapping("/flowable/task/historicTaskList3")
+    Map historicTaskList3(String procInsId);
+
+    @GetMapping("/flowable/task/historicTaskList2")
+    Map historicTaskList2(String procInsId);
+
+    /**
+     * 发送通知
+     */
+    @GetMapping(value = "/flowable/task/add")
+    String add(Map<String ,String > map);
+
     /**
      * 已经签收或者等待签收的任务
-     *
+     * @param data
+     * @return
      */
-//    @GetMapping("/flowable/task/getRecords")
-//    List <Task> getRecords();
+    @RequestMapping(value = "/flowable/task/taskDispose", method = RequestMethod.POST)
+    String taskDispose(@RequestBody String data);
 
     /**
      * 根据processInstanceId获取taskId

+ 73 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/domain/Cert.java

@@ -0,0 +1,73 @@
+package com.jeeplus.sys.domain;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 组织机构-人员资质-人员职业资格证
+ * @TableName sys_cert
+ */
+@Data
+@TableName("sys_cert")
+public class Cert extends BaseEntity {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 人员id
+     */
+    private String userId;
+
+    /**
+     * 证书类型
+     */
+    private String type;
+
+    /**
+     * 证书编号
+     */
+    private String no;
+
+    /**
+     * 发证机关
+     */
+    private String authorities;
+
+    /**
+     * 发证日期
+     */
+    private Date issuedDate;
+
+    /**
+     * 注册日期
+     */
+    private Date enrollDate;
+
+    /**
+     * 到期日期
+     */
+    private Date expireDate;
+
+    /**
+     * 注册证书编号
+     */
+    private String enrollCertNo;
+
+    /**
+     * 专业
+     */
+    private String profession;
+
+    /**
+     * 文件地址
+     */
+    private String fileUrl;
+
+    private static final long serialVersionUID = 1L;
+}

+ 0 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/common/flowable/dto/CommitParamDTO.java

@@ -1,6 +1,5 @@
 package com.jeeplus.finance.common.flowable.dto;
 
-//先注释import com.jeeplus.flowable.model.TaskComment;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -17,7 +16,6 @@ public class CommitParamDTO<T> implements Serializable {
     private String procInsId;
     private String procDefId;
     private String assignee;
-//先注释    private TaskComment comment;
     private T vars;
     private Cope cope; // 抄送的参数,按需使用
 

+ 0 - 69
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/invoice/util/FlowTaskUtil.java

@@ -1,10 +1,8 @@
 package com.jeeplus.finance.invoice.util;
 
-//先注释import com.jeeplus.flowable.service.FlowTaskService;
 import com.jeeplus.flowable.feign.IFlowableApi;
 import com.jeeplus.sys.utils.SpringContextHolder;
 //import org.flowable.task.api.Task;
-//先注释import org.flowable.task.api.Task;
 
 import javax.annotation.Resource;
 import java.lang.reflect.Field;
@@ -20,73 +18,6 @@ public class FlowTaskUtil {
     @Resource
     private IFlowableApi iFlowableApi;
 
-//    private FlowTaskService flowTaskService = SpringContextHolder.getBean(FlowTaskService.class);
-
-
-//    public <T> List<T> taskDispose(List<T> list) {
-//
-//        List<Task> taskList = iFlowableApi.getRecords();
-//        Method procInsIdMethod = null;
-//        Method processDefinitionIdMethod = null;
-//        Method statusMethod = null;
-//        for (T info : list ) {
-//            Class<? extends Object> tClass = info.getClass();
-//            //得到所有属性
-//            Field[] fields = tClass.getDeclaredFields();
-//            Class<? extends Object> superClass = tClass.getSuperclass();
-//            //得到所有属性
-//            Field[] superField = superClass.getDeclaredFields();
-//            Field[] field = concat(fields,superField);
-//
-//            for (Task taskInfo : taskList) {
-//                Integer taskIdInteger = null;
-//                try {
-//                    for (Integer i=0; i<field.length; i++ ){
-//                        //获取属性的名字
-//                        String name = field[i].getName();
-//                        //将属性名字的首字母大写
-//                        name = name.replaceFirst(name.substring(0, 1), name.substring(0, 1).toUpperCase());
-//
-//                        if("ProcInsId".equals(name)){
-//                            field[i].setAccessible(true);
-//                            //整合出 getId() 属性这个方法
-//                            procInsIdMethod = tClass.getMethod("get"+name);
-//
-//                        }else if("ProcessDefinitionId".equals(name)){
-//                            field[i].setAccessible(true);
-//                            //整合出 getId() 属性这个方法
-//                            processDefinitionIdMethod = tClass.getMethod("get"+name);
-//
-//                        }else if("Status".equals(name)){
-//                            field[i].setAccessible(true);
-//                            //整合出 getId() 属性这个方法
-//                            statusMethod = tClass.getMethod("get"+name);
-//
-//                        }else if("TaskId".equals(name)){
-//                            field[i].setAccessible(true);
-//                            //整合出 getId() 属性这个方法
-//                            taskIdInteger = i;
-//
-//                        }
-//                    }
-//
-//                    //调用这个整合出来的get方法,强转成自己需要的类型
-//                    String procInsId = (String)procInsIdMethod.invoke(info);
-//                    String processDefinitionId = (String)processDefinitionIdMethod.invoke(info);
-//                    String status = (String)statusMethod.invoke(info);
-//
-//                    if(procInsId.equals(taskInfo.getProcessInstanceId()) && processDefinitionId.equals(taskInfo.getProcessDefinitionId()) && "4".equals(status)){
-//                        field[taskIdInteger].set(info,taskInfo.getId());
-//                    }
-//                } catch (Exception e) {
-//                    e.printStackTrace();
-//                }
-//            }
-//        }
-//        return list;
-//
-//    }
-
     /**
      * 数据整合方法
      * @param a

+ 3 - 4
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportSignatureCallBackController.java

@@ -22,7 +22,6 @@ import com.jeeplus.finance.projectReport.mapper.CwProjectReportMapper;
 import com.jeeplus.finance.projectReport.mapper.CwProjectReportSignatureMapper;
 import com.jeeplus.finance.projectReport.mapper.ProjectReportWorkAttachmentMapper;
 import com.jeeplus.finance.projectReport.service.CwProjectReportService;
-//先注释import com.jeeplus.flowable.model.Flow;
 import com.jeeplus.flowable.feign.IFlowableApi;
 import com.jeeplus.pubmodules.oss.domain.WorkAttachment;
 import com.jeeplus.pubmodules.oss.mapper.OssServiceMapper;
@@ -116,9 +115,9 @@ public class CwProjectReportSignatureCallBackController {
         String processInstanceId = reportMapper.getProcessInstanceIdById(id);
         if(StringUtils.isNotBlank(processInstanceId)){
             //根据流程id查询流程当前节点信息
-            FlowNode currentTask = flowTaskService.getCurrentTask(processInstanceId);
-            if(null != currentTask && StringUtils.isNotBlank(currentTask.getName())){
-                switch (currentTask.getName()){
+            String currentTask = flowTaskService.getCurrentTaskName(processInstanceId);
+            if(StringUtils.isNotEmpty(currentTask)){
+                switch (currentTask){
                     case "签字注师1审核":
                         reportSignature.setSignatureAnnotator1Status("1");
                         cwProjectReportService.updateSignatureType(reportSignature);

+ 10 - 87
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java

@@ -29,7 +29,6 @@ import com.jeeplus.finance.projectReportArchive.service.dto.CwProjectReportArchi
 import com.jeeplus.finance.workClientInfo.domain.CwWorkClientBase;
 import com.jeeplus.finance.workClientInfo.service.dto.CwWorkClientBaseDTO;
 import com.jeeplus.finance.workClientInfo.service.mapstruct.CwWorkClientBaseWrapper;
-//先注释import com.jeeplus.flowable.model.Flow;
 import com.jeeplus.flowable.feign.IFlowableApi;
 import com.jeeplus.pubmodules.oss.domain.WorkAttachment;
 import com.jeeplus.pubmodules.oss.mapper.OssServiceMapper;
@@ -49,9 +48,6 @@ import freemarker.template.Template;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.flowable.bpmn.model.FlowNode;
-//先注释import org.flowable.engine.TaskService;
-//import org.flowable.engine.history.HistoricActivityInstance;
-//import org.flowable.task.api.Task;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -126,9 +122,6 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
     @Autowired
     private IFlowableApi flowTaskService;
 
-//先注释    @Autowired
-//    private TaskService taskService;
-
     @Resource
     private CwProjectReportReviewMapper reviewMapper;
 
@@ -1306,7 +1299,11 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
         try {
             if(StringUtils.isNotBlank(reportData.getProcInsId3())){
-//先注释                List<Flow> flows = flowTaskService.historicTaskList(reportData.getProcInsId3());
+
+
+
+                Map dataMap = flowTaskService.historicTaskList2(reportData.getProcInsId3());
+                data.putAll(dataMap);
 //                for (Flow flow : flows) {
 //                    HistoricActivityInstance histIns = flow.getHistIns();
 //                    if(StringUtils.isNotBlank(histIns.getActivityName())){
@@ -1489,24 +1486,8 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                         }
                     }
 
-// 先注释                   List<Flow> archiveFlows = flowTaskService.historicTaskList(cwProjectReportArchiveDTO.getProcInsId());
-//                    for (Flow flow : archiveFlows) {
-//                        HistoricActivityInstance histIns = flow.getHistIns();
-//                        if(StringUtils.isNotBlank(histIns.getActivityName())){
-//
-//                            switch (histIns.getActivityName()){
-//                                case "归档员审核":
-//                                    if(null != flow.getComment() && "success".equals(flow.getComment().getLevel())){
-//                                        if(StringUtils.isNotBlank(flow.getAssigneeName())){
-//                                            data.put("archiveName",flow.getAssigneeName());
-//                                        }else{
-//                                            data.put("archiveName","");
-//                                        }
-//                                    }
-//                                    break;
-//                            }
-//                        }
-//                    }
+                    Map dataMap3 = flowTaskService.historicTaskList3(cwProjectReportArchiveDTO.getProcInsId());
+                    data.putAll(dataMap3);
                 }
             }
 
@@ -2331,64 +2312,6 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         return cwProjectReportSignature.getId();
     }
 
-    public void commitFlowable(CwProjectReportData cwProjectReportData) {
-        CwProjectReportData cwProjectReportDto = this.queryById(cwProjectReportData.getId());
-        cwProjectReportData.getCommitParamDTO().setVars(cwProjectReportDto);
-        CommitParamDTO<CwProjectReportData> commitParamDTO = cwProjectReportData.getCommitParamDTO();
-        Map<String, Object> vars = Maps.newHashMap();
-//先注释        Flow flow = new Flow();
-//        flow.setTaskId(commitParamDTO.getTaskId());
-//        flow.setTaskDefKey(commitParamDTO.getTaskDefKey());
-//        flow.setProcInsId(commitParamDTO.getProcInsId());
-//        flow.setProcDefId(commitParamDTO.getProcDefId());
-//        flow.setAssignee(commitParamDTO.getAssignee());
-//        flow.setComment(commitParamDTO.getComment());
-        String var = JSON.toJSONString(commitParamDTO.getVars());
-        Map<String, String> stringObjectMap = JSON.parseObject(var, new TypeReference<Map<String, String>>() {});
-        for (Map.Entry<String, String> entry : stringObjectMap.entrySet()) {
-            String value = entry.getValue();
-            if("true".equals(value) || "false".equals(value)){
-                vars.put(entry.getKey(), Boolean.valueOf(value).booleanValue());
-            }else{
-                vars.put(entry.getKey(), value);
-            }
-        }
-        // 流程节点审核通过
-//  先注释      flowTaskService.auditSave(flow, vars);
-//        CwProjectReport report = this.getOne(new QueryWrapper<CwProjectReport>().lambda().eq(CwProjectReport::getId, cwProjectReportData.getId()));
-//        // 指定下一步处理人
-//        Task task = taskService.createTaskQuery().processInstanceId(flow.getProcInsId()).active().singleResult();
-//        // task为null时,则当前节点为最后一个审核节点
-//        if(task != null){
-//            if(org.apache.commons.lang3.StringUtils.isNotBlank(flow.getAssignee ())){
-//                taskService.setAssignee(task.getId(), flow.getAssignee ());
-//            }
-//            if(ObjectUtil.isNotEmpty(report)) {
-//                CwProjectReportSignature cwProjectReportSignature = cwProjectReportSignatureMapper.selectOne(new QueryWrapper<CwProjectReportSignature>().lambda()
-//                        .eq(CwProjectReportSignature::getReportId, report.getId())
-//                        .eq(CwProjectReportSignature::getType, report.getSignatureType())
-//                );
-//                if ("2".equals(cwProjectReportSignature.getStatus())){
-//                    cwProjectReportSignature.setStatus("6");
-//                    cwProjectReportSignatureMapper.updateById(cwProjectReportSignature);
-//                }else if ("6".equals(cwProjectReportSignature.getStatus())){
-//                    cwProjectReportSignature.setStatus("7");
-//                    cwProjectReportSignatureMapper.updateById(cwProjectReportSignature);
-//                }
-//            }
-//        } else {
-//            // 修改数据流程状态为->审核通过
-//            if (ObjectUtil.isNotEmpty(report)){
-//                CwProjectReportSignature cwProjectReportSignature = cwProjectReportSignatureMapper.selectOne(new QueryWrapper<CwProjectReportSignature>().lambda()
-//                        .eq(CwProjectReportSignature::getReportId, report.getId())
-//                        .eq(CwProjectReportSignature::getType, report.getSignatureType())
-//                );
-//                cwProjectReportSignature.setStatus("5");
-//                cwProjectReportSignatureMapper.updateById(cwProjectReportSignature);
-//            }
-//        }
-    }
-
     public CwProjectReportData queryByContractId(String contractId){
         CwProjectReportData reportData = reportMapper.queryByContractId(contractId);
         return reportData;
@@ -2531,11 +2454,11 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         String processInstanceId = reportMapper.getProcessInstanceIdById(id);
         if(StringUtils.isNotBlank(processInstanceId)){
             //根据流程id查询流程当前节点信息
-            FlowNode currentTask = flowTaskService.getCurrentTask(processInstanceId);
-            if(null != currentTask && StringUtils.isNotBlank(currentTask.getName())){
+            String currentTask = flowTaskService.getCurrentTaskName(processInstanceId);
+            if(StringUtils.isNotEmpty(currentTask)){
                 map.put("success", true);
                 map.put("message", "获取签章流程成功");
-                map.put("signatureType", currentTask.getName());
+                map.put("signatureType", currentTask);
             }else{
                 map.put("success", false);
                 map.put("message", "获取签章流程失败");

+ 6 - 6
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/service/CwProjectReportArchiveService.java

@@ -80,7 +80,7 @@ public class CwProjectReportArchiveService extends ServiceImpl<CwProjectReportAr
     public IPage<CwProjectReportArchiveDTO> findList(Page<CwProjectReportArchiveDTO> page, CwProjectReportArchiveDTO cwProjectReportArchiveDTO) throws Exception{
         QueryWrapper<CwProjectReportArchive> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( CwProjectReportArchiveWrapper.INSTANCE.toEntity(cwProjectReportArchiveDTO), CwProjectReportArchive.class );
         queryWrapper.eq("cw_pa.del_flag","0");
-        if (ObjectUtil.isNotEmpty(cwProjectReportArchiveDTO)) {
+        /*if (ObjectUtil.isNotEmpty(cwProjectReportArchiveDTO)) {
             if (ObjectUtil.isNotEmpty(cwProjectReportArchiveDTO.getCwProjectRecordsDTO())){
                 // 项目名称
                 if (StringUtils.isNotBlank(cwProjectReportArchiveDTO.getCwProjectRecordsDTO().getProjectName())){
@@ -172,17 +172,17 @@ public class CwProjectReportArchiveService extends ServiceImpl<CwProjectReportAr
                 }
 
             }
-        }
+        }*/
         String isBmzr = "0";
         StringBuilder officeIds = new StringBuilder();
         UserDTO userDTO = UserUtils.getCurrentUserDTO();
         List<String> manageOfficeIdList= Lists.newArrayList();
 
-        if (StringUtils.isBlank(cwProjectReportArchiveDTO.getArchiveSta())) {
+        /*if (StringUtils.isBlank(cwProjectReportArchiveDTO.getArchiveSta())) {
             cwProjectReportArchiveDTO.setArchiveSta("");
-        }
+        }*/
         IPage<CwProjectReportArchiveDTO> list = cwProjectReportArchiveMapper.findList(page, userDTO, isBmzr, officeIds.toString(), queryWrapper, cwProjectReportArchiveDTO.getArchiveSta());
-        List<CwProjectReportArchiveDTO> records = list.getRecords();
+        /*List<CwProjectReportArchiveDTO> records = list.getRecords();
         if (null != records && records.size()>0){
             //循环查询出来的数据
             for (CwProjectReportArchiveDTO info : records) {
@@ -225,7 +225,7 @@ public class CwProjectReportArchiveService extends ServiceImpl<CwProjectReportAr
                     }
                 }
             }
-        }
+        }*/
         return list;
     }
 

+ 12 - 3
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/workClientInfo/service/CwWorkClientService.java

@@ -4,11 +4,14 @@ import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.collect.Lists;
 import com.jeeplus.core.query.QueryWrapperGenerator;
 import com.jeeplus.finance.invoice.util.FlowTaskUtil;
@@ -24,6 +27,7 @@ import com.jeeplus.finance.workClientInfo.service.mapstruct.CwWorkClientBaseWrap
 import com.jeeplus.finance.workClientInfo.service.mapstruct.CwWorkClientBillingWrapper;
 import com.jeeplus.finance.workClientInfo.service.mapstruct.CwWorkClientContactWrapper;
 import com.jeeplus.finance.workClientInfo.service.mapstruct.CwWorkClientTypeWrapper;
+import com.jeeplus.flowable.feign.IFlowableApi;
 import com.jeeplus.pubmodules.oss.service.OssService;
 import com.jeeplus.pubmodules.serialNumTpl.service.SerialnumTplService;
 import com.jeeplus.sys.domain.User;
@@ -31,6 +35,7 @@ import com.jeeplus.sys.mapper.UserMapper;
 import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.sys.utils.UserUtils;
 import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -70,6 +75,9 @@ public class CwWorkClientService extends ServiceImpl<CwWorkClientBaseMapper, CwW
     @Resource
     private UserMapper userMapper;
 
+    @Autowired
+    private IFlowableApi iFlowableApi;
+
 
     public IPage<CwWorkClientBaseDTO> findList(Page<CwWorkClientBaseDTO> page, CwWorkClientBaseDTO cwWorkClientBaseDTO) throws Exception{
         QueryWrapper<CwWorkClientBase> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( CwWorkClientBaseWrapper.INSTANCE.toEntity(cwWorkClientBaseDTO), CwWorkClientBase.class );
@@ -115,9 +123,10 @@ public class CwWorkClientService extends ServiceImpl<CwWorkClientBaseMapper, CwW
         IPage<CwWorkClientBaseDTO> list = cwWorkClientBaseMapper.findList(page, queryWrapper);
         List<CwWorkClientBaseDTO> records = list.getRecords();
         //处理数据
-        FlowTaskUtil util = new FlowTaskUtil();
-//先注释        List<CwWorkClientBaseDTO> cwWorkClientBaseDTOS = util.taskDispose(records);
-//        list.setRecords(cwWorkClientBaseDTOS);
+        String data = JSON.toJSONString((records));
+        String datas = iFlowableApi.taskDispose(data);
+        List<CwWorkClientBaseDTO> cwWorkClientBaseDTOS = JSON.parseObject(datas, new TypeReference<List<CwWorkClientBaseDTO>>() {});
+        list.setRecords(cwWorkClientBaseDTOS);
         return list;
     }
 

+ 28 - 6
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableTaskController.java

@@ -22,6 +22,7 @@ import com.jeeplus.flowable.vo.ProcessVo;
 import com.jeeplus.mail.feign.IMailApi;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.UserDTO;
+import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.annotations.Param;
 import org.flowable.bpmn.model.BpmnModel;
@@ -35,6 +36,7 @@ import org.flowable.engine.TaskService;
 import org.flowable.engine.runtime.ProcessInstance;
 import org.flowable.task.api.Task;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cloud.openfeign.SpringQueryMap;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.*;
 
@@ -529,17 +531,18 @@ public class FlowableTaskController {
      * @param procInsId 流程实例
      */
     @GetMapping("historicTaskList2")
-    public List <Flow> historicTaskList2(String procInsId) throws Exception {
-        return flowTaskService.historicTaskList(procInsId);
+    public Map historicTaskList2(String procInsId) throws Exception {
+        return flowTaskService.historicTaskList2(procInsId);
     }
 
     /**
-     * 已经签收或者等待签收的任务
+     * 获取流转历史任务列表
      *
+     * @param procInsId 流程实例
      */
-    @GetMapping("getRecords")
-    public List <Task> getRecords() throws Exception {
-        return flowTaskService.getRecords();
+    @GetMapping("historicTaskList3")
+    public Map historicTaskList3(String procInsId) throws Exception {
+        return flowTaskService.historicTaskList3(procInsId);
     }
 
     /**
@@ -580,4 +583,23 @@ public class FlowableTaskController {
         flowTaskService.auditSave(flow,vars);
 
     }
+
+    @ApiOperation(value = "新增")
+    @GetMapping("/add")
+    public String add(Map<String ,String > map) throws Exception{
+        String taskId = map.get("taskId");
+        String title = map.get("title");
+        String defId = map.get("defId");
+        String taskName = map.get("taskName");
+        String createUser = map.get("createUser");
+        String createTime = map.get("createTime");
+        String noticeName = map.get("noticeName");
+        String noticeId = map.get("noticeId");
+        return noticeServicel.add(taskId, title, defId, taskName, createUser, createTime, noticeName, noticeId);
+    }
+
+    @RequestMapping(value = "/flowable/task/taskDispose", method = RequestMethod.POST)
+    public String taskDispose(@RequestBody String data) {
+        return flowTaskService.taskDispose(data);
+    }
 }

+ 283 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/model/CwWorkClientBaseDtoTest.java

@@ -0,0 +1,283 @@
+package com.jeeplus.flowable.model;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 财务-客户信息管理-客户基本信息
+ * @author: 王强
+ * @create: 2023-07-06 15:00
+ **/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class CwWorkClientBaseDtoTest extends BaseDTO {
+
+    public static final String BIZ_CODE = "11";
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 客户编号
+     */
+    @Excel(name = "客户编号",width = 25,orderNum = "1")
+    private String no;
+
+    /**
+     * 客户名称
+     */
+    @Excel(name = "客户名称",width = 30,orderNum = "0")
+    private String name;
+
+    /**
+     * 客户简称
+     */
+    private String abbreviation;
+
+    /**
+     * 英文名称
+     */
+    @Excel(name = "英文名称",width = 25,orderNum = "4")
+    private String englishName;
+
+    /**
+     * 客户类型
+     */
+    @Excel(name = "客户类型",width = 25,orderNum = "2")
+    private String type;
+
+    /**
+     * 统一社会信用代码
+     */
+    @Excel(name = "统一社会信用代码",width = 25,orderNum = "3")
+    private String uscCode;
+
+    /**
+     * 特殊客户类型
+     */
+    private String scType;
+
+    /**
+     * 管理级次分类
+     */
+    private String manageLevelType;
+
+    /**
+     * 上一级公司
+     */
+    private String oneUpCompany;
+
+    /**
+     * 上一级公司名称
+     */
+    private String oneUpCompanyName;
+
+    /**
+     * 公司级次
+     */
+    private String companyLevel;
+
+    /**
+     * 经营范围
+     */
+    private String businessScope;
+
+    /**
+     * 主要职责
+     */
+    private String keyResponsibilities;
+
+    /**
+     * 所属行业
+     */
+    @Excel(name = "所属行业",width = 25,orderNum = "5")
+    private String industry;
+
+    /**
+     * 企业隶属关系划分
+     */
+    @Excel(name = "企业隶属关系划分",width = 25,orderNum = "7")
+    private String affiliation;
+
+    /**
+     * 按组织类型分类
+     */
+    private String organizationType;
+
+    /**
+     * 客户报备类型
+     */
+//    @Excel(name = "客户报备类型",width = 25,orderNum = "10")
+    private String reportType;
+
+    /**
+     * 上级部门
+     */
+    private String oneUpOffice;
+
+    /**
+     * 登记证书号码
+     */
+    private String registrationCert;
+
+    /**
+     * 批准机构
+     */
+    private String approvingBodies;
+
+    /**
+     * 所属部门
+     */
+    private String officeId;
+
+    /**
+     * 流程id
+     */
+    private String procInsId;
+
+    /**
+     * 流程信息
+     */
+    private String processDefinitionId;
+
+    /**
+     * 状态
+     */
+    @Excel(name = "修改申请状态",width = 25,orderNum = "14")
+    private String status;
+
+    /**
+     * 审核通过时间
+     */
+    private Date agreeDate;
+
+    /**
+     * 审核人
+     */
+    private String agreeUserId;
+
+    /**
+     * 客户类型
+     */
+    private CwWorkClientTypeDTOTest cwWorkClientTypeDTO;
+
+    /**
+     * 开票信息
+     */
+    private List<CwWorkClientBillingDTOTest> cwWorkClientBillingDTOList;
+
+    /**
+     * 联系人信息
+     */
+    private List<CwWorkClientContactDTOTest> cwWorkClientContactDTOList;
+
+    /**
+     * 附件
+     */
+    private List<WorkAttachmentDtoTest> workAttachmentDtoList;
+
+    /**
+     * 创建时间
+     */
+    private String[] createDates;
+
+    /**
+     * 项目id
+     */
+    private String projectId;
+
+    /**
+     * 是否上市
+     */
+    @Excel(name = "是否上市",width = 25,orderNum = "6")
+    private String isListed;
+
+    /**
+     * 按所有制性质分类
+     */
+    @Excel(name = "按所有制性质分类",width = 25,orderNum = "8")
+    private String ownershipType;
+
+    /**
+     * 按最终地位分类
+     */
+    @Excel(name = "按最终地位分类",width = 25,orderNum = "9")
+    private String finalStatusType;
+
+    /**
+     * 创建人
+     */
+    @Excel(name = "创建人",width = 25,orderNum = "11")
+    private String createName;
+
+    /**
+     * 创建时间
+     */
+    @Excel(name = "创建时间",exportFormat = "yyyy-MM-dd HH:mm:ss",width = 25,orderNum = "12")
+    private Date createDateT;
+
+    /**
+     * 地址
+     */
+    private String address;
+
+    /**
+     * 联系电话
+     */
+    private String mobile;
+
+    /**
+     * 是否有社会统一信用代码
+     */
+    private String isUscCode;
+
+    /**
+     * 管理级次分类名称
+     */
+    private String manageLevelTypeName;
+
+    /**
+     * 按组织类型分类名称
+     */
+    private String organizationTypeName;
+
+    /**
+     * 修改申请临时表id
+     */
+    private String updateRequestId;
+
+    /**
+     * 拥有人id
+     */
+    private String updateUser;
+
+    /**
+     * 拥有人姓名
+     */
+    @Excel(name = "拥有人",width = 25,orderNum = "13")
+    private String updateUserName;
+
+    /**
+     * 当前修改申请人id
+     */
+    private String requestUserId;
+
+    /**
+     * 值为 “1”,则查询客户status为 0 或 5 的数据
+     */
+    private String isTrue;
+
+    /**
+     * 数据审核人
+     */
+    private List<String> auditUserIds;
+
+    private static final long serialVersionUID = 1L;
+}

+ 59 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/model/CwWorkClientBillingDTOTest.java

@@ -0,0 +1,59 @@
+package com.jeeplus.flowable.model;
+
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+
+/**
+ * 财务-客户信息管理-开票信息
+ * @TableName cw_work_client_billing
+ */
+@Data
+public class CwWorkClientBillingDTOTest extends BaseDTO {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 客户id
+     */
+    private String clientId;
+
+    /**
+     * 是否有纳税人识别号
+     */
+    private String isTaxpayerIdentificationNo;
+
+    /**
+     * 纳税人识别号
+     */
+    private String taxpayerIdentificationNo;
+
+    /**
+     * 开户行
+     */
+    private String accountHolder;
+
+    /**
+     * 银行账号
+     */
+    private String account;
+
+    /**
+     * 电话
+     */
+    private String phone;
+
+    /**
+     * 地址
+     */
+    private String address;
+
+    /**
+     * 公司名称
+     */
+    private String companyName;
+
+    private static final long serialVersionUID = 1L;
+}

+ 74 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/model/CwWorkClientContactDTOTest.java

@@ -0,0 +1,74 @@
+package com.jeeplus.flowable.model;
+
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+
+/**
+ * 财务-客户信息管理-客户联系人
+ * @TableName cw_work_client_contact
+ */
+@Data
+public class CwWorkClientContactDTOTest extends BaseDTO {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 客户id
+     */
+    private String clientId;
+
+    /**
+     * 姓名
+     */
+    private String name;
+
+    /**
+     * 性别
+     */
+    private String sex;
+
+    /**
+     * 部门
+     */
+    private String officeId;
+
+    /**
+     * 职务
+     */
+    private String position;
+
+    /**
+     * 联系方式1
+     */
+    private String contactFirst;
+
+    /**
+     * 联系方式2
+     */
+    private String contactSecond;
+
+    /**
+     * 传真
+     */
+    private String fax;
+
+    /**
+     * 邮箱
+     */
+    private String email;
+
+    /**
+     * 项目id
+     */
+    private String projectId;
+
+    /**
+     * 合同id
+     */
+    private String contractId;
+
+    private static final long serialVersionUID = 1L;
+}

+ 134 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/model/CwWorkClientTypeDTOTest.java

@@ -0,0 +1,134 @@
+package com.jeeplus.flowable.model;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.core.service.dto.BaseDTO;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * 财务-客户信息管理-客户分类
+ * @TableName cw_work_client_type
+ */
+@Data
+public class CwWorkClientTypeDTOTest extends BaseDTO {
+
+    /**
+     * 备注信息
+     */
+    private String remarks;
+
+    /**
+     * 客户id
+     */
+    private String clientId;
+
+    /**
+     * 是否上市
+     */
+    private String isListed;
+
+    /**
+     * 上市类型
+     */
+    private String listedType;
+
+    /**
+     * 独资或控股公司数
+     */
+    private String holdingCompNum;
+
+    /**
+     * 控股上市公司数
+     */
+    private String holdingListedCompNum;
+
+    /**
+     * 股票代码
+     */
+    private String stockSymbol;
+
+    /**
+     * 股票简称
+     */
+    private String stockAbbreviation;
+
+    /**
+     * 发行日期
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date releaseDate;
+
+    /**
+     * 上市日期
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date listedDate;
+
+    /**
+     * 证券市场
+     */
+    private String securitiesMarket;
+
+    /**
+     * 控股自然人姓名
+     */
+    private String controlNaturalPerson;
+
+    /**
+     * 首次发行签字注师1
+     */
+    private String signatory1;
+
+    /**
+     * 首次发行签字注师2
+     */
+    private String signatory2;
+
+    /**
+     * 首次承接业务日期
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date undertakeBusinessDate;
+
+    /**
+     * 是否变更事务所
+     */
+    private String isChangeFirm;
+
+    /**
+     * 前任事务所
+     */
+    private String formerFirm;
+
+    /**
+     * 事务所变更原因
+     */
+    private String firmChangeCause;
+
+    /**
+     * 按所有制性质分类
+     */
+    private String ownershipType;
+
+    /**
+     * 按监管要求分类
+     */
+    private String supervisionRequestType;
+
+    /**
+     * 按最终地位分类
+     */
+    private String finalStatusType;
+
+    /**
+     * 主管税务机关
+     */
+    private String taxAuthorities;
+
+    private static final long serialVersionUID = 1L;
+}

+ 1 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/model/Flow.java

@@ -58,6 +58,7 @@ public class Flow {
 
     private String assignee; // 任务执行人编号
     private String assigneeName; // 任务执行人名称
+    private String assigneeId; // 任务执行人Id
 
     private Variable vars;        // 流程变量
 

+ 20 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/model/WorkAttachmentDtoTest.java

@@ -0,0 +1,20 @@
+package com.jeeplus.flowable.model;
+
+import com.jeeplus.core.service.dto.BaseDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import lombok.Data;
+
+@Data
+public class WorkAttachmentDtoTest extends BaseDTO {
+
+    private String name;
+
+    private String size;
+
+    private String url;
+
+    private UserDTO createBy;
+
+    private String by;
+
+}

+ 238 - 2
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowTaskService.java

@@ -5,6 +5,8 @@ package com.jeeplus.flowable.service;
 
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.TypeReference;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -14,6 +16,7 @@ import com.jeeplus.flowable.common.cmd.BackUserTaskCmd;
 import com.jeeplus.flowable.constant.FlowableConstant;
 import com.jeeplus.flowable.mapper.FlowMapper;
 import com.jeeplus.flowable.model.ActRuTaskInfo;
+import com.jeeplus.flowable.model.CwWorkClientBaseDtoTest;
 import com.jeeplus.flowable.model.Flow;
 import com.jeeplus.flowable.model.TaskComment;
 import com.jeeplus.flowable.service.converter.json.FlowModelService;
@@ -24,6 +27,7 @@ import com.jeeplus.sys.feign.ITenantApi;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.UserDTO;
 import com.jeeplus.sys.utils.UserUtils;
+import liquibase.pro.packaged.S;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.flowable.bpmn.constants.BpmnXMLConstants;
@@ -53,9 +57,13 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.sql.ResultSet;
 import java.sql.SQLException;
+import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.stream.Collectors;
 
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
 /**
  * 流程定义相关Service
  *
@@ -94,15 +102,243 @@ public class FlowTaskService {
     @Autowired
     private ITenantApi tenantApi;
 
+    /**
+     * 获取流转历史任务列表
+     *
+     * @param procInsId 流程实例
+     */
+    public Map historicTaskList2(String procInsId) throws Exception {
+        List<Flow> actList = Lists.newArrayList ();
+        List<HistoricActivityInstance> list = Lists.newArrayList ();
+        List<HistoricActivityInstance> historicActivityInstances2 = historyService.createHistoricActivityInstanceQuery ().processInstanceId (procInsId)
+                .orderByHistoricActivityInstanceStartTime ().asc ().orderByHistoricActivityInstanceEndTime ().asc ().list ();
+        for (HistoricActivityInstance historicActivityInstance : historicActivityInstances2) {
+            if (historicActivityInstance.getEndTime () != null) {
+                list.add (historicActivityInstance);
+            }
+        }
+
+        for (HistoricActivityInstance historicActivityInstance : historicActivityInstances2) {
+            if (historicActivityInstance.getEndTime () == null) {
+                list.add (historicActivityInstance);
+            }
+        }
+
+        for (int i = 0; i < list.size (); i++) {
+            HistoricActivityInstance histIns = list.get (i);
+            // 只显示开始节点和结束节点,并且执行人不为空的任务
+            if (StrUtil.isNotBlank (histIns.getAssignee ())
+                    && historyService.createHistoricTaskInstanceQuery ().taskId (histIns.getTaskId ()).count () != 0
+                    || BpmnXMLConstants.ELEMENT_TASK_USER.equals (histIns.getActivityType ()) && histIns.getEndTime () == null
+                    || BpmnXMLConstants.ELEMENT_EVENT_START.equals (histIns.getActivityType ())
+                    || BpmnXMLConstants.ELEMENT_EVENT_END.equals (histIns.getActivityType ())) {
+                // 获取流程发起人名称
+                Flow e = queryTaskState (histIns);
+
+                actList.add (e);
+            }
+        }
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
+        Map data = new HashMap();
+        for (Flow flow : actList) {
+            HistoricActivityInstance histIns = flow.getHistIns();
+            if(StringUtils.isNotBlank(histIns.getActivityName())){
+
+                switch (histIns.getActivityName()){
+                    case "开始":
+                        if(StringUtils.isNotBlank(flow.getAssigneeName())){
+                            data.put("firstAuditName",flow.getAssigneeName());
+                            data.put("giveName",flow.getAssigneeName());
+                        }else{
+                            data.put("firstAuditName","");
+                        }
+                        if(null != histIns.getEndTime()){
+                            data.put("firstAuditDate",sdf.format(histIns.getEndTime()));
+                        }else{
+                            data.put("firstAuditDate","    年  月  日");
+                        }
+                        break;
+                    case "二级复核":
+                        if(null != flow.getComment() && "success".equals(flow.getComment().getLevel())){
+                            if(StringUtils.isNotBlank(flow.getAssigneeName())){
+                                data.put("secondAuditName",flow.getAssigneeName());
+                            }else{
+                                data.put("secondAuditName","");
+                            }
+                            if(null != histIns.getEndTime()){
+                                data.put("secondAuditDate",sdf.format(histIns.getEndTime()));
+                            }else{
+                                data.put("secondAuditDate","    年  月  日");
+                            }
+                        }
+                        break;
+                    case "三级复核":
+                        if(null != flow.getComment() && "success".equals(flow.getComment().getLevel())){
+                            if(StringUtils.isNotBlank(flow.getAssigneeName())){
+                                UserDTO userDTO = UserUtils.getByName("潘中");
+                                if(null != userDTO && StringUtils.isNotBlank(userDTO.getName())){
+                                    data.put("thirdlyAuditName",userDTO.getName());
+                                }else{
+                                    data.put("thirdlyAuditName","");
+                                }
+                            }else{
+                                data.put("thirdlyAuditName","");
+                            }
+                            if(null != histIns.getEndTime()){
+                                data.put("thirdlyAuditDate",sdf.format(histIns.getEndTime()));
+                            }else{
+                                data.put("thirdlyAuditDate","    年  月  日");
+                            }
+                        }
+                        break;
+                }
+            }
+        }
+
+        return data;
+    }
+
+    /**
+     * 获取流转历史任务列表
+     *
+     * @param procInsId 流程实例
+     */
+    public Map historicTaskList3(String procInsId) throws Exception {
+        List<Flow> actList = Lists.newArrayList ();
+        List<HistoricActivityInstance> list = Lists.newArrayList ();
+        List<HistoricActivityInstance> historicActivityInstances2 = historyService.createHistoricActivityInstanceQuery ().processInstanceId (procInsId)
+                .orderByHistoricActivityInstanceStartTime ().asc ().orderByHistoricActivityInstanceEndTime ().asc ().list ();
+        for (HistoricActivityInstance historicActivityInstance : historicActivityInstances2) {
+            if (historicActivityInstance.getEndTime () != null) {
+                list.add (historicActivityInstance);
+            }
+        }
+
+        for (HistoricActivityInstance historicActivityInstance : historicActivityInstances2) {
+            if (historicActivityInstance.getEndTime () == null) {
+                list.add (historicActivityInstance);
+            }
+        }
+
+        for (int i = 0; i < list.size (); i++) {
+            HistoricActivityInstance histIns = list.get (i);
+            // 只显示开始节点和结束节点,并且执行人不为空的任务
+            if (StrUtil.isNotBlank (histIns.getAssignee ())
+                    && historyService.createHistoricTaskInstanceQuery ().taskId (histIns.getTaskId ()).count () != 0
+                    || BpmnXMLConstants.ELEMENT_TASK_USER.equals (histIns.getActivityType ()) && histIns.getEndTime () == null
+                    || BpmnXMLConstants.ELEMENT_EVENT_START.equals (histIns.getActivityType ())
+                    || BpmnXMLConstants.ELEMENT_EVENT_END.equals (histIns.getActivityType ())) {
+                // 获取流程发起人名称
+                Flow e = queryTaskState (histIns);
+
+                actList.add (e);
+            }
+        }
+        Map data = new HashMap();
+
+        for (Flow flow : actList) {
+            HistoricActivityInstance histIns = flow.getHistIns();
+            if(StringUtils.isNotBlank(histIns.getActivityName())){
+
+                switch (histIns.getActivityName()){
+                    case "归档员审核":
+                        if(null != flow.getComment() && "success".equals(flow.getComment().getLevel())){
+                            if(StringUtils.isNotBlank(flow.getAssigneeName())){
+                                data.put("archiveName",flow.getAssigneeName());
+                            }else{
+                                data.put("archiveName","");
+                            }
+                        }
+                        break;
+                }
+            }
+        }
+
+        return data;
+    }
+
+    public String taskDispose(String data) {
+        List<CwWorkClientBaseDtoTest> list = JSON.parseObject(data, new TypeReference<List<CwWorkClientBaseDtoTest>>() {});
 
-    public List <Task> getRecords() {
         String userId = UserUtils.getCurrentUserDTO ().getId ();
         // =============== 已经签收或者等待签收的任务  ===============
         TaskQuery todoTaskQuery = taskService.createTaskQuery ().taskCandidateOrAssigned (userId).active ()
                 .includeProcessVariables ().orderByTaskCreateTime ().desc ();
 
         List <Task> todoList = todoTaskQuery.list ( );
-        return todoList;
+
+        Method procInsIdMethod = null;
+        Method processDefinitionIdMethod = null;
+        Method statusMethod = null;
+        for (CwWorkClientBaseDtoTest info : list ) {
+            Class<? extends Object> tClass = info.getClass();
+            //得到所有属性
+            Field[] fields = tClass.getDeclaredFields();
+            Class<? extends Object> superClass = tClass.getSuperclass();
+            //得到所有属性
+            Field[] superField = superClass.getDeclaredFields();
+            Field[] field = concat(fields,superField);
+
+            for (Task taskInfo : todoList) {
+                Integer taskIdInteger = null;
+                try {
+                    for (Integer i=0; i<field.length; i++ ){
+                        //获取属性的名字
+                        String name = field[i].getName();
+                        //将属性名字的首字母大写
+                        name = name.replaceFirst(name.substring(0, 1), name.substring(0, 1).toUpperCase());
+
+                        if("ProcInsId".equals(name)){
+                            field[i].setAccessible(true);
+                            //整合出 getId() 属性这个方法
+                            procInsIdMethod = tClass.getMethod("get"+name);
+
+                        }else if("ProcessDefinitionId".equals(name)){
+                            field[i].setAccessible(true);
+                            //整合出 getId() 属性这个方法
+                            processDefinitionIdMethod = tClass.getMethod("get"+name);
+
+                        }else if("Status".equals(name)){
+                            field[i].setAccessible(true);
+                            //整合出 getId() 属性这个方法
+                            statusMethod = tClass.getMethod("get"+name);
+
+                        }else if("TaskId".equals(name)){
+                            field[i].setAccessible(true);
+                            //整合出 getId() 属性这个方法
+                            taskIdInteger = i;
+
+                        }
+                    }
+
+                    //调用这个整合出来的get方法,强转成自己需要的类型
+                    String procInsId = (String)procInsIdMethod.invoke(info);
+                    String processDefinitionId = (String)processDefinitionIdMethod.invoke(info);
+                    String status = (String)statusMethod.invoke(info);
+
+                    if(procInsId.equals(taskInfo.getProcessInstanceId()) && processDefinitionId.equals(taskInfo.getProcessDefinitionId()) && "4".equals(status)){
+                        field[taskIdInteger].set(info,taskInfo.getId());
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return JSON.toJSONString(list);
+    }
+
+    /**
+     * 数据整合方法
+     * @param a
+     * @param b
+     * @return
+     */
+    static Field[] concat(Field[] a, Field[] b) {
+
+        Field[] c= new Field[a.length+b.length];
+        System.arraycopy(a, 0, c, 0, a.length);
+        System.arraycopy(b, 0, c, a.length, b.length);
+        return c;
     }
 
     public String getTaskIdByprocInstId(String procInsId){

+ 16 - 4
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java

@@ -40,10 +40,7 @@ import org.springframework.web.multipart.MultipartFile;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * 用户Controller
@@ -152,6 +149,21 @@ public class UserController {
         return ResponseEntity.ok ( result );
     }
 
+    /**
+     * 保存人员执业资质
+     *
+     * @param userDTO
+     * @return
+     */
+    @DemoMode
+    @ApiLog("保存人员执业资质")
+    @PreAuthorize("hasAnyAuthority('sys:user:add', 'sys:user:edit')")
+    @ApiOperation(value = "保存人员执业资质")
+    @PostMapping("saveCertList")
+    public ResponseEntity saveCertList(@Valid @RequestBody UserDTO userDTO) {
+        userService.saveCertList(userDTO);
+        return ResponseEntity.ok ( "保存成功!" );
+    }
 
     /**
      * 保存用户

+ 14 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/CertMapper.java

@@ -0,0 +1,14 @@
+package com.jeeplus.sys.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.sys.domain.Cert;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface CertMapper extends BaseMapper<Cert> {
+
+}
+
+
+
+

+ 3 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java

@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.sys.domain.User;
+import com.jeeplus.sys.service.dto.CertDTO;
 import com.jeeplus.sys.service.dto.OfficeDTO;
 import com.jeeplus.sys.service.dto.UserDTO;
 import org.apache.ibatis.annotations.Param;
@@ -60,6 +61,8 @@ public interface UserMapper extends BaseMapper <User> {
     @InterceptorIgnore(tenantLine = "true")
     UserDTO getFlowAbleById(@Param(Constants.WRAPPER) Wrapper queryWrapper);
 
+    List<CertDTO> getCertListByUserId();
+
     @InterceptorIgnore(tenantLine = "true")
     int updateById(@Param("et") User entity);
 

+ 46 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/CertMapper.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.sys.mapper.CertMapper">
+
+    <resultMap id="BaseResultMap" type="com.jeeplus.sys.service.dto.CertDTO">
+            <id property="id" column="id" jdbcType="VARCHAR"/>
+            <result property="createBy.id" column="create_by_id" jdbcType="VARCHAR"/>
+            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+            <result property="updateBy.id" column="update_by_id" jdbcType="VARCHAR"/>
+            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
+            <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
+            <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
+            <result property="userId" column="user_id" jdbcType="VARCHAR"/>
+            <result property="type" column="type" jdbcType="VARCHAR"/>
+            <result property="no" column="no" jdbcType="VARCHAR"/>
+            <result property="authorities" column="authorities" jdbcType="VARCHAR"/>
+            <result property="issuedDate" column="issued_date" jdbcType="TIMESTAMP"/>
+            <result property="enrollDate" column="enroll_date" jdbcType="TIMESTAMP"/>
+            <result property="expireDate" column="expire_date" jdbcType="TIMESTAMP"/>
+            <result property="enrollCertNo" column="enroll_cert_no" jdbcType="VARCHAR"/>
+            <result property="profession" column="profession" jdbcType="VARCHAR"/>
+            <result property="fileUrl" column="file_url" jdbcType="VARCHAR"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        cert.id,
+        cert.create_by_id,
+        cert.create_time,
+        cert.update_by_id,
+        cert.update_time,
+        cert.del_flag,
+        cert.remarks,
+        cert.user_id,
+        cert.type,
+        cert.no,
+        cert.authorities,
+        cert.issued_date,
+        cert.enroll_date,
+        cert.expire_date,
+        cert.enroll_cert_no,
+        cert.profession,
+        cert.file_url
+    </sql>
+</mapper>

+ 27 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml

@@ -35,6 +35,7 @@
             <result property="name" column="postDTO.name"/>
             <result property="code" column="postDTO.code"/>
         </collection>
+        <collection property="certDTOList" ofType="com.jeeplus.sys.service.dto.CertDTO" column="id" select="getCertListByUserId"></collection>
     </resultMap>
 
     <sql id="userColumns">
@@ -69,11 +70,37 @@
     	o.parent_ids AS "officeDTO.parentIds"
     </sql>
 
+    <sql id="Cert_Column_List">
+        cert.id,
+        cert.create_by_id,
+        cert.create_time,
+        cert.update_by_id,
+        cert.update_time,
+        cert.del_flag,
+        cert.remarks,
+        cert.user_id,
+        cert.type,
+        cert.no,
+        cert.authorities,
+        cert.issued_date,
+        cert.enroll_date,
+        cert.expire_date,
+        cert.enroll_cert_no,
+        cert.profession,
+        cert.file_url
+    </sql>
+
     <sql id="userJoins">
         LEFT JOIN sys_office c ON c.id = a.company_id
 		LEFT JOIN sys_office o ON o.id = a.office_id
     </sql>
 
+    <select id="getCertListByUserId" resultType="com.jeeplus.sys.service.dto.CertDTO">
+        select
+        <include refid="Cert_Column_List"></include>
+        from sys_cert cert
+        where cert.del_flag = '0' and cert.user_id = #{id}
+    </select>
 
     <!-- 获得用户 -->
     <select id="get" resultMap="userResult">

+ 22 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/CertService.java

@@ -0,0 +1,22 @@
+/**
+ * Copyright &copy; 2021-2026 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.jeeplus.sys.domain.Cert;
+import com.jeeplus.sys.mapper.CertMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 人员执业资格证书管理
+ */
+@Service
+@Transactional
+public class CertService extends ServiceImpl<CertMapper, Cert> {
+
+	@Autowired
+	private CertMapper certMapper;
+}

+ 37 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java

@@ -4,6 +4,7 @@
 package com.jeeplus.sys.service;
 
 import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -12,13 +13,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jeeplus.common.constant.CacheNames;
 import com.jeeplus.common.constant.CommonConstants;
 import com.jeeplus.common.redis.RedisUtils;
+import com.jeeplus.sys.domain.Cert;
 import com.jeeplus.sys.domain.Office;
 import com.jeeplus.sys.domain.SysConfig;
 import com.jeeplus.sys.domain.User;
 import com.jeeplus.sys.mapper.OfficeMapper;
 import com.jeeplus.sys.mapper.UserMapper;
+import com.jeeplus.sys.service.dto.CertDTO;
 import com.jeeplus.sys.service.dto.OfficeDTO;
 import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.service.mapstruct.CertWrapper;
 import com.jeeplus.sys.service.mapstruct.UserWrapper;
 import com.jeeplus.sys.utils.UserUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -53,6 +57,39 @@ public class UserService extends ServiceImpl <UserMapper, User> {
     @Autowired
     private SysConfigService sysConfigService;
 
+    @Autowired
+    private CertService certService;
+
+    public List<CertDTO> getCertListByUserId(){
+        return userMapper.getCertListByUserId();
+    }
+
+    //	保存人员执业资质
+    public void saveCertList(UserDTO userDTO) {
+        if (ObjectUtil.isNotEmpty(userDTO)) {
+            if (CollectionUtil.isNotEmpty(userDTO.getCertDTOList())) {
+                List<String> ids = userDTO.getCertDTOList().stream().filter(item -> {
+                    if (StringUtils.isNotBlank(item.getId())) {
+                        return true;
+                    }
+                    return false;
+                }).map(CertDTO::getId).collect(Collectors.toList());
+                if (CollectionUtil.isNotEmpty(ids)) {
+                    certService.remove(new QueryWrapper<Cert>().lambda().eq(Cert::getUserId,userDTO.getId()).notIn(Cert::getId,ids));
+                }else{
+                    certService.remove(new QueryWrapper<Cert>().lambda().eq(Cert::getUserId,userDTO.getId()));
+                }
+                userDTO.getCertDTOList().stream().forEach(item->{
+                    Cert cert = CertWrapper.INSTANCE.toEntity(item);
+                    cert.setUserId(userDTO.getId());
+                    certService.saveOrUpdate(cert);
+                });
+            } else {
+                certService.remove(new QueryWrapper<Cert>().lambda().eq(Cert::getUserId,userDTO.getId()));
+            }
+        }
+    }
+
 
     /**
      * 根据角色英文名称查询角色下人员信息

+ 13 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/mapstruct/CertWrapper.java

@@ -0,0 +1,13 @@
+package com.jeeplus.sys.service.mapstruct;
+
+import com.jeeplus.core.mapstruct.EntityWrapper;
+import com.jeeplus.sys.domain.Cert;
+import com.jeeplus.sys.service.dto.CertDTO;
+import org.mapstruct.Mapper;
+import org.mapstruct.ReportingPolicy;
+import org.mapstruct.factory.Mappers;
+
+@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE, uses = {})
+public interface CertWrapper extends EntityWrapper<CertDTO, Cert> {
+    CertWrapper INSTANCE = Mappers.getMapper(CertWrapper.class);
+}