|
@@ -126,19 +126,19 @@ public class ApiYrServiceImpl implements IApiYrService {
|
|
|
Pair<Integer, Integer> pair = deviceStatus.get(deviceId);
|
|
|
|
|
|
Integer lengthA = teamMap.get("A").getKey();
|
|
|
- Integer lengthB = teamMap.get("B").getKey();
|
|
|
- if (lengthB == null) {
|
|
|
- lengthB = 0;
|
|
|
+ Integer lengthB = 0;
|
|
|
+ if (teamMap.get("B") != null) {
|
|
|
+ lengthB = teamMap.get("B").getKey();
|
|
|
}
|
|
|
Integer length = lengthA + lengthB;
|
|
|
|
|
|
BigDecimal weightA = teamMap.get("A").getValue();
|
|
|
- BigDecimal weightB = teamMap.get("B").getValue();
|
|
|
- if (weightB == null) {
|
|
|
- weightB = BigDecimal.ZERO;
|
|
|
+ BigDecimal weightB = BigDecimal.ZERO;
|
|
|
+ if (teamMap.get("B") != null) {
|
|
|
+ weightB = teamMap.get("B").getValue();
|
|
|
}
|
|
|
BigDecimal weight = weightA.add(weightB);
|
|
|
-
|
|
|
+
|
|
|
YrProdEfficiencyVO vo = arr[deviceId];
|
|
|
if (pair != null) {
|
|
|
vo.setTotal(pair.getKey());
|