Parcourir la source

修改任务文件相关接口

zhouyy il y a 4 mois
Parent
commit
2ad6dae366

+ 3 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java

@@ -1360,6 +1360,9 @@ public class TaskController {
                 userIdNameMap = users.stream().collect(Collectors.toMap(User::getId, User::getName));
             }
             for (Task task : list) {
+                if(org.apache.commons.lang3.StringUtils.isBlank(task.getChargeOneId()) || org.apache.commons.lang3.StringUtils.isBlank(task.getChargeTwoId())){
+                    continue;
+                }
                 if(1 == task.getFinalChargeStatus()){
                     task.setFinalChargeStatusText("审核通过");
                 } else if (0 == task.getFinalChargeStatus()) {

+ 5 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskFilesController.java

@@ -386,8 +386,9 @@ public class TaskFilesController {
                     .set(Task::getChargeTwoStatus,0)
                     .set(Task::getChargeOneTime,null)
                     .set(Task::getChargeTwoTime,null)
-                    .set(Task::getChargeOneReason,null)
-                    .set(Task::getChargeTwoReason,null)
+                    .set(Task::getFileRejectReason,null)
+//                    .set(Task::getChargeOneReason,null)
+//                    .set(Task::getChargeTwoReason,null)
                     .eq(Task::getId,task.getId())
             );
         } else if (0 == task.getFinalChargeStatus()) {
@@ -397,7 +398,7 @@ public class TaskFilesController {
                 taskMapper.update(null,new LambdaUpdateWrapper<Task>()
                         .set(Task::getChargeOneStatus,0)
                         .set(Task::getChargeOneTime,null)
-                        .set(Task::getChargeOneReason,null)
+                        .set(Task::getFileRejectReason,null)
                         .eq(Task::getId,task.getId())
                 );
             } else if (2 == task.getChargeStage()) {
@@ -405,7 +406,7 @@ public class TaskFilesController {
                 taskMapper.update(null,new LambdaUpdateWrapper<Task>()
                         .set(Task::getChargeTwoStatus,0)
                         .set(Task::getChargeTwoTime,null)
-                        .set(Task::getChargeTwoReason,null)
+                        .set(Task::getFileRejectReason,null)
                         .eq(Task::getId,task.getId())
                 );
             }

+ 10 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Task.java

@@ -258,9 +258,9 @@ public class Task extends Model<Task> {
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date chargeOneTime;
 
-    /**文件审核人一的驳回原因*/
-    @TableField("charge_one_reason")
-    private String chargeOneReason;
+//    /**文件审核人一的驳回原因*/
+//    @TableField("charge_one_reason")
+//    private String chargeOneReason;
 
     /**文件审核人二id*/
     @TableField("charge_two_id")
@@ -277,9 +277,9 @@ public class Task extends Model<Task> {
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date chargeTwoTime;
 
-    /**文件审核人二的驳回原因*/
-    @TableField("charge_two_reason")
-    private String chargeTwoReason;
+//    /**文件审核人二的驳回原因*/
+//    @TableField("charge_two_reason")
+//    private String chargeTwoReason;
 
     /**文件审核阶段 1审核人一 2审核人二 3都审核通过*/
     @TableField("charge_stage")
@@ -289,6 +289,10 @@ public class Task extends Model<Task> {
     @TableField("final_charge_status")
     private Integer finalChargeStatus;
 
+    /**文件审核驳回原因*/
+    @TableField("file_reject_reason")
+    private String fileRejectReason;
+
     @TableField(exist = false)
     private String finalChargeStatusText;
     @Override

+ 8 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java

@@ -809,14 +809,14 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
             if(1 == task.getChargeStage()){
                 //阶段一,更新阶段一状态
                 taskMapper.update(null,new LambdaUpdateWrapper<Task>()
-                        .set(Task::getChargeOneReason,reason)
+                        .set(Task::getFileRejectReason,reason)
                         .set(Task::getChargeOneTime,new Date())
                         .set(Task::getChargeOneStatus,2)
                         .eq(Task::getId,taskId)
                 );
             } else if (2 == task.getChargeStage()) {
                 taskMapper.update(null,new LambdaUpdateWrapper<Task>()
-                        .set(Task::getChargeTwoReason,reason)
+                        .set(Task::getFileRejectReason,reason)
                         .set(Task::getChargeTwoTime,new Date())
                         .set(Task::getChargeTwoStatus,2)
                         .eq(Task::getId,taskId)
@@ -853,10 +853,13 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
         HttpRespMsg msg=new HttpRespMsg();
         Task task = taskMapper.selectById(taskId);
         String reason = "";
-        switch (task.getChargeStage()){
-            case 1 : reason = task.getChargeOneReason();break;
-            case 2 : reason = task.getChargeTwoReason();break;
+        if(null != task){
+            reason = task.getFileRejectReason();
         }
+//        switch (task.getChargeStage()){
+//            case 1 : reason = task.getChargeOneReason();break;
+//            case 2 : reason = task.getChargeTwoReason();break;
+//        }
         msg.setData(reason);
         return msg;
     }

+ 5 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -2320,7 +2320,9 @@ public class TimingTask {
     public void remindTaskFile(){
         List<Integer> taskIds =  taskFilesMapper.getAllTaskIds();
         if(CollectionUtils.isNotEmpty(taskIds)){
-            List<WxCorpInfo> wxCorpInfos = wxCorpInfoMapper.selectList(null);
+            List<WxCorpInfo> wxCorpInfos = wxCorpInfoMapper.selectList(new LambdaQueryWrapper<WxCorpInfo>()
+                    .eq(WxCorpInfo::getSaasSyncContact,1)
+            );
             Map<Integer, WxCorpInfo> companyWXCorpMap = new HashMap<>();
             if(CollectionUtils.isNotEmpty(wxCorpInfos)){
                 companyWXCorpMap = wxCorpInfos.stream().collect(Collectors.toMap(WxCorpInfo::getCompanyId,t->t));
@@ -2360,7 +2362,8 @@ public class TimingTask {
                                 .select(User::getId,User::getCorpwxUserid)
                                 .in(User::getId, userIds)
                         );
-                        userIdCorpWxMap = users.stream().collect(Collectors.toMap(User::getId, User::getCorpwxUserid));
+                        userIdCorpWxMap = users.stream().filter(t-> org.apache.commons.lang3.StringUtils.isNotBlank(t.getCorpwxUserid()))
+                                .collect(Collectors.toMap(User::getId, User::getCorpwxUserid));
                     }
                     if(null != wxCorpInfo){
                         for (Task companyTask : companyTasks) {
@@ -2384,7 +2387,6 @@ public class TimingTask {
                     }
                 }
             }
-
         }
     }
 }

+ 1 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/TaskMapper.xml

@@ -100,13 +100,12 @@
         <result column="charge_one_id" property="chargeOneId" />
         <result column="charge_one_status" property="chargeOneStatus" />
         <result column="charge_one_time" property="chargeOneTime" />
-        <result column="charge_one_reason" property="chargeOneReason" />
         <result column="charge_two_id" property="chargeTwoId" />
         <result column="charge_two_status" property="chargeTwoStatus" />
         <result column="charge_two_time" property="chargeTwoTime" />
-        <result column="charge_two_reason" property="chargeTwoReason" />
         <result column="charge_stage" property="chargeStage" />
         <result column="final_charge_status" property="finalChargeStatus" />
+        <result column="reject_reason" property="rejectReason"></result>
     </resultMap>
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">