2025-2-24 设备看板对接问题

master
元气满满 1 month ago
parent 94f03c3d39
commit 32abfaea7e

@ -212,7 +212,7 @@ public class EquRepairWorkOrderDetailVO extends BaseEntity {
private List<BaseFileData> files; private List<BaseFileData> files;
//时间维度 年月日 //时间维度 年月日
private BigDecimal timeDimension; private String timeDimension;
//维修前 维修后 //维修前 维修后
public String getAfterRepairFile() { public String getAfterRepairFile() {
@ -694,12 +694,12 @@ public class EquRepairWorkOrderDetailVO extends BaseEntity {
public void setStandardList(List<EquOrderStandard> standardList) { this.standardList = standardList; } public void setStandardList(List<EquOrderStandard> standardList) { this.standardList = standardList; }
// 获取时间维度的值 // 获取时间维度的值
public BigDecimal getTimeDimension() { public String getTimeDimension() {
return timeDimension; return timeDimension;
} }
// 设置时间维度的值 // 设置时间维度的值
public void setTimeDimension(BigDecimal timeDimension) { public void setTimeDimension(String timeDimension) {
this.timeDimension = timeDimension; this.timeDimension = timeDimension;
} }

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

@ -301,10 +301,10 @@
left join base_equipment be on erwo.equipment_code = be.equipment_code left join base_equipment be on erwo.equipment_code = be.equipment_code
left join equ_team et on erwo.work_team = et.team_code left join equ_team et on erwo.work_team = et.team_code
<where> <where>
<if test="timeDimension == 'dd' ">and convert(char(10),eo.create_time,120) = convert(char(10),getdate(),120)</if> <if test="timeDimension == 'dd' ">and convert(char(10),erwo.create_time,120) = convert(char(10),getdate(),120)</if>
<if test="timeDimension == 'mm' ">and month(eo.create_time) = month(getdate())</if> <if test="timeDimension == 'mm' ">and month(erwo.create_time) = month(getdate())</if>
<if test="timeDimension == 'yyyy' ">and year(eo.create_time) = year(getdate())</if> <if test="timeDimension == 'yyyy' ">and year(erwo.create_time) = year(getdate())</if>
<if test="createTime != null and createTime != null ">and convert(char(10),eo.create_time,120) = convert(char(10),#{createTime},120)</if> <if test="createTime != null and createTime != null ">and convert(char(10),erwo.create_time,120) = convert(char(10),#{createTime},120)</if>
<if test="resultInspect != null and resultInspect != '' ">and erwo.result_inspect = #{resultInspect} </if> <if test="resultInspect != null and resultInspect != '' ">and erwo.result_inspect = #{resultInspect} </if>
<if test="orderId != null and orderId != ''">and erwo.order_id = #{orderId}</if> <if test="orderId != null and orderId != ''">and erwo.order_id = #{orderId}</if>
<if test="workCode != null and workCode != ''">and erwo.work_code like concat('%', #{workCode}, '%')</if> <if test="workCode != null and workCode != ''">and erwo.work_code like concat('%', #{workCode}, '%')</if>

Loading…
Cancel
Save