|
@@ -447,15 +447,30 @@ public class SiManageService {
|
|
|
return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "没有查询到符合条件的数据。");
|
|
|
}
|
|
|
|
|
|
- // 增加科室,科室,诊断,接诊医生
|
|
|
+ // 增加科室,诊断,接诊医生
|
|
|
// 住院 21 9902 99940 22 门诊 11 9901 14 53
|
|
|
List<ZyInactpatient> zybr = new ArrayList<>();
|
|
|
List<Map> mzbr = new ArrayList<>();
|
|
|
+ // list数据拆分len一组
|
|
|
+ List<List<SiSetlinfo>> result = new ArrayList<>();
|
|
|
+ int len = 80;
|
|
|
+ int size = list.size();
|
|
|
+ int count = (size + len - 1) / len;
|
|
|
+ for (int i = 0; i < count; i++) {
|
|
|
+ List<SiSetlinfo> subList = list.subList(i * len, (Math.min((i + 1) * len, size)));
|
|
|
+ result.add(subList);
|
|
|
+ }
|
|
|
if("21".equals(prm.getClrType()) || "9902".equals(prm.getClrType()) || "99940".equals(prm.getClrType())
|
|
|
|| "22".equals(prm.getClrType())){
|
|
|
- zybr = setlinfoDao.selectZyPatient(list);
|
|
|
+ for(List<SiSetlinfo> l : result){
|
|
|
+ List<ZyInactpatient> zyList = setlinfoDao.selectZyPatient(l);
|
|
|
+ zybr.addAll(zyList);
|
|
|
+ }
|
|
|
} else {
|
|
|
- mzbr = setlinfoDao.selectMzPatient(list);
|
|
|
+ for(List<SiSetlinfo> l : result) {
|
|
|
+ List<Map> mzList = setlinfoDao.selectMzPatient(l);
|
|
|
+ mzbr.addAll(mzList);
|
|
|
+ }
|
|
|
}
|
|
|
Map<String, ZyInactpatient> zyMap = new HashMap<>();
|
|
|
Map<String, Map> mzMap = new HashMap<>();
|
|
@@ -482,16 +497,24 @@ public class SiManageService {
|
|
|
|
|
|
// 添加科室,诊断,接诊医生
|
|
|
if(!zyMap.isEmpty()){
|
|
|
- ZyInactpatient br = zyMap.get(item.getPatNo() + "|" + item.getTimes());
|
|
|
- item.setDept(br.getDept());
|
|
|
- item.setDoctor(br.getJobDoctor());
|
|
|
- item.setMainDiagnosis(br.getClinicDiagStr());
|
|
|
+ ZyInactpatient br = zyMap.get(item.getPatNo().trim() + "|" + item.getTimes());
|
|
|
+ if(br != null){
|
|
|
+ item.setDept(br.getDept());
|
|
|
+ item.setDoctor(br.getJobDoctor());
|
|
|
+ item.setMainDiagnosis(br.getClinicDiagStr());
|
|
|
+ } else {
|
|
|
+ log.info("住院号:{} 没有病人信息", item.getPatNo());
|
|
|
+ }
|
|
|
} else {
|
|
|
if(!mzMap.isEmpty()){
|
|
|
- Map m = mzMap.get(item.getPatNo() + "|"+item.getTimes());
|
|
|
- item.setDept(String.valueOf(m.get("dept")));
|
|
|
- item.setDoctor(String.valueOf(m.get("doctor")));
|
|
|
- item.setMainDiagnosis(String.valueOf(m.get("zyzd")));
|
|
|
+ Map m = mzMap.get(item.getPatNo().trim() + "|"+item.getTimes());
|
|
|
+ if(m != null){
|
|
|
+ item.setDept(String.valueOf(m.get("dept")));
|
|
|
+ item.setDoctor(String.valueOf(m.get("doctor")));
|
|
|
+ item.setMainDiagnosis(String.valueOf(m.get("zyzd")));
|
|
|
+ } else {
|
|
|
+ log.info("住院号:{} 没有病人信息", item.getPatNo());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|