Browse Source

增加门诊统筹补录退款明细

hurugang 2 năm trước cách đây
mục cha
commit
77ee1f4fec

+ 6 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/ChargeFeeVoController.java

@@ -545,8 +545,12 @@ public class ChargeFeeVoController {
             Collections.sort(sfzffpmx); // 按发票号排序
             resultMap.put("zffpmx", sfzffpmx);
             resultMap.put("zizhufpmx", chargeFeeVoService.queryZiZhuReceiptVo(tokenUser.getUserIdCode(), null));
+            //医保记账明细
             resultMap.put("ybjzmx", chargeFeeVoService.queryMxByChequeType(tokenUser.getUserIdCode(), null,YesNoEnum.YES.code.toString()));
+            //个人账户明细
             resultMap.put("grzhmx", chargeFeeVoService.queryMxByChequeType(tokenUser.getUserIdCode(), null,YesNoEnum.NO.code.toString()));
+            //门诊补录明细
+            resultMap.put("mztcblmx", chargeFeeVoService.queryMxByChequeNo(tokenUser.getUserIdCode(), null));
             resultMap.put("user", tokenUser);
             resultMap.put("code", 0);
             resultMap.put("message", "查询费用日结报表成功");
@@ -659,6 +663,8 @@ public class ChargeFeeVoController {
             resultMap.put("zizhufpmx", chargeFeeVoService.queryZiZhuReceiptVo(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate()));
             resultMap.put("ybjzmx", chargeFeeVoService.queryMxByChequeType(tokenUser.getUserIdCode(), chargeFeeParamsVo.getDcountDate(),YesNoEnum.YES.code.toString()));
             resultMap.put("grzhmx", chargeFeeVoService.queryMxByChequeType(tokenUser.getUserIdCode(), chargeFeeParamsVo.getDcountDate(),YesNoEnum.NO.code.toString()));
+            //门诊补录明细
+            resultMap.put("mztcblmx", chargeFeeVoService.queryMxByChequeNo(tokenUser.getUserIdCode(), chargeFeeParamsVo.getDcountDate()));
             resultMap.put("code", 0);
             resultMap.put("message", "查询重打费用日结报表成功");
             return resultMap;

+ 24 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/mz/ChargeFeeVoMapper.java

@@ -1175,4 +1175,28 @@ public interface ChargeFeeVoMapper {
             " order by b.charge_date asc </script>"})
     List<Map<String,Object>> selectMxByChequeType(@Param("userIdCode") String userIdCode, @Param("dcountDate") Date dcountDate,@Param("caseType") String caseType);
 
+
+
+    /**
+     * 查询门诊统筹补录明细
+     *
+     * @param userIdCode
+     * @param dcountDate
+     * @return
+     */
+    @Select({"<script>",
+            "select name=a.name, " +
+                    "patient_id=rtrim(b.patient_id), " +
+                    "amount=sum(b.amount) " +
+                    "from mz_patient_mi a WITH(NOLOCK) , mz_deposit_file b WITH(NOLOCK) " +
+                    "where b.op_id=#{userIdCode} and b.patient_id=a.patient_id and  b.cheque_no ='1' and b.pay_mark='0'" +
+                    "<when test='dcountDate!=null'>",
+            " and dcount_date=#{dcountDate,jdbcType=TIMESTAMP} ",
+            "</when>",
+            "<when test='dcountDate == null'>",
+            " and dcount_no =0 ",
+            "</when>",
+            " GROUP BY a.name,b.patient_id,b.charge_date order by b.charge_date asc </script>"})
+    List<Map<String,Object>> selectMxByChequeNo(@Param("userIdCode") String userIdCode, @Param("dcountDate") Date dcountDate);
+
 }

+ 10 - 0
src/main/java/cn/hnthyy/thmz/service/his/mz/ChargeFeeVoService.java

@@ -349,4 +349,14 @@ public interface ChargeFeeVoService {
      * @return
      */
     List<Map<String,Object>> queryMxByChequeType(String userIdCode,Date dcountDate,String caseType);
+
+
+    /**
+     * 查询门诊统筹补录明细
+     *
+     * @param userIdCode
+     * @param dcountDate
+     * @return
+     */
+    List<Map<String,Object>> queryMxByChequeNo(String userIdCode, Date dcountDate);
 }

+ 5 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/ChargeFeeVoServiceImpl.java

@@ -300,4 +300,9 @@ public class ChargeFeeVoServiceImpl implements ChargeFeeVoService {
     public List<Map<String, Object>> queryMxByChequeType(String userIdCode, Date dcountDate, String caseType) {
         return chargeFeeVoMapper.selectMxByChequeType(userIdCode,dcountDate,caseType);
     }
+
+    @Override
+    public List<Map<String, Object>> queryMxByChequeNo(String userIdCode, Date dcountDate) {
+        return chargeFeeVoMapper.selectMxByChequeNo(userIdCode,dcountDate);
+    }
 }

+ 24 - 0
src/main/resources/static/js/mz/daily.js

@@ -541,6 +541,30 @@ function getRjbb() {
                     $("#mztcgrzhmx").html(html);
                 }
 
+
+                //门诊补录明细
+                if (res.mztcblmx.length == 0) {
+                    $("#mztcblmx_table").css("display", "none");
+                    $("#mztcblmx").html(null);
+                } else if (res.mztcblmx.length > 0) {
+                    $("#mztcblmx_table").css("display", "block");
+                    var html = '';
+                    for (var i = 0; i < res.mztcblmx.length; i++) {
+                        var patientId = res.mztcblmx[i].patient_id;
+                        if (i % 2 == 0) {
+                            html += '<tr>';
+                        }
+                        html += '<td>' + patientId + '</td>';
+                        html += '<td>' + res.mztcblmx[i].name + '</td>';
+                        //退费是负数
+                        html += '<td>-' + res.mztcblmx[i].amount.toFixed(2) + '</td>';
+                        if (i % 2 == 1 || i == res.mztcblmx.length - 1) {
+                            html += '</tr>';
+                        }
+                    }
+                    $("#mztcblmx").html(html);
+                }
+
                 $("#username_zbr").html(res.user.userName);
             } else if (res.code == -1) {
                 new PNotify({

+ 24 - 0
src/main/resources/static/js/mz/daily_repeat_print.js

@@ -710,6 +710,30 @@ function getRjbb() {
                 }
 
 
+                //门诊补录明细
+                if (res.mztcblmx.length == 0) {
+                    $("#mztcblmx_table").css("display", "none");
+                    $("#mztcblmx").html(null);
+                } else if (res.mztcblmx.length > 0) {
+                    $("#mztcblmx_table").css("display", "block");
+                    var html = '';
+                    for (var i = 0; i < res.mztcblmx.length; i++) {
+                        var patientId = res.mztcblmx[i].patient_id;
+                        if (i % 2 == 0) {
+                            html += '<tr>';
+                        }
+                        html += '<td>' + patientId + '</td>';
+                        html += '<td>' + res.mztcblmx[i].name + '</td>';
+                        //退费是负数
+                        html += '<td>-' + res.mztcblmx[i].amount.toFixed(2) + '</td>';
+                        if (i % 2 == 1 || i == res.mztcblmx.length - 1) {
+                            html += '</tr>';
+                        }
+                    }
+                    $("#mztcblmx").html(html);
+                }
+
+
             } else if (res.code == -1) {
                 new PNotify({
                     title: '错误提示',

+ 25 - 1
src/main/resources/templates/mz/daily.html

@@ -455,7 +455,7 @@
                             </tbody>
                         </table>
                     </div>
-                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 100px;">
+                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 10px;">
                         <table style="width: 96%;padding-left: 20px;display: none;border-top:1px solid"
                                id="mztcgrzhmx_table">
                             <thead>
@@ -478,6 +478,30 @@
                             </tbody>
                         </table>
                     </div>
+
+                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 100px;">
+                        <table style="width: 96%;padding-left: 20px;display: none;border-top:1px solid"
+                               id="mztcblmx_table">
+                            <thead>
+                            <tr>
+                                <td colspan="9">门诊统筹补录退款金额明细:</td>
+                            </tr>
+                            <tr>
+                            <tr>
+                                <td width="180px">门诊ID</td>
+                                <td width="120px">姓名</td>
+                                <td width="100px">金额</td>
+                                <td width="180px">门诊ID</td>
+                                <td width="120px">姓名</td>
+                                <td width="100px">金额</td>
+                            </tr>
+                            </tr>
+                            </thead>
+                            <tbody id="mztcblmx">
+
+                            </tbody>
+                        </table>
+                    </div>
                     <div><span>结账人签字:</span><span style="text-decoration: underline" id="username_zbr"></span><span
                             style="margin-left: 120px;">收款人签字:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
                             style="margin-left: 120px;">审核人签字:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>

+ 25 - 1
src/main/resources/templates/mz/daily_repeat_print.html

@@ -483,7 +483,7 @@
                             </tbody>
                         </table>
                     </div>
-                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 100px;">
+                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 10px;">
                         <table style="width: 96%;padding-left: 20px;display: none;border-top:1px solid"
                                id="mztcgrzhmx_table">
                             <thead>
@@ -506,6 +506,30 @@
                             </tbody>
                         </table>
                     </div>
+
+                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 100px;">
+                        <table style="width: 96%;padding-left: 20px;display: none;border-top:1px solid"
+                               id="mztcblmx_table">
+                            <thead>
+                            <tr>
+                                <td colspan="9">门诊统筹补录退款金额明细:</td>
+                            </tr>
+                            <tr>
+                            <tr>
+                                <td width="180px">门诊ID</td>
+                                <td width="120px">姓名</td>
+                                <td width="100px">金额</td>
+                                <td width="180px">门诊ID</td>
+                                <td width="120px">姓名</td>
+                                <td width="100px">金额</td>
+                            </tr>
+                            </tr>
+                            </thead>
+                            <tbody id="mztcblmx">
+
+                            </tbody>
+                        </table>
+                    </div>
                     <div><span>结账人签字:</span><span style="text-decoration: underline" id="username_zbr"></span><span
                             style="margin-left: 120px;">收款人签字:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span
                             style="margin-left: 120px;">审核人签字:</span><span style="text-decoration: underline">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>