lihong 1 month ago
parent
commit
90ec61f02c

+ 1 - 1
src/main/java/cn/hnthyy/thmz/controller/mz/MzChargeDetailController.java

@@ -3157,7 +3157,7 @@ public class MzChargeDetailController {
     }
     }
 
 
 
 
-    @GetMapping("/queryYjEntryHistory")
+    @PostMapping("/queryYjEntryHistory")
     @UserLoginToken
     @UserLoginToken
     public R queryYjEntryHistory(){
     public R queryYjEntryHistory(){
         List<YjEntryPrintVo> yjEntryPrintVo =  mzChargeDetailService.queryYjEntryHistory();
         List<YjEntryPrintVo> yjEntryPrintVo =  mzChargeDetailService.queryYjEntryHistory();

+ 2 - 1
src/main/java/cn/hnthyy/thmz/entity/his/mz/YjEntryPrintVo.java

@@ -1,6 +1,7 @@
 package cn.hnthyy.thmz.entity.his.mz;
 package cn.hnthyy.thmz.entity.his.mz;
 
 
 import lombok.Data;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 
 import java.math.BigDecimal;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.Date;
@@ -21,7 +22,7 @@ public class YjEntryPrintVo {
     private String doctorName;
     private String doctorName;
     private String qrCodeUrl;
     private String qrCodeUrl;
     private BigDecimal totalFee;
     private BigDecimal totalFee;
-    private Date visitData;
+    private Date visitDate;
 
 
     List<MzChargeDetail> mzChargeDetails;
     List<MzChargeDetail> mzChargeDetails;
 }
 }

+ 15 - 2
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -7940,6 +7940,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
                 .times(times)
                 .times(times)
                 .receiptNo(0)
                 .receiptNo(0)
                 .orderType(6)
                 .orderType(6)
+                .chargeDate(now)
                 .build());
                 .build());
         mzVisitTableMapper.insertMzVisitTable(newMzVisitTable);
         mzVisitTableMapper.insertMzVisitTable(newMzVisitTable);
         MzPatientMi updateMzPatientMi = new MzPatientMi();
         MzPatientMi updateMzPatientMi = new MzPatientMi();
@@ -7967,14 +7968,21 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         AssertUtil.isNotBlank(mzVisitTable,"没有要打印的就诊记录信息");
         AssertUtil.isNotBlank(mzVisitTable,"没有要打印的就诊记录信息");
         data.setPatientId(patientId);
         data.setPatientId(patientId);
         data.setTimes(times);
         data.setTimes(times);
+        data.setVisitDate(mzVisitTable.getVisitDate());
         ZdUnitCode zdUnitCode = zdUnitCodeService.queryByCode(mzVisitTable.getVisitDeptCode());
         ZdUnitCode zdUnitCode = zdUnitCodeService.queryByCode(mzVisitTable.getVisitDeptCode());
         data.setDeptName(zdUnitCode == null ? "" : zdUnitCode.getName());
         data.setDeptName(zdUnitCode == null ? "" : zdUnitCode.getName());
         Employee employee = employeeService.queryByUserCode(mzVisitTable.getDoctorCode());
         Employee employee = employeeService.queryByUserCode(mzVisitTable.getDoctorCode());
         data.setDoctorName(employee == null ? "" :employee.getEmployeeName());
         data.setDoctorName(employee == null ? "" :employee.getEmployeeName());
         List<MzChargeDetail> mzChargeDetails = mzChargeDetailMapper.selectYjEntryCharge(patientId,times);
         List<MzChargeDetail> mzChargeDetails = mzChargeDetailMapper.selectYjEntryCharge(patientId,times);
         AssertUtil.isNotBlank(mzChargeDetails,"没有要打印的费用信息");
         AssertUtil.isNotBlank(mzChargeDetails,"没有要打印的费用信息");
+        for(MzChargeDetail mzChargeDetail : mzChargeDetails){
+            data.setName(mzChargeDetail.getName());
+            ZdChargeItem zdChargeItem = zdChargeItemService.queryZdChargeItemByCode(mzChargeDetail.getChargeItemCode());
+            mzChargeDetail.setTcName(zdChargeItem.getName());
+            mzChargeDetail.setDrugUnit(zdChargeItem.getChargeUnit());
+            mzChargeDetail.setInstructionText(zdChargeItem.getDescriptions());
+        }
         BigDecimal sum = mzChargeDetails.stream().map(MzChargeDetail::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
         BigDecimal sum = mzChargeDetails.stream().map(MzChargeDetail::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
-        log.info("sum={}",sum);
         data.setMzChargeDetails(mzChargeDetails);
         data.setMzChargeDetails(mzChargeDetails);
         data.setTotalFee(sum);
         data.setTotalFee(sum);
         return data;
         return data;
@@ -7990,9 +7998,14 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
     public List<YjEntryPrintVo> queryYjEntryHistory() {
     public List<YjEntryPrintVo> queryYjEntryHistory() {
         String userIdCode = TokenUtil.getUser().getUserIdCode();
         String userIdCode = TokenUtil.getUser().getUserIdCode();
         List<MzPatientMi> list = mzChargeDetailMapper.selectYjEntryHistory(userIdCode);
         List<MzPatientMi> list = mzChargeDetailMapper.selectYjEntryHistory(userIdCode);
+        List<YjEntryPrintVo> yjEntryPrintVos = new ArrayList<>();
         if(CollUtil.isNotEmpty(list)){
         if(CollUtil.isNotEmpty(list)){
+            for(MzPatientMi mzPatientMi : list){
+                YjEntryPrintVo yjEntryPrintVo = queryYjEntryPrintData(mzPatientMi.getPatientId(), mzPatientMi.getTimes());
+                yjEntryPrintVos.add(yjEntryPrintVo);
+            }
         }
         }
-        return null;
+        return yjEntryPrintVos;
     }
     }
 
 
 
 

+ 63 - 26
src/main/resources/static/js/mz/yj_item_entry.js

@@ -516,6 +516,7 @@ function saveYjItem() {
  */
  */
 function openYjEntryHistoryModel() {
 function openYjEntryHistoryModel() {
     $("#yjEntryModal").modal();
     $("#yjEntryModal").modal();
+    initYjHistoryTable();
 }
 }
 
 
 /**
 /**
@@ -532,7 +533,7 @@ function initYjHistoryTable() {
         pagination: true,                   //是否显示分页(*)
         pagination: true,                   //是否显示分页(*)
         sortable: true,                     //是否启用排序
         sortable: true,                     //是否启用排序
         sortOrder: "asc",                   //排序方式
         sortOrder: "asc",                   //排序方式
-        queryParams: diagQueryParams,           //传递参数(*)
+        queryParams: {},           //传递参数(*)
         sidePagination: "client",           //分页方式:client客户端分页,server服务端分页(*)
         sidePagination: "client",           //分页方式:client客户端分页,server服务端分页(*)
         pageNumber: 1,                       //初始化加载第一页,默认第一页
         pageNumber: 1,                       //初始化加载第一页,默认第一页
         pageSize: 10,                       //每页的记录行数(*)
         pageSize: 10,                       //每页的记录行数(*)
@@ -561,20 +562,57 @@ function initYjHistoryTable() {
                 valign: 'middle',
                 valign: 'middle',
                 formatter: function (value, row, index) {
                 formatter: function (value, row, index) {
                     // var rowData = JSON.stringify(row);
                     // var rowData = JSON.stringify(row);
-                    var str = '<button type="button" class="btn btn-primary  btn-sm" onclick="chongPrint(\'' + row.code + '\',\'' + row.name + '\')">选中</button>';
+                    var str = '<button type="button" class="btn btn-primary  btn-sm" onclick="chongPrint(\'' + row.patientId + '\',\'' + row.times + '\')">打印</button>';
                     return str;
                     return str;
                 }
                 }
             },
             },
             {
             {
-                field: 'code',
-                title: '诊断编码',
+                field: 'patientId',
+                title: '门诊号',
+                align: "center",
+                valign: 'middle'
+
+            },
+            {
+                field: 'times',
+                title: '次数',
                 align: "center",
                 align: "center",
                 valign: 'middle'
                 valign: 'middle'
 
 
             },
             },
             {
             {
                 field: 'name',
                 field: 'name',
-                title: '诊断名称',
+                title: '姓名',
+                align: "center",
+                valign: 'middle'
+
+            },
+            {
+                field: 'deptName',
+                title: '科室',
+                align: "center",
+                valign: 'middle'
+
+            },
+            {
+                field: 'doctorName',
+                title: '医生',
+                align: "center",
+                valign: 'middle'
+
+            },
+            {
+                field: 'visitDate',
+                title: '时间',
+                align: "center",
+                valign: 'middle',
+                formatter: function (value, row, index) {
+                    return format(value,'yyyy-MM-dd HH:mm:ss')
+                }
+            },
+            {
+                field: 'totalFee',
+                title: '总金额(元)',
                 align: "center",
                 align: "center",
                 valign: 'middle'
                 valign: 'middle'
 
 
@@ -602,16 +640,14 @@ function initYjHistoryTable() {
                 };
                 };
             }
             }
             return {
             return {
-                "total": ress.total,//总页数
+                "total": ress.data.length,//总页数
                 "rows": ress.data   //数据
                 "rows": ress.data   //数据
             };
             };
         },
         },
     });
     });
 }
 }
 
 
-function chongPrint(patientId,times) {
 
 
-}
 
 
 //查询病人信息
 //查询病人信息
 function queryMzPatient() {
 function queryMzPatient() {
@@ -674,6 +710,10 @@ function selectDeptModal() {
     $("#selectDeptModal").modal("show");
     $("#selectDeptModal").modal("show");
 }
 }
 
 
+function chongPrint(patientId,times) {
+  setPrintDetail(patientId,times)
+    $("#yjEntryModal").modal("hide");
+}
 
 
 /**
 /**
  * 加载搜索窗口
  * 加载搜索窗口
@@ -705,33 +745,30 @@ function initSearchList(content, searchTextIds, width, height) {
 }
 }
 
 
 function setPrintDetail(patientId,times) {
 function setPrintDetail(patientId,times) {
-    if(rightData.length == 0){
-        errorMesageSimaple('没有要打印的数据')
-        return
-    }
     postAjaxJsonHttpRequst("/thmz/queryYjEntryPrintData",{patientId:patientId,times:times},true,function (res) {
     postAjaxJsonHttpRequst("/thmz/queryYjEntryPrintData",{patientId:patientId,times:times},true,function (res) {
         if(res.code == 0){
         if(res.code == 0){
-            $("#patientId_t").html("门诊号:"+ res.patientId)
-            $("#name_t").html("姓名:"+ res.name)
-            $("#date_t").html("日期:"+ res.visitData)
-            $("#dept_t").html("科室:"+ res.deptName)
-            $("#doctor_t").html("医生:"+ res.userName)
+            $("#patientId_t").html("门诊号:"+ res.data.patientId)
+            $("#name_t").html("姓名:"+ res.data.name)
+            $("#date_t").html("日期:"+ format(res.data.visitDate,'yyyy-MM-dd'))
+            $("#dept_t").html("科室:"+ res.data.deptName)
+            $("#doctor_t").html("医生:"+ res.data.doctorName)
             let html = "";
             let html = "";
-            for (let i = 0; i <res.data.length ; i++) {
+            let mzChargeDetails = res.data.mzChargeDetails
+            for (let i = 0; i <mzChargeDetails.length ; i++) {
                 html += "<tr>";
                 html += "<tr>";
-                html += ' <td  style="width: 17%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].code + '</td>';
-                html += ' <td style="width: 45%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].name + '</td>';
-                html += ' <td style="width: 10%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].descriptions + '</td>';
-                html += ' <td style="width: 10%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].chargeUnit + '</td>';
-                html += ' <td style="width: 6%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].unitPrice + '</td>';
-                html += ' <td style="width: 6%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].quantity + '</td>';
-                html += ' <td style="width: 6%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + res.data[i].amount + '</td>';
+                html += ' <td  style="width: 17%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].chargeItemCode + '</td>';
+                html += ' <td style="width: 45%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].tcName + '</td>';
+                html += ' <td style="width: 10%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].instructionText + '</td>';
+                html += ' <td style="width: 10%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].drugUnit + '</td>';
+                html += ' <td style="width: 6%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].unitPrice + '</td>';
+                html += ' <td style="width: 6%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].quantity + '</td>';
+                html += ' <td style="width: 6%;padding-left: 8px;padding-top: 4px;word-break:break-all;">' + mzChargeDetails[i].amount + '</td>';
 
 
                 html += "</tr>";
                 html += "</tr>";
             }
             }
             html += '<tr><td colspan="8"><div style="border:0;border-top:1px solid #000;overflow:hidden;font-size: 13px;"><div style="float: right;font-weight: 700;padding-top: 4px;padding-bottom: 4px;"><span>金额合计:</span><span id="total_count" style="margin-left: 50px;"></span></div></div></td></tr>';
             html += '<tr><td colspan="8"><div style="border:0;border-top:1px solid #000;overflow:hidden;font-size: 13px;"><div style="float: right;font-weight: 700;padding-top: 4px;padding-bottom: 4px;"><span>金额合计:</span><span id="total_count" style="margin-left: 50px;"></span></div></div></td></tr>';
             $("#fymx_table_body").html(html);
             $("#fymx_table_body").html(html);
-            $("#total_count").text(res.totalFee);
+            $("#total_count").text(res.data.totalFee+' 元');
 
 
             setTimeout(printChargeDetail,500)
             setTimeout(printChargeDetail,500)
         }else {
         }else {

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

@@ -4778,9 +4778,9 @@
     <div class="modal-dialog modal-lg">
     <div class="modal-dialog modal-lg">
         <div class="modal-content" style="width: 1100px;max-height: 550px;overflow-y: auto;">
         <div class="modal-content" style="width: 1100px;max-height: 550px;overflow-y: auto;">
             <div class="modal-header">
             <div class="modal-header">
-                <button type="button" class="close" data-dismiss="modal" onclick="clearCrbMainCard(true)"><span
-                        aria-hidden="true">×</span>
-                </button>
+<!--                <button type="button" class="close" data-dismiss="modal" onclick="clearCrbMainCard(true)"><span-->
+<!--                        aria-hidden="true">×</span>-->
+<!--                </button>-->
                 <h4 class="modal-title modal-title-thmz">传染病上报</h4>
                 <h4 class="modal-title modal-title-thmz">传染病上报</h4>
             </div>
             </div>
             <div class="modal-body">
             <div class="modal-body">

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

@@ -217,7 +217,7 @@
             <div class="modal-header">
             <div class="modal-header">
                 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
                 <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span>
                 </button>
                 </button>
-                <h4 class="modal-title modal-title-thmz">医技录入费用记录(交费)</h4>
+                <h4 class="modal-title modal-title-thmz">医技录入费用记录(交费)</h4>
             </div>
             </div>
             <div class="modal-body">
             <div class="modal-body">
                 <div class="col-md-12 col-sm-12 col-xs-12">
                 <div class="col-md-12 col-sm-12 col-xs-12">