|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.op.mes.mapper.ProOrderMapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="ProOrder" id="ProOrderResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="factoryCode" column="factory_code" />
|
|
|
|
@ -12,6 +12,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="prodCode" column="prod_code" />
|
|
|
|
|
<result property="prodDesc" column="prod_desc" />
|
|
|
|
|
<result property="quantity" column="quantity" />
|
|
|
|
|
<result property="quantitySplit" column="quantity_split" />
|
|
|
|
|
<result property="unit" column="unit" />
|
|
|
|
|
<result property="workerOrder" column="worker_order" />
|
|
|
|
|
<result property="planProDate" column="plan_pro_date" />
|
|
|
|
@ -29,12 +30,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectProOrderVo">
|
|
|
|
|
select id, factory_code, order_type, order_code, prod_code, prod_desc, quantity, unit, worker_order, plan_pro_date, plan_complete, atrr1, atrr2, atrr3, status, parent_order, create_by, create_time, update_by, update_time, prod_type from pro_order
|
|
|
|
|
select id, factory_code, order_type, order_code, prod_code, prod_desc, quantity, quantity_split
|
|
|
|
|
unit, worker_order, plan_pro_date, plan_complete, atrr1, atrr2, atrr3,
|
|
|
|
|
status, parent_order, create_by, create_time, update_by, update_time, prod_type
|
|
|
|
|
from pro_order
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectProOrderList" parameterType="ProOrder" resultMap="ProOrderResult">
|
|
|
|
|
<include refid="selectProOrderVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
<if test="orderType != null and orderType != ''"> and order_type = #{orderType}</if>
|
|
|
|
|
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
|
|
|
@ -53,12 +57,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="prodType != null and prodType != ''"> and prod_type = #{prodType}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectProOrderById" parameterType="String" resultMap="ProOrderResult">
|
|
|
|
|
<include refid="selectProOrderVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertProOrder" parameterType="ProOrder">
|
|
|
|
|
insert into pro_order
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
@ -69,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="prodCode != null">prod_code,</if>
|
|
|
|
|
<if test="prodDesc != null">prod_desc,</if>
|
|
|
|
|
<if test="quantity != null">quantity,</if>
|
|
|
|
|
<if test="quantitySplit != null">quantity_split,</if>
|
|
|
|
|
<if test="unit != null">unit,</if>
|
|
|
|
|
<if test="workerOrder != null">worker_order,</if>
|
|
|
|
|
<if test="planProDate != null">plan_pro_date,</if>
|
|
|
|
@ -92,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="prodCode != null">#{prodCode},</if>
|
|
|
|
|
<if test="prodDesc != null">#{prodDesc},</if>
|
|
|
|
|
<if test="quantity != null">#{quantity},</if>
|
|
|
|
|
<if test="quantitySplit != null">#{quantitySplit},</if>
|
|
|
|
|
<if test="unit != null">#{unit},</if>
|
|
|
|
|
<if test="workerOrder != null">#{workerOrder},</if>
|
|
|
|
|
<if test="planProDate != null">#{planProDate},</if>
|
|
|
|
@ -118,6 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="prodCode != null">prod_code = #{prodCode},</if>
|
|
|
|
|
<if test="prodDesc != null">prod_desc = #{prodDesc},</if>
|
|
|
|
|
<if test="quantity != null">quantity = #{quantity},</if>
|
|
|
|
|
<if test="quantitySplit != null">quantity_split = #{quantitySplit},</if>
|
|
|
|
|
<if test="unit != null">unit = #{unit},</if>
|
|
|
|
|
<if test="workerOrder != null">worker_order = #{workerOrder},</if>
|
|
|
|
|
<if test="planProDate != null">plan_pro_date = #{planProDate},</if>
|
|
|
|
@ -141,9 +148,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteProOrderByIds" parameterType="String">
|
|
|
|
|
delete from pro_order where id in
|
|
|
|
|
delete from pro_order where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
</mapper>
|
|
|
|
|
</mapper>
|
|
|
|
|