Commit c3300238 authored by libin's avatar libin

Merge branch 'staff-statistics' into dev

parents 164b5c08 8ffb9ed6
......@@ -87,7 +87,7 @@ public class StaffStatisticsBiz {
Row ctpRow = sheet.createRow(1);
Cell ctpCell = ctpRow.createCell(0);
//缺少判断 公司 身份 时间
//
String companyName = StringUtils.hasText(staffStatisticsFindDTO.getCompanyName()) ? staffStatisticsFindDTO.getCompanyName() : "全集团";
String postionName = StringUtils.hasText(staffStatisticsFindDTO.getPostionName()) ? staffStatisticsFindDTO.getPostionName() : "全部员工";
String startTimeStr = staffStatisticsFindDTO.getStartDate()==null?"":DateUtil.format(staffStatisticsFindDTO.getStartDate(), "yyyy-MM-dd HH:mm:ss");
......@@ -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