|
|
|
@ -3,6 +3,7 @@ package com.docus.server.message.busservice.impl;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.docus.core.util.FileUtil;
|
|
|
|
|
import com.docus.core.util.Func;
|
|
|
|
|
import com.docus.core.util.ObjectUtil;
|
|
|
|
|
import com.docus.infrastructure.core.exception.BaseException;
|
|
|
|
|
import com.docus.infrastructure.web.api.CommonResult;
|
|
|
|
|
import com.docus.infrastructure.web.api.ResultCode;
|
|
|
|
@ -306,6 +307,11 @@ public class SdBusinessServiceImpl implements SdBusinessService {
|
|
|
|
|
HisZyCyYzDTO hisZyCyYzDTO = null;
|
|
|
|
|
|
|
|
|
|
List<HisZyCyYzDTO> zyCyYzDtos = response.getData();
|
|
|
|
|
HisZyCyYzDTO dto = zyCyYzDtos.get(0);
|
|
|
|
|
if(ObjectUtil.isNotEmpty(dto)){
|
|
|
|
|
updateDisDeptAndWardCode(patientId,dto);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 3 5 状态可更新时间
|
|
|
|
|
List<String> status = Arrays.asList("3", "5");
|
|
|
|
|
for (HisZyCyYzDTO zyCyYzDTO : zyCyYzDtos) {
|
|
|
|
@ -318,7 +324,6 @@ public class SdBusinessServiceImpl implements SdBusinessService {
|
|
|
|
|
if (Objects.isNull(hisZyCyYzDTO)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 更新出院时间
|
|
|
|
|
tBasicMapper.updateDisDateTime(patientId, hisZyCyYzDTO.getStop_time());
|
|
|
|
|
// 再次判断
|
|
|
|
@ -326,6 +331,14 @@ public class SdBusinessServiceImpl implements SdBusinessService {
|
|
|
|
|
return count2 > 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void updateDisDeptAndWardCode(String patientId,HisZyCyYzDTO dto){
|
|
|
|
|
String deptCode = dto.getDept_code();
|
|
|
|
|
String deptCodeName = dto.getDept_code_name();
|
|
|
|
|
String wardCode = dto.getWard_code();
|
|
|
|
|
String wardCodeName = dto.getWard_code_name();
|
|
|
|
|
tBasicMapper.updateDisDeptAndWardCode(patientId,deptCode,deptCodeName,wardCode,wardCodeName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 判断医嘱返回结果是否是空
|
|
|
|
|
*
|
|
|
|
|