|
@@ -167,8 +167,20 @@ public class TwinWorkshopCalcServiceImpl implements ITwinWorkshopCalcService {
|
|
|
TwinWorkshopCalc calc = new TwinWorkshopCalc();
|
|
|
calc.setWsId(wsId);
|
|
|
calc.setDataDate(date);
|
|
|
- calc.setValue(resultMap.get("A").getTotalValue(), resultMap.get("B").getTotalValue());
|
|
|
- calc.setPrice(resultMap.get("A").getTotalPrice(), resultMap.get("B").getTotalPrice());
|
|
|
+ BigDecimal totalA = BigDecimal.ZERO;
|
|
|
+ BigDecimal totalB = BigDecimal.ZERO;
|
|
|
+ BigDecimal priceA = BigDecimal.ZERO;
|
|
|
+ BigDecimal priceB = BigDecimal.ZERO;
|
|
|
+ if (resultMap.get("A") != null) {
|
|
|
+ totalA = resultMap.get("A").getTotalValue();
|
|
|
+ priceA = resultMap.get("A").getTotalPrice();
|
|
|
+ }
|
|
|
+ if (resultMap.get("B") != null) {
|
|
|
+ totalB = resultMap.get("B").getTotalValue();
|
|
|
+ priceB = resultMap.get("B").getTotalPrice();
|
|
|
+ }
|
|
|
+ calc.setValue(totalA, totalB);
|
|
|
+ calc.setPrice(priceA, priceB);
|
|
|
calcList.add(calc);
|
|
|
|
|
|
}
|