Forráskód Böngészése

用户离职交接需求调整

huangguoce 4 hónapja
szülő
commit
9f5df66d2f
25 módosított fájl, 1375 hozzáadás és 10 törlés
  1. 71 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportController.java
  2. 11 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportMapper.java
  3. 177 1
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportMapper.xml
  4. 225 2
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java
  5. 14 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/controller/CwProjectReportArchiveController.java
  6. 7 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/mapper/CwProjectReportArchiveMapper.java
  7. 50 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/mapper/xml/CwProjectReportArchiveMapper.xml
  8. 93 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/service/CwProjectReportArchiveService.java
  9. 6 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/service/dto/CwProjectReportArchiveDTO.java
  10. 37 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/controller/CwReimbursementInfoController.java
  11. 6 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/mapper/CwReimbursementInfoMapper.java
  12. 120 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/mapper/xml/CwReimbursementInfoMapper.xml
  13. 99 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/service/CwReimbursementInfoService.java
  14. 16 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApplyArchived/controller/ReportCancellApplyArchivedController.java
  15. 93 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApplyArchived/service/ReportCancellApplyArchivedService.java
  16. 29 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverController.java
  17. 3 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/Handover.java
  18. 37 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverProject.java
  19. 8 1
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverMapper.java
  20. 30 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverProjectMapper.java
  21. 30 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverMapper.xml
  22. 43 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverProjectMapper.xml
  23. 89 0
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverProjectService.java
  24. 80 5
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverService.java
  25. 1 1
      jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/registration/mapper/xml/DepartMapper.xml

+ 71 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportController.java

@@ -30,6 +30,7 @@ import com.jeeplus.finance.projectReport.service.dto.CwProjectReportDTO;
 import com.jeeplus.finance.projectReport.service.dto.CwProjectReportSignatureDTO;
 import com.jeeplus.finance.projectReport.service.dto.NumberReplaceDTO;
 import com.jeeplus.finance.projectReport.service.dto.ProjectReportWorkAttachmentDTO;
+import com.jeeplus.finance.projectReportArchive.service.dto.CwProjectReportArchiveDTO;
 import com.jeeplus.finance.workClientInfo.service.dto.CwWorkClientBaseDTO;
 import com.jeeplus.flowable.feign.IFlowableApi;
 import com.jeeplus.logging.annotation.ApiLog;
@@ -1279,4 +1280,74 @@ public class CwProjectReportController {
         }
     }
 
+    /**
+     * 查询未归档的财务报告信息
+     * @param projectReportData
+     * @param page
+     * @return
+     */
+    @ApiLog("查询未归档的财务报告信息")
+    @PreAuthorize("hasAuthority('cwProjectReport:list')")
+    @GetMapping("findNotCompletedList")
+    public ResponseEntity<IPage<CwProjectReportData>> findNotCompletedList(CwProjectReportData projectReportData, Page<CwProjectReportData> page) throws Exception {
+        IPage<CwProjectReportData> result = new Page<CwProjectReportData>();
+        result = projectReportService.findNotCompletedList (page,projectReportData);
+        result.getRecords().stream().forEach(i -> {
+
+            //当项目经理是跨租户的人员时,则特殊处理
+            if (StringUtils.isBlank(i.getProjectMasterName())){
+                //根据项目经理id去人员表重查数据
+                if (StringUtils.isNotBlank(i.getProjectMasterId())){
+                    UserDTO byId = SpringUtil.getBean(IUserApi.class).getById(i.getProjectMasterId());
+                    if(null != byId)
+                        i.setProjectMasterName(byId.getName());
+                }
+            }
+            if (StringUtils.isBlank(i.getRealHeaderName())){
+                //根据项目经理id去人员表重查数据
+                if (StringUtils.isNotBlank(i.getProjectMasterId2())){
+                    UserDTO byId = SpringUtil.getBean(IUserApi.class).getById(i.getProjectMasterId2());
+                    if(null != byId)
+                        i.setRealHeaderName(byId.getName());
+                }
+
+            }
+
+            // 复核
+            if (StringUtils.isNotBlank(i.getRevTaskId()) && StringUtils.isNotBlank(i.getReviewStatus())) {
+                if ("2".equals(i.getReviewStatus())) { // “审核中”的数据要获取数据审核人
+                    i.setAuditUserIdsRev(flowTaskService.getTaskAuditUsers(i.getRevTaskId()));  // 获取数据审核人
+                }
+            }
+            // 签章
+            if (StringUtils.isNotBlank(i.getSignatureType())) {
+                // 电子章
+                if ("1".equals(i.getSignatureType())) {
+                    if (StringUtils.isNotBlank(i.getSignTaskId1()) && StringUtils.isNotBlank(i.getStatus1())) {
+                        if ("2".equals(i.getStatus1())) { // “审核中”的数据要获取数据审核人
+                            i.setAuditUserIdsSign1(flowTaskService.getTaskAuditUsers(i.getSignTaskId1()));  // 获取数据审核人
+                        }
+                    }
+                }
+                // 公章+执业章
+                if ("2".equals(i.getSignatureType())) {
+                    if (StringUtils.isNotBlank(i.getSignTaskId2()) && StringUtils.isNotBlank(i.getStatus2())) {
+                        if ("2".equals(i.getStatus2())) { // “审核中”的数据要获取数据审核人
+                            i.setAuditUserIdsSign2(flowTaskService.getTaskAuditUsers(i.getSignTaskId2()));  // 获取数据审核人
+                        }
+                    }
+                }
+                // 实体章
+                if ("3".equals(i.getSignatureType())) {
+                    if (StringUtils.isNotBlank(i.getSignTaskId3()) && StringUtils.isNotBlank(i.getStatus3())) {
+                        if ("2".equals(i.getStatus3())) { // “审核中”的数据要获取数据审核人
+                            i.setAuditUserIdsSign3(flowTaskService.getTaskAuditUsers(i.getSignTaskId3()));  // 获取数据审核人
+                        }
+                    }
+                }
+            }
+        });
+        return ResponseEntity.ok (result);
+    }
+
 }

+ 11 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/CwProjectReportMapper.java

@@ -7,6 +7,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.finance.projectReport.domain.*;
+import com.jeeplus.finance.projectReportArchive.service.dto.CwProjectReportArchiveDTO;
 import com.jeeplus.finance.workClientInfo.domain.CwWorkClientBase;
 import com.jeeplus.finance.workClientInfo.service.dto.CwWorkClientBaseDTO;
 import com.jeeplus.sys.domain.WorkAttachmentInfo;
@@ -250,4 +251,14 @@ public interface CwProjectReportMapper extends BaseMapper<CwProjectReport> {
     void updateCompleteInvoice(@Param("id") String id);
 
     CwProjectReportData getByInvoiceNumber(@Param("invoiceNumber")String invoiceNumber,@Param("id") String id);
+
+    /**
+     * 查询近1个月完成的财务报告和所有未完成的财务报告信息
+     * @param queryWrapper
+     * @return
+     */
+    //@InterceptorIgnore(tenantLine = "true")
+    IPage<CwProjectReportData> findNotCompletedList(Page<CwProjectReportData> page, @Param("isBmzr") String isBmzr, @Param("officeIds") String officeIds, @Param(Constants.WRAPPER) QueryWrapper<CwProjectReportData> queryWrapper);
+    IPage<CwProjectReportData> findNotCompletedList2(Page<CwProjectReportData> page,@Param("isBmzr") String isBmzr, @Param("officeIds") String officeIds, @Param(Constants.WRAPPER) QueryWrapper<CwProjectReportData> queryWrapper);
+
 }

+ 177 - 1
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportMapper.xml

@@ -37,6 +37,34 @@
         cw_wcb.agree_user_id
     </sql>
 
+    <sql id="Base_Column_List2">
+        cw_pa.id,
+        cw_pa.create_by_id,
+        cw_pa.create_time,
+        cw_pa.update_by_id,
+        cw_pa.update_time,
+        cw_pa.del_flag,
+        cw_pa.remarks,
+        cw_pa.project_id,
+        cw_pa.name,
+        cw_pa.audited_units,
+        cw_pa.report_num,
+        cw_pa.papers_num,
+        cw_pa.year,
+        cw_pa.number,
+        cw_pa.is_number,
+        cw_pa.audit_date,
+        cw_pa.proc_ins_id,
+        cw_pa.process_definition_id,
+        cw_pa.status,
+        cw_pa.file_number,
+        cw_pa.report_id,
+        cw_pa.report_remarks,
+        cw_pa.audit_money,
+        cw_pa.connect_report_id,
+        cw_pa.borrow_type
+    </sql>
+
     <select id="findList" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
         SELECT
         DISTINCT a.id,
@@ -150,6 +178,8 @@
         ORDER BY a.create_time DESC
     </select>
 
+
+
     <select id="findList2" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
         SELECT
         DISTINCT a.id,
@@ -216,7 +246,6 @@
         ifnull(cw_na.review_status,'0') as applyStatus,
         ifnull(cw_na.take_number_type,'0') as takeNumberType,
         cw_na.improper_take_cause as improperTakeCause,
-
         artar.ID_ as review_task_number_id,
         cw_nra.proc_ins_id as applyReviewProcId,
         cw_nra.process_definition_id as applyReviewProcDefId,
@@ -253,6 +282,153 @@
         ORDER BY cw_rev.review_status = 2 desc, cw_rev.audit_time DESC
     </select>
 
+
+
+    <select id="findNotCompletedList" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
+        SELECT DISTINCT
+        a.id,
+        a.create_by_id AS createById,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.del_flag,
+        a.remarks,
+        a.status,
+        a.document_no,
+        a.project_report_number,
+        a.project_id,
+        a.signature_type,
+        a.office_id,
+        a.real_create,
+        a.proc_ins_id,
+        a.process_definition_id,
+        a.signature_annotator_status,
+        b.project_number AS projectNumber,
+        b.project_name AS projectName,
+        d.name AS userName,
+        COALESCE(cw_rev.review_status, '0') AS reviewStatus,
+        cw_rev.new_type AS newType,
+        cw_rev.audit_time AS auditTime,
+        COALESCE(cw_na.review_status,'0') as applyStatus,
+        new_line.report_no AS reportNo,
+        new_line.report_date,
+        a.industry,
+        a.report_name
+        FROM cw_project_report a
+        LEFT JOIN cw_project_records b ON a.project_id = b.id
+        LEFT JOIN sys_user d ON a.create_by_id = d.id
+        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 cw_project_report_archive cw_pa ON a.id = cw_pa.report_id AND cw_pa.del_flag = '0'
+        LEFT JOIN cw_project_report_number_apply cw_na on  a.id = cw_na.report_id
+        LEFT JOIN cw_work_client_base cwcb ON new_line.served_unit_id = cwcb.id
+            ${ew.customSqlSegment}
+        ORDER BY a.create_time DESC
+    </select>
+
+    <select id="findNotCompletedList2" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
+        SELECT
+            DISTINCT a.id,
+                     a.create_by_id as createById,
+                     a.create_time,
+                     a.update_by_id,
+                     a.update_time,
+                     a.del_flag,
+                     a.remarks,
+                     a.status,
+                     a.document_no,
+                     a.project_report_number,
+                     a.project_id,
+                     a.office_id,
+                     a.signature_type,
+                     a.signature_annotator1,
+                     a.signature_annotator2,
+                     a.signature_contract_id,
+                     a.real_create,
+                     a.proc_ins_id,
+                     a.process_definition_id,
+                     a.signature_annotator_status,
+                     b.project_number as projectNumber,
+                     b.project_name as projectName,
+                     b.project_master_id as projectMasterId,
+                     b.real_header as projectMasterId2,
+                     b.project_classification,
+                     b.report_type as projectType,
+                     c.name as departmentName,
+                     d.name as userName,
+                     ifnull(cw_pa.audit_money,"0") as "auditFees",
+                     e.name as projectMasterName,
+                     b.real_header as projectMaster2Id,
+                     f.name as projectMaster2Name,
+                     cw_prs1.proc_ins_id as proc_ins_id1,
+                     cw_prs1.process_definition_id as process_definition_id1,
+                     cw_prs1.status as status1,
+                     cw_prs1.id as sid1,
+                     cw_prs2.proc_ins_id as proc_ins_id2,
+                     cw_prs2.process_definition_id as process_definition_id2,
+                     cw_prs2.status as status2,
+                     cw_prs2.id as sid2,
+                     cw_prs3.proc_ins_id as proc_ins_ids3,
+                     cw_prs3.process_definition_id as process_definition_id3,
+                     cw_prs3.status as status3,
+                     cw_prs3.id as sid3,
+                     ifnull(cw_rev.review_status,'0') as reviewStatus,
+                     cw_rev.proc_ins_id as procInsId3,
+                     cw_rev.new_type as newType,
+                     cw_rev.audit_time as auditTime,
+                     new_line.report_no as reportNo,
+                     new_line.report_date,
+                     cwcb.name as servedUnitName,
+                     art.ID_ as rev_task_id,
+                     arta.ID_ as rev_task_id2,
+                     art1.ID_ as sign_task_id1,
+                     art2.ID_ as sign_task_id2,
+                     art3.ID_ as sign_task_id3,
+                     a.industry,
+                     a.business_objects,
+                     a.report_name,
+                     cw_na.proc_ins_id as applyProcId,
+                     cw_na.process_definition_id as applyProcDefId,
+                     ifnull(cw_na.review_status,'0') as applyStatus,
+                     ifnull(cw_na.take_number_type,'0') as takeNumberType,
+                     cw_na.improper_take_cause as improperTakeCause,
+
+                     artar.ID_ as review_task_number_id,
+                     cw_nra.proc_ins_id as applyReviewProcId,
+                     cw_nra.process_definition_id as applyReviewProcDefId,
+                     ifnull(cw_nra.review_status,'0') as applyReviewStatus,
+                     cw_ci.contract_name
+        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
+                 LEFT JOIN sys_user d on a.create_by_id = d.id
+                 LEFT JOIN sys_user e on b.project_master_id = e.id
+                 LEFT JOIN sys_user f on b.real_header = f.id
+
+                 LEFT JOIN cw_project_report_signature cw_prs1 on cw_prs1.report_id = a.id and cw_prs1.type = '1' and cw_prs1.del_flag = '0'
+                 LEFT JOIN cw_project_report_signature cw_prs2 on cw_prs2.report_id = a.id and cw_prs2.type = '2' and cw_prs2.del_flag = '0'
+                 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 act_ru_task art1 ON cw_prs1.proc_ins_id = art1.PROC_INST_ID_
+                 left join act_ru_task art2 ON cw_prs2.proc_ins_id = art2.PROC_INST_ID_
+                 left join act_ru_task art3 ON cw_prs3.proc_ins_id = art3.PROC_INST_ID_
+
+                 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 cw_project_report_archive cw_pa on  a.id = cw_pa.report_id and cw_pa.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
+                 left join cw_work_client_base cwcb on new_line.served_unit_id = cwcb.id
+                 LEFT JOIN cw_work_contract_info cw_ci on  b.contract_id=cw_ci.id
+                 LEFT JOIN cw_project_report_number_apply cw_na on  a.id = cw_na.report_id
+                 LEFT JOIN cw_project_report_number_review_apply cw_nra on  a.id = cw_nra.report_id
+                 left join act_ru_task arta ON cw_na.proc_ins_id = arta.PROC_INST_ID_
+                 left join act_ru_task artar ON cw_nra.proc_ins_id = artar.PROC_INST_ID_
+            ${ew.customSqlSegment}
+        ORDER BY cw_rev.review_status = 2 desc, cw_rev.audit_time DESC
+    </select>
+
     <select id="queryById" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
         SELECT
         a.id,

+ 225 - 2
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/service/CwProjectReportService.java

@@ -672,11 +672,11 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                 queryWrapper.le("a.audit_fees", contractAmounts[1]);
             }
         }
-        if (StringUtils.isNotEmpty(projectReportData.getReviewStatus())) {
+        if (StringUtils.isNotEmpty(projectReportData.getReviewStatus()) && !"-1".equals(projectReportData.getReviewStatus())){
             queryWrapper.eq("cw_rev.review_status", projectReportData.getReviewStatus());
         }
         //报告号签章状态
-        if (StringUtils.isNotEmpty(projectReportData.getApplyStatus())) {
+        if (StringUtils.isNotEmpty(projectReportData.getApplyStatus()) && !"-1".equals(projectReportData.getApplyStatus()) ) {
             if("0".equals(projectReportData.getApplyStatus())){
                 queryWrapper.isNull("cw_na.review_status");
                 if(StringUtils.isBlank(projectReportData.getReviewStatus())){
@@ -686,6 +686,15 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
                 queryWrapper.eq("cw_na.review_status", projectReportData.getApplyStatus());
             }
         }
+//        if(StringUtils.isNotEmpty(projectReportData.getApplyStatus()) && StringUtils.isNotEmpty(projectReportData.getReviewStatus())){
+//            if("-1".equals(projectReportData.getApplyStatus()) && "-1".equals(projectReportData.getReviewStatus())){
+//                queryWrapper.and(wrapper ->
+//                        wrapper.ne("cw_na.review_status", "5")
+//                                .or()
+//                                .ne("cw_rev.review_status", "5")
+//                );
+//            }
+//        }
         if (StringUtils.isNotEmpty(projectReportData.getStatus1())) {
             queryWrapper.eq("cw_prs1.status", projectReportData.getStatus1());
         }
@@ -5234,4 +5243,218 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         }
         return false;
     }
+
+
+    /**
+     * 查询近1个月完成的财务报告和所有未完成的财务报告信息
+     * @param projectReportData
+     * @return
+     * @throws Exception
+     */
+    public IPage<CwProjectReportData> findNotCompletedList( Page<CwProjectReportData> page, CwProjectReportData projectReportData) throws Exception{
+        QueryWrapper<CwProjectReportData> queryWrapper = QueryWrapperGenerator.buildQueryCondition (projectReportData,CwProjectReportData.class);
+        queryWrapper.eq("a.del_flag","0");
+//        queryWrapper.orderByDesc("a.create_date");
+        //条件
+        if (StringUtils.isNotEmpty(projectReportData.getProjectNumber())) {
+            queryWrapper.like("b.project_number", projectReportData.getProjectNumber());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getProjectName())) {
+            queryWrapper.like("b.project_name", projectReportData.getProjectName());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getReportName())) {
+            queryWrapper.like("a.report_name", projectReportData.getReportName());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getProjectMasterId())) {
+            queryWrapper.eq("b.project_master_id", projectReportData.getProjectMasterId());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getProjectMaster2Id())) {
+            queryWrapper.eq("b.real_header", projectReportData.getProjectMaster2Id());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getProjectMasterName())) { // 项目经理1筛选
+            queryWrapper.like("e.id", projectReportData.getProjectMasterName()).or().like("e.name", projectReportData.getProjectMasterName());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getRealHeaderName())) { // 项目经理2筛选
+            queryWrapper.like("f.id", projectReportData.getRealHeaderName()).or().like("f.name", projectReportData.getRealHeaderName());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getCreateBy().getId())) {
+            queryWrapper.and(wrapper -> wrapper.like("a.create_by_id", projectReportData.getCreateBy().getId())
+                    .or()
+                    .like("d.name", projectReportData.getCreateBy().getId()));
+        }
+        //4、签约时间(区间)
+        String[] contractDates = projectReportData.getContractDates();
+        if (contractDates != null) {
+
+            queryWrapper.between("a.create_time", contractDates[0], contractDates[1]);
+        }
+        //5、报告文号
+        if (StringUtils.isNotEmpty(projectReportData.getReportNo())) {
+            queryWrapper.like("new_line.report_no", projectReportData.getReportNo());
+        }
+        //6、审计收费
+        String[] contractAmounts = projectReportData.getContractAmounts();
+        if (contractAmounts != null) {
+            if (StringUtils.isNotEmpty(contractAmounts[0])) {
+                queryWrapper.ge("a.audit_fees",contractAmounts[0]);
+            }
+            if (contractAmounts.length>1 && StringUtils.isNotEmpty(contractAmounts[1])) {
+                queryWrapper.le("a.audit_fees", contractAmounts[1]);
+            }
+        }
+        if(StringUtils.isNotEmpty(projectReportData.getApplyStatus()) && StringUtils.isNotEmpty(projectReportData.getReviewStatus())){
+            if("-1".equals(projectReportData.getApplyStatus()) && "-1".equals(projectReportData.getReviewStatus())){
+                queryWrapper.and(wrapper ->
+                        wrapper.ne("cw_na.review_status", "5")
+                                .or()
+                                .ne("cw_rev.review_status", "5")
+                );
+            }
+        }
+//        if(StringUtils.isNotEmpty(projectReportData.getApplyStatus()) && StringUtils.isNotEmpty(projectReportData.getReviewStatus())){
+//            if("-1".equals(projectReportData.getApplyStatus()) && "-1".equals(projectReportData.getReviewStatus())){
+//                queryWrapper.and(wrapper ->
+//                        wrapper.ne("cw_na.review_status", "5")
+//                                .or()
+//                                .ne("cw_rev.review_status", "5")
+//                );
+//            }
+//        }
+        if (StringUtils.isNotEmpty(projectReportData.getStatus1())) {
+            queryWrapper.eq("cw_prs1.status", projectReportData.getStatus1());
+        }
+        if (StringUtils.isNotBlank(projectReportData.getFilingType())) {
+            List<CwProjectRecords> projectList = cwProjectRecordsService.list(new LambdaQueryWrapper<CwProjectRecords>().eq(CwProjectRecords::getReportType, projectReportData.getFilingType()));
+            List<String> projectIdList = projectList.stream().map(CwProjectRecords::getId).collect(Collectors.toList());
+            if (CollectionUtil.isNotEmpty(projectIdList)) {
+                queryWrapper.in("b.id", projectIdList);
+            } else {
+                return new Page<>();
+            }
+        }
+        if (ArrayUtil.isNotEmpty(projectReportData.getCreateDates())) {
+            queryWrapper.between("a.create_time", projectReportData.getCreateDates()[0], projectReportData.getCreateDates()[1]);
+        }
+        //报告日期
+        if (ArrayUtil.isNotEmpty(projectReportData.getReportDates())) {
+            queryWrapper.between("new_line.report_date", projectReportData.getReportDates()[0], projectReportData.getReportDates()[1]);
+        }
+        //项目分类
+        if (StringUtils.isNotEmpty(projectReportData.getProjectClassification())) {
+            queryWrapper.eq("b.project_classification", projectReportData.getProjectClassification());
+        }
+        //报告类型
+        if (StringUtils.isNotEmpty(projectReportData.getReportType())) {
+            queryWrapper.eq("new_line.report_type", projectReportData.getReportType());
+        }
+
+        String isBmzr = "0";
+        StringBuilder officeIds = new StringBuilder();
+        //UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+//        UserDTO userDTO = UserUtils.getCurrentUserDTO();
+        List<String> manageOfficeIdList= Lists.newArrayList();
+
+
+
+        long l1 = System.currentTimeMillis();
+        IPage<CwProjectReportData> list = null;
+        long l2 = System.currentTimeMillis();
+        System.out.println("报告列表查询service方法消耗时间:" + (l2-l1));
+
+        //获取当前登录人角色是否是苏州报告签字盖章代办
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        if (CollectionUtil.isNotEmpty(userDTO.getRoleDTOList())){
+            for (RoleDTO roleDTO : userDTO.getRoleDTOList()) {
+                RoleDTO dtoById = SpringUtil.getBean(IRoleApi.class).getRoleDTOById(roleDTO.getId());
+                if ("szbgqzgzdb".equals(dtoById.getEnName())){
+                    list = reportMapper.findNotCompletedList2(page,isBmzr, officeIds.toString(), queryWrapper);
+                    break;
+                }
+            }
+        }
+
+        if(null == list){
+            list = reportMapper.findNotCompletedList(page,isBmzr, officeIds.toString(), queryWrapper);
+        }
+
+        List<UserDTO> allUserInfo = (List<UserDTO>) RedisUtils.getInstance().get(CacheNames.USER_CACHE_USER_ALL_INFO);
+        if (null == allUserInfo || allUserInfo.size() == 0) {
+            allUserInfo = SpringUtil.getBean(IUserApi.class).getAllUserInfo();
+        }
+        ArrayList<User> users = new ArrayList<>();
+        List<UserDTO> finalAllUserInfo = allUserInfo;
+
+        List<CwProjectReportData> records = list.getRecords();
+        //获取查询的所有报告id
+        List<String> reportIdList = Lists.newArrayList();
+
+        for (CwProjectReportData record : records) {
+            reportIdList.add(record.getId());
+        }
+        //根据报告id查询修改签字注师记录表信息
+        List<CwSignatureAnnotator> sigByIdList = new ArrayList<CwSignatureAnnotator>();
+        if(reportIdList.size()>0){
+            sigByIdList = cwSignatureAnnotatorMapper.getSigByIdList(reportIdList);
+        }
+
+        List<CwSignatureAnnotator> finalSigByIdList = sigByIdList;
+        list.getRecords().forEach(li->{
+            if (StringUtils.isBlank(li.getProjectMasterName())){
+                //根据项目经理1的id去查项目经理去名称
+                if (StringUtils.isNotBlank(li.getProjectMasterId())){
+                    UserDTO matchingUser = null;
+                    for (UserDTO user : finalAllUserInfo) {
+                        if (li.getProjectMasterId().equals(user.getId())) {
+                            matchingUser = user;
+                            break;
+                        }
+                    }
+                    if (matchingUser != null) {
+                        String projectMasterName = matchingUser.getName(); // Assuming the property name is "userName"
+                        li.setProjectMasterName(projectMasterName);
+                    }
+                }
+            }
+
+            if (StringUtils.isBlank(li.getRealHeaderName())) {
+                if (StringUtils.isNotBlank(li.getProjectMaster2Id())){
+                    UserDTO matchingUser = null;
+                    for (UserDTO user : finalAllUserInfo) {
+                        if (li.getProjectMaster2Id().equals(user.getId())) {
+                            matchingUser = user;
+                            break;
+                        }
+                    }
+                    if (matchingUser != null) {
+                        String projectMasterName = matchingUser.getName(); // Assuming the property name is "userName"
+                        li.setProjectMaster2Name(projectMasterName);
+                    }
+                }
+            }
+            if(StringUtils.isEmpty(li.getSignatureAnnotatorStatus())){
+                li.setSignatureAnnotatorStatus("0");
+            }
+            /*CwSignatureAnnotator sigById = cwSignatureAnnotatorMapper.getSigById(li.getId());
+            if (ObjectUtil.isNotEmpty(sigById)){
+                li.setProcInsSigId(sigById.getProcInsId());
+                li.setSigReason(sigById.getReason());
+                li.setTaskSigId(sigById.getTaskId());
+            }*/
+            for (CwSignatureAnnotator annotator : finalSigByIdList) {
+                if(li.getId().equals(annotator.getReportId())){
+                    li.setProcInsSigId(annotator.getProcInsId());
+                    li.setSigReason(annotator.getReason());
+                    li.setTaskSigId(annotator.getTaskId());
+                }
+            }
+
+            //如果质控审核已经完成且审核通过时间存在,则判断审核时间是否已经超过一天,若不超过,则可以重复发起质控审核
+            if (null != li.getAuditTime() && "5".equals(li.getReviewStatus())){
+                li.setRepetitionReviewFlag(getRepetitionReviewFlag(li.getAuditTime()));
+            }
+
+        });
+        return list;
+
+    }
 }

+ 14 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/controller/CwProjectReportArchiveController.java

@@ -243,4 +243,18 @@ public class CwProjectReportArchiveController {
         return cwProjectReportArchiveService.deleteByIds(id);
     }
 
+
+    /**
+     * 查询一个月内财务项目报告归档信息列表
+     * @param cwProjectReportArchiveDTO
+     * @param page
+     * @return
+     */
+    @ApiLog("查询一个月内财务项目报告归档信息列表")
+    @GetMapping("findCompletedList")
+    public ResponseEntity<IPage<CwProjectReportArchiveDTO>> findCompletedList(CwProjectReportArchiveDTO cwProjectReportArchiveDTO, Page<CwProjectReportArchiveDTO> page) throws Exception {
+        IPage<CwProjectReportArchiveDTO> result = new Page<CwProjectReportArchiveDTO>();
+        result = cwProjectReportArchiveService.findCompletedList (page, cwProjectReportArchiveDTO);
+        return ResponseEntity.ok (result);
+    }
 }

+ 7 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/mapper/CwProjectReportArchiveMapper.java

@@ -70,6 +70,13 @@ public interface CwProjectReportArchiveMapper extends BaseMapper<CwProjectReport
      * @return
      */
     CwProjectReportArchiveDTO getLastAuditDateByReportId(String reportId);
+
+    /**
+     * 根据条件查询完成的规定信息
+     * @return
+     */
+    IPage<CwProjectReportArchiveDTO> findCompletedList(Page<CwProjectReportArchiveDTO> page, @Param("currentUser") UserDTO currentUser, @Param("isBmzr") String isBmzr, @Param("officeIds") String officeIds, @Param(Constants.WRAPPER) QueryWrapper<CwProjectReportArchive> queryWrapper, @Param("sta") String sta);
+
 }
 
 

+ 50 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/mapper/xml/CwProjectReportArchiveMapper.xml

@@ -278,6 +278,56 @@
         ORDER BY cw_pa.create_time DESC
     </select>
 
+    <select id="findCompletedList" resultMap="BaseResultMap">
+        select
+        DISTINCT
+        <include refid="Base_Column_List"></include>,
+        cw_wcb.name as audited_units_name,
+        su.name as user_name,
+        su1.name as project_master_name,
+        su2.name as realHeaderName,
+        cw_pr.project_name as project_name,
+        cw_pr.project_number as projectNumber,
+        cw_prnl.report_no,
+        date_format(cw_prnl.report_date,'%Y-%m-%d') as report_date,
+        art.ID_ as task_id,
+        crb.create_by_id as borrowUserId,
+        crb.proc_ins_id as procInsId2,
+        (case when cw_pa.audit_date is null then timestampdiff(day,cw_prnl.report_date,now()) when cw_pa.audit_date is not null then timestampdiff(day,cw_prnl.report_date,cw_pa.audit_date) end) as archiveDay
+        from cw_project_report_archive cw_pa
+        left join cw_project_report_borrow crb on crb.archive_id = cw_pa.id and crb.del_flag = '0'
+        left join cw_work_client_base cw_wcb on cw_pa.audited_units = cw_wcb.id and cw_wcb.del_flag = '0'
+        left join sys_user su on su.id = cw_pa.create_by_id and su.del_flag = '0'
+        left join sys_office so on so.id = su.office_id and so.del_flag ='0'
+        left join cw_project_records cw_pr on cw_pr.id = cw_pa.project_id and cw_pr.del_flag = '0'
+        left join sys_user su1 on cw_pr.project_master_id = su1.id and su1.del_flag = '0'
+        left join sys_user su2 on cw_pr.real_header = su2.id and su2.del_flag = '0'
+        left join cw_project_report_new_line cw_prnl on cw_prnl.report_id = cw_pa.report_id and cw_prnl.del_flag = '0'
+
+        left join cw_project_members cpm on cw_pr.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
+
+        left join act_ru_task art ON cw_pa.proc_ins_id = art.PROC_INST_ID_
+
+        ${ew.customSqlSegment}
+        and cw_prnl.report_number is not null and cw_prnl.report_date is not null
+        <if test="sta == '超期未归档'">
+            and cw_pa.audit_date is null and timestampdiff(day,cw_prnl.report_date,now())>60
+        </if>
+        <if test="sta == '暂时未归档'">
+            and cw_pa.audit_date is null and timestampdiff(day,cw_prnl.report_date,now()) &lt;= 60
+        </if>
+        <if test="sta == '已超期归档'">
+            and cw_pa.audit_date is not null and timestampdiff(day,cw_prnl.report_date,cw_pa.audit_date)>60
+        </if>
+        <if test="sta == '已按时归档'">
+            and cw_pa.audit_date is not null and timestampdiff(day,cw_prnl.report_date,cw_pa.audit_date) &lt;= 60
+        </if>
+        ORDER BY cw_pa.create_time DESC
+    </select>
+
+
     <sql id="prnl_column">
         cw_pr.id as report_id,
         cw_prnl.report_no,

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

@@ -526,4 +526,97 @@ public class CwProjectReportArchiveService extends ServiceImpl<CwProjectReportAr
         CwProjectReportArchiveDTO hiById = cwProjectReportArchiveMapper.getLastAuditDateByReportId(collectId);
         return hiById;
     }
+
+    /**
+     * 查询财务项目报告归档信息列表
+     * @param page
+     * @param cwProjectReportArchiveDTO
+     * @return
+     * @throws Exception
+     */
+    public IPage<CwProjectReportArchiveDTO> findCompletedList(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.getCwProjectRecordsDTO())){
+                // 归档时间
+                if (ArrayUtil.isNotEmpty(cwProjectReportArchiveDTO.getAuditDates())){
+                    queryWrapper.ge("cw_pa.audit_date", cwProjectReportArchiveDTO.getAuditDates()[0])
+                            .le("cw_pa.audit_date", cwProjectReportArchiveDTO.getAuditDates()[1]);
+                }
+                // 创建人
+                if (ObjectUtil.isNotEmpty(cwProjectReportArchiveDTO.getCreateBy())){
+                    if (StringUtils.isNotBlank(cwProjectReportArchiveDTO.getCreateBy().getName())){
+                        queryWrapper.nested(qw ->
+                                qw.in("cw_pa.create_by_id", cwProjectReportArchiveDTO.getCreateBy().getName())
+                                        .or()
+                                        .like("su.name", cwProjectReportArchiveDTO.getCreateBy().getName())
+                        );
+
+                    }
+                }
+            }
+        }
+        String isBmzr = "0";
+        StringBuilder officeIds = new StringBuilder();
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken());
+        List<String> manageOfficeIdList= Lists.newArrayList();
+
+        if (StringUtils.isBlank(cwProjectReportArchiveDTO.getArchiveSta())) {
+            cwProjectReportArchiveDTO.setArchiveSta("");
+        }
+
+        IPage<CwProjectReportArchiveDTO> list = cwProjectReportArchiveMapper.findCompletedList(page, userDTO, isBmzr, officeIds.toString(), queryWrapper, cwProjectReportArchiveDTO.getArchiveSta());
+        List<CwProjectReportArchiveDTO> records = list.getRecords();
+        if (null != records && records.size()>0){
+            //循环查询出来的数据
+            for (CwProjectReportArchiveDTO info : records) {
+                //如果归档日期为空,则表示该报告还未归档
+                if(null == info.getAuditDate()){
+                    //如果归档日期差大于60天,表示超期未归档
+                    if(info.getArchiveDay()>60){
+                        // 超期天数
+                        Integer overdueDay = info.getArchiveDay() - 60;
+                        info.setArchiveSta("超期未归档");
+                        long n = (long) Math.ceil((double)(overdueDay) / 30);
+                        String money = Long.toString(n * 200);
+                        info.setOverdueDay(String.valueOf(overdueDay));
+                        info.setFineMoney(money);
+                    }else{
+                        //如果归档日期差小于等于60天,表示暂时未归档
+                        info.setArchiveSta("暂时未归档");
+                        info.setOverdueDay(String.valueOf(info.getArchiveDay() - 60));
+                        info.setFineMoney("0");
+                    }
+                } else {
+                    //如果归档日期不为空,则表示该报告已归档
+
+                    //如果归档日期差大于60天,表示已超期归档
+                    if(info.getArchiveDay()>60){
+                        // 超期天数
+                        Integer overdueDay = info.getArchiveDay() - 60;
+
+                        info.setArchiveSta("已超期归档");
+                        long n = (long) Math.ceil((double)(overdueDay) / 30);
+                        String money = Long.toString(n * 200);
+                        info.setOverdueDay(String.valueOf(overdueDay));
+                        info.setFineMoney(money);
+                    }else{
+                        //如果归档日期差小于等于60天,表示已按时归档
+                        info.setArchiveSta("已按时归档");
+                        info.setOverdueDay(String.valueOf(info.getArchiveDay() - 60));
+                        info.setFineMoney("0");
+                    }
+                }
+//                // 报告归档
+//                if (StringUtils.isNotBlank(info.getTaskId()) && StringUtils.isNotBlank(info.getStatus())) {
+//                    if ("2".equals(info.getStatus())) { // “审核中”的数据要获取数据审核人
+//                        info.setAuditUserIds(flowTaskService.getTaskAuditUsers(info.getTaskId()));  // 获取数据审核人
+//                    }
+//                }
+            }
+        }
+        return list;
+    }
+
 }

+ 6 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReportArchive/service/dto/CwProjectReportArchiveDTO.java

@@ -163,6 +163,12 @@ public class CwProjectReportArchiveDTO extends BaseDTO {
     private String projectName;
 
     /**
+     * 项目编号
+     */
+    private String projectNumber;
+
+
+    /**
      * 项目经理
      */
     @Excel(name = "项目经理",width = 25,orderNum = "3")

+ 37 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/controller/CwReimbursementInfoController.java

@@ -188,6 +188,14 @@ public class CwReimbursementInfoController {
     }
 
 
+    @ApiOperation(value = "根据租户ID查询用户树形")
+    @GetMapping(value = "/userTreeByTenantId")
+    public ResponseEntity<List<TreeUserDto>> userTreeByTenantId(@RequestParam String name) {
+        List<TreeUserDto> list = service.userTreeByTenantId(name);
+        return ResponseEntity.ok(list);
+    }
+
+
     @ApiLog(value = "财务报销数据", type = LogTypeEnum.EXPORT)
     @GetMapping("exportFile")
     @ApiOperation(value = "财务报销数据")
@@ -617,4 +625,33 @@ public class CwReimbursementInfoController {
     }
 
 
+    /**
+     * 离职查询用户是否存在电脑报销信息
+     * @return
+     */
+    @ApiOperation(value = "列表查询")
+    @GetMapping("/computerList")
+    public ResponseEntity<IPage<RetureListDto>> computerList(Page<RetureListDto> page, QueryListDto dto) throws Exception{
+        IPage<RetureListDto> iPage = service.computerList(page, dto);
+        iPage.getRecords().stream().forEach(i -> {
+            // 报销审批
+            if (StringUtils.isNotBlank(i.getTaskId()) && StringUtils.isNotBlank(i.getType())) {
+                if ("2".equals(i.getType())) { // “审核中”的数据要获取数据审核人
+                    i.setAuditUserIds(flowTaskService.getTaskAuditUsers(i.getTaskId()));  // 获取数据审核人
+                    String currentTaskName = flowTaskService.getCurrentTaskName(i.getProcInsId());
+                    if (com.jeeplus.utils.StringUtils.isNotBlank(currentTaskName) && !currentTaskName.contains("综合管理部主任") && !currentTaskName.contains("部门主任")){
+                        i.setApplyFile(true);
+                    }
+                }
+            }
+            //文件补充
+            if (StringUtils.isNotBlank(i.getTaskIdFile()) && StringUtils.isNotBlank(i.getFileStatus())) {
+                if ("2".equals(i.getFileStatus()) || "4".equals(i.getFileStatus())) { // “审核中”的数据要获取数据审核人
+                    i.setAuditFileUserIds(flowTaskService.getTaskAuditUsers(i.getTaskIdFile()));  // 获取数据审核人
+                }
+            }
+        });
+        return ResponseEntity.ok(iPage);
+    }
+
 }

+ 6 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/mapper/CwReimbursementInfoMapper.java

@@ -40,6 +40,10 @@ public interface CwReimbursementInfoMapper extends BaseMapper<CwReimbursementInf
 
     List<TreeUserDto> findUserList(@Param("name") String name);
 
+    List<TreeUserDto> findOfficeListByTenantId(@Param("tenantId") String tenantId);
+
+    List<TreeUserDto> findUserListByTenantId(@Param("name") String name,@Param("tenantId") String tenantId);
+
     List<RetureListDto> findExportList (@Param(Constants.WRAPPER) QueryWrapper queryWrapper);
 
     IPage<RetureListDto> relationReimbursementList (Page<RetureListDto> page, @Param("id") String id);
@@ -90,5 +94,7 @@ public interface CwReimbursementInfoMapper extends BaseMapper<CwReimbursementInf
 
     @InterceptorIgnore(tenantLine = "true")
     List<WorkAttachmentInfo> findReimFiles(@Param("infoId") String infoId,@Param("attachmentFlag") String attachmentFlag);
+    @InterceptorIgnore(tenantLine = "true")
+    IPage<RetureListDto> computerList (Page<RetureListDto> page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper, @Param("officeIds")String officeIds);
 
 }

+ 120 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/mapper/xml/CwReimbursementInfoMapper.xml

@@ -129,6 +129,99 @@
 			${ew.customSqlSegment}
 		ORDER BY a.update_time DESC
     </select>
+
+	<select id="computerList"
+			resultType="com.jeeplus.finance.reimbursementApproval.approvalInfo.service.dto.RetureListDto">
+		SELECT
+			DISTINCT a.id,
+					 a.`no`,
+					 (CASE
+						  WHEN a.source_type = 1 THEN t.name
+						  WHEN a.source_type = 2 THEN t2.name
+						  WHEN a.source_type = 3 THEN t3.name
+						  WHEN a.source_type = 4 THEN t4.name
+						  WHEN a.source_type = 6 THEN t6.name
+						  ELSE t5.name END) AS type_name,
+					 (CASE
+						  WHEN a.source_type = 1 THEN so.name
+						  WHEN a.source_type = 2 THEN so2.name
+						  WHEN a.source_type = 3 THEN so3.name
+						  WHEN a.source_type = 4 THEN so4.name
+						  WHEN a.source_type = 6 THEN so6.name
+						  ELSE so5.name END) AS dept_name,
+					 (CASE
+						  WHEN a.source_type = 1 THEN us.name
+						  WHEN a.source_type = 2 THEN us2.name
+						  WHEN a.source_type = 3 THEN us3.name
+						  WHEN a.source_type = 4 THEN us4.name
+						  WHEN a.source_type = 6 THEN us6.name
+						  ELSE us5.name END) AS name,
+					 (CASE
+						  WHEN a.source_type = 1 THEN b.`number`
+						  WHEN a.source_type = 2 THEN b2.`number`
+						  WHEN a.source_type = 3 THEN b3.`number`
+						  WHEN a.source_type = 4 THEN b4.`number`
+						  WHEN a.source_type = 6 THEN b6.`number`
+						  ELSE b5.`number` END) AS `number`,
+
+					 a.user_name,
+					 a.reim_date,
+					 a.approval_time,
+					 a.type,
+					 a.create_by_id as create_id,
+					 a.payment_time,
+					 a.payment_status,
+					 b.user_id as projectUser,
+					 b.dept_id as projectOffice,
+					 b3.user_id as reportUser,
+					 b3.dept_id as reportOffice,
+					 pru.purchase_no
+		FROM
+			cw_reimbursement_info a
+				LEFT JOIN cw_reimbursement_detail_info b ON a.id = b.info_id AND b.del_flag = 0
+				left join cw_reimbursement_type_info t on b.type_id = t.id and t.del_flag = 0
+				left join cw_project_records p on p.id = b.project_id and p.del_flag = 0
+				left join sys_office so on so.id = b.dept_id and so.del_flag = 0
+				left join sys_user us on us.id = b.user_id and us.del_flag = 0
+
+				LEFT JOIN cw_reimbursement_detail_info_contract b2 ON a.id = b2.info_id AND b2.del_flag = 0
+				left join cw_reimbursement_type_info t2 on b2.type_id = t2.id and t2.del_flag = 0
+				left join cw_work_contract_info contr2 on contr2.id = b2.contract_id and contr2.del_flag = 0
+				left join sys_office so2 on so2.id = b2.dept_id and so2.del_flag = 0
+				left join sys_user us2 on us2.id = b2.user_id and us2.del_flag = 0
+
+				LEFT JOIN cw_reimbursement_detail_info_report b3 ON a.id = b3.info_id AND b3.del_flag = 0
+				left join cw_reimbursement_type_info t3 on b3.type_id = t3.id and t3.del_flag = 0
+				left join cw_project_records p3 on p3.id = b3.project_id and p3.del_flag = 0
+				left join sys_office so3 on so3.id = b3.dept_id and so3.del_flag = 0
+				left join sys_user us3 on us3.id = b3.user_id and us3.del_flag = 0
+
+				LEFT JOIN cw_reimbursement_detail_info_other b4 ON a.id = b4.info_id AND b4.del_flag = 0
+				left join cw_reimbursement_type_info t4 on b4.type_id = t4.id and t4.del_flag = 0
+				left join cw_project_records p4 on p4.id = b4.project_id and p4.del_flag = 0
+				left join sys_office so4 on so4.id = b4.dept_id and so4.del_flag = 0
+				left join sys_user us4 on us4.id = b4.user_id and us4.del_flag = 0
+
+				LEFT JOIN cw_reimbursement_detail_info_procured b5 ON a.id = b5.info_id AND b5.del_flag = 0
+				left join cw_reimbursement_type_info t5 on b5.type_id = t5.id and t5.del_flag = 0
+				left join cw_project_records p5 on p5.id = b5.project_id and p5.del_flag = 0
+				left join sys_office so5 on so5.id = b5.dept_id and so5.del_flag = 0
+				left join sys_user us5 on us5.id = b5.user_id and us5.del_flag = 0
+
+				LEFT JOIN human_reimbursement_detail_info_procured b6 ON a.id = b6.info_id AND b6.del_flag = 0
+				left join cw_reimbursement_type_info t6 on b6.type_id = t6.id and t6.del_flag = 0
+				left join sys_office so6 on so6.id = b6.dept_id and so6.del_flag = 0
+				left join sys_user us6 on us6.id = b6.user_id and us6.del_flag = 0
+
+				LEFT JOIN sys_user c ON a.create_by_id =  c.id
+				left join sys_user_manage_office sumo on sumo.office_id = c.office_id
+				LEFT JOIN act_ru_task d ON a.proc_ins_id = d.PROC_INST_ID_
+				left join material_management_pruchase_request_basics pru on pru.id = a.purchase_id and pru.del_flag = '0'
+			${ew.customSqlSegment}
+		ORDER BY a.update_time DESC
+	</select>
+
+
 	<select id="findFiles" resultType="com.jeeplus.sys.domain.WorkAttachmentInfo">
 		SELECT
 			id,
@@ -164,6 +257,33 @@
 			and a.`name` LIKE CONCAT ('%', #{name}, '%')
 		</if>
 	</select>
+	<select id="findOfficeListByTenantId"
+			resultType="com.jeeplus.finance.reimbursementApproval.approvalInfo.service.dto.TreeUserDto">
+		SELECT id,`name`,parent_id FROM sys_office WHERE del_flag = 0
+		<if test="tenantId != null and tenantId != ''">
+			and tenant_id = #{tenantId}
+		</if>
+	</select>
+	<select id="findUserListByTenantId"
+			resultType="com.jeeplus.finance.reimbursementApproval.approvalInfo.service.dto.TreeUserDto">
+		SELECT
+		a.id,
+		a.`name`,
+		a.office_id AS parent_id,
+		b.`name` AS office_name,
+		true AS is_user
+		FROM
+		sys_user a
+		LEFT JOIN sys_office b ON a.office_id = b.id
+		WHERE
+		a.del_flag = 0
+		<if test="tenantId != null and tenantId != ''">
+			and a.tenant_id = #{tenantId}
+		</if>
+		<if test="name != null and name != ''">
+			AND a.name LIKE CONCAT('%', #{name}, '%')
+		</if>
+	</select>
 	<select id="findExportList"
 			resultType="com.jeeplus.finance.reimbursementApproval.approvalInfo.service.dto.RetureListDto">
 		SELECT

+ 99 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reimbursementApproval/approvalInfo/service/CwReimbursementInfoService.java

@@ -1225,6 +1225,25 @@ public class CwReimbursementInfoService {
     }
 
     /**
+     * 根据用户租户id查询用户数据
+     */
+    public List<TreeUserDto> userTreeByTenantId(String name) {
+        List<TreeUserDto> list = new ArrayList<>();
+        UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
+        // 查询部门
+        List<TreeUserDto> officeList = infoMapper.findOfficeListByTenantId(userDTO.getTenantDTO().getId());
+        if (CollectionUtils.isNotEmpty(officeList)) {
+            list.addAll(officeList);
+        }
+        // 查询用户
+        List<TreeUserDto> userList = infoMapper.findUserListByTenantId(name,userDTO.getTenantDTO().getId());
+        if (CollectionUtils.isNotEmpty(userList)) {
+            list.addAll(userList);
+        }
+        return list;
+    }
+
+    /**
      * 下载列表查询
      */
     public List<RetureListDto> exportList(QueryListDto dto) throws Exception{
@@ -1914,4 +1933,84 @@ public class CwReimbursementInfoService {
         CwReimbursementFileSupplement fileSupplement = cwReimbursementFileSupplementMapper.getByReimId(id);
         return fileSupplement;
     }
+
+    /**
+     * 列表查询
+     */
+    public IPage<RetureListDto> computerList(Page<RetureListDto> page , QueryListDto dto) throws Exception{
+        QueryWrapper<QueryListDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(dto, QueryListDto.class);
+        /**
+         * a表是reimbursementInfo
+         * b表是reimbursementDetailInfo
+         * c表是sysUser
+         */
+        queryWrapper.eq("a.del_flag", 0);
+        queryWrapper.notIn("a.business_flag",'0');
+        // 报销人
+        if (StringUtils.isNotEmpty(dto.getReimBy())) {
+            queryWrapper.apply("( b.user_id = {0} OR us.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+            queryWrapper.or().apply("( b2.user_id = {0} OR us2.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+            queryWrapper.or().apply("( b3.user_id = {0} OR us3.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+            queryWrapper.or().apply("( b4.user_id = {0} OR us4.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+            queryWrapper.or().apply("( b5.user_id = {0} OR us5.name LIKE {1} )", dto.getReimBy(), "%" + dto.getReimBy() + "%");
+
+        }
+        // 报销状态
+        if (StringUtils.isNotEmpty(dto.getType())) {
+            queryWrapper.eq("a.type", dto.getType());
+        }
+        // 报销部门
+        if (StringUtils.isNotEmpty(dto.getDepartment())) {
+            queryWrapper.apply("( b.dept_id = {0} OR so.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+            queryWrapper.or().apply("( b2.dept_id = {0} OR so2.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+            queryWrapper.or().apply("( b3.dept_id = {0} OR so3.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+            queryWrapper.or().apply("( b4.dept_id = {0} OR so4.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+            queryWrapper.or().apply("( b5.dept_id = {0} OR so5.name LIKE {1} )", dto.getDepartment(), "%" + dto.getDepartment() + "%");
+
+        }
+        // 报销类别
+        if (StringUtils.isNotEmpty(dto.getRemiType())) {
+            queryWrapper.apply(" (b.type_id = {0} OR t.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+            queryWrapper.or().apply(" (b2.type_id = {0} OR t2.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+            queryWrapper.or().apply(" (b3.type_id = {0} OR t3.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+            queryWrapper.or().apply(" (b4.type_id = {0} OR t4.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+            queryWrapper.or().apply(" (b5.type_id = {0} OR t5.name LIKE {1}) ", dto.getRemiType(), "%" + dto.getRemiType() + "%");
+
+        }
+
+        // 报销项状态
+        if (com.jeeplus.utils.StringUtils.isNotEmpty(dto.getReimbursementType())) {
+            queryWrapper.eq("a.reimbursement_type", dto.getReimbursementType());
+        }
+        // 付款状态
+        if (com.jeeplus.utils.StringUtils.isNotEmpty(dto.getPaymentStatus())) {
+            queryWrapper.like("a.payment_status", dto.getPaymentStatus());
+        }
+        StringBuilder officeIds = new StringBuilder();
+        List<String> manageOfficeIdList= Lists.newArrayList();
+        IPage<RetureListDto> list = infoMapper.findList(page, queryWrapper, officeIds.toString());
+        list.getRecords().stream().forEach(item -> {
+            if (StringUtils.isNotBlank(item.getSourceType()) && "1".equals(item.getSourceType())) { //项目报销
+                if (StringUtils.isNotBlank(item.getProjectId())) {
+                    String proName = selectProjectByIds(item.getProjectId());
+                    item.setProjectName(proName);
+                }
+                if (StringUtils.isBlank(item.getDeptName())){
+                    String name = infoMapper.findUserById(item.getProjectUser());
+                    item.setName(name);
+                    String office = infoMapper.findOfficeById(item.getProjectOffice());
+                    item.setDeptName(office);
+                }
+            }
+            if (StringUtils.isNotBlank(item.getSourceType()) && "3".equals(item.getSourceType())){//报告报销
+                if (StringUtils.isBlank(item.getDeptName())){
+                    String name = infoMapper.findUserById(item.getReportUser());
+                    item.setName(name);
+                    String office = infoMapper.findOfficeById(item.getReportOffice());
+                    item.setDeptName(office);
+                }
+            }
+        });
+        return list;
+    }
 }

+ 16 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApplyArchived/controller/ReportCancellApplyArchivedController.java

@@ -125,4 +125,20 @@ public class ReportCancellApplyArchivedController {
         }
         EasyPoiUtil.exportExcel ( result, "报告作废归档信息",  options.getSheetName ( ), ArchivedReportInfoDto.class, fileName, response );
     }
+
+
+    /**
+     * 查询报告作废归档未完成信息列表
+     * @param projectReportData
+     * @param page
+     * @return
+     */
+    @ApiLog("查询报告作废归档未完成信息列表")
+    @GetMapping("findNotCompList")
+    public ResponseEntity<IPage<ArchivedReportInfoDto>> findNotCompList(ArchivedReportInfoDto projectReportData, Page<ArchivedReportInfoDto> page) throws Exception {
+        IPage<ArchivedReportInfoDto> result = new Page<ArchivedReportInfoDto>();
+        result = applyService.findNotCompList (page,projectReportData);
+        return ResponseEntity.ok (result);
+    }
+
 }

+ 93 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/reportCancellApplyArchived/service/ReportCancellApplyArchivedService.java

@@ -539,4 +539,97 @@ public class ReportCancellApplyArchivedService extends ServiceImpl<ReportCancell
     public ApplyArchiveReportDTO findByContractInfoId(String id) {
         return applyMapper.selectFilePaperByContractInfoId(id);
     }
+
+    /**
+     * 差选项目列表信息
+     *
+     * @param page
+     * @param projectReportData
+     * @return
+     * @throws Exception
+     */
+    public IPage<ArchivedReportInfoDto> findNotCompList(Page<ArchivedReportInfoDto> page, ArchivedReportInfoDto projectReportData) throws Exception {
+        QueryWrapper<ArchivedReportInfoDto> queryWrapper = QueryWrapperGenerator.buildQueryCondition(projectReportData, ArchivedReportInfoDto.class);
+        queryWrapper.eq("a.del_flag", "0");
+        queryWrapper.eq("a.status", "5");
+        //条件
+        if (StringUtils.isNotEmpty(projectReportData.getCreateBy().getId())) {
+            queryWrapper.like("a.create_by_id", projectReportData.getCreateBy().getId()).or().like("f.name",projectReportData.getCreateBy().getId());
+        }
+        if (StringUtils.isNotEmpty(projectReportData.getApplyFileType()) && "-1".equals(projectReportData.getApplyFileType())) { // 状态筛选
+            queryWrapper.ne("a.apply_file_type","5");
+        }
+        //创建时间
+        String[] contractDates = projectReportData.getContractDates();
+        if (contractDates != null) {
+            queryWrapper.between("a.create_time", contractDates[0], contractDates[1]);
+        }
+        StringBuilder officeIds = new StringBuilder();
+        List<String> manageOfficeIdList= Lists.newArrayList();
+        IPage<ArchivedReportInfoDto> list = applyMapper.getList(page, queryWrapper,officeIds.toString());
+        list.getRecords().stream().forEach(i -> {
+            // 报告作废归档
+            if (StringUtils.isNotBlank(i.getArchivedTaskId()) && StringUtils.isNotBlank(i.getApplyFileType())) {
+                if ("2".equals(i.getApplyFileType())) { // “审核中”的数据要获取数据审核人
+                    i.setAuditUserIdsArchived(flowTaskService.getTaskAuditUsers(i.getArchivedTaskId()));  // 获取数据审核人
+                }
+            }
+        });
+        List<UserDTO> allUserInfo = (List<UserDTO>) RedisUtils.getInstance().get(CacheNames.USER_CACHE_USER_ALL_INFO);
+        if (null == allUserInfo || allUserInfo.size() == 0) {
+            allUserInfo = SpringUtil.getBean(IUserApi.class).getAllUserInfo();
+        }
+        List<UserDTO> finalAllUserInfo = allUserInfo;
+        list.getRecords().forEach(li -> {
+            if (StringUtils.isBlank(li.getProjectMasterName())){
+                //根据项目经理1的id去查项目经理去名称
+                if (StringUtils.isNotBlank(li.getProjectMasterId())){
+                    UserDTO matchingUser = null;
+                    for (UserDTO user : finalAllUserInfo) {
+                        if (li.getProjectMasterId().equals(user.getId())) {
+                            matchingUser = user;
+                            break;
+                        }
+                    }
+                    if (matchingUser != null) {
+                        String projectMasterName = matchingUser.getName(); // Assuming the property name is "userName"
+                        li.setProjectMasterName(projectMasterName);
+                    }
+                }
+
+                if (StringUtils.isNotBlank(li.getProjectMaster2Id())){
+                    UserDTO matchingUser = null;
+                    for (UserDTO user : finalAllUserInfo) {
+                        if (li.getProjectMaster2Id().equals(user.getId())) {
+                            matchingUser = user;
+                            break;
+                        }
+                    }
+                    if (matchingUser != null) {
+                        String projectMasterName = matchingUser.getName(); // Assuming the property name is "userName"
+                        li.setProjectMaster2Name(projectMasterName);
+                    }
+                }
+
+                if (StringUtils.isBlank(li.getReportSponsor())) {
+                    if (StringUtils.isNotBlank(li.getReportSponsorId())){
+                        UserDTO matchingUser = null;
+                        for (UserDTO user : finalAllUserInfo) {
+                            if (li.getReportSponsorId().equals(user.getId())) {
+                                matchingUser = user;
+                                break;
+                            }
+                        }
+                        if (matchingUser != null) {
+                            String projectMasterName = matchingUser.getName(); // Assuming the property name is "userName"
+                            li.setReportSponsor(projectMasterName);
+                        }
+                    }
+                }
+
+            }
+        });
+        return list;
+    }
+
 }

+ 29 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/controller/HandoverController.java

@@ -2,6 +2,8 @@ package com.jeeplus.human.depart.handover.controller;
 
 import com.jeeplus.common.utils.ResponseUtil;
 import com.jeeplus.human.depart.handover.domain.Handover;
+import com.jeeplus.human.depart.handover.domain.HandoverProject;
+import com.jeeplus.human.depart.handover.service.HandoverProjectService;
 import com.jeeplus.human.depart.handover.service.HandoverService;
 import com.jeeplus.logging.annotation.ApiLog;
 import com.jeeplus.logging.constant.enums.LogTypeEnum;
@@ -12,6 +14,7 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * @author 王强
@@ -26,6 +29,9 @@ public class HandoverController {
     @Resource
     private HandoverService handoverService;
 
+    @Resource
+    private HandoverProjectService handoverProjectService;
+
     /**
      * 保存离职交接信息
      * @param handover
@@ -72,4 +78,27 @@ public class HandoverController {
     public void updateStatusById(@RequestBody Handover dto) {
         handoverService.updateStatusById(dto);
     }
+
+    /**
+     * 固定保存项目信息
+     * @return
+     */
+    @ApiLog(value = "固定保存项目信息", type = LogTypeEnum.SAVE)
+    @PostMapping("saveProject")
+    public String saveProject(@RequestBody List<HandoverProject> handoverProject) throws Exception {
+        return handoverProjectService.saveProject(handoverProject);
+    }
+
+
+    /**
+     * 查询已固定的项目信息
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "查询已固定的项目信息")
+    @GetMapping("/findProjectList")
+    public ResponseEntity<List<HandoverProject>> findProjectList(@RequestParam String id) throws Exception{
+        List<HandoverProject> list = handoverProjectService.findProjectList(id);
+        return ResponseEntity.ok(list);
+    }
 }

+ 3 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/Handover.java

@@ -3,6 +3,7 @@ package com.jeeplus.human.depart.handover.domain;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.jeeplus.core.domain.BaseEntity;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
 import lombok.Data;
 import org.apache.pdfbox.pdmodel.PDDocument;
 import org.apache.pdfbox.pdmodel.PDPage;
@@ -66,6 +67,8 @@ public class Handover extends BaseEntity {
     private String signatureFlag;    //离职证明是否签章(1:已签章,2:未签章(需线下盖章))
 
     @TableField(exist = false)
+    private List<WorkAttachmentInfo> workAttachments;
+    @TableField(exist = false)
     private String arrivalDate;             //到岗日期
     @TableField(exist = false)
     private String departResignationDate;   //预定离职日期

+ 37 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/domain/HandoverProject.java

@@ -0,0 +1,37 @@
+package com.jeeplus.human.depart.handover.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.jeeplus.core.domain.BaseEntity;
+import lombok.Data;
+
+/**
+ * 项目移交
+ * @author hgc
+ * @version 1.0
+ */
+@Data
+@TableName("human_resources_depart_handover_project")
+public class HandoverProject extends BaseEntity {
+
+    //    项目编号
+    private String projectNumber;
+    //    项目名称
+    private String projectName;
+    //    报告号
+    private String reportCode;
+    //    所在节点
+    private String nodeLocation;
+    //    类型
+    private String type;
+    //离职交接记录ID
+    private String handoverId;
+    //创建人
+    private String createProjectUserId;
+
+
+
+    @TableField(exist = false)
+    private  String createName;
+
+}

+ 8 - 1
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverMapper.java

@@ -3,10 +3,13 @@ package com.jeeplus.human.depart.handover.mapper;
 import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.human.depart.handover.domain.Handover;
-import com.jeeplus.human.depart.registration.domain.DepartRegistration;
+import com.jeeplus.human.depart.handover.domain.HandoverProject;
+import com.jeeplus.sys.service.dto.UserDTO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * @author 王强
  * @version 1.0
@@ -18,6 +21,7 @@ public interface HandoverMapper extends BaseMapper<Handover> {
 
     Handover getById(@Param("id") String id);
 
+
     void updateStatusById(@Param("id") String id, @Param("type") String type);
 
     Handover getUserInfoById(@Param("handoverId") String handoverId);
@@ -41,4 +45,7 @@ public interface HandoverMapper extends BaseMapper<Handover> {
      * @return
      */
     String getUserInfoByUserId(@Param("userId")String userId);
+
+
 }
+

+ 30 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/HandoverProjectMapper.java

@@ -0,0 +1,30 @@
+package com.jeeplus.human.depart.handover.mapper;
+
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.jeeplus.human.depart.handover.domain.Handover;
+import com.jeeplus.human.depart.handover.domain.HandoverProject;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+
+@Mapper
+@InterceptorIgnore(tenantLine = "true")
+public interface HandoverProjectMapper extends BaseMapper<HandoverProject> {
+
+    /**
+     * 固定保存项目
+     * @return
+     */
+    void saveProject(@Param("handoverProject")List<HandoverProject> handoverProject);
+
+    /**
+     * 获取固定项目信息
+     * @return
+     */
+    List<HandoverProject>  findProjectList(@Param("id") String id);
+
+}
+

+ 30 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverMapper.xml

@@ -27,6 +27,8 @@
 		WHERE id = #{id}
     </update>
 
+
+
     <select id="getById" resultType="com.jeeplus.human.depart.handover.domain.Handover">
         select
         <include refid="Base_Column_List"></include>,
@@ -58,4 +60,32 @@
         UPDATE human_resources_depart_handover SET signature_url = #{signatureUrl}
 		WHERE id = #{id}
     </update>
+
+    <insert id="saveProject">
+        INSERT INTO human_resources_depart_handover_project (
+        project_number,
+        project_name,
+        report_code,
+        node_location,
+        type,
+        handover_id
+        )
+        VALUES
+        <foreach collection="handoverProject" item="project" separator=",">
+            (#{project.projectNumber}, #{project.projectName}, #{project.reportCode}, #{project.nodeLocation}, #{project.type}, #{project.handoverId})
+        </foreach>
+    </insert>
+
+    <select id="findProjectList" resultType="com.jeeplus.human.depart.handover.domain.HandoverProject">
+        select
+            a.id,
+            a.create_time as createTime,
+            a.create_by_id as createById,
+            a.report_code as reportCode,
+            a.node_location as nodeLocation,
+            a.type,
+            a.handover_id as handoverId
+            FROM human_resources_depart_handover_project a where a.handover_id = #{id} and del_flag = 0
+    </select>
+
 </mapper>

+ 43 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/mapper/xml/HandoverProjectMapper.xml

@@ -0,0 +1,43 @@
+<?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.human.depart.handover.mapper.HandoverProjectMapper">
+
+    <insert id="saveProject">
+        INSERT INTO human_resources_depart_handover_project (
+        project_number,
+        project_name,
+        report_code,
+        node_location,
+        type,
+        handover_id,
+        create_project_user_id
+        )
+        VALUES
+        <foreach collection="handoverProject" item="project" separator=",">
+            (#{project.projectNumber},
+             #{project.projectName},
+             #{project.reportCode},
+             #{project.nodeLocation},
+             #{project.type},
+             #{project.handoverId},
+            #{project.createProjectUserId})
+        </foreach>
+    </insert>
+
+    <select id="findProjectList" resultType="com.jeeplus.human.depart.handover.domain.HandoverProject">
+        select
+            a.id,
+            a.create_time as createTime,
+            a.create_by_id as createById,
+            a.project_number as projectNumber,
+            a.project_name as projectName,
+            a.report_code as reportCode,
+            a.node_location as nodeLocation,
+            a.type,
+            a.handover_id as handoverId,
+            b.name as createName
+            FROM human_resources_depart_handover_project a
+            LEFT JOIN sys_user b on a.create_project_user_id = b.id
+            where a.handover_id = #{id} and a.del_flag = 0
+    </select>
+</mapper>

+ 89 - 0
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverProjectService.java

@@ -0,0 +1,89 @@
+package com.jeeplus.human.depart.handover.service;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.google.common.collect.Lists;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.flowable.feign.IAssessApi;
+import com.jeeplus.flowable.feign.IFinanceApi;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.human.depart.handover.domain.*;
+import com.jeeplus.human.depart.handover.mapper.HandoverMapper;
+import com.jeeplus.human.depart.handover.mapper.HandoverProjectMapper;
+import com.jeeplus.human.depart.registration.domain.DepartRegistration;
+import com.jeeplus.human.depart.registration.mapper.DepartMapper;
+import com.jeeplus.human.enrollment.enrollmentRegistration.utils.HunamFreemarkerUtil;
+import com.jeeplus.human.signature.entity.Action;
+import com.jeeplus.human.signature.entity.Location;
+import com.jeeplus.human.signature.entity.SignatorieInfo;
+import com.jeeplus.human.signature.entity.SignatureContract;
+import com.jeeplus.human.signature.utils.Global;
+import com.jeeplus.human.signature.utils.SignaturePostUtil;
+import com.jeeplus.sys.domain.WorkAttachmentInfo;
+import com.jeeplus.sys.feign.IPostApi;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.feign.IWorkAttachmentApi;
+import com.jeeplus.sys.service.dto.PostDTO;
+import com.jeeplus.sys.service.dto.UserDTO;
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.pdmodel.PDPage;
+import org.apache.pdfbox.pdmodel.PDPageContentStream;
+import org.apache.pdfbox.pdmodel.common.PDRectangle;
+import org.apache.pdfbox.pdmodel.font.PDType0Font;
+import org.apache.pdfbox.pdmodel.graphics.state.RenderingMode;
+import org.apache.pdfbox.util.Matrix;
+import org.apache.poi.xwpf.usermodel.*;
+import org.springframework.beans.BeanUtils;
+import org.springframework.mock.web.MockMultipartFile;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.multipart.MultipartFile;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import javax.annotation.Resource;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import java.io.*;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.time.LocalDate;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * @author 王强
+ * @version 1.0
+ * @date 2023-10-27 9:04
+ */
+@Service
+@Transactional
+public class HandoverProjectService extends ServiceImpl<HandoverProjectMapper, HandoverProject> {
+
+    public List<HandoverProject> findProjectList(String id) {
+        // 查询基础信息表
+        List<HandoverProject> list = baseMapper.findProjectList(id);
+        return list;
+    }
+
+    public String  saveProject(List<HandoverProject> handoverProject) throws Exception {
+        saveBatch(handoverProject);
+        return "操作成功";
+    }
+
+
+
+}

+ 80 - 5
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/handover/service/HandoverService.java

@@ -1,7 +1,10 @@
 package com.jeeplus.human.depart.handover.service;
 
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
@@ -11,6 +14,7 @@ import com.jeeplus.flowable.feign.IFinanceApi;
 import com.jeeplus.flowable.feign.IFlowableApi;
 import com.jeeplus.human.depart.handover.domain.*;
 import com.jeeplus.human.depart.handover.mapper.HandoverMapper;
+import com.jeeplus.human.depart.handover.mapper.HandoverProjectMapper;
 import com.jeeplus.human.depart.registration.domain.DepartRegistration;
 import com.jeeplus.human.depart.registration.mapper.DepartMapper;
 import com.jeeplus.human.enrollment.enrollmentRegistration.utils.HunamFreemarkerUtil;
@@ -56,6 +60,8 @@ import java.nio.file.Paths;
 import java.nio.file.StandardCopyOption;
 import java.time.LocalDate;
 import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.stream.Collectors;
 
 /**
  * @author 王强
@@ -93,6 +99,8 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
     private DepartMapper departMapper;
 
     @Resource
+    private HandoverProjectMapper handoverProjectMapper;
+    @Resource
     private HandoverDraftService draftService;
 
     @Resource
@@ -140,14 +148,23 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
     public Handover findById(String id) {
         // 查询基础信息表
         Handover info = mapper.getById(id);
+        WorkAttachmentInfo workAttachmentInfo = new WorkAttachmentInfo();
+        workAttachmentInfo.setAttachmentId(id);
+        workAttachmentInfo.setAttachmentFlag("workClient");
+//        info.setWorkAttachments(SpringUtil.getBean ( IWorkAttachmentApi.class ).selectListByAttachmentId(id));
+        List<WorkAttachmentInfo> attachments =SpringUtil.getBean ( IWorkAttachmentApi.class ).getByAttachmentIdAndUrlAndAttachmentFlag(workAttachmentInfo);
+        if(attachments != null && info!= null){
+            info.setWorkAttachments(attachments);
+        }
         return info;
     }
 
+
     public Handover saveRegistration(Handover handover) throws Exception {
         if (StringUtils.isNotEmpty(handover.getId())){
-
+            UserDTO userDTO = SpringUtil.getBean ( IUserApi.class ).getByToken(TokenProvider.getCurrentToken ( ));
             Handover report = mapper.getById(handover.getId());
-            handover.setCreateById(report.getCreateById());
+            handover.setCreateById(userDTO.getId());
             if (report != null){
                 return update(handover);
             }
@@ -155,6 +172,8 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
         return add(handover);
     }
 
+
+
     /**
      * 修改
      */
@@ -167,6 +186,27 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
         BeanUtils.copyProperties(reportData, report);
         report.setUpdateById(userDTO.getId());
         report.setUpdateTime(new Date());
+
+        List<WorkAttachmentInfo> workAttachments = reportData.getWorkAttachments();
+        List<String> collect = workAttachments.stream().distinct().filter(item -> {
+            if (StringUtils.isNotBlank(item.getId())) {
+                return true;
+            }
+            return false;
+        }).map(WorkAttachmentInfo::getId).collect(Collectors.toList());
+        if (CollectionUtil.isNotEmpty(workAttachments)) {
+            if(CollectionUtil.isNotEmpty(collect)){
+                SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentIdNotInIds(reportData.getId(),collect);
+            }
+            workAttachments.stream().forEach(i -> i.setAttachmentId(reportData.getId()));
+            Map<String,String> map = new HashMap<>();
+            map.put("workAttachments",JSON.toJSONString(workAttachments));
+            map.put("currentToken", TokenProvider.getCurrentToken());
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).saveMsg2(map);
+        } else{
+            SpringUtil.getBean ( IWorkAttachmentApi.class ).deleteByAttachmentId(reportData.getId());
+//            ossService.remove(new QueryWrapper<WorkAttachmentInfo>().lambda().eq(WorkAttachmentInfo::getAttachmentId,workClientInfo.getId()));
+        }
         mapper.updateById(report);
 
         if (report.getType().equals("5")){
@@ -368,6 +408,7 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
 
         }
 
+
         return report;
     }
 
@@ -425,6 +466,7 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
             report.setRegistrationId(registrationId);
         }
 
+
         mapper.insert(report);
 
         //根据freemarker模板生成离职证明XML文件
@@ -453,10 +495,42 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
                 report.setSignatureFlag("0");
             }
         }
+        mapper.updateById(report);
 
+        //        保存附件
+        //附件信息处理
+        List<WorkAttachmentInfo> workAttachments = reportData.getWorkAttachments();
+        if (CollectionUtil.isNotEmpty(workAttachments)) {
+            int j = 1;
+            for (WorkAttachmentInfo i : workAttachments) {
+                i.setId(UUID.randomUUID().toString().replace("-", ""));
+
+                //文件类型处理
+                String fileName = i.getAttachmentName();
+                List<String> strings = Arrays.asList(fileName.split("\\."));
+                // 检查文件名是否有后缀
+                if (CollectionUtil.isNotEmpty(strings) && strings.size() > 1) {
+                    // 获取最后一个部分作为文件类型
+                    i.setType(strings.get(strings.size() - 1));
+                } else {
+                    // 如果没有后缀或文件名无效,设置一个默认类型或空
+                    i.setType("");
+                }
+                i.setDelFlag(0);
+                i.setCreateTime(new Date());
+                i.setUpdateTime(new Date());
+                i.setAttachmentId(reportData.getId());
+                i.setSort(j);
+                Map<String,String> map = new HashMap<>();
+                String workAttachment = JSON.toJSONString((i));
+                String userDTOInfo = JSON.toJSONString((userDTO));
+                map.put("workAttachment",workAttachment);
+                map.put("userDTO",userDTOInfo);
+                SpringUtil.getBean ( IWorkAttachmentApi.class ).insertWorkAttachment(map);
+                j++;
+            }
+        }
 
-
-        mapper.updateById(report);
         return report;
     }
 
@@ -506,7 +580,7 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
         //先查询数据库中是否已经对数据进行保存
         //若未保存,则进行保存,否则直接跳过
         List<WorkAttachmentInfo> byAttachmentIdAndUrl = SpringUtil.getBean ( IWorkAttachmentApi.class ).selectListByAttachmentId(workattachment.getAttachmentId());
-        if(byAttachmentIdAndUrl.size() == 0){
+        if(byAttachmentIdAndUrl == null || byAttachmentIdAndUrl.isEmpty()){
             Map<String,String> map = new HashMap<>();
             String workAttachment = JSON.toJSONString((workattachment));
             String userDTOInfo = JSON.toJSONString((userDTO));
@@ -1254,4 +1328,5 @@ public class HandoverService extends ServiceImpl<HandoverMapper, Handover> {
     public void updateSignatureUrl(Handover handover){
         mapper.updateSignatureUrl(handover);
     }
+
 }

+ 1 - 1
jeeplus-modules/jeeplus-human/src/main/java/com/jeeplus/human/depart/registration/mapper/xml/DepartMapper.xml

@@ -66,7 +66,7 @@
         left join sys_user su2 on a.create_by_id = su2.id
         LEFT JOIN sys_office so on a.department = so.id
         left join human_resources_depart_handover dh on a.id = dh.registration_id
-        left join work_attachment wa on dh.id = wa.attachment_id
+        left join work_attachment wa on dh.id = wa.attachment_id and wa.attachment_flag = 'dimission_file_signature'
         LEFT JOIN act_ru_task e ON dh.proc_ins_id = e.PROC_INST_ID_
         left join human_resources_depart_handover_imprest im on dh.id = im.handover_id
         left join human_resources_depart_handover_computer compu on dh.id = compu.handover_id