Browse Source

客户、合同、报告流程修改

lizhenhao 2 years ago
parent
commit
0c160b1e79

+ 20 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/contractRegistration/controller/ContractInfoController.java

@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.common.utils.ResponseUtil;
 import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.flowable.service.FlowTaskService;
+import com.jeeplus.sys.utils.StringUtils;
 import com.jeeplus.test.cw.contractRegistration.domain.ContractInfo;
 import com.jeeplus.test.cw.contractRegistration.service.ContractInfoService;
 import io.swagger.annotations.Api;
@@ -14,6 +16,7 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import javax.annotation.Resource;
 import java.util.List;
 
 /**
@@ -28,6 +31,9 @@ public class ContractInfoController {
     @Autowired
     private ContractInfoService service;
 
+    @Resource
+    private FlowTaskService flowTaskService;
+
     /**
      * 列表查询
      * @param info
@@ -39,6 +45,20 @@ public class ContractInfoController {
     public ResponseEntity<IPage<ContractInfo>> list(ContractInfo info, Page<ContractInfo> page) throws Exception {
         QueryWrapper<ContractInfo> wrapper = QueryWrapperGenerator.buildQueryCondition(info, ContractInfo.class);
         IPage<ContractInfo> list = service.list(page,info,wrapper);
+        list.getRecords().stream().forEach(i -> {
+            // 项目登记
+            if (StringUtils.isNotBlank(i.getTaskId()) && StringUtils.isNotBlank(i.getStatus())) {
+                if ("2".equals(i.getStatus())) { // “审核中”的数据要获取数据审核人
+                    i.setAuditUserIds(flowTaskService.getTaskAuditUsers(i.getTaskId()));  // 获取数据审核人
+                }
+            }
+            // 纸质归档
+            if (StringUtils.isNotBlank(i.getFilePaperTaskId()) && StringUtils.isNotBlank(i.getFiledPaperType())) {
+                if ("2".equals(i.getFiledPaperType())) { // “审核中”的数据要获取数据审核人
+                    i.setAuditUserIdsFP(flowTaskService.getTaskAuditUsers(i.getFilePaperTaskId()));  // 获取数据审核人
+                }
+            }
+        });
         return ResponseEntity.ok(list);
     }
 

+ 18 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/contractRegistration/domain/ContractInfo.java

@@ -213,4 +213,22 @@ public class ContractInfo extends BaseEntity {
      * 合同流水号
      */
     private String contractSerialNumber;
+
+    @TableField(exist = false)
+    private String taskId;
+
+    /**
+     * 数据审核人
+     */
+    @TableField(exist = false)
+    private List<String> auditUserIds;
+
+    @TableField(exist = false)
+    private String filePaperTaskId;
+
+    /**
+     * 数据审核人  纸质归档
+     */
+    @TableField(exist = false)
+    private List<String> auditUserIdsFP;
 }

+ 5 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/contractRegistration/mapper/xml/ContractInfoMapper.xml

@@ -68,7 +68,9 @@
             h.filed_no as filedNo,
             h.confirm_filed_no as confirmFiledNo,
             h.proc_ins_id as taskFiledPaperProcInsId,
-            cw_wcb.name as client_contacts_name
+            cw_wcb.name as client_contacts_name,
+            art.ID_ as task_id,
+            art_fp.ID_ as file_paper_task_id
 		FROM
 			cw_work_contract_info a
             LEFT JOIN cw_work_contract_file b on a.id = b.contract_info_id
@@ -80,6 +82,8 @@
             LEFT JOIN act_ru_task g ON f.proc_ins_id = g.PROC_INST_ID_
             LEFT JOIN cw_work_contract_file_paper h on a.id = h.contract_info_id
             LEFT JOIN cw_work_client_base cw_wcb on a.client_contacts = cw_wcb.id and cw_wcb.del_flag = '0'
+            LEFT JOIN act_ru_task art ON a.proc_ins_id = art.PROC_INST_ID_
+            LEFT JOIN act_ru_task art_fp ON h.proc_ins_id = art_fp.PROC_INST_ID_
 		${ew.customSqlSegment}
 		ORDER BY a.update_date DESC
     </select>

+ 8 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/controller/CwProjectReportController.java

@@ -109,6 +109,14 @@ public class CwProjectReportController {
     public ResponseEntity<IPage<CwProjectReportData>> data(CwProjectReportData projectReportData, Page<CwProjectReportData> page) throws Exception {
         IPage<CwProjectReportData> result = new Page<CwProjectReportData>();
         result = projectReportService.findList (page,projectReportData);
+        result.getRecords().stream().forEach(i -> {
+            // 复核
+            if (StringUtils.isNotBlank(i.getRevTaskId()) && StringUtils.isNotBlank(i.getReviewStatus())) {
+                if ("2".equals(i.getReviewStatus())) { // “审核中”的数据要获取数据审核人
+                    i.setAuditUserIdsRev(flowTaskService.getTaskAuditUsers(i.getRevTaskId()));  // 获取数据审核人
+                }
+            }
+        });
         return ResponseEntity.ok (result);
     }
 

+ 11 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/domain/CwProjectReportData.java

@@ -424,4 +424,15 @@ public class CwProjectReportData extends BaseDTO {
      * 项目经理2name
      */
     private String projectMaster2Name;
+
+    /**
+     * 复核流程taskId
+     */
+    private String revTaskId;
+
+    /**
+     * 数据审核人  报告复核
+     */
+    @TableField(exist = false)
+    private List<String> auditUserIdsRev;
 }

+ 3 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/mapper/xml/CwProjectReportMapper.xml

@@ -82,7 +82,8 @@
         ifnull(cw_rev.review_status,'0') as reviewStatus,
         cw_rev.proc_ins_id as procInsId3,
         new_line.report_no as reportNo,
-        cwcb.name as servedUnitName
+        cwcb.name as servedUnitName,
+        art.ID_ as rev_task_id
         FROM cw_project_report a
         left join cw_project_records b on a.project_id = b.id
         LEFT JOIN sys_office c on a.office_id = c.id
@@ -94,6 +95,7 @@
         LEFT JOIN cw_project_report_signature cw_prs3 on cw_prs3.report_id = a.id and cw_prs3.type = '3' and cw_prs3.del_flag = '0'
         left join cw_project_report_new_line new_line on a.id = new_line.report_id and new_line.del_flag = '0'
         left join cw_project_report_review cw_rev on a.id = cw_rev.report_id and cw_rev.del_flag = '0'
+        left join act_ru_task art ON cw_rev.proc_ins_id = art.PROC_INST_ID_
         left join cw_project_members cpm on b.id = cpm.project_id
         left join sys_user sub on cpm.user_id = sub.id
         left join sys_user_manage_office sumo on sumo.office_id = sub.office_id

+ 11 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/workClientInfo/controller/CwWorkClientController.java

@@ -11,6 +11,7 @@ import com.jeeplus.core.excel.ExcelOptions;
 import com.jeeplus.core.excel.ExportMode;
 import com.jeeplus.core.excel.utils.EasyPoiUtil;
 import com.jeeplus.core.query.QueryWrapperGenerator;
+import com.jeeplus.flowable.service.FlowTaskService;
 import com.jeeplus.sys.constant.enums.LogTypeEnum;
 import com.jeeplus.sys.utils.DictUtils;
 import com.jeeplus.sys.utils.StringUtils;
@@ -55,6 +56,9 @@ public class CwWorkClientController {
     @Resource
     private CwWorkClientService cwWorkClientService;
 
+    @Resource
+    private FlowTaskService flowTaskService;
+
     /**
      * 查询客户信息列表
      * @param cwWorkClientBaseDTO
@@ -68,6 +72,13 @@ public class CwWorkClientController {
     public ResponseEntity<IPage<CwWorkClientBaseDTO>> data(CwWorkClientBaseDTO cwWorkClientBaseDTO, Page<CwWorkClientBaseDTO> page) throws Exception {
         IPage<CwWorkClientBaseDTO> result = new Page<CwWorkClientBaseDTO>();
         result = cwWorkClientService.findList (page,cwWorkClientBaseDTO);
+        result.getRecords().stream().forEach(i -> {
+            if (StringUtils.isNotBlank(i.getTaskId()) && StringUtils.isNotBlank(i.getStatus())) {
+                if ("2".equals(i.getStatus())) { // “审核中”的数据要获取数据审核人
+                    i.setAuditUserIds(flowTaskService.getTaskAuditUsers(i.getTaskId()));  // 获取数据审核人
+                }
+            }
+        });
         return ResponseEntity.ok (result);
     }
 

+ 4 - 1
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/workClientInfo/mapper/xml/CwWorkClientBaseMapper.xml

@@ -52,6 +52,7 @@
             <result property="updateUser" column="update_user" jdbcType="VARCHAR"/>
             <result property="updateUserName" column="update_user_name" jdbcType="VARCHAR"/>
             <result property="requestUserId" column="request_user_id" jdbcType="VARCHAR"/>
+            <result property="taskId" column="task_id" jdbcType="VARCHAR"/>
             <association property="cwWorkClientTypeDTO" column="id" select="getType" javaType="com.jeeplus.test.cw.workClientInfo.service.dto.CwWorkClientTypeDTO"></association>
             <collection property="workAttachmentDtoList" ofType="com.jeeplus.test.workContract.service.dto.WorkAttachmentDto" column="id" select="getFileList"></collection>
             <collection property="cwWorkClientBillingDTOList" ofType="com.jeeplus.test.cw.workClientInfo.service.dto.CwWorkClientBillingDTO" column="id" select="getBilling"></collection>
@@ -236,13 +237,15 @@
         cw_wct.final_status_type as final_status_type,
         cw_mlt.name as manage_level_type_name,
         cw_ot.name as organization_type_name,
-        su1.name as update_user_name
+        su1.name as update_user_name,
+        art.ID_ as task_id
         from cw_work_client_base cw_wcb
         left join sys_user su on su.id = cw_wcb.create_by and su.del_flag = '0'
         left join cw_work_client_type cw_wct on cw_wct.client_id = cw_wcb.id and cw_wct.del_flag = '0'
         left join cw_manage_level_type cw_mlt on cw_mlt.id = cw_wcb.manage_level_type and cw_mlt.del_flag = '0'
         left join cw_organization_type cw_ot on cw_ot.id = cw_wcb.organization_type and cw_ot.del_flag = '0'
         left join sys_user su1 on su1.id = cw_wcb.update_user and su1.del_flag = '0'
+        left join act_ru_task art on cw_wcb.proc_ins_id = art.PROC_INST_ID_
         ${ew.customSqlSegment}
     </select>
 

+ 5 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/workClientInfo/service/dto/CwWorkClientBaseDTO.java

@@ -279,5 +279,10 @@ public class CwWorkClientBaseDTO extends BaseDTO {
      */
     private String isTrue;
 
+    /**
+     * 数据审核人
+     */
+    private List<String> auditUserIds;
+
     private static final long serialVersionUID = 1L;
 }