lighter 9 달 전
부모
커밋
cb20b055cb
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      src/main/java/thyyxxk/webserver/controller/api/medicallaboratory/MedicalLaboratoryController.java

+ 5 - 3
src/main/java/thyyxxk/webserver/controller/api/medicallaboratory/MedicalLaboratoryController.java

@@ -76,15 +76,17 @@ public class MedicalLaboratoryController {
             if (null == body.getPublishTime()) {
                 return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "报告状态为[发布]时,发布时间不能为空。");
             }
-            pushWxMessage(body);
         }
         MedicalLaboratoryState existOne = dao.selectById(body.getReqNo());
         if (null == existOne) {
             body.setCreateTime(new Date());
             dao.insert(body);
-            return ResultVoUtil.success(body.getReqNo());
+        } else {
+            dao.updateById(body);
+        }
+        if (body.getReportState() == State.PUBLISHED) {
+            pushWxMessage(body);
         }
-        dao.updateById(body);
         return ResultVoUtil.success(body.getReqNo());
     }