소스 검색

异常表示推送上位机重新处理

wangzl 2 달 전
부모
커밋
899c0c1885
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      pump-web/src/main/java/com/tuoren/web/layer/controller/BusPatientController.java

+ 7 - 3
pump-web/src/main/java/com/tuoren/web/layer/controller/BusPatientController.java

@@ -166,10 +166,14 @@ public class BusPatientController{
         @PostMapping("/setupFlag")
         public CommonResult setupFlag(@RequestBody PatientExceptionFlagParam param){
             try{
-                return CommonResult.success(this.iBusPatientEntityService.update(null,
+                boolean update = this.iBusPatientEntityService.update(null,
                         new LambdaUpdateWrapper<BusPatientEntity>()
-                                .set(BusPatientEntity::getExceptionFlag,param.getIsFlag())
-                                .eq(BusPatientEntity::getPatientId,param.getPatientId())),"修改成功");
+                                .set(BusPatientEntity::getExceptionFlag, param.getIsFlag())
+                                .eq(BusPatientEntity::getPatientId, param.getPatientId()));
+                if(update){
+                    iBusPatientEntityService.sendPatientInfoToPump(param.getPatientId());
+                }
+                return CommonResult.success(update,"修改成功");
             } catch (Exception e) {
                 log.error("出现错误, {}",e.getMessage());
                 return CommonResult.failed("修改失败");