Procházet zdrojové kódy

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

# Conflicts:
#	sp-server/app.pid
qzyReal před 3 roky
rodič
revize
6371758f49

+ 4 - 3
sp-server/src/main/java/com/pj/project/tb_fee_statistics/TbFeeStatisticsService.java

@@ -216,14 +216,15 @@ public class TbFeeStatisticsService extends ServiceImpl<TbFeeStatisticsMapper, T
             }
             businessFee.setTaxMoney(businessFee.getTaxMoney().add(item.getTotal()));//含税收入
             businessFee.setNum(businessFee.getNum() + Integer.valueOf(item.getNum()));
-            BigDecimal taxes = businessFee.getTaxMoney()
+            BigDecimal taxes = item.getTotal()
                     .divide(BigDecimal.valueOf(1).add(businessFee.getTaxRate()),2, BigDecimal.ROUND_HALF_UP)
                     .multiply(businessFee.getTaxRate());
             taxes = taxes.setScale(2, BigDecimal.ROUND_HALF_UP);
-            BigDecimal noTaxMoney = businessFee.getTaxMoney().subtract(taxes);
+            BigDecimal noTaxMoney = item.getTotal().subtract(taxes);
             noTaxMoney = noTaxMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
 
-            businessFee.setNoTaxMoney(noTaxMoney).setTaxes(taxes);
+            businessFee.setNoTaxMoney(businessFee.getNoTaxMoney().add(noTaxMoney))
+                    .setTaxes(businessFee.getTaxes().add(taxes));
             businessFee.setDayTime(now).setMonth(thisMonth).setYear(thisYear).setDay(toDay)
                     .setFeeType(feeType)
                     //.setItemTypeName(itemType)