Explorar el Código

住院证优化

lihong hace 1 año
padre
commit
5b60eeb011

+ 10 - 4
src/main/java/cn/hnthyy/thmz/controller/mz/ZyReqController.java

@@ -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", "打印入院通知单成功");

+ 4 - 0
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzZyReq.java

@@ -117,4 +117,8 @@ public class MzZyReq {
      * 入院途径代码  1 急诊 2 门诊 3 其他医疗机构转入 9 其他
      */
     private Integer routeOfAdmission;
+    /**
+     * 入院途径名称
+     */
+    private String routeOfAdmissionName;
 }

+ 5 - 4
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -3444,10 +3444,11 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                     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 = mzZdCommonMapper.selectRouteOfAdmission();
+                    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")));
+                }
                 mzPrescriptionVo.setMzZyReq(mzZyReq);
             }
         }

+ 1 - 0
src/main/resources/static/js/mz/add_mzzyreq.js

@@ -593,6 +593,7 @@ function printZyReq(patientId, printType) {
                 }
                 $("#reqDeptZyReq").text(mzZyReq.reqWardName);
                 $("#smallDeptZyReq").text(mzZyReq.smallDeptName);
+                $("#routeOfAdmissionName").text(mzZyReq.routeOfAdmissionName);
                 //$("#admissStatusZyReq").text(mzZyReq.admissStatus);
                 // $("input:checkbox[value='" + mzZyReq.admissStatus + "']").prop('checked', true);
                 $("input:checkbox[name='admissStatusZyReq']").each(function (i, e) {

+ 2 - 0
src/main/resources/static/js/mz/clinic.js

@@ -11168,6 +11168,7 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
                         }
                         $("#reqDeptZyReq").text(mzZyReq.reqWardName);
                         $("#smallDeptZyReq").text(mzZyReq.smallDeptName);
+                        $("#routeOfAdmissionName").text(mzZyReq.routeOfAdmissionName);
                         //$("#admissStatusZyReq").text(mzZyReq.admissStatus);
                         // $("input:checkbox[value='" + mzZyReq.admissStatus + "']").attr('checked', 'true');
                         $("input:checkbox[name='admissStatusZyReq']").each(function (i, e) {
@@ -11768,6 +11769,7 @@ function printZyReq(patientId, printType) {
                 }
                 $("#reqDeptZyReq").text(mzZyReq.reqWardName);
                 $("#smallDeptZyReq").text(mzZyReq.smallDeptName);
+                $("#routeOfAdmissionName").text(mzZyReq.routeOfAdmissionName);
                 //$("#admissStatusZyReq").text(mzZyReq.admissStatus);
                 // $("input:checkbox[value='" + mzZyReq.admissStatus + "']").attr('checked', 'true');
                 $("input:checkbox[name='admissStatusZyReq']").each(function (i, e) {

+ 1 - 1
src/main/resources/templates/mz/add_mzzyreq.html

@@ -251,7 +251,7 @@
                     </td>
                 </tr>
                 <tr>
-                    <td colspan="2">付费方式:<span
+                    <td colspan="2">入院途径:<span id="routeOfAdmissionName"
                             style="width: 245px;display: inline-block;border-bottom: 1px solid grey;"></span>
                     <td colspan="3">电话:<span id="phoneZyReq"
                                              style="width: 120px;display: inline-block;border-bottom: 1px solid grey;"></span>

+ 1 - 1
src/main/resources/templates/mz/clinic.html

@@ -3102,7 +3102,7 @@
                     </td>
                 </tr>
                 <tr>
-                    <td colspan="2">付费方式:<span
+                    <td colspan="2">入院途径:<span id="routeOfAdmissionName"
                             style="width: 245px;display: inline-block;border-bottom: 1px solid grey;"></span>
                     <td colspan="3">电话:<span id="phoneZyReq"
                                              style="width: 120px;display: inline-block;border-bottom: 1px solid grey;"></span>