提交酸扎串联内容以及磨辊间
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.klp.mes.roll.mapper.MesRollGrindMapper">
|
||||
|
||||
<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
|
||||
FROM mes_roll_grind
|
||||
WHERE del_flag = 0 AND roll_id = #{rollId}
|
||||
ORDER BY grind_time ASC, grind_id ASC
|
||||
</select>
|
||||
|
||||
<select id="selectMonthlyStats" resultType="map">
|
||||
SELECT
|
||||
DATE_FORMAT(grind_time, '%Y-%m') AS month,
|
||||
COUNT(*) AS grindCount,
|
||||
IFNULL(SUM(grind_amount), 0) AS totalGrindAmount
|
||||
FROM mes_roll_grind
|
||||
WHERE del_flag = 0
|
||||
AND roll_id = #{rollId}
|
||||
AND YEAR(grind_time) = #{year}
|
||||
GROUP BY DATE_FORMAT(grind_time, '%Y-%m')
|
||||
ORDER BY month ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -42,4 +42,18 @@
|
||||
WHERE del_flag = 0 AND roll_no = #{rollNo} AND status = #{onlyIfStatus}
|
||||
</update>
|
||||
|
||||
<update id="incrementGrindCount">
|
||||
UPDATE mes_roll_info
|
||||
SET grind_count = grind_count + 1,
|
||||
<if test="diaAfter != null">current_dia = #{diaAfter},</if>
|
||||
update_time = NOW()
|
||||
WHERE del_flag = 0 AND roll_id = #{rollId}
|
||||
</update>
|
||||
|
||||
<update id="updateCurrentDia">
|
||||
UPDATE mes_roll_info
|
||||
SET current_dia = #{currentDia}, update_time = NOW()
|
||||
WHERE del_flag = 0 AND roll_id = #{rollId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user