|
@@ -5,7 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.dto.data.ABehospitalInfoDTO;
|
|
|
-import com.diagbot.entity.*;
|
|
|
+import com.diagbot.entity.BehospitalInfo;
|
|
|
+import com.diagbot.entity.MedicalRecord;
|
|
|
+import com.diagbot.entity.QcAbnormal;
|
|
|
+import com.diagbot.entity.QcType;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.facade.QcAbnormalFacade;
|
|
|
import com.diagbot.facade.QcTypeFacade;
|
|
@@ -16,6 +19,7 @@ import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.util.TZDBConn;
|
|
|
import com.diagbot.vo.data.ABehospitalInfoVO;
|
|
|
import com.diagbot.vo.data.ADeleteFlagVO;
|
|
|
+import com.diagbot.vo.data.APlaceFileVO;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
@@ -221,4 +225,29 @@ public class ABehospitalInfoFacade extends BehospitalInfoServiceImpl {
|
|
|
return RespDTO.onError(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public RespDTO placeFileFlag(APlaceFileVO aPlaceFileVO){
|
|
|
+ try {
|
|
|
+ //验证数据是否存在
|
|
|
+ if(StringUtil.isEmpty(aPlaceFileVO.getBehospitalCode())){
|
|
|
+ return RespDTO.onError("请输入病人住院编码!");
|
|
|
+ }else if(aPlaceFileVO.getHospitalId()==null){
|
|
|
+ return RespDTO.onError("请输入医院编码!");
|
|
|
+ }else{
|
|
|
+ UpdateWrapper<BehospitalInfo> updateWrapper=new UpdateWrapper<>();
|
|
|
+ updateWrapper.eq("behospital_code", aPlaceFileVO.getBehospitalCode())
|
|
|
+ .eq("hospital_id", aPlaceFileVO.getHospitalId())
|
|
|
+ .eq("is_deleted",IsDeleteEnum.N)
|
|
|
+ .set("is_placefile","1")
|
|
|
+ .set("placefile_date",aPlaceFileVO.getPlaceFileDate().isEmpty()?null:DateUtil.parseDateTime(aPlaceFileVO.getPlaceFileDate()))
|
|
|
+ .set("gmt_modified", DateUtil.now());
|
|
|
+
|
|
|
+ Boolean flag=update(new BehospitalInfo(),updateWrapper);
|
|
|
+ return RespDTO.onSuc(flag);
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ aMedAbnormalInfoFacade.saveAbnormalInfo("病人住院登记-归档",JSON.toJSONString(aPlaceFileVO),"",e.getMessage());
|
|
|
+ return RespDTO.onError(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|