提交 | 用户 | 时间
|
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.OmProductionOrderInfoMapper"> |
|
6 |
|
|
7 |
<resultMap type="OmProductionOrderInfo" id="OmProductionOrderInfoResult"> |
|
8 |
<result property="id" column="id" /> |
|
9 |
<result property="workOrderNo" column="work_order_no" /> |
|
10 |
<result property="salesOrderCode" column="sales_order_code" /> |
|
11 |
<result property="productCode" column="product_code" /> |
|
12 |
<result property="lineCode" column="line_code" /> |
|
13 |
<result property="planQty" column="plan_qty" /> |
|
14 |
<result property="planStartTime" column="plan_start_time" /> |
|
15 |
<result property="planEndTime" column="plan_end_time" /> |
|
16 |
<result property="orderStatus" column="order_status" /> |
|
17 |
<result property="createTime" column="create_time" /> |
|
18 |
<result property="updateTime" column="update_time" /> |
|
19 |
<result property="createBy" column="create_by" /> |
|
20 |
<result property="updateBy" column="update_by" /> |
|
21 |
<result property="remarks" column="remarks" /> |
|
22 |
<result property="delFlag" column="del_flag" /> |
|
23 |
</resultMap> |
|
24 |
|
|
25 |
<sql id="selectOmProductionOrderInfoVo"> |
|
26 |
select id, work_order_no, sales_order_code, product_code, line_code, plan_qty, plan_start_time, plan_end_time, order_status, create_time, update_time, create_by, update_by, remarks, del_flag from om_production_order_info |
|
27 |
</sql> |
|
28 |
|
|
29 |
<select id="selectOmProductionOrderInfoList" parameterType="OmProductionOrderInfo" resultMap="OmProductionOrderInfoResult"> |
|
30 |
<include refid="selectOmProductionOrderInfoVo"/> |
|
31 |
<where> |
|
32 |
<if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if> |
|
33 |
<if test="salesOrderCode != null and salesOrderCode != ''"> and sales_order_code = #{salesOrderCode}</if> |
|
34 |
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> |
|
35 |
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if> |
|
36 |
and del_flag = "0" |
|
37 |
</where> |
|
38 |
</select> |
|
39 |
|
|
40 |
<select id="selectOmProductionOrderInfoById" parameterType="Long" resultMap="OmProductionOrderInfoResult"> |
|
41 |
<include refid="selectOmProductionOrderInfoVo"/> |
|
42 |
where id = #{id} and del_flag = "0" |
|
43 |
</select> |
|
44 |
|
|
45 |
<insert id="insertOmProductionOrderInfo" parameterType="OmProductionOrderInfo" useGeneratedKeys="true" keyProperty="id"> |
|
46 |
insert into om_production_order_info |
|
47 |
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
48 |
<if test="workOrderNo != null and workOrderNo != ''">work_order_no,</if> |
|
49 |
<if test="salesOrderCode != null and salesOrderCode != ''">sales_order_code,</if> |
|
50 |
<if test="productCode != null and productCode != ''">product_code,</if> |
|
51 |
<if test="lineCode != null and lineCode != ''">line_code,</if> |
|
52 |
<if test="planQty != null">plan_qty,</if> |
|
53 |
<if test="planStartTime != null">plan_start_time,</if> |
|
54 |
<if test="planEndTime != null">plan_end_time,</if> |
|
55 |
<if test="orderStatus != null">order_status,</if> |
|
56 |
<if test="createTime != null">create_time,</if> |
|
57 |
<if test="updateTime != null">update_time,</if> |
|
58 |
<if test="createBy != null">create_by,</if> |
|
59 |
<if test="updateBy != null">update_by,</if> |
|
60 |
<if test="remarks != null">remarks,</if> |
|
61 |
<if test="delFlag != null">del_flag,</if> |
|
62 |
</trim> |
|
63 |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
64 |
<if test="workOrderNo != null and workOrderNo != ''">#{workOrderNo},</if> |
|
65 |
<if test="salesOrderCode != null and salesOrderCode != ''">#{salesOrderCode},</if> |
|
66 |
<if test="productCode != null and productCode != ''">#{productCode},</if> |
|
67 |
<if test="lineCode != null and lineCode != ''">#{lineCode},</if> |
|
68 |
<if test="planQty != null">#{planQty},</if> |
|
69 |
<if test="planStartTime != null">#{planStartTime},</if> |
|
70 |
<if test="planEndTime != null">#{planEndTime},</if> |
|
71 |
<if test="orderStatus != null">#{orderStatus},</if> |
|
72 |
<if test="createTime != null">#{createTime},</if> |
|
73 |
<if test="updateTime != null">#{updateTime},</if> |
|
74 |
<if test="createBy != null">#{createBy},</if> |
|
75 |
<if test="updateBy != null">#{updateBy},</if> |
|
76 |
<if test="remarks != null">#{remarks},</if> |
|
77 |
<if test="delFlag != null">#{delFlag},</if> |
|
78 |
</trim> |
|
79 |
</insert> |
|
80 |
|
|
81 |
<update id="updateOmProductionOrderInfo" parameterType="OmProductionOrderInfo"> |
|
82 |
update om_production_order_info |
|
83 |
<trim prefix="SET" suffixOverrides=","> |
|
84 |
<if test="workOrderNo != null and workOrderNo != ''">work_order_no = #{workOrderNo},</if> |
|
85 |
<if test="salesOrderCode != null and salesOrderCode != ''">sales_order_code = #{salesOrderCode},</if> |
|
86 |
<if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
|
87 |
<if test="lineCode != null and lineCode != ''">line_code = #{lineCode},</if> |
|
88 |
<if test="planQty != null">plan_qty = #{planQty},</if> |
|
89 |
<if test="planStartTime != null">plan_start_time = #{planStartTime},</if> |
|
90 |
<if test="planEndTime != null">plan_end_time = #{planEndTime},</if> |
|
91 |
<if test="orderStatus != null">order_status = #{orderStatus},</if> |
|
92 |
<if test="createTime != null">create_time = #{createTime},</if> |
|
93 |
<if test="updateTime != null">update_time = #{updateTime},</if> |
|
94 |
<if test="createBy != null">create_by = #{createBy},</if> |
|
95 |
<if test="updateBy != null">update_by = #{updateBy},</if> |
|
96 |
<if test="remarks != null">remarks = #{remarks},</if> |
|
97 |
<if test="delFlag != null">del_flag = #{delFlag},</if> |
|
98 |
</trim> |
|
99 |
where id = #{id} |
|
100 |
</update> |
|
101 |
|
|
102 |
<update id="deleteOmProductionOrderInfoById" parameterType="Long"> |
|
103 |
update om_production_order_info set del_flag = "1" where id = #{id} |
|
104 |
</update> |
|
105 |
|
|
106 |
<update id="deleteOmProductionOrderInfoByIds" parameterType="String"> |
|
107 |
update om_production_order_info set del_flag = "1" where id in |
|
108 |
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
109 |
#{id} |
|
110 |
</foreach> |
|
111 |
</update> |
|
112 |
</mapper> |