This commit is contained in:
2026-06-09 16:48:29 +08:00
2 changed files with 8 additions and 9 deletions

View File

@@ -149,12 +149,12 @@ public class MesRollChangeServiceImpl implements IMesRollChangeService
if (rec != null) {
cell.put("rollNo", getRollNoByPos(rec, posType));
cell.put("onlineTime", rec.getChangeTime());
Map<String, Object> stats = mesRollChangeMapper.selectCoilStats(rec.getChangeTime(), null);
MesRollChangeVo tmp = new MesRollChangeVo();
fillStatsToVo(tmp, stats);
cell.put("workLength", tmp.getWorkLength());
cell.put("coilCount", tmp.getCoilCount());
cell.put("totalWeight", tmp.getTotalWeight());
// Map<String, Object> stats = mesRollChangeMapper.selectCoilStats(rec.getChangeTime(), null);
// MesRollChangeVo tmp = new MesRollChangeVo();
// fillStatsToVo(tmp, stats);
// cell.put("workLength", tmp.getWorkLength());
// cell.put("coilCount", tmp.getCoilCount());
// cell.put("totalWeight", tmp.getTotalWeight());
}
byStand.put(standNo, cell);
}

View File

@@ -168,15 +168,14 @@
<!-- 查询指定机架+辊位的最新换辊记录 -->
<select id="selectLatestByStandAndPosition" resultMap="MesRollChangeResult">
<include refid="selectMesRollChangeVo"/>
FROM mes_roll_change
WHERE line_id = #{lineId} AND stand_no = #{standNo}
WHERE line_id = #{lineId} AND stand_no = #{standNo} AND del_flag = 0
AND (
(#{posType} = 'upperWr' AND upper_wr_no IS NOT NULL)
OR (#{posType} = 'lowerWr' AND lower_wr_no IS NOT NULL)
OR (#{posType} = 'upperBr' AND upper_br_no IS NOT NULL)
OR (#{posType} = 'lowerBr' AND lower_br_no IS NOT NULL)
)
ORDER BY change_id DESC
ORDER BY change_time DESC, change_id DESC
LIMIT 1
</select>