feat(mes/roll): 新增轧辊磨削记录通用查询和报表页面
1. 新增通用查询接口,支持按轧辊ID、产线ID、时间范围筛选磨削记录 2. 重构后端列表接口,支持不传轧辊ID查询全部记录 3. 修复硬度字段类型转换问题,将未倒角转为0数值 4. 新增磨辊报表页面,支持统计分析和图表展示
This commit is contained in:
@@ -5,12 +5,29 @@
|
||||
<select id="selectByRollId" resultType="com.klp.mes.roll.domain.vo.MesRollGrindVo">
|
||||
SELECT grind_id, roll_id, roll_no, grind_time, team,
|
||||
dia_before, dia_after, grind_amount, roll_shape,
|
||||
flaw_result, hardness, operator, remark, create_time
|
||||
flaw_result,
|
||||
CASE WHEN hardness = '未倒角' THEN 0 ELSE CAST(hardness AS DECIMAL(10,1)) END AS hardness,
|
||||
operator, remark, create_time
|
||||
FROM mes_roll_grind
|
||||
WHERE del_flag = 0 AND roll_id = #{rollId}
|
||||
ORDER BY grind_time ASC, grind_id ASC
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultType="com.klp.mes.roll.domain.vo.MesRollGrindVo">
|
||||
SELECT grind_id, roll_id, roll_no, grind_time, team,
|
||||
dia_before, dia_after, grind_amount, roll_shape,
|
||||
flaw_result,
|
||||
CASE WHEN hardness = '未倒角' THEN 0 ELSE CAST(hardness AS DECIMAL(10,1)) END AS hardness,
|
||||
operator, remark, create_time
|
||||
FROM mes_roll_grind
|
||||
WHERE del_flag = 0
|
||||
<if test="rollId != null">AND roll_id = #{rollId}</if>
|
||||
<if test="lineId != null">AND line_id = #{lineId}</if>
|
||||
<if test="beginTime != null and beginTime != ''">AND grind_time >= #{beginTime}</if>
|
||||
<if test="endTime != null and endTime != ''">AND grind_time <= #{endTime}</if>
|
||||
ORDER BY grind_time ASC, grind_id ASC
|
||||
</select>
|
||||
|
||||
<select id="selectMonthlyStats" resultType="map">
|
||||
SELECT
|
||||
DATE_FORMAT(grind_time, '%Y-%m') AS month,
|
||||
|
||||
Reference in New Issue
Block a user