Parcourir la source

日结表格改造

hurugang il y a 5 ans
Parent
commit
f92c6cf0f5

+ 12 - 8
src/main/java/cn/hnthyy/thmz/controller/ChargeFeeVoController.java

@@ -356,7 +356,13 @@ public class ChargeFeeVoController {
         Map<String, Object> resultMap = new HashMap<>();
         try {
             User tokenUser = TokenUtil.getUser(httpServletRequest);
+            //挂号收入构成表格数据
+            ReqrecVo reqrecVo = chargeFeeVoService.queryMzReceiptSerialCount(tokenUser.getUserIdCode(), null, null, null).get(0);
+            reqrecVo.fomartReqrecVo();
+            resultMap.put("ghsrgcmx", reqrecVo);
             MzReceiptSerial mzReceiptSerial = chargeFeeVoService.queryMzReceiptSerial(tokenUser.getUserIdCode(), null, null, null).get(0);
+            mzReceiptSerial.setTotalChargeStr(mzReceiptSerial.getTotalCharge().add(reqrecVo.getGhje()));
+            mzReceiptSerial.setCharge1(reqrecVo.getGhje());
             resultMap.put("mzReceiptSerial", mzReceiptSerial);
             ChargeCountVo chargeCountVo = chargeFeeVoService.queryChargeCountVo(tokenUser.getUserIdCode(), null, null, null).get(0);
             chargeCountVo.fomartChargeCountVo();
@@ -384,10 +390,6 @@ public class ChargeFeeVoController {
             resultMap.put("ghtpzs", ghtpzs);
             //收费作废发票明细
             resultMap.put("sfzffpmx", chargeFeeVoService.queryReceiptVo(tokenUser.getUserIdCode(), null));
-            //挂号收入构成表格数据
-            ReqrecVo reqrecVo = chargeFeeVoService.queryMzReceiptSerialCount(tokenUser.getUserIdCode(), null, null, null).get(0);
-            reqrecVo.fomartReqrecVo();
-            resultMap.put("ghsrgcmx", reqrecVo);
             //退号发票明细
             resultMap.put("thzffpmx", chargeFeeVoService.queryThMzReceiptSerial(tokenUser.getUserIdCode(), null));
             resultMap.put("user", tokenUser);
@@ -432,7 +434,13 @@ public class ChargeFeeVoController {
                 resultMap.put("message", "查询重打费用日结报表失败,结算时间为空");
                 return resultMap;
             }
+            //挂号收入构成表格数据
+            ReqrecVo reqrecVo = chargeFeeVoService.queryMzReceiptSerialCount(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate(), null, null).get(0);
+            reqrecVo.fomartReqrecVo();
+            resultMap.put("ghsrgcmx", reqrecVo);
             MzReceiptSerial mzReceiptSerial = chargeFeeVoService.queryMzReceiptSerial(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate(), null, null).get(0);
+            mzReceiptSerial.setTotalChargeStr(mzReceiptSerial.getTotalCharge().add(reqrecVo.getGhje()));
+            mzReceiptSerial.setCharge1(reqrecVo.getGhje());
             resultMap.put("mzReceiptSerial", mzReceiptSerial);
             ChargeCountVo chargeCountVo = chargeFeeVoService.queryChargeCountVo(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate(), null, null).get(0);
             chargeCountVo.fomartChargeCountVo();
@@ -460,10 +468,6 @@ public class ChargeFeeVoController {
             resultMap.put("ghtpzs", ghtpzs);
             //收费作废发票明细
             resultMap.put("sfzffpmx", chargeFeeVoService.queryReceiptVo(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate()));
-            //挂号收入构成表格数据
-            ReqrecVo reqrecVo = chargeFeeVoService.queryMzReceiptSerialCount(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate(), null, null).get(0);
-            reqrecVo.fomartReqrecVo();
-            resultMap.put("ghsrgcmx", reqrecVo);
             //退号发票明细
             resultMap.put("thzffpmx", chargeFeeVoService.queryThMzReceiptSerial(chargeFeeParamsVo.getOpId(), chargeFeeParamsVo.getDcountDate()));
             User tokenUser = userService.queryUserByUserIdCode(chargeFeeParamsVo.getOpId());

+ 12 - 0
src/main/java/cn/hnthyy/thmz/entity/his/MzReceiptSerial.java

@@ -1,5 +1,6 @@
 package cn.hnthyy.thmz.entity.his;
 
+import cn.hnthyy.thmz.Utils.NumberToCN;
 import lombok.Data;
 
 import java.io.Serializable;
@@ -94,7 +95,18 @@ public class MzReceiptSerial implements Serializable {
     //新付款方式
     private String newChequeType;
 
+    //总金额
+    private String totalChargeStr;
+
     private Integer totalCount;
+
+    public void setTotalChargeStr(BigDecimal totalCharge) {
+        if(totalCharge!=null){
+            this.totalCharge=totalCharge.setScale(2, BigDecimal.ROUND_HALF_UP);
+            totalChargeStr=NumberToCN.number2CNMontrayUnit(this.totalCharge);
+        }
+    }
+
     public MzReceiptSerial() {
     }
 

+ 2 - 2
src/main/resources/static/js/daily.js

@@ -90,7 +90,7 @@ function getRjbb() {
                 $("#charge18").html(res.mzReceiptSerial.charge18.toFixed(2));
                 $("#charge19").html(res.mzReceiptSerial.charge19.toFixed(2));
                 $("#charge20").html(res.mzReceiptSerial.charge20.toFixed(2));
-                $("#totalCharge").html(res.mzReceiptSerial.totalCharge.toFixed(2));
+                $("#totalCharge").html(res.mzReceiptSerial.totalChargeStr +"  ("+res.mzReceiptSerial.totalCharge+")");
 
                 $("#userIdCode_p").html(res.user.userCode);
                 $("#username_p").html(res.user.userName);
@@ -116,7 +116,7 @@ function getRjbb() {
                 $("#charge19_p").html(res.mzReceiptSerial.charge19.toFixed(2));
                 $("#charge20_p").html(res.mzReceiptSerial.charge20.toFixed(2));
                 $("#totalCharge_p").html(res.mzReceiptSerial.totalCharge.toFixed(2));
-
+                $("#totalCharge_p").html(res.mzReceiptSerial.totalChargeStr +"  ("+res.mzReceiptSerial.totalCharge+")");
                 //现金收款
                 $("#xjbs").html(res.chargeCountVo.xjbs);
                 $("#xjbs_p").html(res.chargeCountVo.xjbs);

+ 10 - 2
src/main/resources/templates/daily.html

@@ -113,8 +113,12 @@
                         <td id="charge8">0.00</td>
                         <td>手术器械使用费</td>
                         <td id="charge17">0.00</td>
+                        <td></td>
+                        <td></td>
+                    </tr>
+                    <tr>
                         <td>合计:</td>
-                        <td id="totalCharge">0.00</td>
+                        <td id="totalCharge" colspan="5">0.00</td>
                     </tr>
                     </tbody>
                 </table>
@@ -387,8 +391,12 @@
                             <td id="charge8_p">0.00</td>
                             <td>手术器械使用费</td>
                             <td id="charge17_p">0.00</td>
+                            <td></td>
+                            <td></td>
+                        </tr>
+                        <tr>
                             <td>合计:</td>
-                            <td id="totalCharge_p">0.00</td>
+                            <td id="totalCharge_p" colspan="5">0.00</td>
                         </tr>
                         </tbody>
                     </table>