From 91b2da2c3a42656e842f7c9e0c4af6aa02dbaa3a Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期一, 04 九月 2023 09:23:29 +0800
Subject: [PATCH] MOM系统-9-04 生产报工
---
production-server/src/main/resources/mapper/ManufactureOrderProcessMapper.xml | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/production-server/src/main/resources/mapper/ManufactureOrderProcessMapper.xml b/production-server/src/main/resources/mapper/ManufactureOrderProcessMapper.xml
index 6a3a0d1..9d64c2c 100644
--- a/production-server/src/main/resources/mapper/ManufactureOrderProcessMapper.xml
+++ b/production-server/src/main/resources/mapper/ManufactureOrderProcessMapper.xml
@@ -2,4 +2,32 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yuanchu.mom.mapper.ManufactureOrderProcessMapper">
+ <update id="updateTime" parameterType="integer">
+ UPDATE manufacture_order_process p
+ <trim prefix="set" suffixOverrides=",">
+ <trim prefix="start_time =case" suffix="end,">
+ <foreach collection="list" item="list" index="index">
+ WHEN p.id=#{list.id} THEN #{list.startTime}
+ </foreach>
+ </trim>
+ <trim prefix="end_time =case" suffix="end,">
+ <foreach collection="list" item="list" index="index">
+ WHEN p.id=#{list.id} THEN #{list.endTime}
+ </foreach>
+ </trim>
+ </trim>
+ WHERE p.id in
+ <foreach collection="list" item="list" index="index" separator="," open="(" close=")">
+ <if test="list.startTime != null and list.endTime != null">
+ #{list.id, jdbcType=BIGINT}
+ </if>
+ </foreach>
+ </update>
+
+ <select id="selectSchedulingStartTime" resultType="date">
+ SELECT DATE_FORMAT(p.`start_time`, '%Y-%m-%d')
+ FROM manufacture_order_process p
+ WHERE p.`manufacture_scheduling_id` = #{schedulingId}
+ LIMIT 1
+ </select>
</mapper>
--
Gitblit v1.9.3