bug修复
This commit is contained in:
@@ -791,8 +791,8 @@ public class WmsCostCoilDailyServiceImpl implements IWmsCostCoilDailyService {
|
||||
summary.put("totalGrossWeight", BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP));
|
||||
summary.put("totalCost", BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP));
|
||||
summary.put("avgStorageDays", BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP));
|
||||
summary.put("todayCost", BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP));
|
||||
}
|
||||
|
||||
// 兼容前端字段命名
|
||||
summary.putIfAbsent("totalCoils", total);
|
||||
|
||||
@@ -813,6 +813,7 @@ public class WmsCostCoilDailyServiceImpl implements IWmsCostCoilDailyService {
|
||||
|
||||
if (db == null || db.isEmpty()) {
|
||||
result.put("totalCost", BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP));
|
||||
result.put("todayCost", BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP));
|
||||
result.put("totalNetWeight", BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP));
|
||||
result.put("totalGrossWeight", BigDecimal.ZERO.setScale(3, RoundingMode.HALF_UP));
|
||||
result.put("avgStorageDays", BigDecimal.ZERO.setScale(2, RoundingMode.HALF_UP));
|
||||
@@ -821,16 +822,18 @@ public class WmsCostCoilDailyServiceImpl implements IWmsCostCoilDailyService {
|
||||
}
|
||||
|
||||
BigDecimal totalCost = toBigDecimal(db.get("totalCost"), 2);
|
||||
BigDecimal todayCost = toBigDecimal(db.get("todayCost"), 2);
|
||||
BigDecimal totalNetWeight = toBigDecimal(db.get("totalNetWeight"), 3);
|
||||
BigDecimal totalGrossWeight = toBigDecimal(db.get("totalGrossWeight"), 3);
|
||||
BigDecimal avgStorageDays = toBigDecimal(db.get("avgStorageDays"), 2);
|
||||
Number totalCoils = db.get("totalCoils") instanceof Number ? (Number) db.get("totalCoils") : 0;
|
||||
|
||||
LocalDate calcDate = LocalDate.now();
|
||||
Long totalCoils = baseMapper.countStockpileByEnterCoilNo(calcDate,null);
|
||||
result.put("totalCost", totalCost);
|
||||
result.put("todayCost", todayCost);
|
||||
result.put("totalNetWeight", totalNetWeight);
|
||||
result.put("totalGrossWeight", totalGrossWeight);
|
||||
result.put("avgStorageDays", avgStorageDays);
|
||||
result.put("totalCoils", totalCoils.intValue());
|
||||
result.put("totalCoils", totalCoils);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user