Sfoglia il codice sorgente

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

wangzl 2 mesi fa
parent
commit
899c0c1885

+ 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("修改失败");