Pārlūkot izejas kodu

湘雅新需求更改

shiyue 3 gadi atpakaļ
vecāks
revīzija
9e301b8a21

+ 1 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -169,6 +169,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/qc/data/sendMrContent").permitAll()
                 .antMatchers("/qc/data/sendMrRecord").permitAll()
                 .antMatchers("/qc/data/sendPatientInfo").permitAll()
+                .antMatchers("/qc/data/sendLeaveInfo").permitAll()
                 .antMatchers("/qc/data/sendDoctorAdvice").permitAll()
                 .antMatchers("/qc/data/sendHomePageIng").permitAll()
                 .antMatchers("/qc/data/sendHomePage").permitAll()

+ 1 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -213,6 +213,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/data/sendMrContent", request)
                 || matchers("/qc/data/sendMrRecord", request)
                 || matchers("/qc/data/sendPatientInfo", request)
+                || matchers("/qc/data/sendLeaveInfo", request)
                 || matchers("/qc/data/sendDoctorAdvice", request)
                 || matchers("/qc/data/sendHomePageIng", request)
                 || matchers("/qc/data/sendHomePage", request)

+ 32 - 0
src/main/java/com/diagbot/facade/data/ABehospitalInfoFacade.java

@@ -266,4 +266,36 @@ public class ABehospitalInfoFacade extends BehospitalInfoServiceImpl {
             return RespDTO.onError(e.getMessage());
         }
     }
+
+
+    /**
+     * 出院时间更改
+     * @param aBehospitalInfoVO
+     * @return
+     */
+    public  RespDTO sendLeaveInfo(ABehospitalInfoVO aBehospitalInfoVO){
+        try {
+            //验证数据是否存在
+            if(StringUtil.isBlank(aBehospitalInfoVO.getBehospitalCode())){
+                return RespDTO.onError("请输入病人住院编码!");
+            }else if(aBehospitalInfoVO.getHospitalId()==null){
+                return RespDTO.onError("请输入医院编码!");
+            }else{
+                UpdateWrapper<BehospitalInfo> updateWrapper=new UpdateWrapper<>();
+                updateWrapper.eq("behospital_code", aBehospitalInfoVO.getBehospitalCode())
+                        .eq("hospital_id", aBehospitalInfoVO.getHospitalId())
+                        .eq("is_deleted",IsDeleteEnum.N)
+                        .set("leave_hospital_date",aBehospitalInfoVO.getLeaveHospitalDate().isEmpty()?DateUtil.formatDateTime(DateUtil.now()):DateUtil.parseDateTime(aBehospitalInfoVO.getLeaveHospitalDate()))
+                        .set("gmt_modified", DateUtil.now());
+
+                Boolean flag=update(new BehospitalInfo(),updateWrapper);
+                aMedAbnormalInfoFacade.saveAbnormalInfo("病人住院登记-出院成功",aBehospitalInfoVO.getBehospitalCode(),JSON.toJSONString(aBehospitalInfoVO),flag.toString(),"");
+                return RespDTO.onSuc(flag);
+            }
+        }catch (Exception e){
+            aMedAbnormalInfoFacade.saveAbnormalInfo("病人住院登记-出院失败","",JSON.toJSONString(aBehospitalInfoVO),"",e.getMessage());
+            return RespDTO.onError(e.getMessage());
+        }
+
+    }
 }

+ 7 - 0
src/main/java/com/diagbot/facade/data/AMedicalRecordFacade.java

@@ -557,6 +557,13 @@ public class AMedicalRecordFacade extends MedicalRecordServiceImpl {
         } else {
             modeId = Long.valueOf("0");
         }
+//        if (modeId.equals(Long.valueOf("0"))){
+//            String recTitle=medicalRecord.getRecTitle();
+//            if (recTitle.contains("查") && recTitle.contains("房")){
+//
+//            }
+//
+//        }
         return modeId;
     }
 

+ 1 - 1
src/main/java/com/diagbot/task/ViewTask.java

@@ -59,7 +59,7 @@ public class ViewTask implements SchedulingConfigurer{
                 //2.1 从数据库获取执行周期
                 taskDate = sysTaskCronFacade.getOne(new QueryWrapper<SysTaskCron>()
                         .eq("cron_code", "ViewTASK"), false);
-                String cron = "0 0 22 * * ? ";
+                String cron = "0 0 23 * * ? ";
                 //2.2 合法性校验.
                 if (null != taskDate && StringUtil.isNotBlank(taskDate.getCron())) {
                     cron = taskDate.getCron();

+ 7 - 0
src/main/java/com/diagbot/web/DataController.java

@@ -105,6 +105,13 @@ public class DataController {
         return aBehospitalInfoFacade.executeBehospital(list);
     }
 
+    @ApiOperation(value = "数据引擎-获取病人出院信息")
+    @PostMapping("/sendLeaveInfo")
+    @SysLogger("sendLeaveInfo")
+    public RespDTO sendLeaveInfo(@RequestBody ABehospitalInfoVO aBehospitalInfoVO){
+        return aBehospitalInfoFacade.sendLeaveInfo(aBehospitalInfoVO);
+    }
+
     @ApiOperation(value = "数据引擎-获取医院医生医嘱信息")
     @PostMapping(value = "/sendDoctorAdvice")
     @SysLogger("sendDoctorAdvice")