diff --git a/op-modules/op-device/src/main/java/com/op/device/domain/vo/EquRepairWorkOrderDetailVO.java b/op-modules/op-device/src/main/java/com/op/device/domain/vo/EquRepairWorkOrderDetailVO.java index c4cd2500..6970c95d 100644 --- a/op-modules/op-device/src/main/java/com/op/device/domain/vo/EquRepairWorkOrderDetailVO.java +++ b/op-modules/op-device/src/main/java/com/op/device/domain/vo/EquRepairWorkOrderDetailVO.java @@ -212,7 +212,7 @@ public class EquRepairWorkOrderDetailVO extends BaseEntity { private List files; //时间维度 年月日 - private BigDecimal timeDimension; + private String timeDimension; //维修前 维修后 public String getAfterRepairFile() { @@ -694,12 +694,12 @@ public class EquRepairWorkOrderDetailVO extends BaseEntity { public void setStandardList(List standardList) { this.standardList = standardList; } // 获取时间维度的值 - public BigDecimal getTimeDimension() { + public String getTimeDimension() { return timeDimension; } // 设置时间维度的值 - public void setTimeDimension(BigDecimal timeDimension) { + public void setTimeDimension(String timeDimension) { this.timeDimension = timeDimension; } diff --git a/op-modules/op-device/src/main/java/com/op/device/service/impl/DeviceInterfaceServiceImpl.java b/op-modules/op-device/src/main/java/com/op/device/service/impl/DeviceInterfaceServiceImpl.java index b1df034e..2f6b5f8d 100644 --- a/op-modules/op-device/src/main/java/com/op/device/service/impl/DeviceInterfaceServiceImpl.java +++ b/op-modules/op-device/src/main/java/com/op/device/service/impl/DeviceInterfaceServiceImpl.java @@ -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); } } diff --git a/op-modules/op-device/src/main/resources/mapper/device/DeviceInterfaceMapper.xml b/op-modules/op-device/src/main/resources/mapper/device/DeviceInterfaceMapper.xml index 42166892..1fd63345 100644 --- a/op-modules/op-device/src/main/resources/mapper/device/DeviceInterfaceMapper.xml +++ b/op-modules/op-device/src/main/resources/mapper/device/DeviceInterfaceMapper.xml @@ -301,10 +301,10 @@ left join base_equipment be on erwo.equipment_code = be.equipment_code left join equ_team et on erwo.work_team = et.team_code - and convert(char(10),eo.create_time,120) = convert(char(10),getdate(),120) - and month(eo.create_time) = month(getdate()) - and year(eo.create_time) = year(getdate()) - and convert(char(10),eo.create_time,120) = convert(char(10),#{createTime},120) + and convert(char(10),erwo.create_time,120) = convert(char(10),getdate(),120) + and month(erwo.create_time) = month(getdate()) + and year(erwo.create_time) = year(getdate()) + and convert(char(10),erwo.create_time,120) = convert(char(10),#{createTime},120) and erwo.result_inspect = #{resultInspect} and erwo.order_id = #{orderId} and erwo.work_code like concat('%', #{workCode}, '%')