|
|
|
@ -247,9 +247,8 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
|
|
|
|
|
equipmentBoardVO.getInspectionTotal().compareTo(BigDecimal.ZERO) == 0) {
|
|
|
|
|
equipmentBoardVO.setInspectionFinishRate(BigDecimal.ZERO);
|
|
|
|
|
} else {
|
|
|
|
|
BigDecimal rate = equipmentBoardVO.getInspectionFinish()
|
|
|
|
|
.divide(equipmentBoardVO.getInspectionTotal(), 2, BigDecimal.ROUND_HALF_UP)
|
|
|
|
|
.multiply(new BigDecimal("100"));
|
|
|
|
|
BigDecimal rate = equipmentBoardVO.getInspectionFinish().multiply(new BigDecimal("100"))
|
|
|
|
|
.divide(equipmentBoardVO.getInspectionTotal(), 2, BigDecimal.ROUND_DOWN);
|
|
|
|
|
equipmentBoardVO.setInspectionFinishRate(rate);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -257,9 +256,8 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
|
|
|
|
|
equipmentBoardVO.getSpotInspectionTotal().compareTo(BigDecimal.ZERO) == 0) {
|
|
|
|
|
equipmentBoardVO.setSpotInspectionFinishRate(BigDecimal.ZERO);
|
|
|
|
|
} else {
|
|
|
|
|
BigDecimal rate = equipmentBoardVO.getSpotInspectionFinish()
|
|
|
|
|
.divide(equipmentBoardVO.getSpotInspectionTotal(), 2, BigDecimal.ROUND_HALF_UP)
|
|
|
|
|
.multiply(new BigDecimal("100"));
|
|
|
|
|
BigDecimal rate = equipmentBoardVO.getSpotInspectionFinish().multiply(new BigDecimal("100"))
|
|
|
|
|
.divide(equipmentBoardVO.getSpotInspectionTotal(), 2, BigDecimal.ROUND_DOWN);
|
|
|
|
|
equipmentBoardVO.setSpotInspectionFinishRate(rate);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|