Quellcode durchsuchen

cpa系统功能调整

wangqiang vor 1 Jahr
Ursprung
Commit
0622f3841b
46 geänderte Dateien mit 2443 neuen und 34 gelöschten Zeilen
  1. 33 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/AssessApiFallbackFactory.java
  2. 15 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/FlowableApiFallbackFactory.java
  3. 33 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IAssessApi.java
  4. 24 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IFlowableApi.java
  5. 6 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/factory/UserApiFallbackFactory.java
  6. 9 0
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/feign/IUserApi.java
  7. 13 1
      jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/service/dto/UserDTO.java
  8. 4 0
      jeeplus-common/jeeplus-common-core/src/main/java/com/jeeplus/common/constant/AppNameConstants.java
  9. 36 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/controller/ProjectListController.java
  10. 2 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/ProgramArchiveMapper.java
  11. 1 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/ProgramAuditMapper.java
  12. 23 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/ProjectListMapper.java
  13. 2 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/xml/ProgramArchiveMapper.xml
  14. 121 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/xml/ProjectListMapper.xml
  15. 43 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/service/ProjectListService.java
  16. 5 0
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/service/dto/ProgramArchiveDto.java
  17. 2 1
      jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/typeDict/mapper/ProgramTypeDictMapper.java
  18. 6 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/contractRegistration/domain/ContractInfo.java
  19. 1 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/contractRegistration/mapper/xml/ContractInfoMapper.xml
  20. 1 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwProjectRecordsMapper.java
  21. 2 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwProjectRecordsMapper.xml
  22. 18 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/controller/CwProjectReportController.java
  23. 1 0
      jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectReport/mapper/xml/CwProjectReportMapper.xml
  24. 11 3
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableProcessController.java
  25. 29 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableTaskController.java
  26. 59 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/NotificationController.java
  27. 67 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/listener/MyExecutionListener.java
  28. 7 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/mapper/FlowMapper.java
  29. 44 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/mapper/MyNoticeListMapper.java
  30. 4 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/mapper/xml/FlowMapper.xml
  31. 88 6
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/mapper/xml/MyNoticeListMapper.xml
  32. 5 0
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowTaskService.java
  33. 22 5
      jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/MyNoticeService.java
  34. 69 16
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/controller/UserController.java
  35. 8 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/feign/UserApiImpl.java
  36. 21 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/UserMapper.java
  37. 107 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml
  38. 34 0
      jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/service/UserService.java
  39. 17 0
      jeeplus-modules/jeeplus-xxl-job-executor-sample/pom.xml
  40. 200 0
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/jeeplus/domain/MyNoticeList.java
  41. 1058 0
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/jeeplus/domain/ProgramProjectListInfo.java
  42. 3 0
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/XxlJobExecutorApplication.java
  43. 13 0
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/feign/AssessFeignApi.java
  44. 14 0
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/feign/FlowableFeignApi.java
  45. 13 0
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/feign/UserFeignApi.java
  46. 149 2
      jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/service/jobhandler/SampleXxlJob.java

+ 33 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/AssessApiFallbackFactory.java

@@ -0,0 +1,33 @@
+package com.jeeplus.flowable.factory;
+
+import com.jeeplus.flowable.feign.IAssessApi;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.cloud.openfeign.FallbackFactory;
+import org.springframework.stereotype.Component;
+
+/**
+ * 财务服务降级处理
+ * @author: 王强
+ * @create: 2023-07-26 17:03
+ **/
+@Slf4j
+@Component
+public class AssessApiFallbackFactory implements FallbackFactory<IAssessApi> {
+
+    @Override
+    public IAssessApi create(Throwable cause) {
+        log.error ( "财务服务调用失败:{}", cause.getMessage ( ) );
+        return new IAssessApi() {
+
+            @Override
+            public void updateArchiveStatus(String id, String archiveStatus, String overArchiveStatus) {
+
+            }
+
+            @Override
+            public String getOverdueFilingProjectList() {
+                return null;
+            }
+        };
+    }
+}

+ 15 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/factory/FlowableApiFallbackFactory.java

@@ -37,6 +37,21 @@ public class FlowableApiFallbackFactory implements FallbackFactory <IFlowableApi
             }
 
             @Override
+            public void insertMyNotice(Map<String, String> map) {
+
+            }
+
+            @Override
+            public void updateMyNotice(Map<String, String> map) {
+
+            }
+
+            @Override
+            public String getRepetitionCountBymyNoticeTitle(Map<String, String> map) {
+                return null;
+            }
+
+            @Override
             public String add(Map<String, String> map) {
                 return null;
             }

+ 33 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IAssessApi.java

@@ -0,0 +1,33 @@
+package com.jeeplus.flowable.feign;
+
+import com.jeeplus.common.constant.AppNameConstants;
+import com.jeeplus.flowable.factory.AssessApiFallbackFactory;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * @author: 王强
+ * @create: 2023-07-26 17:01
+ **/
+@FeignClient(contextId = "assessApi", name = AppNameConstants.APP_ASSESS_MODULES, fallbackFactory = AssessApiFallbackFactory.class)
+public interface IAssessApi {
+
+    /**
+     * 修改报告归档 归档状态信息
+     * @param id
+     * @param archiveStatus
+     * @param overArchiveStatus
+     */
+    @GetMapping(value = "/program/projectList/updateArchiveStatus")
+    void updateArchiveStatus(@RequestParam(value = "id")String id,
+                             @RequestParam(value = "archiveStatus")String archiveStatus,
+                             @RequestParam(value = "overArchiveStatus")String overArchiveStatus);
+
+    /**
+     * 查询项目签发单完成后3天未归档项目信息
+     * @return
+     */
+    @GetMapping(value = "/program/projectList/getOverdueFilingProjectList")
+    String getOverdueFilingProjectList();
+}

+ 24 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/flowable/feign/IFlowableApi.java

@@ -24,6 +24,30 @@ public interface IFlowableApi {
     Map historicTaskList2(String procInsId);
 
     /**
+     * 根据通知信息查询数据
+     * @param map
+     * @return
+     */
+    @RequestMapping(value = "/flowable/task/insertMyNotice2", method = RequestMethod.POST)
+    void insertMyNotice(@RequestBody Map<String ,String > map);
+
+    /**
+     * 根据通知信息查询数据
+     * @param map
+     * @return
+     */
+    @RequestMapping(value = "/flowable/task/updateMyNotice2", method = RequestMethod.POST)
+    void updateMyNotice(@RequestBody Map<String ,String > map);
+
+    /**
+     * 根据通知信息查询数据
+     * @param map
+     * @return
+     */
+    @RequestMapping(value = "/flowable/task/getRepetitionCountBymyNoticeTitle", method = RequestMethod.POST)
+    String getRepetitionCountBymyNoticeTitle(@RequestBody Map<String ,String > map);
+
+    /**
      * 发送通知
      */
     @RequestMapping(value = "/flowable/task/add", method = RequestMethod.POST)

+ 6 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/factory/UserApiFallbackFactory.java

@@ -62,6 +62,12 @@ public class UserApiFallbackFactory implements FallbackFactory <IUserApi> {
             public UserDTO getById(String id) {
                 return null;
             }
+
+            @Override
+            public String getByIdForXXL(String id) {
+                return null;
+            }
+
             @Override
             public UserDTO getFlowAbleById(String id) {
                 return null;

+ 9 - 0
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/feign/IUserApi.java

@@ -90,6 +90,15 @@ public interface IUserApi {
      * @param id
      * @return
      */
+    @GetMapping(value = BASE_URL + "/getByIdForXXL")
+    String getByIdForXXL(@RequestParam("id") String id);
+
+    /**
+     * 根据id获取用户
+     *
+     * @param id
+     * @return
+     */
     @GetMapping(value = BASE_URL + "/getFlowAbleById")
     UserDTO getFlowAbleById(@RequestParam("id") String id);
 

+ 13 - 1
jeeplus-api/jeeplus-system-api/src/main/java/com/jeeplus/sys/service/dto/UserDTO.java

@@ -7,6 +7,7 @@ import cn.hutool.core.util.StrUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.google.common.collect.Lists;
 import com.jeeplus.common.excel.annotation.ExcelDictProperty;
@@ -25,6 +26,7 @@ import org.hibernate.validator.constraints.Length;
 
 import javax.validation.constraints.Email;
 import javax.validation.constraints.NotNull;
+import java.io.Serializable;
 import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -37,11 +39,21 @@ import java.util.stream.Collectors;
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
-public class UserDTO extends BaseDTO {
+public class UserDTO extends BaseDTO implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
     /**
+     * 财务公司签字注师被选择次数
+     */
+    private Integer accountantUserFlag;
+
+    /**
+     * 财务公司签字注师被选择次数
+     */
+    private Integer accountantUserCount;
+
+    /**
      * 执业资格证类型
      */
     private String certType;

+ 4 - 0
jeeplus-common/jeeplus-common-core/src/main/java/com/jeeplus/common/constant/AppNameConstants.java

@@ -21,4 +21,8 @@ public interface AppNameConstants {
      * 公共模块
      */
     String APP_PUBLIC_MODULES = "jeeplus-public-modules";
+    /**
+     * 评估模块
+     */
+    String APP_ASSESS_MODULES = "jeeplus-assess";
 }

+ 36 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/controller/ProjectListController.java

@@ -1,5 +1,7 @@
 package com.jeeplus.assess.program.configuration.projectList.controller;
 
+import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.aop.demo.annotation.DemoMode;
@@ -11,6 +13,7 @@ import com.jeeplus.assess.workContract.domain.WorkContractInfo;
 import com.jeeplus.common.excel.ExcelOptions;
 import com.jeeplus.common.excel.annotation.ExportMode;
 import com.jeeplus.common.utils.ResponseUtil;
+import com.jeeplus.flowable.feign.IAssessApi;
 import com.jeeplus.logging.annotation.ApiLog;
 import com.jeeplus.assess.utils.FreemarkerUtil;
 import freemarker.template.Configuration;
@@ -41,6 +44,39 @@ public class ProjectListController {
     private ProjectListService projectListService;
 
     /**
+     * 查询当前登录人所属项目组的项目
+     * @return
+     */
+    @ApiOperation(value = "查询当前登录人所属项目组的项目")
+    @GetMapping(value = "/getOverArchiveFlag")
+    public ResponseEntity<String> getOverArchiveFlag() {
+        return projectListService.getOverArchiveFlag();
+    }
+
+    /**
+     * 查询项目签发单完成后3天未归档项目信息
+     * @return
+     */
+    @GetMapping("getOverdueFilingProjectList")
+    public String getOverdueFilingProjectList(){
+        List<ProgramProjectListInfo> listInfos = projectListService.getOverdueFilingProjectList();
+        return JSON.toJSONString(listInfos);
+    }
+
+    /**
+     * 修改报告归档 归档状态信息
+     * @param id
+     * @param archiveStatus
+     * @param overArchiveStatus
+     */
+    @GetMapping("updateArchiveStatus")
+    public void updateArchiveStatus(@RequestParam(value = "id")String id,
+                                    @RequestParam(value = "archiveStatus")String archiveStatus,
+                                    @RequestParam(value = "overArchiveStatus")String overArchiveStatus){
+        projectListService.updateArchiveStatus(id, archiveStatus, overArchiveStatus);
+    }
+
+    /**
      * 新增/修改
      */
     @ApiOperation(value = "新增/修改")

+ 2 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/ProgramArchiveMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.assess.program.configuration.projectList.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.assess.program.configuration.projectList.domain.ProgramArchive;
 import com.jeeplus.assess.program.configuration.projectList.service.dto.ProgramArchiveDto;
@@ -10,6 +11,7 @@ import org.apache.ibatis.annotations.Mapper;
  */
 @Mapper
 public interface ProgramArchiveMapper extends BaseMapper<ProgramArchive> {
+    @InterceptorIgnore(tenantLine = "true")
     ProgramArchiveDto findByIdArchive(String id);
 
     /**

+ 1 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/ProgramAuditMapper.java

@@ -11,6 +11,7 @@ import org.apache.ibatis.annotations.Param;
  * @Entity com.jeeplus.test.program.configuration.projectList.domain.ProgramAudit
  */
 @Mapper
+@InterceptorIgnore(tenantLine = "true")
 public interface ProgramAuditMapper extends BaseMapper<ProgramAudit> {
     @InterceptorIgnore(tenantLine = "true")
     ProgramAuditDto findByIdAudit(String id);

+ 23 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/ProjectListMapper.java

@@ -20,6 +20,13 @@ import java.util.List;
 @Mapper
 public interface ProjectListMapper extends BaseMapper<ProgramProjectListInfo> {
 
+    /**
+     * 根据人员查询该人员是否存在超期未归档或超期归档中的项目信息
+     * @param currentUser
+     * @return
+     */
+    Integer getOverArchiveFlag(@Param("currentUser") UserDTO currentUser);
+
     IPage<WorkContractInfo> findContractPageList(Page<WorkContractInfo> page, @Param("dto") ContractDto dto);
 
     void updateStatusById(@Param("id")String id, @Param("status")String status);
@@ -52,4 +59,20 @@ public interface ProjectListMapper extends BaseMapper<ProgramProjectListInfo> {
      */
     @InterceptorIgnore(tenantLine = "true")
     List<ProgramProjectListInfo> getListByidList(@Param("idList") List<String> idList);
+
+    /**
+     * 修改报告归档 归档状态信息
+     * @param id
+     * @param archiveStatus 归档状态
+     * @param overArchiveStatus 超期归档状态值(over_archive_status:0:未超期;1:已超期)
+     */
+    void updateArchiveStatus(@Param("id")String id, @Param("archiveStatus")String archiveStatus, @Param("overArchiveStatus")String overArchiveStatus);
+
+    /**
+     * 查询项目签发单完成后3天未归档项目信息
+     * @param threeDayAgo 签发单完成时间
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    List<ProgramProjectListInfo> getOverdueFilingProjectList(@Param("threeDayAgo") String threeDayAgo);
 }

+ 2 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/xml/ProgramArchiveMapper.xml

@@ -40,6 +40,7 @@
             <result property="procInsId" column="proc_ins_id" jdbcType="VARCHAR"/>
             <result property="processDefinitionId" column="process_definition_id" jdbcType="VARCHAR"/>
             <result property="status" column="status" jdbcType="VARCHAR"/>
+            <result property="overArchiveStatus" column="over_archive_status" jdbcType="VARCHAR"/>
             <result property="reportNo" column="report_no" jdbcType="VARCHAR"/>
             <result property="auditUserId" column="audit_user_id" jdbcType="VARCHAR"/>
             <result property="signatureEvaluatorFirst" column="signature_evaluator_first" jdbcType="VARCHAR"/>
@@ -83,6 +84,7 @@
         pa.proc_ins_id,
         pa.process_definition_id,
         pa.status,
+        pa.over_archive_status,
         pa.audit_date,
         pa.audit_date as "auditDateDate",
         pa.audit_user_id,

+ 121 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/mapper/xml/ProjectListMapper.xml

@@ -57,6 +57,12 @@
     <update id="updateStatusById">
         UPDATE program_project_list_info SET `status` = #{status} WHERE id = #{id}
     </update>
+    <update id="updateArchiveStatus">
+        update program_archive set
+                status = #{archiveStatus},
+                over_archive_status = #{overArchiveStatus}
+                where id = #{id}
+    </update>
 
     <select id="findPageList" resultType="com.jeeplus.assess.program.configuration.projectList.domain.ProgramProjectListInfo">
         SELECT
@@ -406,6 +412,7 @@
            a.mode,
            a.status,
            a.proc_ins_id,
+           a.assessment_range,
            a.process_definition_id,
            a.generate_report_number,
            prn.report_no,
@@ -726,4 +733,118 @@
             </foreach>
         </where>
     </select>
+    <select id="getOverdueFilingProjectList"
+            resultType="com.jeeplus.assess.program.configuration.projectList.domain.ProgramProjectListInfo">
+        SELECT
+        distinct
+        a.id,
+        a.create_by_id AS create_by,
+        a.create_time,
+        a.update_by_id,
+        a.update_time,
+        a.del_flag,
+        a.contract_id,
+        a.contract_name,
+        a.client,
+        a.client_name,
+        a.amount,
+        a.contract_type,
+        a.name,
+        a.no,
+        a.project_type,
+        a.approval_no,
+        a.company,
+        a.project_mould,
+        a.property_holder,
+        a.property_holder_name,
+        a.location,
+        a.is_first,
+        a.year_num,
+        a.check_year,
+        a.project_manager,
+        c.name AS project_manager_name,
+        a.report_type,
+        a.industry,
+        a.enterprise_type,
+        a.risk_level,
+        a.project_source,
+        a.estimate,
+        a.plan_end_time,
+        a.use_num,
+        a.appointment,
+        a.work_hours,
+        a.remarks,
+        a.assessment_enterprise,
+        a.assessment_enterprise_name,
+        a.link_num,
+        a.relationship,
+        a.assessment_way,
+        a.assessment_objective,
+        a.assessment_date,
+        a.num,
+        a.project_development,
+        a.delegate_project_type,
+        a.assessment_object,
+        a.work_begin_date,
+        a.work_end_date,
+        a.reporting_date,
+        a.is_have,
+        a.is_influence,
+        a.mode,
+        a.status,
+        a.proc_ins_id,
+        a.process_definition_id,
+        prn.report_no,
+        pa1.status as status1,
+        pa1.id as auditId1,
+        pa1.proc_ins_id as procInsId1,
+        pa2.status as status2,
+        pa2.id as auditId2,
+        pa2.proc_ins_id as procInsId2,
+        pa3.status as status3,
+        pa3.id as auditId3,
+        pa3.proc_ins_id as procInsId3,
+        pa.status as archive_status,
+        pa.id as archive_id,
+        pa.proc_ins_id as procInsIdArchive,
+        d.id AS issued_id,
+        d.proc_ins_id AS procInsId4,
+        d.status AS issued_status,
+        d.agree_time AS agree_time,
+        wci.no AS contract_no,
+        art.ID_ as task_id,
+        art1.ID_ as task_id_audit1,
+        art2.ID_ as task_id_audit2,
+        art3.ID_ as task_id_audit3,
+        artd.ID_ as task_id_issued,
+        art_archive.ID_ as task_id_archive
+        FROM
+        program_project_list_info a
+        LEFT JOIN sys_user b ON a.create_by_id = b.id
+        LEFT JOIN sys_user c ON a.project_manager = c.id
+        LEFT JOIN work_contract_info wci ON wci.id = a.contract_id and wci.del_flag = '0'
+        LEFT JOIN program_report_no prn ON prn.program_id = a.id and prn.del_flag = '0'
+        LEFT JOIN program_audit pa1 ON pa1.program_id = a.id and pa1.audit_level = '1' and pa1.del_flag = '0'
+        LEFT JOIN program_audit pa2 ON pa2.program_id = a.id and pa2.audit_level = '2' and pa2.del_flag = '0'
+        LEFT JOIN program_audit pa3 ON pa3.program_id = a.id and pa3.audit_level = '3' and pa3.del_flag = '0'
+        LEFT JOIN program_archive pa ON pa.program_id = a.id and pa.del_flag = '0'
+        left join program_members pm on a.id = pm.project_id
+        LEFT JOIN proofread_issued d ON a.id = d.project_id
+        LEFT JOIN act_ru_task art ON a.proc_ins_id = art.PROC_INST_ID_
+        LEFT JOIN act_ru_task art1 ON pa1.proc_ins_id = art1.PROC_INST_ID_
+        LEFT JOIN act_ru_task art2 ON pa2.proc_ins_id = art2.PROC_INST_ID_
+        LEFT JOIN act_ru_task art3 ON pa3.proc_ins_id = art3.PROC_INST_ID_
+        LEFT JOIN act_ru_task artd ON d.proc_ins_id = artd.PROC_INST_ID_
+        LEFT JOIN act_ru_task art_archive ON pa.proc_ins_id = art_archive.PROC_INST_ID_
+        <where>
+            a.del_flag = 0
+            and (pa.status is null or (pa.status != 5 and pa.status != 7))
+            and d.status = 5 and d.agree_time &lt;= #{threeDayAgo}
+        </where>
+        ORDER BY a.update_time DESC
+    </select>
+    <select id="getOverArchiveFlag" resultType="java.lang.Integer">
+        select count(id) from program_archive
+        where over_archive_status =1 and status != 7 and create_by_id = #{currentUser.id}
+    </select>
 </mapper>

+ 43 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/service/ProjectListService.java

@@ -53,6 +53,8 @@ import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -98,6 +100,41 @@ public class ProjectListService {
 //    @Autowired
 //    private UserService userService;
 
+    /**
+     * getHaveProjectIds
+     * @return
+     */
+    public ResponseEntity<String> getOverArchiveFlag(){
+        UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+        Integer overArchiveFlag = projectListMapper.getOverArchiveFlag(userDTO);
+        if(overArchiveFlag>0){
+            return ResponseEntity.ok("1");
+        }
+        return ResponseEntity.ok("0");
+    }
+
+    /**
+     * 查询项目签发单完成后3天未归档项目信息
+     * @return
+     */
+    public List<ProgramProjectListInfo> getOverdueFilingProjectList(){
+        //获取3天前的时间
+        String threeDayAgo = LocalDateTime.now().plusDays(-3).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
+        //查询项目未归档且签发单完成时间在三天之前的项目
+        List<ProgramProjectListInfo> list = projectListMapper.getOverdueFilingProjectList(threeDayAgo);
+        return list;
+    }
+
+    /**
+     * 修改报告归档 归档状态信息
+     * @param id
+     * @param archiveStatus 归档状态
+     * @param overArchiveStatus 超期归档状态值(over_archive_status:0:未超期;1:已超期)
+     */
+    public void updateArchiveStatus(String id, String archiveStatus, String overArchiveStatus){
+        projectListMapper.updateArchiveStatus(id, archiveStatus, overArchiveStatus);
+    }
+
     public String save(ProjectListDto dto, String tabType) throws Exception{
         if (StringUtils.isNotEmpty(dto.getId())) {
             return update(dto);
@@ -273,6 +310,12 @@ public class ProjectListService {
 
     public String saveFormArchive(ProgramArchiveDto programArchiveDto) {
 //        ProgramArchive programArchive = ProgramArchiveWrapper.INSTANCE.toEntity(programArchiveDto);
+        //根据归档id 查询该归档信息是否为超期归档
+        ProgramArchiveDto archive = programArchiveMapper.findByIdArchive(programArchiveDto.getId());
+        if(null != archive && StringUtils.isNotBlank(archive.getOverArchiveStatus()) && "1".equals(archive.getOverArchiveStatus()) && "5".equals(programArchiveDto.getStatus())){
+            programArchiveDto.setStatus("7");
+        }
+
         ProgramArchive programArchive = new ProgramArchive();
         BeanUtils.copyProperties(programArchiveDto, programArchive);
         if (StringUtils.isNotBlank(programArchive.getId())){

+ 5 - 0
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/projectList/service/dto/ProgramArchiveDto.java

@@ -18,6 +18,11 @@ import java.util.List;
 public class ProgramArchiveDto extends BaseDTO {
 
     /**
+     * 超期状态(0:未超期,1:超期)
+     */
+    private String overArchiveStatus;
+
+    /**
      * 备注信息
      */
     private String remarks;

+ 2 - 1
jeeplus-modules/jeeplus-assess/src/main/java/com/jeeplus/assess/program/configuration/typeDict/mapper/ProgramTypeDictMapper.java

@@ -1,5 +1,6 @@
 package com.jeeplus.assess.program.configuration.typeDict.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
@@ -21,7 +22,7 @@ public interface ProgramTypeDictMapper extends BaseMapper<ProgramTypeDict> {
     public IPage<ProgramTypeDictDTO> findList(Page<ProgramTypeDictDTO> page, @Param(Constants.WRAPPER) QueryWrapper<ProgramTypeDict> queryWrapper);
 
     public ProgramTypeDictDTO queryById(@Param("id") String id);
-
+    @InterceptorIgnore(tenantLine = "true")
     public List<ProgramTypeDictDTO> getList();
 }
 

+ 6 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/contractRegistration/domain/ContractInfo.java

@@ -24,6 +24,12 @@ import java.util.List;
 @TableName(value = "cw_work_contract_info")
 public class ContractInfo extends BaseEntity {
 
+    /**
+     * 借用人id
+     */
+    @TableField(exist = false)
+    private String borrowUserId;
+
     //合同编号(字典值)
     public static final String BIZ_CODE = "10";
 

+ 1 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/contractRegistration/mapper/xml/ContractInfoMapper.xml

@@ -64,6 +64,7 @@
             b.proc_ins_id as taskFiledProcInsId,
             d.name as departmentName,
             f.borrow_type,
+            f.create_by_id as borrowUserId,
             g.ID_ as task_borrow_id,
             h.filed_paper_type as filedPaperType,
             h.filed_no as filedNo,

+ 1 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/CwProjectRecordsMapper.java

@@ -28,6 +28,7 @@ public interface CwProjectRecordsMapper extends BaseMapper<CwProjectRecords> {
      * @param queryWrapper
      * @return
      */
+    @InterceptorIgnore(tenantLine = "true")
     IPage<CwProjectRecordsDTO> findList(Page<CwProjectRecordsDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwProjectRecords> queryWrapper);
     /**
      * 查询项目数据集合,和上面findList是一样的,目的是跳过findList接口的数据规则(比如仅部门可见、仅自己可见之类的)

+ 2 - 0
jeeplus-modules/jeeplus-finance/src/main/java/com/jeeplus/finance/projectRecords/mapper/xml/CwProjectRecordsMapper.xml

@@ -27,6 +27,7 @@
         <result property="status" column="status" jdbcType="VARCHAR"/>
         <result property="createBy.name" column="user_name" jdbcType="VARCHAR"/>
         <result property="projectMasterName" column="project_master_name" jdbcType="VARCHAR"/>
+        <result property="projectMasterName2" column="project_master_name" jdbcType="VARCHAR"/>
         <result property="contractId" column="contract_id" jdbcType="VARCHAR"/>
         <result property="contractName" column="contract_name" jdbcType="VARCHAR"/>
         <result property="contractAmount" column="contract_amount" jdbcType="VARCHAR"/>
@@ -274,6 +275,7 @@
         <include refid="Base_Column_List"></include>,
         su.name as user_name,
         su2.name as project_master_name,
+        su2.name as projectMasterName2,
         su3.name as real_header_name,
         cw_wci.contract_name,
         cw_wci.contract_amount,

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

@@ -112,6 +112,24 @@ public class CwProjectReportController {
         IPage<CwProjectReportData> result = new Page<CwProjectReportData>();
         result = projectReportService.findList (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());
+                    i.setProjectMasterName(byId.getName());
+                }
+            }
+            if (StringUtils.isBlank(i.getRealHeaderName())){
+                //根据项目经理id去人员表重查数据
+                if (StringUtils.isNotBlank(i.getProjectMasterId2())){
+                    UserDTO byId = SpringUtil.getBean(IUserApi.class).getById(i.getProjectMasterId2());
+                    i.setRealHeaderName(byId.getName());
+                }
+
+            }
+
             // 复核
             if (StringUtils.isNotBlank(i.getRevTaskId()) && StringUtils.isNotBlank(i.getReviewStatus())) {
                 if ("2".equals(i.getReviewStatus())) { // “审核中”的数据要获取数据审核人

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

@@ -61,6 +61,7 @@
         b.project_number as projectNumber,
         b.project_name as projectName,
         b.project_master_id as projectMasterId,
+        b.real_header as projectMasterId2,
         c.name as departmentName,
         d.name as userName,
         a.audit_fees,

+ 11 - 3
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableProcessController.java

@@ -46,12 +46,20 @@ public class FlowableProcessController {
      * 流程定义列表
      */
     @GetMapping("list")
-    public ResponseEntity processListData(Page <Map> page, String category) {
+    public ResponseEntity processListData(Page <Map> page, String id) {
         /*
          * 保存两个对象,一个是ProcessDefinition(流程定义),一个是Deployment(流程部署)
          */
-        page = flowProcessService.processList ( page, category );
-        return ResponseEntity.ok ( page );
+        page = flowProcessService.processList ( page, id );
+
+        List<Map> records = page.getRecords();
+        Map resultMap = new HashMap();
+        for (Map map : records) {
+            if(id.equals(map.get("id"))){
+                resultMap = map;
+            }
+        }
+        return ResponseEntity.ok ( resultMap );
     }
 
     @GetMapping("exist")

+ 29 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/FlowableTaskController.java

@@ -5,6 +5,10 @@ package com.jeeplus.flowable.controller;
 
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -612,4 +616,29 @@ public class FlowableTaskController {
         Page<MyNoticeList> voPage = noticeServicel.noticeList(page, type, title, taskName);
         return ResponseEntity.ok (voPage);
     }
+
+    @ApiOperation(value = "根据通知信息查询数据")
+    @RequestMapping(value = "/insertMyNotice2", method = RequestMethod.POST)
+    public void insertMyNotice2(@RequestBody Map<String ,String > map) throws Exception{
+        String myNoticeInfo = map.get("myNoticeInfo");
+        MyNoticeList jsonObject = JSON.parseObject(myNoticeInfo, new TypeReference<MyNoticeList>() {});
+        noticeServicel.insertMyNotice(jsonObject);
+    }
+
+    @ApiOperation(value = "根据通知信息查询数据")
+    @RequestMapping(value = "/updateMyNotice2", method = RequestMethod.POST)
+    public void updateMyNotice2(@RequestBody Map<String ,String > map) throws Exception{
+        String myNoticeInfo = map.get("myNoticeInfo");
+        MyNoticeList jsonObject = JSON.parseObject(myNoticeInfo, new TypeReference<MyNoticeList>() {});
+        noticeServicel.updateMyNotice(jsonObject);
+    }
+
+    @ApiOperation(value = "根据通知信息查询数据")
+    @RequestMapping(value = "/getRepetitionCountBymyNoticeTitle", method = RequestMethod.POST)
+    public String getRepetitionCountBymyNoticeTitle(@RequestBody Map<String ,String > map) throws Exception{
+        String myNoticeInfo = map.get("myNoticeInfo");
+        MyNoticeList jsonObject = JSON.parseObject(myNoticeInfo, new TypeReference<MyNoticeList>() {});
+        MyNoticeList noticeList = noticeServicel.getRepetitionCountBymyNoticeTitle(jsonObject);
+        return JSON.toJSONString(noticeList);
+    }
 }

+ 59 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/controller/NotificationController.java

@@ -0,0 +1,59 @@
+//package com.jeeplus.flowable.controller;
+//
+//import io.swagger.annotations.Api;
+//import org.flowable.engine.RuntimeService;
+//import org.flowable.task.api.Task;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.http.HttpStatus;
+//import org.springframework.http.ResponseEntity;
+//import org.springframework.web.bind.annotation.PostMapping;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RequestParam;
+//import org.springframework.web.bind.annotation.RestController;
+//
+///**
+// * @author: 王强
+// * @create: 2023-07-24 13:36
+// **/
+//@RestController
+//@Api(value = "我的通知")
+//@RequestMapping("/flowable/notification")
+//public class NotificationController {
+//    @Autowired
+//    private RuntimeService runtimeService;
+//
+//    @PostMapping("/completeTask")
+//    public ResponseEntity<String> completeTask(@RequestParam("taskId") String taskId) {
+//        try {
+//            Task task = runtimeService.createTaskQuery().taskId(taskId).singleResult();
+//            if (task == null) {
+//                return ResponseEntity.badRequest().body("Invalid task ID.");
+//            }
+//
+//            // 完成任务
+//            runtimeService.complete(taskId);
+//
+//            // 发送通知给用户
+//            sendNotification(task.getAssignee());
+//
+//            return ResponseEntity.ok("Task completed successfully.");
+//        } catch (Exception e) {
+//            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error completing task: " + e.getMessage());
+//        }
+//    }
+//
+//    private void sendNotification(String userId) {
+//        // 发送通知的具体逻辑
+//        // 可以使用第三方库或服务发送通知,如电子邮件、短信、推送通知等
+//        // 这里仅作为示例,假设发送电子邮件通知
+//        String email = getEmailFromUserId(userId);
+//        // 发送电子邮件通知的代码...
+//    }
+//
+//    private String getEmailFromUserId(String userId) {
+//        // 根据用户ID查询用户电子邮件地址的逻辑
+//        // 例如从数据库或用户存储中获取电子邮件地址
+//        // 这里仅作为示例,返回一个固定的电子邮件地址
+//        return "user@example.com";
+//    }
+//}

+ 67 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/listener/MyExecutionListener.java

@@ -1,19 +1,86 @@
 package com.jeeplus.flowable.listener;
 
+import cn.hutool.extra.spring.SpringUtil;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jeeplus.common.TokenProvider;
+import com.jeeplus.flowable.model.ActRuTaskInfo;
+import com.jeeplus.flowable.model.Flow;
+import com.jeeplus.flowable.service.FlowProcessService;
+import com.jeeplus.flowable.service.FlowTaskService;
+import com.jeeplus.flowable.service.MyNoticeService;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
+import lombok.SneakyThrows;
+import org.flowable.engine.RuntimeService;
+import org.flowable.engine.TaskService;
 import org.flowable.engine.delegate.DelegateExecution;
 import org.flowable.engine.delegate.ExecutionListener;
+import org.flowable.engine.runtime.ProcessInstance;
+import org.flowable.task.api.Task;
 import org.springframework.stereotype.Component;
 
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 @Component("myExecutionListener")
 public class MyExecutionListener implements ExecutionListener {
 
+    @SneakyThrows
     public void notify(DelegateExecution delegateExecution) {
 
         String eventName = delegateExecution.getEventName ( );
+        System.out.println("--------- delegateExecution -----------" + delegateExecution);
 
         if ( "start".equals ( eventName ) ) {
             System.out.println ( "start=========" );
         } else if ( "end".equals ( eventName ) ) {
+            //根据这里的 delegateExecution的id去act_ru_task表中查该流程的数据 对应表中的EXECUTION_ID_
+            ActRuTaskInfo task = SpringUtil.getBean(MyNoticeService.class).getTaskInfoByID(delegateExecution.getId());
+
+            List<Flow> flows = SpringUtil.getBean(FlowTaskService.class).historicTaskList(task.getProcInstId());
+            //根据PROC_DEF_ID_去act_re_deployment中查询流程的名称
+            String substring = task.getProcDefId().substring(0, task.getProcDefId().indexOf(":"));
+            String actName = SpringUtil.getBean(FlowTaskService.class).getActNameByDefId(substring);
+
+            String titleName = "";
+            // 根据流程定义ID查询流程实例
+            ProcessInstance processInstance = SpringUtil.getBean(RuntimeService.class).createProcessInstanceQuery()
+                    .processInstanceId(task.getProcInstId())
+                    .singleResult();
+
+            if (processInstance != null) {
+                // 获取流程实例标题变量名(假设标题存储在名为"title"的变量中)
+                String titleVariableName = "title";
+
+                // 查询流程实例的标题变量
+                Object title = SpringUtil.getBean(RuntimeService.class).getVariable(processInstance.getId(), titleVariableName);
+
+                if (title != null) {
+                    titleName = title.toString();
+                } else {
+                    // 如果标题变量不存在或者没有值,可以返回默认标题
+                    titleName = "";
+                }
+            }
+            Flow flow = new Flow();
+            for (int i=0;i<flows.size();i++){
+                if (flows.get(i).getComment().getMessage().equals("发起流程")){
+                     flow = flows.get(i);
+                }
+            }
+
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+
+            UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
+
+            SpringUtil.getBean(MyNoticeService.class).add(task.getProcInstId(),titleName,task.getProcDefId(),actName,
+                    flow.getAssigneeName(),format.format(flow.getHistIns().getEndTime()),
+                    flow.getAssigneeName(),flow.getAssigneeId(),userDTO.getId());
+
             System.out.println ( "end=========" );
         } else if ( "take".equals ( eventName ) ) {//连线监听
             System.out.println ( "take=========" );

+ 7 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/mapper/FlowMapper.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.flowable.model.ActRuTaskInfo;
 import com.jeeplus.flowable.model.Flow;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 审批Mapper接口
@@ -35,4 +36,10 @@ public interface FlowMapper extends BaseMapper <Flow> {
      */
     String getTenantIdByProcDefKey(String procDefKey);
 
+    /**
+     * 根据PROC_DEF_ID_去act_re_deployment中查询流程的名称
+     * @param procDefId
+     * @return
+     */
+    String getActNameByDefId(@Param("procDefId") String procDefId);
 }

+ 44 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/mapper/MyNoticeListMapper.java

@@ -1,8 +1,13 @@
 package com.jeeplus.flowable.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 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.flowable.model.ActRuTaskInfo;
 import com.jeeplus.flowable.model.MyNoticeList;
 import org.apache.ibatis.annotations.Param;
 
@@ -40,10 +45,49 @@ public interface MyNoticeListMapper extends BaseMapper<MyNoticeList> {
     void updateMyNotice(MyNoticeList myNoticeList);
 
     /**
+     * 根据通知信息查询详情
+     * @param myNoticeList
+     * @return
+     */
+    MyNoticeList getRepetitionCountBymyNoticeTitle(MyNoticeList myNoticeList);
+
+    /**
      * 部分通知变更为已读
      * @param idList
      * @return
      */
+    @InterceptorIgnore(tenantLine = "true")
     void portionRead(List idList);
 
+    /**
+     * 查询 流程信息
+     * @param id
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    ActRuTaskInfo getTaskInfoByID(@Param("id")String id);
+
+    /**
+     * 查询我的通知列表数据
+     * @param page
+     * @param queryWrapper
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    Page<MyNoticeList> selectNoticePage(Page<MyNoticeList> page, @Param(Constants.WRAPPER)QueryWrapper<MyNoticeList> queryWrapper);
+
+    /**
+     *查询通知信息
+     * @param wrapper
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    MyNoticeList selectInfo(@Param(Constants.WRAPPER) LambdaQueryWrapper<MyNoticeList> wrapper);
+
+    /**
+     * 根据id修改查看状态
+     * @param id
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    void updateInfoById(@Param("id")String id);
 }

+ 4 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/mapper/xml/FlowMapper.xml

@@ -60,5 +60,9 @@
 		where KEY_ = #{procDefKey}
 		limit 1
 	</select>
+    <select id="getActNameByDefId" resultType="java.lang.String">
+		select NAME_ from act_re_deployment where KEY_ = #{procDefId}
+		limit 1
+	</select>
 
 </mapper>

+ 88 - 6
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/mapper/xml/MyNoticeListMapper.xml

@@ -61,12 +61,91 @@
 			and a.task_name = #{taskName}
 		</where>
 	</select>
+    <select id="getTaskInfoByID" resultType="com.jeeplus.flowable.model.ActRuTaskInfo">
+		select
+		  ID_ as "id",
+		  REV_ as "rev",
+		  EXECUTION_ID_ as "executionId",
+		  PROC_INST_ID_ as "procInstId",
+		  PROC_DEF_ID_ as "procDefId",
+		  TASK_DEF_ID_ as "taskDefId",
+		  SCOPE_ID_ as "scopeId",
+		  SUB_SCOPE_ID_ as "subScopeId",
+		  SCOPE_TYPE_ as "scopeType",
+		  SCOPE_DEFINITION_ID_ as "scopeDefinitionId",
+		  NAME_ as "name",
+		  PARENT_TASK_ID_ as "parentTaskId",
+		  DESCRIPTION_ as "description",
+		  TASK_DEF_KEY_ as "taskDefKey",
+		  OWNER_ as "owner",
+		  ASSIGNEE_ as "assignee",
+		  DELEGATION_ as "delegation",
+		  PRIORITY_ as "priority",
+		  CREATE_TIME_ as "createTime",
+		  DUE_DATE_ as "dueDate",
+		  CATEGORY_ as "category",
+		  SUSPENSION_STATE_ as "suspensionState",
+		  TENANT_ID_ as "tenantId",
+		  FORM_KEY_ as "formKey",
+		  CLAIM_TIME_ as "claimTime",
+		  IS_COUNT_ENABLED_ as "isCountEnabled",
+		  VAR_COUNT_ as "varCount",
+		  ID_LINK_COUNT_ as "idLinkCount",
+		  SUB_TASK_COUNT_  as "subTaskCount"
+		from
+		  act_ru_task
+		where EXECUTION_ID_= #{id}
+		order by CREATE_TIME_ desc
+		limit 1
+	</select>
+    <select id="selectNoticePage" resultType="com.jeeplus.flowable.model.MyNoticeList">
+		SELECT
+		 a.id, a.create_by_id, a.create_time,
+		 a.update_by_id, a.update_time, a.del_flag, a.task_id,
+		 a.title, a.def_id, a.task_name, a.link, a.create_user, a.create_time,
+		 a.type, a.repetition_count, a.notice_id, su.name AS "noticeName"
+		 FROM my_notice_list a
+		 LEFT JOIN sys_user su ON a.notice_id = su.id
+		 ${ew.customSqlSegment}
+	</select>
+	<select id="selectInfo" resultType="com.jeeplus.flowable.model.MyNoticeList">
+		SELECT id, task_id, title, def_id, task_name, link, create_user, create_time, notice_name, notice_id, type, repetition_count, create_by_id, update_time, update_by_id, del_flag, tenant_id
+ 		FROM my_notice_list
+ 		${ew.customSqlSegment}
+	</select>
+    <select id="getRepetitionCountBymyNoticeTitle" resultType="com.jeeplus.flowable.model.MyNoticeList">
+		select
+		a.id,
+		a.create_by_id,
+		a.create_time,
+		a.update_by_id,
+		a.update_time,
+		a.del_flag,
+		a.task_id,
+		a.title,
+		a.def_id,
+		a.task_name,
+		a.link,
+		a.create_user,
+		a.create_time,
+		a.type,
+		a.repetition_count,
+		a.notice_id
+		from
+		my_notice_list a
+		<where>
+			a.del_flag = 0
+			and a.notice_id = #{noticeId}
+			and a.title = #{title}
+			and a.type = 0
+		</where>
+	</select>
 
-	<insert id="insertMyNotice">
+    <insert id="insertMyNotice">
 		insert into my_notice_list (
 		  id,
 		  create_by_id,
-		  create_time,
+		  create_date,
 		  update_by_id,
 		  update_time,
 		  del_flag,
@@ -85,10 +164,10 @@
 		values
 		  (
 			#{id},
-			#{createBy},
-			#{createDate},
-			#{updateBy},
-			#{updateDate},
+			#{createById},
+			#{createTime},
+			#{updateById},
+			#{updateTime},
 			#{delFlag},
 			#{taskId},
 			#{title},
@@ -123,4 +202,7 @@
 			</foreach>
 		</where>
 	</update>
+	<update id="updateInfoById">
+		update my_notice_list set type = 1 where id = #{id}
+	</update>
 </mapper>

+ 5 - 0
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/FlowTaskService.java

@@ -765,6 +765,7 @@ public class FlowTaskService {
                     if ( user != null ) {
                         e.setAssignee ( histIns.getAssignee ( ) );
                         e.setAssigneeName ( user.getName ( ) );
+                        e.setAssigneeId ( user.getId ( ) );
                     }
                 }
             }
@@ -788,6 +789,7 @@ public class FlowTaskService {
             if ( user != null ) {
                 e.setAssignee ( histIns.getAssignee ( ) );
                 e.setAssigneeName ( user.getName ( ) );
+                e.setAssigneeId ( user.getId ( ) );
             }
         }
         // 获取意见评论内容
@@ -1192,4 +1194,7 @@ public class FlowTaskService {
         return flowMapper.getTaskInfoByTaskId(taskId);
     }
 
+    public String getActNameByDefId(String procDefId) {
+        return flowMapper.getActNameByDefId(procDefId);
+    }
 }

+ 22 - 5
jeeplus-modules/jeeplus-flowable/src/main/java/com/jeeplus/flowable/service/MyNoticeService.java

@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.jeeplus.common.TokenProvider;
 import com.jeeplus.core.domain.BaseEntity;
 import com.jeeplus.flowable.mapper.MyNoticeListMapper;
+import com.jeeplus.flowable.model.ActRuTaskInfo;
 import com.jeeplus.flowable.model.MyNoticeList;
 import com.jeeplus.sys.feign.IUserApi;
 import com.jeeplus.sys.service.dto.UserDTO;
@@ -41,17 +42,20 @@ public class MyNoticeService {
         QueryWrapper<MyNoticeList> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("a.notice_id", SpringUtil.getBean ( IUserApi.class ).getByToken (TokenProvider.getCurrentToken()).getId());
         queryWrapper.orderByDesc("a.create_time");
-        queryWrapper.eq("a.type", 0);
+
         if (StringUtils.isNotEmpty(type)) {
             queryWrapper.eq("a.type", Integer.parseInt(type));
+        } else {
+            queryWrapper.eq("a.type", 0);
         }
         if (StringUtils.isNotEmpty(title)) {
             queryWrapper.like("a.title", title);
         }
         if (StringUtils.isNotEmpty(taskName)) {
-            queryWrapper.eq("a.task_name", taskName);
+            queryWrapper.like("a.task_name", taskName);
         }
-        Page<MyNoticeList> listPage = mapper.selectPage(page, queryWrapper);
+//        Page<MyNoticeList> listPage = mapper.selectPage(page, queryWrapper);
+        Page<MyNoticeList> listPage = mapper.selectNoticePage(page, queryWrapper);
         if (CollectionUtils.isNotEmpty(listPage.getRecords())) {
             for (MyNoticeList notice : listPage.getRecords()) {
                 notice.setType("0".equals(notice.getType())? "未读":"已读");
@@ -123,10 +127,10 @@ public class MyNoticeService {
     public String update(String taskId, String noticeId) {
         LambdaQueryWrapper<MyNoticeList> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(BaseEntity::getDelFlag, 0).eq(MyNoticeList::getTaskId, taskId).eq(MyNoticeList::getNoticeName, noticeId).eq(MyNoticeList::getType, 0);
-        MyNoticeList one = mapper.selectOne(wrapper);
+        MyNoticeList one = mapper.selectInfo(wrapper);
         if (one != null) {
             one.setType("1");
-            mapper.updateById(one);
+            mapper.updateInfoById(one.getId());
         }
         return "操作成功";
     }
@@ -173,6 +177,15 @@ public class MyNoticeService {
 
     /**
      * 根据通知信息查询数据
+     * @param myNoticeList
+     * @return
+     */
+    public MyNoticeList getRepetitionCountBymyNoticeTitle(MyNoticeList myNoticeList){
+        return mapper.getRepetitionCountBymyNoticeTitle(myNoticeList);
+    }
+
+    /**
+     * 根据通知信息查询数据
      * @param idList
      * @return
      */
@@ -181,4 +194,8 @@ public class MyNoticeService {
             mapper.portionRead(idList);
         }
     }
+
+    public ActRuTaskInfo getTaskInfoByID(String id) {
+        return mapper.getTaskInfoByID(id);
+    }
 }

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

@@ -200,6 +200,19 @@ public class UserController {
             }
         }
         IPage <UserDTO> result = userService.findPage ( page, queryWrapper );
+        //判断 如果是签字注师筛选,则获取签字注师的被选择次数
+        if(StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())){
+            List<UserDTO> userList = result.getRecords();
+            for (UserDTO info : userList) {
+                if("潘中".equals(info.getName())){
+                    info.setAccountantUserFlag(0);
+                }else{
+                    info.setAccountantUserFlag(1);
+                }
+                Integer accountantUserCount = userService.getAccountantUserCount(info.getId());
+                info.setAccountantUserCount(accountantUserCount);
+            }
+        }
         return ResponseEntity.ok ( result );
     }
 
@@ -285,26 +298,66 @@ public class UserController {
         return ResponseEntity.ok ( result );
     }
 
-    /**
-     * 查询列表(排除admin)
-     *
-     * @param userDTO
-     * @param page
-     * @return
-     */
-    @ApiLog("用户数据列表")
-    @ApiOperation(value = "用户数据列表")
-    @PreAuthorize("hasAuthority('sys:user:list')")
     @GetMapping("list2")
-    public ResponseEntity list2(UserDTO userDTO, Page <UserDTO> page) throws Exception {
-        QueryWrapper <UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( userDTO, UserDTO.class );
-        if ( userDTO.getTenantDTO ( ) != null && StrUtil.isNotBlank ( userDTO.getTenantDTO ( ).getId ( ) ) ) {
-            queryWrapper.eq ( "a.tenant_id", userDTO.getTenantDTO ( ).getId ( ) );
+    public ResponseEntity list2(UserDTO userDTO, Page<UserDTO> page) throws Exception {
+        if (ObjectUtil.isNotEmpty(userDTO.getOfficeDTO().getId())||ObjectUtil.isNotEmpty(userDTO.getLoginName())){
+            IPage<UserDTO> result = userService.findPage3(userDTO);
+            //判断 如果是签字注师筛选,则获取签字注师的被选择次数
+            if (StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())) {
+                List<UserDTO> userList = result.getRecords();
+                for (UserDTO info : userList) {
+                    if ("潘中".equals(info.getName())) {
+                        info.setAccountantUserFlag(0);
+                    } else {
+                        info.setAccountantUserFlag(1);
+                    }
+                    Integer accountantUserCount = userService.getAccountantUserCount(info.getId());
+                    info.setAccountantUserCount(accountantUserCount);
+                }
+            }
+            result.setTotal(result.getRecords().size());
+            return ResponseEntity.ok(result);
+
+        }else {
+            IPage<UserDTO> result = userService.findPage1(userDTO,page);
+            //判断 如果是签字注师筛选,则获取签字注师的被选择次数
+            if (StringUtils.isNotBlank(userDTO.getCertType()) && "6".equals(userDTO.getCertType())) {
+                List<UserDTO> userList = result.getRecords();
+                for (UserDTO info : userList) {
+                    if ("潘中".equals(info.getName())) {
+                        info.setAccountantUserFlag(0);
+                    } else {
+                        info.setAccountantUserFlag(1);
+                    }
+                    Integer accountantUserCount = userService.getAccountantUserCount(info.getId());
+                    info.setAccountantUserCount(accountantUserCount);
+                }
+            }
+            result.setTotal(result.getRecords().size());
+            return ResponseEntity.ok(result);
         }
-        IPage <UserDTO> result = userService.findPage2 ( page, queryWrapper );
-        return ResponseEntity.ok ( result );
     }
 
+//    /**
+//     * 查询列表(排除admin)
+//     *
+//     * @param userDTO
+//     * @param page
+//     * @return
+//     */
+//    @ApiLog("用户数据列表")
+//    @ApiOperation(value = "用户数据列表")
+//    @PreAuthorize("hasAuthority('sys:user:list')")
+//    @GetMapping("list2")
+//    public ResponseEntity list2(UserDTO userDTO, Page <UserDTO> page) throws Exception {
+//        QueryWrapper <UserDTO> queryWrapper = QueryWrapperGenerator.buildQueryCondition ( userDTO, UserDTO.class );
+//        if ( userDTO.getTenantDTO ( ) != null && StrUtil.isNotBlank ( userDTO.getTenantDTO ( ).getId ( ) ) ) {
+//            queryWrapper.eq ( "a.tenant_id", userDTO.getTenantDTO ( ).getId ( ) );
+//        }
+//        IPage <UserDTO> result = userService.findPage2 ( page, queryWrapper );
+//        return ResponseEntity.ok ( result );
+//    }
+
     /**
      * 保存人员执业资质
      *

+ 8 - 0
jeeplus-modules/jeeplus-system/src/main/java/com/jeeplus/sys/feign/UserApiImpl.java

@@ -1,6 +1,7 @@
 package com.jeeplus.sys.feign;
 
 import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -80,6 +81,13 @@ public class UserApiImpl implements IUserApi {
     }
 
     @Override
+    public String getByIdForXXL(String id) {
+        UserDTO userDTO = UserUtils.get(id);
+        String s = JSON.toJSONString(userDTO);
+        return s;
+    }
+
+    @Override
     public UserDTO getFlowAbleById(String id) {
         return userService.getFlowAbleById ( id );
     }

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

@@ -27,6 +27,27 @@ import java.util.List;
 public interface UserMapper extends BaseMapper <User> {
 
     /**
+     * 获取岗位列表
+     *
+     *
+     * @return
+     */
+    @InterceptorIgnore(tenantLine = "true")
+    List<UserDTO> findList1(@Param("dto") UserDTO dto);
+
+    //过滤部门条件
+    @InterceptorIgnore(tenantLine = "true")
+    List<UserDTO> findList3(@Param("id")String id, @Param("loginName") String loginName);
+
+
+    /**
+     * 根据用户id 查询该用户会计报告的签字注师被选择次数
+     * @param userId
+     * @return
+     */
+    Integer getAccountantUserCount(@Param("userId") String userId);
+
+    /**
      * 根据角色英文名称查询角色下人员信息
      *
      * @param enName 角色名称

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

@@ -57,6 +57,7 @@
 		a.login_date AS "loginDate",
 		a.remarks,
 		a.login_flag,
+		a.other_service_flag,
 		a.photo,
 		a.qr_code,
 		a.sign,
@@ -305,7 +306,7 @@ select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.l
 		a.login_date AS "loginDate",
 		a.remarks,
 		a.login_flag,
+		a.other_service_flag,
 		a.photo,
 		a.qr_code,
 		a.sign,
@@ -342,6 +343,111 @@ select a.id, a.company_id as "companyDTO.id", a.office_id as "officeDTO.id", a.l
         <include refid="userJoins"/>
         where a.name = #{name}
     </select>
+    <select id="getAccountantUserCount" resultType="java.lang.Integer">
+        select count(id) from cw_project_report
+		    where del_flag = 0 and (signature_annotator1 = #{userId} or signature_annotator2 = #{userId})
+    </select>
+    <select id="findList3" resultType="com.jeeplus.sys.service.dto.UserDTO">
+        SELECT
+        a.id,
+        a.company_id AS "companyDTO.id",
+        a.office_id AS "officeDTO.id",
+        a.login_name AS "loginName",
+        a.is_admin AS "isAdmin",
+        a.PASSWORD,
+        a.NO,
+        a.NAME,
+        a.email,
+        a.phone,
+        a.mobile,
+        a.login_ip AS "loginIp",
+        a.login_date AS "loginDate",
+        a.remarks,
+        a.login_flag,
+        a.other_service_flag,
+        a.photo,
+        a.qr_code,
+        a.sign,
+        a.create_by_id AS "createBy.id",
+        a.create_time,
+        a.update_by_id AS "updateBy.id",
+        a.update_time,
+        a.manage_office_ids ,
+        c.NAME AS "companyDTO.name",
+        c.parent_id AS "companyDTO.parent.id",
+        c.parent_ids AS "companyDTO.parentIds",
+        o.NAME AS "officeDTO.name",
+        o.parent_id AS "officeDTO.parent.id",
+        o.parent_ids AS "officeDTO.parentIds",
+        o.is_public AS "officeDTO.isPublic",
+        a.roster_id
+        FROM
+        sys_post AS post
+        LEFT JOIN sys_user_post AS user_post ON user_post.post_id = post.id
+        LEFT JOIN sys_user AS a ON a.id = user_post.user_id
+        AND a.del_flag = 0
+        LEFT JOIN sys_cert sc ON a.id = sc.user_id
+        AND sc.del_flag = '0'
+        LEFT JOIN sys_office c ON c.id = a.company_id
+        LEFT JOIN sys_office o ON o.id = a.office_id
+        <where>
+            AND post.NAME = '签字注师2'
+            <if test="id != null and id != '' ">
+                AND a.office_id = #{id}
+            </if>
+            <if test="loginName != null and loginName != '' ">
+                AND a.login_name LIKE CONCAT('%', #{loginName}, '%')
+            </if>
+            AND post.del_flag = 0
+        </where>
+    </select>
+    <select id="findList1" resultType="com.jeeplus.sys.service.dto.UserDTO">
+        SELECT
+			a.id,
+			a.company_id AS "companyDTO.id",
+			a.office_id AS "officeDTO.id",
+			a.login_name AS "loginName",
+			a.is_admin AS "isAdmin",
+			a.PASSWORD,
+			a.NO,
+			a.NAME,
+			a.email,
+			a.phone,
+			a.mobile,
+			a.login_ip AS "loginIp",
+			a.login_date AS "loginDate",
+			a.remarks,
+			a.login_flag,
+			a.other_service_flag,
+			a.photo,
+			a.qr_code,
+			a.sign,
+			a.create_by_id AS "createBy.id",
+			a.create_time,
+			a.update_by_id AS "updateBy.id",
+			a.update_time,
+			a.manage_office_ids ,
+			c.NAME AS "companyDTO.name",
+			c.parent_id AS "companyDTO.parent.id",
+			c.parent_ids AS "companyDTO.parentIds",
+			o.NAME AS "officeDTO.name",
+			o.parent_id AS "officeDTO.parent.id",
+			o.parent_ids AS "officeDTO.parentIds",
+			o.is_public AS "officeDTO.isPublic",
+			a.roster_id
+		FROM
+			sys_post AS post
+				LEFT JOIN sys_user_post AS user_post ON user_post.post_id = post.id
+				LEFT JOIN sys_user AS a ON a.id = user_post.user_id
+				AND a.del_flag = 0
+				LEFT JOIN sys_cert sc ON a.id = sc.user_id
+				AND sc.del_flag = '0'
+				LEFT JOIN sys_office c ON c.id = a.company_id
+				LEFT JOIN sys_office o ON o.id = a.office_id
+		WHERE
+			post.NAME = '签字注师2'
+		  AND post.del_flag = 0
+    </select>
 
     <update id="updateUserUpPassword">
 		update sys_user set

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

@@ -64,6 +64,15 @@ public class UserService extends ServiceImpl <UserMapper, User> {
     @Autowired
     private CertService certService;
 
+    /**
+     * 根据用户id 查询该用户会计报告的签字注师被选择次数
+     * @param userId
+     * @return
+     */
+    public Integer getAccountantUserCount(String userId) {
+        return userMapper.getAccountantUserCount (userId);
+    }
+
     public List<CertDTO> getCertListByUserId(){
         return userMapper.getCertListByUserId();
     }
@@ -408,4 +417,29 @@ public class UserService extends ServiceImpl <UserMapper, User> {
     public List<User> selectListByName(String name) {
         return userMapper.selectListByName(name);
     }
+
+    /**
+     * 签字注师查询用户权限所用
+     * @param userDTO
+     * @return
+     */
+    public IPage<UserDTO> findPage3(UserDTO userDTO) {
+        Page<UserDTO> page = new Page<>();
+        List <UserDTO> list1 = baseMapper.findList3(userDTO.getOfficeDTO().getId(),userDTO.getLoginName());
+        page.setRecords(list1);
+        return page;
+    }
+
+    /**
+     * 岗位分页检索
+     * @param page
+     * @param
+     * @return
+     */
+    public IPage <UserDTO> findPage1(UserDTO dto, Page <UserDTO> page) {
+        List <UserDTO> list1 = baseMapper.findList1(dto);
+        // 将List<UserDTO>数据设置到Page对象中
+        page.setRecords(list1);
+        return  page;
+    }
 }

+ 17 - 0
jeeplus-modules/jeeplus-xxl-job-executor-sample/pom.xml

@@ -14,6 +14,12 @@
 
     <dependencies>
 
+<!--        <dependency>-->
+<!--            <groupId>org.jeeplus</groupId>-->
+<!--            <artifactId>jeeplus-common-security</artifactId>-->
+<!--            <version>9.0</version>-->
+<!--        </dependency>-->
+
         <!-- starter-web:spring-webmvc + autoconfigure + logback + yaml + tomcat -->
         <dependency>
             <groupId>org.springframework.boot</groupId>
@@ -75,6 +81,17 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-actuator</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.jeeplus</groupId>
+            <artifactId>jeeplus-system-api</artifactId>
+            <version>9.0</version>
+            <scope>compile</scope>
+        </dependency>
+        <!-- Feign依赖 -->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
     </dependencies>
     <build>
         <finalName>jeeplus-xxl-job-executor-sample</finalName>

+ 200 - 0
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/jeeplus/domain/MyNoticeList.java

@@ -0,0 +1,200 @@
+package com.jeeplus.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.util.Date;
+
+public class MyNoticeList {
+
+    private String id;
+
+    private String createById;
+    private String updateById;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+    private int delFlag;
+
+    /**
+     * 流程id
+     */
+    private String taskId;
+
+    /**
+     * 实例标题
+     */
+    private String title;
+
+    /**
+     * 流程id
+     */
+    private String defId;
+
+    /**
+     * 流程名称
+     */
+    private String taskName;
+
+    /**
+     * 当前环节
+     */
+    private String link;
+
+    /**
+     * 创建人名称
+     */
+    private String createUser;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /**
+     * 通知人名称
+     */
+    private String noticeName;
+
+    /**
+     * 通知人id
+     */
+    private String noticeId;
+
+    /**
+     * 读取状态
+     */
+    private String type;
+
+    /**
+     * 重复数量
+     */
+    private Integer repetitionCount;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getCreateById() {
+        return createById;
+    }
+
+    public void setCreateById(String createById) {
+        this.createById = createById;
+    }
+
+    public String getUpdateById() {
+        return updateById;
+    }
+
+    public void setUpdateById(String updateById) {
+        this.updateById = updateById;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public int getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(int delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getDefId() {
+        return defId;
+    }
+
+    public void setDefId(String defId) {
+        this.defId = defId;
+    }
+
+    public String getTaskName() {
+        return taskName;
+    }
+
+    public void setTaskName(String taskName) {
+        this.taskName = taskName;
+    }
+
+    public String getLink() {
+        return link;
+    }
+
+    public void setLink(String link) {
+        this.link = link;
+    }
+
+    public String getCreateUser() {
+        return createUser;
+    }
+
+    public void setCreateUser(String createUser) {
+        this.createUser = createUser;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getNoticeName() {
+        return noticeName;
+    }
+
+    public void setNoticeName(String noticeName) {
+        this.noticeName = noticeName;
+    }
+
+    public String getNoticeId() {
+        return noticeId;
+    }
+
+    public void setNoticeId(String noticeId) {
+        this.noticeId = noticeId;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Integer getRepetitionCount() {
+        return repetitionCount;
+    }
+
+    public void setRepetitionCount(Integer repetitionCount) {
+        this.repetitionCount = repetitionCount;
+    }
+}

Datei-Diff unterdrückt, da er zu groß ist
+ 1058 - 0
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/jeeplus/domain/ProgramProjectListInfo.java


+ 3 - 0
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/XxlJobExecutorApplication.java

@@ -2,11 +2,14 @@ package com.xxl.job.executor;
 
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.ComponentScan;
 
 /**
  * @author xuxueli 2018-10-28 00:38:13
  */
 @SpringBootApplication
+@EnableFeignClients
 public class XxlJobExecutorApplication {
 
     public static void main(String[] args) {

+ 13 - 0
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/feign/AssessFeignApi.java

@@ -0,0 +1,13 @@
+package com.xxl.job.executor.feign;
+
+import com.jeeplus.common.constant.AppNameConstants;
+import com.jeeplus.flowable.feign.IAssessApi;
+import org.springframework.cloud.openfeign.FeignClient;
+
+/**
+ * @author: 王强
+ * @create: 2023-07-27 08:48
+ **/
+@FeignClient(contextId = "assessFeignApi", name = AppNameConstants.APP_ASSESS_MODULES)
+public interface AssessFeignApi extends IAssessApi {
+}

+ 14 - 0
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/feign/FlowableFeignApi.java

@@ -0,0 +1,14 @@
+package com.xxl.job.executor.feign;
+
+/**
+ * @author: 王强
+ * @create: 2023-07-27 10:24
+ **/
+
+import com.jeeplus.common.constant.AppNameConstants;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import org.springframework.cloud.openfeign.FeignClient;
+
+@FeignClient(contextId = "flowableApi", name = AppNameConstants.APP_FLOWABLE_SERVICE)
+public interface FlowableFeignApi extends IFlowableApi {
+}

+ 13 - 0
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/feign/UserFeignApi.java

@@ -0,0 +1,13 @@
+package com.xxl.job.executor.feign;
+
+import com.jeeplus.common.constant.AppNameConstants;
+import com.jeeplus.sys.feign.IUserApi;
+import org.springframework.cloud.openfeign.FeignClient;
+
+/**
+ * @author: 王强
+ * @create: 2023-07-26 17:40
+ **/
+@FeignClient(contextId = "userFeignApi", name = AppNameConstants.APP_SYSTEM_SERVICE)
+public interface UserFeignApi extends IUserApi {
+}

+ 149 - 2
jeeplus-modules/jeeplus-xxl-job-executor-sample/src/main/java/com/xxl/job/executor/service/jobhandler/SampleXxlJob.java

@@ -1,7 +1,19 @@
 package com.xxl.job.executor.service.jobhandler;
 
+import cn.hutool.extra.spring.SpringUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.TypeReference;
+import com.jeeplus.domain.MyNoticeList;
+import com.jeeplus.domain.ProgramProjectListInfo;
+import com.jeeplus.flowable.feign.IAssessApi;
+import com.jeeplus.flowable.feign.IFlowableApi;
+import com.jeeplus.sys.feign.IUserApi;
+import com.jeeplus.sys.service.dto.UserDTO;
 import com.xxl.job.core.context.XxlJobHelper;
 import com.xxl.job.core.handler.annotation.XxlJob;
+import com.xxl.job.executor.feign.AssessFeignApi;
+import com.xxl.job.executor.feign.UserFeignApi;
+import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
@@ -12,7 +24,8 @@ import java.io.DataOutputStream;
 import java.io.InputStreamReader;
 import java.net.HttpURLConnection;
 import java.net.URL;
-import java.util.Arrays;
+import java.text.SimpleDateFormat;
+import java.util.*;
 import java.util.concurrent.TimeUnit;
 
 /**
@@ -30,7 +43,6 @@ import java.util.concurrent.TimeUnit;
 public class SampleXxlJob {
     private static Logger logger = LoggerFactory.getLogger ( SampleXxlJob.class );
 
-
     /**
      * 1、简单任务示例(Bean模式)
      */
@@ -45,6 +57,141 @@ public class SampleXxlJob {
         // default success
     }
 
+    /**
+     * 1、简单任务示例(Bean模式)
+     */
+    @XxlJob("projectArchiveTask")
+    public void projectArchiveTask() throws Exception {
+        System.out.println("进来了---");
+        String json = SpringUtil.getBean ( AssessFeignApi.class ).getOverdueFilingProjectList();
+        List<ProgramProjectListInfo> projectList = JSON.parseObject(json, new TypeReference<List<ProgramProjectListInfo>>() {});
+
+//        List<ProgramProjectListInfo> projectList = pgProjectListService.getOverdueFilingProjectList();
+        //遍历查询的项目,对所有项目的归档状态进行调整。添加超期归档状态值(over_archive_status:0:未超期;1:已超期),归档状态,若是0或者空值则调整为6。若为其他值则不进行调整
+        for (ProgramProjectListInfo info : projectList) {
+            //判定是否以发起归档申请(即归档状态是否为空或者0)
+            String archiveStatus = "";
+            if(StringUtils.isBlank(info.getArchiveStatus()) || "0".equals(info.getArchiveStatus())){
+                archiveStatus = "6";
+            }else{
+                archiveStatus = info.getArchiveStatus();
+            }
+            //修改报告归档 归档状态信息
+            SpringUtil.getBean ( IAssessApi.class ).updateArchiveStatus(info.getArchiveId(),archiveStatus,"1");
+            //对数据进行发送通知
+            String taskName = null;
+            String titleStr = null;
+
+            //如果当前时间大于过期时间
+            //Date类的一个方法,如果info.getAdventDateDate()早于 new Date() 返回true,否则返回false
+            if(info.getAgreeTime().before(new Date())){
+                taskName = "评估-超期归档";
+                titleStr = "项目【"+ info.getName()+"】归档已超期。超期时间:"+dateToString(info.getAgreeTime()) +"。";
+            }else{
+                taskName = "评估-超期归档";
+                titleStr = "项目【"+ info.getName()+"】即将归档超期。超期时间:"+dateToString(info.getAgreeTime());
+            }
+
+
+            //计算两日期之间的天数
+            int interval = Integer.parseInt(this.getInterval(info.getAgreeTime(), new Date()));
+            if(interval > 0){
+                titleStr = titleStr + "已超期:" + interval + "天。请尽快归还";
+            }
+
+            Set<String> noticeUserSet = new HashSet<String>();
+            if(StringUtils.isNotBlank(info.getCreateBy())){
+
+                String byIdForXXL = SpringUtil.getBean(IUserApi.class).getByIdForXXL(info.getCreateBy());
+                UserDTO createUser = JSON.parseObject(byIdForXXL, new TypeReference<UserDTO>() {});
+//                UserDTO createUser = SpringUtil.getBean ( IUserApi.class ).getById(info.getCreateBy());
+                if(null != createUser && StringUtils.isNotBlank(createUser.getId())){
+                    noticeUserSet.add(createUser.getId());
+                }
+            }
+            List<String> noticeUserList = new ArrayList<String>(noticeUserSet);
+            if(noticeUserList.size()>0){
+                MyNoticeList myNotice = new MyNoticeList();
+                myNotice.setCreateById("1");
+                myNotice.setCreateTime(new Date());
+                myNotice.setUpdateById("1");
+                myNotice.setUpdateTime(new Date());
+                myNotice.setDelFlag(0);
+                //根据procInsId获取taskId
+                String currentTask = SpringUtil.getBean(IFlowableApi.class).getTaskIdByprocInstId(info.getProcInsId());
+                myNotice.setTaskId(currentTask);
+                myNotice.setDefId(info.getProcessDefinitionId());
+                myNotice.setTitle(titleStr);
+                myNotice.setTaskName(taskName);
+                myNotice.setLink("结束");
+                myNotice.setType("0");
+                myNotice.setCreateUser("管理员");
+                myNotice.setCreateTime(new Date());
+
+                for (String noticeUserId : noticeUserList) {
+                    myNotice.setNoticeId(noticeUserId);
+                    String byIdForXXL = SpringUtil.getBean(IUserApi.class).getByIdForXXL(info.getCreateBy());
+                    UserDTO createUser = JSON.parseObject(byIdForXXL, new TypeReference<UserDTO>() {});
+                    myNotice.setNoticeName(createUser.getName());
+                    //根据taskName和通知人 查询重复数量
+                    String myNoticeInfo = JSON.toJSONString(myNotice);
+                    Map<String,String> map = new HashMap();
+                    map.put("myNoticeInfo", myNoticeInfo);
+                    String jsonInfo = SpringUtil.getBean(IFlowableApi.class).getRepetitionCountBymyNoticeTitle(map);
+                    MyNoticeList repetitionCountBymyNotice = JSON.parseObject(jsonInfo, new TypeReference<MyNoticeList>() {});
+
+                    if(null == repetitionCountBymyNotice){
+                        // 生成id
+                        String id = UUID.randomUUID().toString().replace("-", "");
+                        myNotice.setId(id);
+                        myNotice.setRepetitionCount(0);
+
+                        myNoticeInfo = JSON.toJSONString(myNotice);
+                        map.put("myNoticeInfo", myNoticeInfo);
+                        SpringUtil.getBean ( IFlowableApi.class ).insertMyNotice(map);
+                    }else{
+                        myNotice.setId(repetitionCountBymyNotice.getId());
+                        myNotice.setRepetitionCount(repetitionCountBymyNotice.getRepetitionCount()+1);
+
+                        myNoticeInfo = JSON.toJSONString(myNotice);
+                        map.put("myNoticeInfo", myNoticeInfo);
+                        SpringUtil.getBean ( IFlowableApi.class ).updateMyNotice(map);
+                    }
+                }
+            }
+        }
+    }
+
+    public static String dateToString(Date date) {
+        SimpleDateFormat sformat = new SimpleDateFormat("yyyy-MM-dd");//日期格式
+        return sformat.format(date);
+    }
+
+    /**
+     * 计算两日期相差天数
+     * @param beginDate
+     * @param endDate
+     * @return
+     * @throws Exception
+     */
+    public String getInterval(Date beginDate, Date endDate){
+        long day = 0;
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        try {
+            if(beginDate != null){
+                String begin = sdf.format(beginDate);
+                beginDate  = sdf.parse(begin);
+            }
+            if(endDate!= null){
+                String end= sdf.format(endDate);
+                endDate= sdf.parse(end);
+            }
+        } catch (Exception e){
+            e.getMessage();
+        }
+        day = (endDate.getTime()-beginDate.getTime())/(24*60*60*1000);
+        return String.valueOf(day);
+    }
 
     /**
      * 2、分片广播任务