|
@@ -16,17 +16,20 @@ import cn.hnthyy.thmz.service.his.RegionService;
|
|
|
import cn.hnthyy.thmz.service.his.ResponceTypeService;
|
|
|
import cn.hnthyy.thmz.service.his.mz.EmployeeService;
|
|
|
import cn.hnthyy.thmz.service.his.mz.MzPatientMiService;
|
|
|
+import cn.hnthyy.thmz.service.his.mz.MzZdCommonService;
|
|
|
import cn.hnthyy.thmz.service.his.mz.MzZyReqService;
|
|
|
import cn.hnthyy.thmz.service.his.zd.ZdUnitCodeService;
|
|
|
import cn.hnthyy.thmz.service.thmz.UserDeptRelationService;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
+import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Comparator;
|
|
@@ -52,6 +55,8 @@ public class ZyReqController {
|
|
|
private RegionService regionService;
|
|
|
@Autowired
|
|
|
private UserDeptRelationService userDeptRelationService;
|
|
|
+ @Resource
|
|
|
+ private MzZdCommonService mzZdCommonService;
|
|
|
/**
|
|
|
* 查询病人的住院证
|
|
|
*
|
|
@@ -120,10 +125,11 @@ public class ZyReqController {
|
|
|
Employee employee= employeeService.queryByUserCode(mzZyReq.getDoctorCode());
|
|
|
mzZyReq.setDoctorName(employee!=null?employee.getEmployeeName():"");
|
|
|
}
|
|
|
-// if(mzZyReq.getAdmissStatus()!=null && StringUtils.isNotBlank(mzZyReq.getAdmissStatus())){
|
|
|
-// CodeNameEntity codeNameEntity= mzZdCommonService.queryAdmissStatusByCode(mzZyReq.getAdmissStatus());
|
|
|
-// mzZyReq.setAdmissStatus(codeNameEntity!=null?codeNameEntity.getName():"");
|
|
|
-// }
|
|
|
+ if(mzZyReq.getRouteOfAdmission() !=null){
|
|
|
+ List<Map<String, Object>> mapList = mzZdCommonService.queryRouteOfAdmission();
|
|
|
+ Map<Integer, List<Map<String, Object>>> codeMap = mapList.stream().collect(Collectors.groupingBy(item -> Convert.toInt(item.get("code"))));
|
|
|
+ mzZyReq.setRouteOfAdmissionName(codeMap.get(mzZyReq.getRouteOfAdmission())==null ? null : Convert.toStr(codeMap.get(mzZyReq.getRouteOfAdmission()).get(0).get("name")));
|
|
|
+ }
|
|
|
}
|
|
|
resultMap.put("code", 0);
|
|
|
resultMap.put("message", "打印入院通知单成功");
|