|
@@ -1,9 +1,9 @@
|
|
|
<?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">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ruoyi.ams.order.mapper.ActAllocationDetailsMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="ActAllocationDetails" id="ActAllocationDetailsResult">
|
|
|
<result property="allocationId" column="allocation_id" />
|
|
|
<result property="orderNo" column="order_no" />
|
|
@@ -16,41 +16,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="qty" column="qty" />
|
|
|
<result property="pickTransactionId" column="pick_transaction_id" />
|
|
|
<result property="pickToLocation" column="pick_to_location" />
|
|
|
- <result property="createUserId" column="create_user_id" />
|
|
|
- <result property="createDate" column="create_date" />
|
|
|
- <result property="editUserId" column="edit_user_id" />
|
|
|
- <result property="editDate" column="edit_date" />
|
|
|
+ <result property="pickQty" column="pick_qty" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
<result property="userdefine1" column="userdefine1" />
|
|
|
<result property="userdefine2" column="userdefine2" />
|
|
|
<result property="userdefine3" column="userdefine3" />
|
|
|
<result property="userdefine4" column="userdefine4" />
|
|
|
- <result property="pickQty" column="pick_qty" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectActAllocationDetailsVo">
|
|
|
- select allocation_id, order_no, line_no, material, location_id, call_transaction_id, status, lotnum, qty, pick_transaction_id, pick_to_location, create_user_id, create_date, edit_user_id, edit_date, userdefine1, userdefine2, userdefine3, userdefine4, pick_qty from act_allocation_details
|
|
|
+ select allocation_id, order_no, line_no, material, location_id, call_transaction_id, status, lotnum, qty, pick_transaction_id, pick_to_location, pick_qty, create_by, create_time, update_by, update_time, userdefine1, userdefine2, userdefine3, userdefine4 from act_allocation_details
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectActAllocationDetailsList" parameterType="ActAllocationDetails" resultMap="ActAllocationDetailsResult">
|
|
|
<include refid="selectActAllocationDetailsVo"/>
|
|
|
- <where>
|
|
|
- <if test="allocationId != null and allocationId != ''"> and allocation_id = #{allocationId}</if>
|
|
|
- <if test="orderNo != null and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
|
|
|
- <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
- <if test="params.beginTime != null and params.beginTime != ''">
|
|
|
- AND date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
- </if>
|
|
|
- <if test="params.endTime != null and params.endTime != ''">
|
|
|
- AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
|
|
- </if>
|
|
|
+ <where>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectActAllocationDetailsByAllocationId" parameterType="String" resultMap="ActAllocationDetailsResult">
|
|
|
<include refid="selectActAllocationDetailsVo"/>
|
|
|
where allocation_id = #{allocationId}
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insertActAllocationDetails" parameterType="ActAllocationDetails">
|
|
|
insert into act_allocation_details
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -65,16 +56,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="qty != null">qty,</if>
|
|
|
<if test="pickTransactionId != null">pick_transaction_id,</if>
|
|
|
<if test="pickToLocation != null">pick_to_location,</if>
|
|
|
- <if test="createUserId != null">create_user_id,</if>
|
|
|
- <if test="createDate != null">create_date,</if>
|
|
|
- <if test="editUserId != null">edit_user_id,</if>
|
|
|
- <if test="editDate != null">edit_date,</if>
|
|
|
+ <if test="pickQty != null">pick_qty,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
<if test="userdefine1 != null">userdefine1,</if>
|
|
|
<if test="userdefine2 != null">userdefine2,</if>
|
|
|
<if test="userdefine3 != null">userdefine3,</if>
|
|
|
<if test="userdefine4 != null">userdefine4,</if>
|
|
|
- <if test="pickQty != null">pick_qty,</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="allocationId != null">#{allocationId},</if>
|
|
|
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
|
|
@@ -87,16 +78,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="qty != null">#{qty},</if>
|
|
|
<if test="pickTransactionId != null">#{pickTransactionId},</if>
|
|
|
<if test="pickToLocation != null">#{pickToLocation},</if>
|
|
|
- <if test="createUserId != null">#{createUserId},</if>
|
|
|
- <if test="createDate != null">#{createDate},</if>
|
|
|
- <if test="editUserId != null">#{editUserId},</if>
|
|
|
- <if test="editDate != null">#{editDate},</if>
|
|
|
+ <if test="pickQty != null">#{pickQty},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="userdefine1 != null">#{userdefine1},</if>
|
|
|
<if test="userdefine2 != null">#{userdefine2},</if>
|
|
|
<if test="userdefine3 != null">#{userdefine3},</if>
|
|
|
<if test="userdefine4 != null">#{userdefine4},</if>
|
|
|
- <if test="pickQty != null">#{pickQty},</if>
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateActAllocationDetails" parameterType="ActAllocationDetails">
|
|
@@ -112,15 +103,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="qty != null">qty = #{qty},</if>
|
|
|
<if test="pickTransactionId != null">pick_transaction_id = #{pickTransactionId},</if>
|
|
|
<if test="pickToLocation != null">pick_to_location = #{pickToLocation},</if>
|
|
|
- <if test="createUserId != null">create_user_id = #{createUserId},</if>
|
|
|
- <if test="createDate != null">create_date = #{createDate},</if>
|
|
|
- <if test="editUserId != null">edit_user_id = #{editUserId},</if>
|
|
|
- <if test="editDate != null">edit_date = #{editDate},</if>
|
|
|
+ <if test="pickQty != null">pick_qty = #{pickQty},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="userdefine1 != null">userdefine1 = #{userdefine1},</if>
|
|
|
<if test="userdefine2 != null">userdefine2 = #{userdefine2},</if>
|
|
|
<if test="userdefine3 != null">userdefine3 = #{userdefine3},</if>
|
|
|
<if test="userdefine4 != null">userdefine4 = #{userdefine4},</if>
|
|
|
- <if test="pickQty != null">pick_qty = #{pickQty},</if>
|
|
|
</trim>
|
|
|
where allocation_id = #{allocationId}
|
|
|
</update>
|
|
@@ -130,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteActAllocationDetailsByAllocationIds" parameterType="String">
|
|
|
- delete from act_allocation_details where allocation_id in
|
|
|
+ delete from act_allocation_details where allocation_id in
|
|
|
<foreach item="allocationId" collection="array" open="(" separator="," close=")">
|
|
|
#{allocationId}
|
|
|
</foreach>
|