Commit 8ffb9ed6 authored by libin's avatar libin

员工统计

parent 3e37f99c
......@@ -365,20 +365,20 @@ public class StaffStatisticsBiz {
for (AppUserSellingWaterDTO waterDTO : appUserSellingWaterDTOS) {
if (waterDTO.getStatus() == 0) {
royaltyAmount = royaltyAmount.add(waterDTO.getCommission());
totalAmount = totalAmount.add(waterDTO.getPrice());
totalAmount = totalAmount.add(waterDTO.getCommission().divide(new BigDecimal(String.valueOf(waterDTO.getExtract()/100.00))));
inAmount = inAmount.add(waterDTO.getCommission());
isCommissionZero = waterDTO.getCommission().intValue()==0;
}
if (waterDTO.getStatus() == 1) {
royaltyAmount = royaltyAmount.subtract(waterDTO.getCommission());
totalAmount = totalAmount.subtract(waterDTO.getPrice());
totalAmount = totalAmount.subtract(waterDTO.getCommission().divide(new BigDecimal(String.valueOf(waterDTO.getExtract()/100.00))));
outAmount = outAmount.add(waterDTO.getCommission());
isCommissionZero=!isCommissionZero;
}
}
if(appUserSellingWaterDTOS.size()==1 || inAmount.subtract(outAmount).intValue()>0 || isCommissionZero){
if(appUserSellingWaterDTOS.size()==1 || inAmount.subtract(outAmount).doubleValue()>0 || isCommissionZero){
orderCounter.incrementAndGet();
}
}
......
......@@ -229,13 +229,14 @@ public class StaffStatisticsBiz extends BaseBiz<StaffStatisticsMapper, StaffStat
for (AppUserSellingWaterDTO waterDTO : waterDTOS) {
if (sellingWaterEntry.getKey() == 0){
royaltyAmount = royaltyAmount.add(waterDTO.getCommission());
totalAmount = totalAmount.add(waterDTO.getPrice());
totalAmount = totalAmount.add(waterDTO.getCommission().divide(new BigDecimal(String.valueOf(waterDTO.getExtract()))));
orderCounter.incrementAndGet();
}
if (sellingWaterEntry.getKey()==1){
royaltyAmount = royaltyAmount.subtract(waterDTO.getCommission());
totalAmount = totalAmount.subtract(waterDTO.getPrice());
totalAmount = totalAmount.subtract(waterDTO.getCommission().divide(new BigDecimal(String.valueOf(waterDTO.getExtract()/100.00))));
}
}
staffStatisticsResultMap.put(TOTAL_AMOUNT_VAL,totalAmount);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment