Pārlūkot izejas kodu

智能pos报表开发完成

hurugang 2 gadi atpakaļ
vecāks
revīzija
0a84dd09db

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

@@ -330,6 +330,7 @@ public interface ChargeFeeVoMapper {
                     "sum ( case when ((cheque_type='W' or cheque_type='E' or cheque_type='Y') and op_id ='99999') then amount else 0 end ) wxzzss," +
                     "sum ( case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') then amount else 0 end ) zfbzzss," +
                     "sum ( case when (cheque_type='P' or cheque_type='T') then amount else 0 end ) ybgrzhss," +
+                    "sum ( case when cheque_type ='O' then amount else 0 end ) jhzfss," +
                     "count ( distinct case when cheque_type ='1' and pay_mark ='0' then receipt_sn else null end ) xjbs," +
                     "count ( distinct case when ( cheque_type ='5' or cheque_type ='3' ) and pay_mark ='0' then receipt_sn else null end ) yhsbs," +
                     "count ( distinct case when cheque_type ='6' and pay_mark ='0' then receipt_sn else null end ) sybbs," +
@@ -339,6 +340,7 @@ public interface ChargeFeeVoMapper {
                     "count ( distinct case when ((cheque_type='W' or cheque_type='E' or cheque_type='Y') and op_id ='99999') and pay_mark ='0' then receipt_sn else null end ) wxzzbs," +
                     "count ( distinct case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') and pay_mark ='0' then receipt_sn else null end ) zfbzzbs," +
                     "count ( distinct case when (cheque_type='P' or cheque_type='T') and pay_mark ='0' then receipt_sn else null end ) ybgrzhbs," +
+                    "count ( distinct case when cheque_type ='O' and pay_mark ='0' then receipt_sn else null end ) jhzfbs," +
                     "count ( distinct case when ((cheque_type ='2' or cheque_type ='8' or cheque_type ='9') and pay_mark ='0')  then receipt_sn else null end ) ybjzbs," +
                     "    count ( distinct case when pay_mark ='0' then cast(serial_no as char)+cheque_type else null end ) zjbs," +
                     "count ( distinct case when cheque_type ='1' and pay_mark > '0' then receipt_sn else null end ) xjtfbs," +
@@ -352,6 +354,7 @@ public interface ChargeFeeVoMapper {
                     " count ( distinct case when ((cheque_type='W' or cheque_type='E' or cheque_type='Y') and op_id ='99999') and pay_mark > '0' then receipt_sn else null end ) wxzztfbs," +
                     " count ( distinct case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') and pay_mark > '0' then receipt_sn else null end ) zfbzztfbs," +
                     " count ( distinct case when (cheque_type='P' or cheque_type='T') and pay_mark > '0' then receipt_sn else null end ) ybgrzhtfbs," +
+                    "count ( distinct case when cheque_type ='O' and pay_mark > '0' then receipt_sn else null end ) jhzftfbs," +
                     "sum ( case when cheque_type= 'E' and op_id <![CDATA[<>]]> '99999' then amount else 0 end ) wxss," +
                     "sum ( case when cheque_type= 'F' and op_id <![CDATA[<>]]> '99999' then amount else 0 end ) zfbss," +
                     "sum ( case when cheque_type ='1' and pay_mark ='1' then amount else 0 end ) xjtf," +
@@ -364,6 +367,7 @@ public interface ChargeFeeVoMapper {
                     "sum ( case when ((cheque_type='W' or cheque_type='E' or cheque_type='Y') and op_id ='99999') and pay_mark ='1' then amount else 0 end ) wxzztf," +
                     "sum ( case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') and pay_mark ='1' then amount else 0 end ) zfbzztf," +
                     "sum ( case when (cheque_type='P' or cheque_type='T') and pay_mark ='1' then amount else 0 end ) ybgrzhtf," +
+                    "sum ( case when cheque_type ='O' and pay_mark ='1' then amount else 0 end ) jhzftf," +
                     "sum ( case when cheque_type ='1' and pay_mark ='0'  then amount else 0 end ) xjsk," +
                     "sum ( case when cheque_type in ('5' ,'3') and pay_mark ='0' then amount else 0 end ) yhksk," +
                     "sum ( case when cheque_type='6' and pay_mark ='0' then amount else 0 end ) sybksk," +
@@ -373,6 +377,7 @@ public interface ChargeFeeVoMapper {
                     "sum ( case when ((cheque_type='W' or cheque_type='E' or cheque_type='Y') and op_id ='99999') and pay_mark ='0'  then amount else 0 end ) wxzzsk," +
                     "sum ( case when ((cheque_type='M' or cheque_type='F') and op_id ='99999') and pay_mark ='0'  then amount else 0 end ) zfbzzsk," +
                     "sum ( case when (cheque_type='P' or cheque_type='T') and pay_mark ='0'  then amount else 0 end ) ybgrzhsk," +
+                    "sum ( case when cheque_type ='O' and pay_mark ='0'  then amount else 0 end ) jhzfsk," +
                     "sum ( case when cheque_type ='E' and op_id <![CDATA[<>]]> '99999' and pay_mark ='0' then amount else 0 end ) wxsk," +
                     "sum ( case when cheque_type ='F' and op_id <![CDATA[<>]]> '99999' and pay_mark ='0' then amount else 0 end ) zfbsk" +
                     " from mz_deposit_file WITH(NOLOCK) " +
@@ -641,6 +646,12 @@ public interface ChargeFeeVoMapper {
                     " ABS( sum ( case when  op_id='99999' and   times  <![CDATA[<]]> 0 and paymode ='M'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 )+ isnull ( blb_fee , 0 ) + isnull ( zlk_fee , 0 ) else 0 end )) zfbzzth, " +
                     " count ( case when times  <![CDATA[>]]> 0 and paymode ='M' then 1 else null end )  - count ( case when op_id='99999' and times  <![CDATA[<]]> 0 and paymode ='M' then 1 else null end ) zfbzzsshs," +
                     " sum ( case when op_id='99999' and paymode ='M' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 )+ isnull ( blb_fee , 0 ) + isnull ( zlk_fee , 0 ) else 0 end ) zfbzzss, " +
+                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='O' then 1 else null end ) jhzfhs," +
+                    " sum ( case when times  <![CDATA[>]]> 0 and paymode ='O'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 )+ isnull ( blb_fee , 0 ) + isnull ( zlk_fee , 0 ) else 0 end ) jhzfsk, " +
+                    " count ( case when  times  <![CDATA[<]]> 0 and paymode ='O' then 1 else null end )  jhzfthhs," +
+                    " ABS(sum ( case when times  <![CDATA[<]]> 0 and paymode ='O' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 )+ isnull ( blb_fee , 0 ) + isnull ( zlk_fee , 0 ) else 0 end )) jhzfth, " +
+                    " count ( case when times  <![CDATA[>]]> 0 and paymode ='O'  then 1 else null end ) - count ( case when times  <![CDATA[<]]> 0 and paymode ='O'  then 1 else null end ) jhzfsshs," +
+                    " sum ( case when paymode ='O'  then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 )+ isnull ( blb_fee , 0 ) + isnull ( zlk_fee , 0 ) else 0 end ) jhzfss," +
                     " sum ( case when isnull ( paymode , '1' ) = 'Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 )+ isnull ( blb_fee , 0 ) + isnull ( zlk_fee , 0 ) else 0 end ) ghjejz," +
                     " sum ( case when isnull ( paymode , '1' ) <![CDATA[<>]]> 'Y' then req_fee + oth_fee + clinic_fee + isnull ( brochure_fee , 0 ) + isnull ( bl_fee , 0 ) + isnull ( ck_fee , 0 )+ isnull ( blb_fee , 0 ) + isnull ( zlk_fee , 0 ) else 0 end ) ghjebhjz," +
                     " sum ( clinic_fee ) zcsr," +

+ 25 - 1
src/main/java/cn/hnthyy/thmz/vo/ChargeCountVo.java

@@ -145,6 +145,19 @@ public class ChargeCountVo {
     private Integer ybgrzhtf;
     //医保个人账户实收笔数
     private Integer ybgrzhssbs;
+
+    //聚合支付实收
+    private BigDecimal jhzfss;
+    //聚合支付收款
+    private BigDecimal jhzfsk;
+    //聚合支付笔数
+    private Integer jhzfbs;
+    //聚合支付退费笔数
+    private Integer jhzftfbs;
+    //聚合支付退费
+    private Integer jhzftf;
+    //聚合支付实收笔数
+    private Integer jhzfssbs;
     //以上次数公式为收款次数--退费次数
 
     //实缴合计
@@ -253,6 +266,14 @@ public class ChargeCountVo {
         }
         ybgrzhssbs=ybgrzhbs-ybgrzhtfbs;
 
+        if(jhzfbs==null){
+            jhzfbs=0;
+        }
+        if(jhzftfbs==null){
+            jhzftfbs=0;
+        }
+        jhzfssbs=jhzfbs-jhzftfbs;
+
         if(zfss==null){
             zfss=BigDecimal.ZERO;
         }
@@ -299,7 +320,10 @@ public class ChargeCountVo {
         if(ybgrzhss==null){
             ybgrzhss=BigDecimal.ZERO;
         }
-        sjhj=xjss.add(yhkss).add(zfbss).add(wxss).add(sybkss).add(zfbzzss).add(wxzzss).setScale(2, BigDecimal.ROUND_HALF_UP);
+        if(jhzfss==null){
+            jhzfss=BigDecimal.ZERO;
+        }
+        sjhj=xjss.add(yhkss).add(zfbss).add(wxss).add(sybkss).add(zfbzzss).add(wxzzss).add(jhzfss).setScale(2, BigDecimal.ROUND_HALF_UP);
         sjhjdx=NumberToCN.number2CNMontrayUnit(sjhj);
         ybkjzhjdx=NumberToCN.number2CNMontrayUnit(ybjzss);
         ybgrzhhjdx=NumberToCN.number2CNMontrayUnit(ybgrzhss);

+ 12 - 0
src/main/java/cn/hnthyy/thmz/vo/ReqrecVo.java

@@ -127,6 +127,18 @@ public class ReqrecVo {
     private Integer zfbzzsshs;
     //支付宝自助实收
     private BigDecimal zfbzzss;
+    //聚合支付号数
+    private Integer jhzfhs;
+    //聚合支付收款
+    private BigDecimal jhzfsk;
+    //聚合支付退号号数
+    private Integer jhzfthhs;
+    //聚合支付退号费
+    private BigDecimal jhzfth;
+    //聚合支付实收号数
+    private Integer jhzfsshs;
+    //聚合支付实收
+    private BigDecimal jhzfss;
     //合计号数
     private Integer hjhs;
     //合计收款

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

@@ -56,7 +56,7 @@ function initFeeTable() {
  * @param flag 是否显示的是自助的费用
  */
 function extractedSf (res,flag) {
-//现金收款
+    //现金收款
     $("#xjbs").html(res.chargeCountVo.xjbs);
     if (res.chargeCountVo.xjsk != null) {
         $("#xjsk").html(res.chargeCountVo.xjsk.toFixed(2));
@@ -189,6 +189,19 @@ function extractedSf (res,flag) {
     if (res.chargeCountVo.ybgrzhss != null) {
         $("#ybgrzhss").html(res.chargeCountVo.ybgrzhss.toFixed(2));
     }
+    //聚合支付收款
+    $("#jhzfbs").html(res.chargeCountVo.jhzfbs);
+    if (res.chargeCountVo.jhzfsk != null) {
+        $("#jhzfsk").html(res.chargeCountVo.jhzfsk.toFixed(2));
+    }
+    $("#jhzftfbs").html(res.chargeCountVo.jhzftfbs);
+    if (res.chargeCountVo.jhzftf != null) {
+        $("#jhzftf").html(res.chargeCountVo.jhzftf.toFixed(2));
+    }
+    $("#jhzfssbs").html(res.chargeCountVo.jhzfssbs);
+    if (res.chargeCountVo.jhzfss != null) {
+        $("#jhzfss").html(res.chargeCountVo.jhzfss.toFixed(2));
+    }
     //总计收款
     $("#zjbs").html(res.chargeCountVo.zjbs);
     if (res.chargeCountVo.zjsk != null) {
@@ -234,7 +247,7 @@ function extractedSf (res,flag) {
  * @param res
  */
 function extractedGh (res,flag) {
-//现金收款
+    //现金收款
     $("#ghxjbs").html(res.ghsrgcmx.xjhs);
     if (res.ghsrgcmx.xjsk != null) {
         $("#ghxjsk").html(res.ghsrgcmx.xjsk.toFixed(2));
@@ -370,6 +383,27 @@ function extractedGh (res,flag) {
            $("#ghwxss").html(0.00);
        }
    }
+
+    //聚合支付收款
+    $("#ghjhzfbs").html(res.ghsrgcmx.jhzfhs);
+    if (res.ghsrgcmx.jhzfsk != null) {
+        $("#ghjhzfsk").html(res.ghsrgcmx.jhzfsk.toFixed(2));
+    }else {
+        $("#ghjhzfsk").html(0.00);
+    }
+    $("#ghjhzftfbs").html(res.ghsrgcmx.jhzfthhs);
+    if (res.ghsrgcmx.jhzfth != null) {
+        $("#ghjhzftf").html(res.ghsrgcmx.jhzfth.toFixed(2));
+    }else {
+        $("#ghjhzftf").html(0.00);
+    }
+    $("#ghjhzfssbs").html(res.ghsrgcmx.jhzfsshs);
+    if (res.ghsrgcmx.jhzfss != null) {
+        $("#ghjhzfss").html(res.ghsrgcmx.jhzfss.toFixed(2));
+    }else {
+        $("#ghjhzfss").html(0.00);
+    }
+
     //记账绿色通道收款
     $("#ghzfbs").html(res.ghsrgcmx.byjzhs);
     if (res.ghsrgcmx.byjzsk != null) {

+ 34 - 0
src/main/resources/static/js/mz/daily_collect.js

@@ -200,6 +200,20 @@ function extractedSf (res) {
     if (res.chargeCountVo.ybgrzhss != null) {
         $("#ybgrzhss").html(res.chargeCountVo.ybgrzhss.toFixed(2));
     }
+    //聚合支付收款
+    $("#jhzfbs").html(res.chargeCountVo.jhzfbs);
+    if (res.chargeCountVo.jhzfsk != null) {
+        $("#jhzfsk").html(res.chargeCountVo.jhzfsk.toFixed(2));
+    }
+    $("#jhzftfbs").html(res.chargeCountVo.jhzftfbs);
+    if (res.chargeCountVo.jhzftf != null) {
+        $("#jhzftf").html(res.chargeCountVo.jhzftf.toFixed(2));
+    }
+    $("#jhzfssbs").html(res.chargeCountVo.jhzfssbs);
+    if (res.chargeCountVo.jhzfss != null) {
+        $("#jhzfss").html(res.chargeCountVo.jhzfss.toFixed(2));
+    }
+
     //总计收款
     $("#zjbs").html(res.chargeCountVo.zjbs);
     if (res.chargeCountVo.zjsk != null) {
@@ -339,6 +353,26 @@ function extractedGh (res) {
         $("#ghwxzzss").html(res.ghsrgcmx.wxzzss.toFixed(2));
     }
 
+    //聚合支付收款
+    $("#ghjhzfbs").html(res.ghsrgcmx.jhzfhs);
+    if (res.ghsrgcmx.jhzfsk != null) {
+        $("#ghjhzfsk").html(res.ghsrgcmx.jhzfsk.toFixed(2));
+    }else {
+        $("#ghjhzfsk").html(0.00);
+    }
+    $("#ghjhzftfbs").html(res.ghsrgcmx.jhzfthhs);
+    if (res.ghsrgcmx.jhzfth != null) {
+        $("#ghjhzftf").html(res.ghsrgcmx.jhzfth.toFixed(2));
+    }else {
+        $("#ghjhzftf").html(0.00);
+    }
+    $("#ghjhzfssbs").html(res.ghsrgcmx.jhzfsshs);
+    if (res.ghsrgcmx.jhzfss != null) {
+        $("#ghjhzfss").html(res.ghsrgcmx.jhzfss.toFixed(2));
+    }else {
+        $("#ghjhzfss").html(0.00);
+    }
+
     //记账绿色通道收款
     $("#ghzfbs").html(res.ghsrgcmx.byjzhs);
     if (res.ghsrgcmx.byjzsk != null) {

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

@@ -261,6 +261,19 @@ function extractedSf (res,flag) {
     }else {
         $("#ybgrzhss").html(0.00);
     }
+    //聚合支付收款
+    $("#jhzfbs").html(res.chargeCountVo.jhzfbs);
+    if (res.chargeCountVo.jhzfsk != null) {
+        $("#jhzfsk").html(res.chargeCountVo.jhzfsk.toFixed(2));
+    }
+    $("#jhzftfbs").html(res.chargeCountVo.jhzftfbs);
+    if (res.chargeCountVo.jhzftf != null) {
+        $("#jhzftf").html(res.chargeCountVo.jhzftf.toFixed(2));
+    }
+    $("#jhzfssbs").html(res.chargeCountVo.jhzfssbs);
+    if (res.chargeCountVo.jhzfss != null) {
+        $("#jhzfss").html(res.chargeCountVo.jhzfss.toFixed(2));
+    }
     //总计收款
     $("#zjbs").html(res.chargeCountVo.zjbs);
     if (res.chargeCountVo.zjsk != null) {
@@ -459,6 +472,26 @@ function extractedGh (res,flag) {
             $("#ghwxss").html(0.00);
         }
     }
+    //聚合支付收款
+    $("#ghjhzfbs").html(res.ghsrgcmx.jhzfhs);
+    if (res.ghsrgcmx.jhzfsk != null) {
+        $("#ghjhzfsk").html(res.ghsrgcmx.jhzfsk.toFixed(2));
+    }else {
+        $("#ghjhzfsk").html(0.00);
+    }
+    $("#ghjhzftfbs").html(res.ghsrgcmx.jhzfthhs);
+    if (res.ghsrgcmx.jhzfth != null) {
+        $("#ghjhzftf").html(res.ghsrgcmx.jhzfth.toFixed(2));
+    }else {
+        $("#ghjhzftf").html(0.00);
+    }
+    $("#ghjhzfssbs").html(res.ghsrgcmx.jhzfsshs);
+    if (res.ghsrgcmx.jhzfss != null) {
+        $("#ghjhzfss").html(res.ghsrgcmx.jhzfss.toFixed(2));
+    }else {
+        $("#ghjhzfss").html(0.00);
+    }
+
     //记账绿色通道收款
     $("#ghzfbs").html(res.ghsrgcmx.byjzhs);
     if (res.ghsrgcmx.byjzsk != null) {

+ 18 - 0
src/main/resources/templates/mz/daily.html

@@ -191,6 +191,15 @@
                             <td id="wxssbs">0</td>
                             <td id="wxss">0.00</td>
                         </tr>
+                        <tr>
+                            <td class="text-center">聚合支付</td>
+                            <td id="jhzfbs">0</td>
+                            <td id="jhzfsk">0.00</td>
+                            <td id="jhzftfbs">0</td>
+                            <td id="jhzftf">0.00</td>
+                            <td id="jhzfssbs">0</td>
+                            <td id="jhzfss">0.00</td>
+                        </tr>
                         <tr>
                             <td class="text-center">医保个人账户</td>
                             <td id="ybgrzhbs">0</td>
@@ -300,6 +309,15 @@
                             <td id="ghsybssbs">0</td>
                             <td id="ghsybkss">0.00</td>
                         </tr>
+                        <tr>
+                            <td class="text-center">聚合支付</td>
+                            <td id="ghjhzfbs">0</td>
+                            <td id="ghjhzfsk">0.00</td>
+                            <td id="ghjhzftfbs">0</td>
+                            <td id="ghjhzftf">0.00</td>
+                            <td id="ghjhzfssbs">0</td>
+                            <td id="ghjhzfss">0.00</td>
+                        </tr>
                         <tr>
                             <td class="text-center">支付宝<span class="zz_title" style="display: none">自助</span></td>
                             <td id="ghzfbbs">0</td>

+ 18 - 0
src/main/resources/templates/mz/daily_collect.html

@@ -203,6 +203,15 @@
                             <td id="wxssbs">0</td>
                             <td id="wxss">0.00</td>
                         </tr>
+                        <tr>
+                            <td class="text-center">聚合支付</td>
+                            <td id="jhzfbs">0</td>
+                            <td id="jhzfsk">0.00</td>
+                            <td id="jhzftfbs">0</td>
+                            <td id="jhzftf">0.00</td>
+                            <td id="jhzfssbs">0</td>
+                            <td id="jhzfss">0.00</td>
+                        </tr>
                         <tr>
                             <td class="text-center">支付宝自助</td>
                             <td id="zfbzzbs">0</td>
@@ -348,6 +357,15 @@
                             <td id="ghwxssbs">0</td>
                             <td id="ghwxss">0.00</td>
                         </tr>
+                        <tr>
+                            <td class="text-center">聚合支付</td>
+                            <td id="ghjhzfbs">0</td>
+                            <td id="ghjhzfsk">0.00</td>
+                            <td id="ghjhzftfbs">0</td>
+                            <td id="ghjhzftf">0.00</td>
+                            <td id="ghjhzfssbs">0</td>
+                            <td id="ghjhzfss">0.00</td>
+                        </tr>
                         <tr>
                             <td class="text-center">支付宝自助</td>
                             <td id="ghzfbzzbs">0</td>

+ 18 - 0
src/main/resources/templates/mz/daily_repeat_print.html

@@ -217,6 +217,15 @@
                             <td id="wxssbs">0</td>
                             <td id="wxss">0.00</td>
                         </tr>
+                        <tr>
+                            <td class="text-center">聚合支付</td>
+                            <td id="jhzfbs">0</td>
+                            <td id="jhzfsk">0.00</td>
+                            <td id="jhzftfbs">0</td>
+                            <td id="jhzftf">0.00</td>
+                            <td id="jhzfssbs">0</td>
+                            <td id="jhzfss">0.00</td>
+                        </tr>
                         <tr>
                             <td class="text-center">医保个人账户</td>
                             <td id="ybgrzhbs">0</td>
@@ -326,6 +335,15 @@
                             <td id="ghsybssbs">0</td>
                             <td id="ghsybkss">0.00</td>
                         </tr>
+                        <tr>
+                            <td class="text-center">聚合支付</td>
+                            <td id="ghjhzfbs">0</td>
+                            <td id="ghjhzfsk">0.00</td>
+                            <td id="ghjhzftfbs">0</td>
+                            <td id="ghjhzftf">0.00</td>
+                            <td id="ghjhzfssbs">0</td>
+                            <td id="ghjhzfss">0.00</td>
+                        </tr>
                         <tr>
                             <td class="text-center">支付宝<span class="zz_title" style="display: none">自助</span></td>
                             <td id="ghzfbbs">0</td>