浏览代码

feature 代码提交

xiahan 3 周之前
父节点
当前提交
1c942d8234

+ 19 - 5
qhse-common/src/main/java/com/rongwei/bscommon/sys/service/impl/RohhServiceImpl.java

@@ -38,6 +38,11 @@ public class RohhServiceImpl implements RohhService {
     @Autowired
     private QhseRohhEventServiceImpl qhseRohhEventService;
 
+    /**
+     * 创建整改记录
+     *
+     * @param id
+     */
     @Override
     public void createRectification(String id) {
         QhseRohhDo qhseRohhDo = rohhCheck(id);
@@ -56,9 +61,9 @@ public class RohhServiceImpl implements RohhService {
         // 增加事件
         ROHHEventVo rohhEventVo = new ROHHEventVo();
         rohhEventVo.setRohhid(id);
-        rohhEventVo.setEventname("分配");
-        rohhEventVo.setEventtype("任务分配");
-        rohhEventVo.setDescribe("当前任务已交由" + qhseRohhDo.getRectificationuser() + "整改");
+        rohhEventVo.setEventname("整改");
+        rohhEventVo.setEventtype("整改登记");
+        rohhEventVo.setDescribe("任务已整改登记完成");
         createRPEvent(rohhEventVo);
     }
 
@@ -77,6 +82,15 @@ public class RohhServiceImpl implements RohhService {
         qhseRohhValidateDo.setVerifierphoto(qhseRohhDo.getVerifierphoto());
         qhseRohhValidateDo.setVerifierresult(qhseRohhDo.getVerifierresult());
         qhseRohhValidateService.save(qhseRohhValidateDo);
+        // 复诊结果
+        String verifierResult = qhseRohhDo.getVerifierresult();
+        // 增加事件
+        ROHHEventVo rohhEventVo = new ROHHEventVo();
+        rohhEventVo.setRohhid(id);
+        rohhEventVo.setEventname("复证");
+        rohhEventVo.setEventtype(verifierResult.equals("1") ? "复证通过" :"复证不通过");
+        rohhEventVo.setDescribe(verifierResult.equals("1") ? "任务已整改登记完成" : qhseRohhDo.getVerifierdesc());
+        createRPEvent(rohhEventVo);
     }
 
     @Override
@@ -144,9 +158,9 @@ public class RohhServiceImpl implements RohhService {
             qhseRohhEventDo = new QhseRohhEventDo();
             qhseRohhEventDo.setRohhid(id);
             qhseRohhEventDo.setId(SecurityUtil.getUUID());
-            qhseRohhEventDo.setEventname("整改");
+            qhseRohhEventDo.setEventname(taskTransferVo.getEventName());
             qhseRohhEventDo.setEventtype("任务转派");
-            qhseRohhEventDo.setDescribe("当前任务已交由" + userName + "处理;转派说明:"+taskTransferVo.getZpsm());
+            qhseRohhEventDo.setDescribe("当前任务已交由" + userName + "处理;转派说明:" + taskTransferVo.getZpsm());
             QHSEUtils.initModelGeneralParameters(qhseRohhEventDo, currentUser);
             eventSavaList.add(qhseRohhEventDo);
 

+ 1 - 0
qhse-entity/src/main/java/com/rongwei/bsentity/vo/TaskTransferVo.java

@@ -16,4 +16,5 @@ public class TaskTransferVo {
     private String userId;
     private String userName;
     private String zpsm;
+    private String eventName;
 }