提交 | 用户 | 时间
|
9f7aa7
|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
吴 |
2 |
<!DOCTYPE mapper |
|
3 |
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
4 |
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
5 |
<mapper namespace="com.billion.main.om.mapper.OmOrderSchedulingMapper"> |
|
6 |
|
|
7 |
<resultMap type="OmOrderScheduling" id="OmOrderSchedulingResult"> |
|
8 |
<result property="id" column="id" /> |
|
9 |
<result property="workOrderNo" column="work_order_no" /> |
|
10 |
<result property="sfcCode" column="sfc_code" /> |
|
11 |
<result property="productCode" column="product_code" /> |
|
12 |
<result property="onlineTime" column="online_time" /> |
|
13 |
<result property="offlineTime" column="offline_time" /> |
|
14 |
<result property="qualityStatus" column="quality_status" /> |
|
15 |
<result property="status" column="status" /> |
|
16 |
<result property="createBy" column="create_by" /> |
|
17 |
<result property="createTime" column="create_time" /> |
|
18 |
<result property="updateBy" column="update_by" /> |
|
19 |
<result property="updateTime" column="update_time" /> |
|
20 |
<result property="remarks" column="remarks" /> |
b9df2f
|
21 |
<result property="nowQty" column="now_qty" /> |
9f7aa7
|
22 |
</resultMap> |
吴 |
23 |
|
|
24 |
<sql id="selectOmOrderSchedulingVo"> |
b9df2f
|
25 |
select id, now_qty,work_order_no, sfc_code, product_code, online_time, offline_time, quality_status, status, create_by, create_time, update_by, update_time, remarks from om_order_scheduling |
9f7aa7
|
26 |
</sql> |
吴 |
27 |
|
|
28 |
<select id="selectOmOrderSchedulingList" parameterType="OmOrderScheduling" resultMap="OmOrderSchedulingResult"> |
|
29 |
<include refid="selectOmOrderSchedulingVo"/> |
|
30 |
<where> |
|
31 |
<if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if> |
|
32 |
<if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</if> |
|
33 |
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> |
1c50cb
|
34 |
<!-- <if test="params.beginOnlineTime != null and params.beginOnlineTime != '' and params.endOnlineTime != null and params.endOnlineTime != ''"> and online_time between #{params.beginOnlineTime} and #{params.endOnlineTime}</if>--> |
H |
35 |
<!-- <if test="params.beginOfflineTime != null and params.beginOfflineTime != '' and params.endOfflineTime != null and params.endOfflineTime != ''"> and offline_time between #{params.beginOfflineTime} and #{params.endOfflineTime}</if>--> |
|
36 |
<!---- <if test="params.beginOnlineTime != null and params.beginOnlineTime != '' and params.endOnlineTime != null and params.endOnlineTime != ''"> </if>--> |
|
37 |
<!-- <if test="params.beginOfflineTime != null and params.beginOfflineTime != '' and params.endOfflineTime != null and params.endOfflineTime != ''"></if>--> |
9f7aa7
|
38 |
<if test="status != null and status != ''"> and status = #{status}</if> |
b9df2f
|
39 |
<if test="nowQty != null and nowQty != ''"> and now_qty = #{nowQty}</if> |
9f7aa7
|
40 |
</where> |
吴 |
41 |
</select> |
|
42 |
|
|
43 |
<select id="selectOmOrderSchedulingById" parameterType="Long" resultMap="OmOrderSchedulingResult"> |
|
44 |
<include refid="selectOmOrderSchedulingVo"/> |
|
45 |
where id = #{id} |
|
46 |
</select> |
|
47 |
|
|
48 |
<insert id="insertOmOrderScheduling" parameterType="OmOrderScheduling"> |
|
49 |
insert into om_order_scheduling |
|
50 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
51 |
<if test="workOrderNo != null and workOrderNo != ''">work_order_no,</if> |
|
52 |
<if test="sfcCode != null and sfcCode != ''">sfc_code,</if> |
|
53 |
<if test="productCode != null and productCode != ''">product_code,</if> |
|
54 |
<if test="onlineTime != null">online_time,</if> |
|
55 |
<if test="offlineTime != null">offline_time,</if> |
|
56 |
<if test="qualityStatus != null">quality_status,</if> |
|
57 |
<if test="status != null">status,</if> |
|
58 |
<if test="createBy != null">create_by,</if> |
|
59 |
<if test="createTime != null">create_time,</if> |
|
60 |
<if test="updateBy != null">update_by,</if> |
|
61 |
<if test="updateTime != null">update_time,</if> |
|
62 |
<if test="remarks != null">remarks,</if> |
|
63 |
</trim> |
|
64 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
65 |
<if test="workOrderNo != null and workOrderNo != ''">#{workOrderNo},</if> |
|
66 |
<if test="sfcCode != null and sfcCode != ''">#{sfcCode},</if> |
|
67 |
<if test="productCode != null and productCode != ''">#{productCode},</if> |
|
68 |
<if test="onlineTime != null">#{onlineTime},</if> |
|
69 |
<if test="offlineTime != null">#{offlineTime},</if> |
|
70 |
<if test="qualityStatus != null">#{qualityStatus},</if> |
|
71 |
<if test="status != null">#{status},</if> |
|
72 |
<if test="createBy != null">#{createBy},</if> |
|
73 |
<if test="createTime != null">#{createTime},</if> |
|
74 |
<if test="updateBy != null">#{updateBy},</if> |
|
75 |
<if test="updateTime != null">#{updateTime},</if> |
|
76 |
<if test="remarks != null">#{remarks},</if> |
|
77 |
</trim> |
|
78 |
</insert> |
|
79 |
|
|
80 |
<update id="updateOmOrderScheduling" parameterType="OmOrderScheduling"> |
|
81 |
update om_order_scheduling |
|
82 |
<trim prefix="SET" suffixOverrides=","> |
|
83 |
<if test="workOrderNo != null and workOrderNo != ''">work_order_no = #{workOrderNo},</if> |
|
84 |
<if test="sfcCode != null and sfcCode != ''">sfc_code = #{sfcCode},</if> |
|
85 |
<if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
|
86 |
<if test="onlineTime != null">online_time = #{onlineTime},</if> |
|
87 |
<if test="offlineTime != null">offline_time = #{offlineTime},</if> |
|
88 |
<if test="qualityStatus != null">quality_status = #{qualityStatus},</if> |
|
89 |
<if test="status != null">status = #{status},</if> |
|
90 |
<if test="createBy != null">create_by = #{createBy},</if> |
|
91 |
<if test="createTime != null">create_time = #{createTime},</if> |
|
92 |
<if test="updateBy != null">update_by = #{updateBy},</if> |
|
93 |
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
94 |
<if test="remarks != null">remarks = #{remarks},</if> |
|
95 |
</trim> |
|
96 |
where id = #{id} |
|
97 |
</update> |
|
98 |
|
|
99 |
<delete id="deleteOmOrderSchedulingById" parameterType="Long"> |
|
100 |
delete from om_order_scheduling where id = #{id} |
|
101 |
</delete> |
|
102 |
|
|
103 |
<delete id="deleteOmOrderSchedulingByIds" parameterType="String"> |
|
104 |
delete from om_order_scheduling where id in |
|
105 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
106 |
#{id} |
|
107 |
</foreach> |
|
108 |
</delete> |
|
109 |
</mapper> |