Quellcode durchsuchen

Merge branch 'debug' of http://47.101.143.145:8090/77975466/pco into debug

qzyReal vor 3 Jahren
Ursprung
Commit
7b6d4df01a

+ 18 - 3
sp-admin/sa-view/tb-fee-statistics/month-statistcs-list.html

@@ -59,14 +59,29 @@
 						   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车费', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
 					<sa-td name="月份" prop="month" ></sa-td>
 					<sa-td name="数量" prop="num" ></sa-td>
-					<sa-td name="含税收入(元)" prop="statisticsMoney"></sa-td>
+<!--					<sa-td name="含税收入(元)" prop="statisticsMoney"></sa-td>-->
+					<el-table-column label="含税收入(元)" >
+						<template slot-scope="s">
+							<span>{{Number(s.row.statisticsMoney).toFixed(2)}}</span>
+						</template>
+					</el-table-column>
 					<el-table-column label="税率(%)" >
 						<template slot-scope="s">
 							<span>{{s.row.taxRate * 100}}</span>
 						</template>
 					</el-table-column>
-					<sa-td name="税款(元)" prop="taxes" ></sa-td>
-					<sa-td name="不含税收入(元)" prop="noTaxMoney" ></sa-td>
+<!--					<sa-td name="税款(元)" prop="taxes" ></sa-td>-->
+					<el-table-column label="税款(元)" >
+						<template slot-scope="s">
+							<span>{{Number(s.row.taxes).toFixed(2)}}</span>
+						</template>
+					</el-table-column>
+<!--					<sa-td name="不含税收入(元)" prop="noTaxMoney" ></sa-td>-->
+					<el-table-column label="不含税收入(元)" >
+						<template slot-scope="s">
+							<span>{{Number(s.row.noTaxMoney).toFixed(2)}}</span>
+						</template>
+					</el-table-column>
 					<!--					<el-table-column label="操作" fixed="right"  width="240px">-->
 					<!--						<template slot-scope="s">-->
 					<!--							<el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>-->

+ 12 - 2
sp-admin/sa-view/tb-fee-statistics/tb-fee-details-list.html

@@ -102,8 +102,18 @@
 							<span>{{s.row.taxRate * 100}}</span>
 						</template>
 					</el-table-column>
-					<sa-td name="税款(元)" prop="taxPrice" ></sa-td>
-					<sa-td name="不含税金额(元)" prop="noTaxPrice" ></sa-td>
+<!--					<sa-td name="税款(元)" prop="taxPrice" ></sa-td>-->
+					<el-table-column label="税款(元)" >
+						<template slot-scope="s">
+							<span>{{Number(s.row.taxPrice).toFixed(2)}}</span>
+						</template>
+					</el-table-column>
+<!--					<sa-td name="不含税金额(元)" prop="noTaxPrice" ></sa-td>-->
+					<el-table-column label="不含税金额(元)" >
+						<template slot-scope="s">
+							<span>{{Number(s.row.noTaxPrice).toFixed(2)}}</span>
+						</template>
+					</el-table-column>
 					<sa-td name="收款方式" prop="payType" type="enum" :jv="{3: '微信支付'}"></sa-td>
 					<sa-td name="收款种类" prop="payMode" type="enum" :jv="{1: '直接收款'}"></sa-td>
 <!--					<sa-td name="系统流水号" prop="tradeNo" width="140px" ></sa-td>-->

+ 14 - 4
sp-admin/sa-view/tb-fee-statistics/tb-fee-statistics-list.html

@@ -61,7 +61,12 @@
 <!--					<sa-td name="业务类型" prop="itemTypeName" ></sa-td>-->
 					<sa-td name="日期" type="date" prop="dayTime" ></sa-td>
 					<sa-td name="数量" prop="num" ></sa-td>
-					<sa-td name="含税收入(元)" prop="taxMoney" ></sa-td>
+<!--					<sa-td name="含税收入(元)" prop="taxMoney" ></sa-td>-->
+					<el-table-column label="含税收入(元)" >
+						<template slot-scope="s">
+							<span>{{Number(s.row.taxMoney).toFixed(2)}}</span>
+						</template>
+					</el-table-column>
 <!--					<sa-td name="税率" prop="taxRate" ></sa-td>-->
 					<el-table-column label="税率(%)" >
 						<template slot-scope="s">
@@ -71,11 +76,16 @@
 <!--					<sa-td name="税款(元)" prop="taxes" ></sa-td>-->
 					<el-table-column label="税款(元)" >
 						<template slot-scope="s">
-							<span v-if="s.row.taxes != null" >{{s.row.taxes}}</span>
-							<span v-else >{{Math.round((s.row.taxMoney-s.row.noTaxMoney)*100)/100}}</span>
+							<span v-if="s.row.taxes != null" >{{Number(s.row.taxes).toFixed(2)}}</span>
+							<span v-else >{{Number(s.row.taxMoney-s.row.noTaxMoney).toFixed(2)}}</span>
+						</template>
+					</el-table-column>
+<!--					<sa-td name="不含税收入(元)" prop="noTaxMoney" ></sa-td>-->
+					<el-table-column label="不含税收入(元)" >
+						<template slot-scope="s">
+							<span>{{Number(s.row.noTaxMoney).toFixed(2)}}</span>
 						</template>
 					</el-table-column>
-					<sa-td name="不含税收入(元)" prop="noTaxMoney" ></sa-td>
 					<sa-td name="支付方式" prop="payType" type="enum" :jv="{3: '微信支付'}"></sa-td>
 <!--					<el-table-column label="操作" fixed="right"  width="240px">-->
 <!--						<template slot-scope="s">-->

+ 18 - 3
sp-admin/sa-view/tb-fee-statistics/year-statistcs-list.html

@@ -51,14 +51,29 @@
 						   :jv="{1: '核酸检测',2: '消杀作业', 3: '装卸作业', 4: '停车费', 5: '过磅费', 6: '入场管理费', 7: '充电打冷作业'}"></sa-td>
 					<sa-td name="年份" prop="year"></sa-td>
 					<sa-td name="数量" prop="num" ></sa-td>
-					<sa-td name="含税收入(元)" prop="statisticsMoney"></sa-td>
+<!--					<sa-td name="含税收入(元)" prop="statisticsMoney"></sa-td>-->
+					<el-table-column label="含税收入(元)" >
+						<template slot-scope="s">
+							<span>{{Number(s.row.statisticsMoney).toFixed(2)}}</span>
+						</template>
+					</el-table-column>
 					<el-table-column label="税率(%)" >
 						<template slot-scope="s">
 							<span>{{s.row.taxRate * 100}}</span>
 						</template>
 					</el-table-column>
-					<sa-td name="税款(元)" prop="taxes" ></sa-td>
-					<sa-td name="不含税收入(元)" prop="noTaxMoney" ></sa-td>
+<!--					<sa-td name="税款(元)" prop="taxes" ></sa-td>-->
+					<el-table-column label="税款(元)" >
+						<template slot-scope="s">
+							<span>{{Number(s.row.taxes).toFixed(2)}}</span>
+						</template>
+					</el-table-column>
+<!--					<sa-td name="不含税收入(元)" prop="noTaxMoney" ></sa-td>-->
+					<el-table-column label="不含税收入(元)" >
+						<template slot-scope="s">
+							<span>{{Number(s.row.noTaxMoney).toFixed(2)}}</span>
+						</template>
+					</el-table-column>
 					<!--					<el-table-column label="操作" fixed="right"  width="240px">-->
 					<!--						<template slot-scope="s">-->
 					<!--							<el-button class="c-btn" type="success" icon="el-icon-view" @click="get(s.row)">查看</el-button>-->

+ 17 - 0
sp-server/src/main/java/com/pj/project/tb_fee_details/TbFeeDetailsController.java

@@ -1,5 +1,6 @@
 package com.pj.project.tb_fee_details;
 
+import java.math.BigDecimal;
 import java.util.List;
 
 import com.pj.utils.so.SoMap;
@@ -82,6 +83,22 @@ public class TbFeeDetailsController {
 	    SoMap so = SoMap.getRequestSoMap();
 	    return AjaxJson.getSuccessData(tbFeeDetailsService.export(so));
     }
+
+    @RequestMapping("calcuAgain")
+    public AjaxJson calcuAgain(){
+        List<TbFeeDetails> list = tbFeeDetailsService.list();
+        for (TbFeeDetails detail : list) {
+            BigDecimal taxPrice = BigDecimal.valueOf(0);
+            BigDecimal noTaxPrice = BigDecimal.valueOf(0);
+            taxPrice = detail.getItemPrice().divide(BigDecimal.valueOf(1).add(detail.getTaxRate()),2, BigDecimal.ROUND_HALF_UP).multiply(detail.getTaxRate());
+            taxPrice = taxPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
+            noTaxPrice = detail.getItemPrice().subtract(taxPrice);
+            noTaxPrice = noTaxPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
+            detail.setTaxPrice(taxPrice).setNoTaxPrice(noTaxPrice);
+        }
+        tbFeeDetailsService.updateBatchById(list);
+        return AjaxJson.getSuccess();
+    }
 	
 	
 	

+ 7 - 1
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsController.java

@@ -104,7 +104,13 @@ public class TbFeeStatisticsController {
         SoMap so = SoMap.getRequestSoMap();
         return AjaxJson.getSuccessData(tbFeeStatisticsService.exportMonthStatistics(so));
     }
-	
+
+
+    @RequestMapping("calcuAgain")
+    public AjaxJson calcuAgain() {
+        tbFeeStatisticsService.calcuAgain();
+        return AjaxJson.getSuccess();
+    }
 	
 	
 	

+ 2 - 2
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsMapper.xml

@@ -106,7 +106,7 @@
 	</select>
 
     <select id="getMonth" resultMap="model">
-        select month, fee_type,  sum(num) as num, sum(tax_money) as statistics_money, sum(taxes) as taxes, sum(no_tax_money) as no_tax_money, any_value(tax_rate)
+        select month, fee_type,  sum(num) as num, sum(tax_money) as statistics_money, sum(taxes) as taxes, sum(no_tax_money) as no_tax_money, any_value(tax_rate) as tax_rate
         from tb_fee_statistics
         <where>
             <if test=' this.has("feeType") '> and fee_type = #{feeType} </if>
@@ -121,7 +121,7 @@
     </select>
 
     <select id="getYear" resultMap="model">
-        select year, fee_type,  sum(num) as num, sum(tax_money) as statistics_money, sum(taxes) as taxes, sum(no_tax_money) as no_tax_money, any_value(tax_rate)
+        select year, fee_type,  sum(num) as num, sum(tax_money) as statistics_money, sum(taxes) as taxes, sum(no_tax_money) as no_tax_money, any_value(tax_rate) as tax_rate
         from tb_fee_statistics
         <where>
             <if test=' this.has("feeType") '> and fee_type = #{feeType} </if>

+ 20 - 0
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsService.java

@@ -369,4 +369,24 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
         return prefix + "/feeStatistics_month/" + today + "/收费月统计表_" + monthStr + ".xlsx";
     }
 
+    public void calcuAgain() {
+        List<TbFeeStatistics> list = this.list();
+        for (TbFeeStatistics statistic : list) {
+            String day = statistic.getDay();
+            Integer feeType = statistic.getFeeType();
+            QueryWrapper<TbFeeDetails> qw = new QueryWrapper<>();
+            qw.like("create_time", day).eq("fee_type", feeType);
+            List<TbFeeDetails> detailsList = tbFeeDetailsService.list(qw);
+            BigDecimal totalPrice = new BigDecimal(0);
+            BigDecimal totalTaxes = new BigDecimal(0);
+            BigDecimal totalNoTaxPrice = new BigDecimal(0);
+            for (TbFeeDetails detail : detailsList) {
+                totalPrice = totalPrice.add(detail.getItemPrice());
+                totalTaxes = totalTaxes.add(detail.getTaxPrice());
+                totalNoTaxPrice = totalNoTaxPrice.add(detail.getNoTaxPrice());
+            }
+            statistic.setTaxMoney(totalPrice).setTaxes(totalTaxes).setNoTaxMoney(totalNoTaxPrice);
+        }
+        this.updateBatchById(list);
+    }
 }