浏览代码

日报打印优化

hurugang 6 年之前
父节点
当前提交
150127a6fa

+ 3 - 2
src/main/java/cn/hnthyy/thmz/controller/ChargeFeeVoController.java

@@ -645,8 +645,9 @@ public class ChargeFeeVoController {
                 resultMap.put("message", "存在退费后发票未重打的发票信息,请 处理后再结账!");
                 return resultMap;
             }
-            Date dcountDate = chargeFeeVoService.dcountCharge(tokenUser.getUserIdCode());
-            resultMap.put("dcountDate", dcountDate);
+            //Date dcountDate = chargeFeeVoService.dcountCharge(tokenUser.getUserIdCode());
+            //resultMap.put("dcountDate", dcountDate);
+            resultMap.put("dcountDate", new Date());
             resultMap.put("code", 0);
             resultMap.put("message", "费用结算成功");
             return resultMap;

+ 34 - 34
src/main/java/cn/hnthyy/thmz/controller/MzyReqrecController.java

@@ -371,39 +371,39 @@ public class MzyReqrecController {
 
 
 
-    /**
-     * 挂号信息清洗
-     * 不做业务使用 (开发使用)
-     * @return
-     */
-    @UserLoginToken
-    @RequestMapping(value = "/reduction", method = {RequestMethod.GET})
-    public Map<String, Object> reduction() {
-        Map<String, Object> resultMap = new HashMap<>();
-        try {
-            List<MzyReqrec> mzyReqrecs=mzyReqrecService.queryAllCancel();
-            int count = 0;
-            if(mzyReqrecs!=null && mzyReqrecs.size()>0){
-                for (MzyReqrec mzyReqrec:mzyReqrecs){
-                    mzyReqrec.setTimes(-mzyReqrec.getTimes());
-                    int num =mzyReqrecService.modifyMzyReqrec(mzyReqrec);
-                    if(num>0){
-                        count++;
-                    }
-                }
-            }
-            log.info("数据清洗总数:"+count);
-            resultMap.put("code", 0);
-            resultMap.put("message", "数据清洗总数"+count);
-            return resultMap;
-        }catch (Exception e){
-            e.printStackTrace();
-            resultMap.put("code", -1);
-            resultMap.put("message", "数据清洗失败,系统出错,请联系管理员");
-            log.error("数据清洗失败,系统异常,错误信息{}",e.getMessage());
-            return resultMap;
-        }
-    }
+//    /**
+//     * 挂号信息清洗
+//     * 不做业务使用 (开发使用)
+//     * @return
+//     */
+//    @UserLoginToken
+//    @RequestMapping(value = "/reduction", method = {RequestMethod.GET})
+//    public Map<String, Object> reduction() {
+//        Map<String, Object> resultMap = new HashMap<>();
+//        try {
+//            List<MzyReqrec> mzyReqrecs=mzyReqrecService.queryAllCancel();
+//            int count = 0;
+//            if(mzyReqrecs!=null && mzyReqrecs.size()>0){
+//                for (MzyReqrec mzyReqrec:mzyReqrecs){
+//                    mzyReqrec.setTimes(-mzyReqrec.getTimes());
+//                    int num =mzyReqrecService.modifyMzyReqrec(mzyReqrec);
+//                    if(num>0){
+//                        count++;
+//                    }
+//                }
+//            }
+//            log.info("数据清洗总数:"+count);
+//            resultMap.put("code", 0);
+//            resultMap.put("message", "数据清洗总数"+count);
+//            return resultMap;
+//        }catch (Exception e){
+//            e.printStackTrace();
+//            resultMap.put("code", -1);
+//            resultMap.put("message", "数据清洗失败,系统出错,请联系管理员");
+//            log.error("数据清洗失败,系统异常,错误信息{}",e.getMessage());
+//            return resultMap;
+//        }
+//    }
 
 
     /**
@@ -485,7 +485,7 @@ public class MzyReqrecController {
                 return resultMap;
             }
             mzyReqrec.setOpId(tokenUser.getUserIdCode());
-            int num=mzyReqrecService.modifyMzyReqrec(mzyReqrec);
+            int num=mzyReqrecService.modifyMzyReqrec(mzyReqrec,tokenUser);
             if(num==1){
                 resultMap.put("code", 0);
                 resultMap.put("message", "更新挂号信息成功");

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/ChargeFeeVoMapper.java

@@ -604,7 +604,7 @@ public interface ChargeFeeVoMapper {
             "<script>",
             "SELECT " +
                     " mzy_reqrec.receipt_bill," +
-                    "         mzy_reqrec.name," +
+                    "         rtrim(mzy_reqrec.name) name," +
                     "         mzy_reqrec.req_fee+mzy_reqrec.oth_fee+mzy_reqrec.clinic_fee  as total_charge " +
                     "FROM mzy_reqrec " +
                     "where cancel_mark <![CDATA[<>]]> '0' " +

+ 2 - 1
src/main/java/cn/hnthyy/thmz/service/his/MzyReqrecService.java

@@ -2,6 +2,7 @@ package cn.hnthyy.thmz.service.his;
 
 import cn.hnthyy.thmz.entity.MzException;
 import cn.hnthyy.thmz.entity.his.MzyReqrec;
+import cn.hnthyy.thmz.entity.thmz.User;
 import cn.hnthyy.thmz.pageDto.MzyReqrecPageDto;
 
 import java.util.List;
@@ -40,7 +41,7 @@ public interface MzyReqrecService {
      * @param mzyReqrec
      * @return
      */
-    int modifyMzyReqrec(MzyReqrec mzyReqrec);
+    int modifyMzyReqrec(MzyReqrec mzyReqrec,User tokenUser);
 
     /**
      * 按照病人id 和次数查询病人挂号信息

+ 5 - 2
src/main/java/cn/hnthyy/thmz/service/impl/his/MzyReqrecServiceImpl.java

@@ -3,6 +3,7 @@ package cn.hnthyy.thmz.service.impl.his;
 import cn.hnthyy.thmz.entity.MzException;
 import cn.hnthyy.thmz.entity.his.*;
 import cn.hnthyy.thmz.entity.thmz.Receipt;
+import cn.hnthyy.thmz.entity.thmz.User;
 import cn.hnthyy.thmz.entity.thmz.Windows;
 import cn.hnthyy.thmz.enums.YesNoEnum;
 import cn.hnthyy.thmz.mapper.his.*;
@@ -181,7 +182,7 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
 
     @Override
     @Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT,timeout=36000,rollbackFor=Exception.class)
-    public int modifyMzyReqrec(MzyReqrec mzyReqrec) {
+    public int modifyMzyReqrec(MzyReqrec mzyReqrec,User tokenUser) {
         if(YesNoEnum.YES.code.equals(mzyReqrec.getCancelMark())){
             //此时是退号,需要把就诊信息也标记成退号
             MzVisitTable mzVisitTable = new MzVisitTable();
@@ -197,7 +198,9 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
             dbMzyReqrec.setSerialNo(-dbMzyReqrec.getSerialNo());
             dbMzyReqrec.setCancelMark(mzyReqrec.getCancelMark());
             dbMzyReqrec.setOpDay(new Date());
-            dbMzyReqrec.setOpId(mzyReqrec.getOpId());
+            dbMzyReqrec.setOpId(tokenUser.getUserIdCode());
+            dbMzyReqrec.setDcountNo(YesNoEnum.NO.code);
+            dbMzyReqrec.setClosingDate(null);
             mzyReqrecMapper.insertMzyReqrec(dbMzyReqrec);
         }
         return mzyReqrecMapper.updateMzyReqrec(mzyReqrec);

+ 7 - 4
src/main/resources/static/js/daily.js

@@ -397,7 +397,7 @@ function getRjbb() {
                 if (res.thzffpmx.length == 0) {
                     $("#thzffpmx_table").css("display", "none");
                     $("#thzffpmx_table_p").css("display", "none");
-                } else if (res.sfzffpmx.length > 0) {
+                } else if (res.thzffpmx.length > 0) {
                     $("#thzffpmx_table").css("display", "block");
                     $("#thzffpmx_table_p").css("display", "block");
                     var html = '';
@@ -746,11 +746,14 @@ function dcountCharge() {
                     setPrint();
                     LODOP = getLodop();
                     LODOP.PRINT_INITA(6, 0, "210mm", "297mm", "门诊收费收入日报表");
+                    LODOP.SET_PRINT_STYLE("FontSize", 9); //字体大小
                     //设置默认打印机
                     LODOP.SET_PRINTER_INDEX(printIndex);
-                    LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "297mm");
-                    LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "210mm");
-                    LODOP.ADD_PRINT_HTM("0mm", "0mm", "210mm", "297mm", document.getElementById("printDiv").innerHTML);
+                    LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "210mm");
+                    LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "297mm");
+                    LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm", document.getElementById("printDiv_sf").innerHTML);
+                    LODOP.NewPageA();
+                    LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm", document.getElementById("printDiv_gh").innerHTML);
                     LODOP.PRINT();
                     //LODOP.PREVIEW();
                 }

+ 6 - 3
src/main/resources/static/js/daily_collect.js

@@ -775,9 +775,12 @@ function print() {
     var strStyle="<style> table,td,th {border-width: 1px;border-style: solid;border-collapse: collapse}</style>"
     //设置默认打印机
     LODOP.SET_PRINTER_INDEX(printIndex);
-    LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "297mm");
-    LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "210mm");
-    LODOP.ADD_PRINT_HTM("0mm", "0mm", "210mm", "297mm", document.getElementById("printDiv").innerHTML);
+    LODOP.SET_PRINT_STYLE("FontSize", 9); //字体大小
+    //设置默认打印机
+    LODOP.SET_PRINTER_INDEX(printIndex);
+    LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "210mm");
+    LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "297mm");
+    LODOP.ADD_PRINT_HTM("0mm", "0mm", "200mm", "280mm", document.getElementById("printDiv").innerHTML);
     LODOP.NewPageA();
     //LODOP.ADD_PRINT_HTM("0mm", "0mm", "210mm", "297mm", document.getElementById("ghgzlhzb_parent_p").innerHTML);
 

+ 8 - 3
src/main/resources/static/js/daily_repeat_print.js

@@ -770,9 +770,14 @@ function print() {
     LODOP.PRINT_INITA(6, 0, "210mm", "297mm", "门诊收费收入日报表");
     //设置默认打印机
     LODOP.SET_PRINTER_INDEX(printIndex);
-    LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "297mm");
-    LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "210mm");
-    LODOP.ADD_PRINT_HTM("0mm", "0mm", "210mm", "297mm", document.getElementById("printDiv").innerHTML);
+    LODOP.SET_PRINT_STYLE("FontSize", 9); //字体大小
+    //设置默认打印机
+    LODOP.SET_PRINTER_INDEX(printIndex);
+    LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "210mm");
+    LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "297mm");
+    LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm", document.getElementById("printDiv_sf").innerHTML);
+    LODOP.NewPageA();
+    LODOP.ADD_PRINT_HTM("0mm", "5mm", "200mm", "280mm", document.getElementById("printDiv_gh").innerHTML);
     LODOP.PRINT();
     //LODOP.PREVIEW();
 }

+ 5 - 3
src/main/resources/templates/daily.html

@@ -327,12 +327,12 @@
                 </div>
 
 
-                <div id="printDiv" style="display: none">
+                <div id="printDiv_sf" style="display: none">
                     <h2 style="text-align:center;font-weight: 700;">门诊收费收入日报表</h2>
                     <div style="margin-top: 20px;"><span>工号:</span><span id="userIdCode_p"></span><span
                             style="margin-left: 120px;">姓名:</span><span id="username_p"></span><span
                             style="margin-left: 120px;">结账时间:</span><span id="dcountDate_p"></span></div>
-                    <table border="1" cellspacing="0" style="width: 96%;">
+                    <table border="1" cellspacing="0" style="width: 96%;margin-top: 20px;border-width: 1px;border-style: solid;border-collapse: collapse;">
                         <tbody>
                         <tr>
                             <td>挂号费</td>
@@ -509,7 +509,7 @@
                             </tbody>
                         </table>
                     </div>
-                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 100px;border-width: 1px;border-style: solid;border-collapse: collapse;">
+                    <div class="form-group col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 100px;border-collapse: collapse;">
                         <div class="col-md-12 col-sm-12 col-xs-12"
                              style="border-bottom: 0.5px solid #dcdcdc;padding-left: 20px;">
                             <table style="width: 60%;">
@@ -550,6 +550,8 @@
                             </tbody>
                         </table>
                     </div>
+                </div>
+                <div id="printDiv_gh" style="display: none">
                     <h2 style="text-align:center;font-weight: 700">门诊挂号收入个人日报表</h2>
                     <div style="margin-top: 20px;"><span>工号:</span><span id="userIdCode_gh_p"></span><span
                             style="margin-left: 120px;">姓名:</span><span id="username_gh_p"></span><span

+ 1 - 1
src/main/resources/templates/daily_collect.html

@@ -587,7 +587,7 @@
                         </tbody>
                     </table>
                 </div>
-                <div id="username_zbr_p_parent"><span>制表人:</span><span style="text-decoration: underline" id="username_zbr_p"></span></div>
+                <div id="username_zbr_p_parent" style="display: none"><span>制表人:</span><span style="text-decoration: underline" id="username_zbr_p"></span></div>
 
             </div>
             <table id="tb_table"></table>

+ 3 - 1
src/main/resources/templates/daily_repeat_print.html

@@ -344,7 +344,7 @@
                 </div>
 
 
-                <div id="printDiv" style="display: none">
+                <div id="printDiv_sf" style="display: none">
                     <h2 style="text-align:center;font-weight: 700;">门诊收费收入日报表(重打)</h2>
                     <div style="margin-top: 20px;"><span>工号:</span><span id="userIdCode_p"></span><span
                             style="margin-left: 120px;">姓名:</span><span id="username_p"></span><span
@@ -567,6 +567,8 @@
                             </tbody>
                         </table>
                     </div>
+                </div>
+                <div id="printDiv_gh" style="display: none">
                     <h2 style="text-align:center;font-weight: 700">门诊挂号收入个人日报表(重打)</h2>
                     <div style="margin-top: 20px;"><span>工号:</span><span id="userIdCode_gh_p"></span><span
                             style="margin-left: 120px;">姓名:</span><span id="username_gh_p"></span><span