xiahan 3 недель назад
Родитель
Сommit
a1eefda869

+ 2 - 0
qhse-common/src/main/java/com/rongwei/bscommon/system/service/RohhService.java

@@ -19,4 +19,6 @@ public interface RohhService {
     void createRPEvent(ROHHEventVo rohhEventVo);
 
     void taskTransfer(TaskTransferVo taskTransferVo);
+
+    void taskTransferfzr(TaskTransferVo taskTransferVo);
 }

+ 53 - 2
qhse-common/src/main/java/com/rongwei/bscommon/system/service/impl/RohhServiceImpl.java

@@ -159,8 +159,59 @@ public class RohhServiceImpl implements RohhService {
             qhseRohhEventDo.setRohhid(id);
             qhseRohhEventDo.setId(SecurityUtil.getUUID());
             qhseRohhEventDo.setEventname(taskTransferVo.getEventName());
-            qhseRohhEventDo.setEventtype("任务转派");
-            qhseRohhEventDo.setDescribe("当前任务已交由" + userName + "处理;转派说明:" + taskTransferVo.getZpsm());
+            qhseRohhEventDo.setEventtype("转派整改责任人");
+            qhseRohhEventDo.setDescribe("当前任务已交由" + userName + "整改;转派说明:" + taskTransferVo.getZpsm());
+            QHSEUtils.initModelGeneralParameters(qhseRohhEventDo, currentUser);
+            eventSavaList.add(qhseRohhEventDo);
+
+        }
+
+        if (!savaList.isEmpty()) {
+            qhseRohhService.updateBatchById(savaList);
+        }
+        if (!eventSavaList.isEmpty()) {
+            qhseRohhEventService.saveBatch(eventSavaList);
+        }
+    }
+
+    @Override
+    public void taskTransferfzr(TaskTransferVo taskTransferVo) {
+        List<String> ids = taskTransferVo.getIds();
+        if (ids == null || ids.isEmpty()) {
+            throw new RuntimeException("参数异常");
+        }
+        String userId = taskTransferVo.getUserId();
+        String userName = taskTransferVo.getUserName();
+        if (StringUtils.isBlank(userId) || StringUtils.isBlank(userName)) {
+            throw new RuntimeException("重新选择的复证人为空");
+        }
+        QhseRohhDo qhseRohhDo;
+        QhseRohhEventDo qhseRohhEventDo;
+        List<QhseRohhDo> savaList = new ArrayList<>();
+        List<QhseRohhEventDo> eventSavaList = new ArrayList<>();
+        SysUserVo currentUser = QHSEUtils.getCurrentUser();
+        for (String id : ids) {
+            if (StringUtils.isBlank(id)) {
+                continue;
+            }
+            qhseRohhDo = new QhseRohhDo();
+
+            qhseRohhDo.setId(id);
+            qhseRohhDo.setModifydate(new Date());
+            qhseRohhDo.setModifyuserid(currentUser.getId());
+            qhseRohhDo.setModifyusername(currentUser.getName());
+            qhseRohhDo.setVerifier(userName);
+            qhseRohhDo.setDescribe(taskTransferVo.getZpsm());
+            qhseRohhDo.setVerifierid(userId);
+            savaList.add(qhseRohhDo);
+
+
+            qhseRohhEventDo = new QhseRohhEventDo();
+            qhseRohhEventDo.setRohhid(id);
+            qhseRohhEventDo.setId(SecurityUtil.getUUID());
+            qhseRohhEventDo.setEventname(taskTransferVo.getEventName());
+            qhseRohhEventDo.setEventtype("转办复证人");
+            qhseRohhEventDo.setDescribe("当前任务已交由" + userName + "复证;转派说明:" + taskTransferVo.getZpsm());
             QHSEUtils.initModelGeneralParameters(qhseRohhEventDo, currentUser);
             eventSavaList.add(qhseRohhEventDo);
 

+ 15 - 2
qhse-server/src/main/java/com/rongwei/controller/RohhController.java

@@ -76,15 +76,28 @@ public class RohhController {
         return R.ok();
     }
     /**
-     * 任务转派
+     * 任务转派 整改人
      *
      * @param id
      * @return
      */
     @PostMapping("/task/transfer")
     public R taskTransfer(@RequestBody TaskTransferVo taskTransferVo) {
-        log.info("开始任务转派: {}", taskTransferVo);
+        log.info("开始转派任务整改人: {}", taskTransferVo);
         rohhService.taskTransfer(taskTransferVo);
         return R.ok();
     }
+
+    /**
+     * 任务转派 整改人
+     *
+     * @param id
+     * @return
+     */
+    @PostMapping("/task/transfer/fzr")
+    public R taskTransfzr(@RequestBody TaskTransferVo taskTransferVo) {
+        log.info("开始转派任务复诊人: {}", taskTransferVo);
+        rohhService.taskTransferfzr(taskTransferVo);
+        return R.ok();
+    }
 }