|
|
@ -33,7 +33,7 @@
|
|
|
|
fromCorp, status, remark, exportStatus, fromType, contrastStatus, signStatus,
|
|
|
|
fromCorp, status, remark, exportStatus, fromType, contrastStatus, signStatus,
|
|
|
|
receiveStatus, erpFk, stockCheckFk, customerId, supId,
|
|
|
|
receiveStatus, erpFk, stockCheckFk, customerId, supId,
|
|
|
|
exportFilePath, locStorageCode, supplementNo, ullageSupNo, createUser, reviewUser,
|
|
|
|
exportFilePath, locStorageCode, supplementNo, ullageSupNo, createUser, reviewUser,
|
|
|
|
outChangeEnable, originUllageSupNo, preCheck,updateTime,replicateNo)
|
|
|
|
outChangeEnable, originUllageSupNo, preCheck, updateTime, replicateNo, invWarehouseCode)
|
|
|
|
values (#{id},
|
|
|
|
values (#{id},
|
|
|
|
#{action},
|
|
|
|
#{action},
|
|
|
|
#{corpOrderId},
|
|
|
|
#{corpOrderId},
|
|
|
@ -52,7 +52,8 @@
|
|
|
|
#{erpFk},
|
|
|
|
#{erpFk},
|
|
|
|
#{stockCheckFk},
|
|
|
|
#{stockCheckFk},
|
|
|
|
#{customerId}, #{supId}, #{exportFilePath}, #{locStorageCode}, #{supplementNo},
|
|
|
|
#{customerId}, #{supId}, #{exportFilePath}, #{locStorageCode}, #{supplementNo},
|
|
|
|
#{ullageSupNo}, #{createUser}, #{reviewUser}, #{outChangeEnable}, #{originUllageSupNo}, #{preCheck},#{updateTime}, #{replicateNo})
|
|
|
|
#{ullageSupNo}, #{createUser}, #{reviewUser}, #{outChangeEnable}, #{originUllageSupNo}, #{preCheck},
|
|
|
|
|
|
|
|
#{updateTime}, #{replicateNo}, #{invWarehouseCode})
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -63,8 +64,9 @@
|
|
|
|
fromCorp, status, remark, exportStatus, fromType, contrastStatus, signStatus,
|
|
|
|
fromCorp, status, remark, exportStatus, fromType, contrastStatus, signStatus,
|
|
|
|
receiveStatus, erpFk, stockCheckFk, customerId, supId,
|
|
|
|
receiveStatus, erpFk, stockCheckFk, customerId, supId,
|
|
|
|
exportFilePath, locStorageCode, supplementNo, ullageSupNo, createUser, reviewUser,
|
|
|
|
exportFilePath, locStorageCode, supplementNo, ullageSupNo, createUser, reviewUser,
|
|
|
|
outChangeEnable, originUllageSupNo, preCheck,updateTime,replicateNo)
|
|
|
|
outChangeEnable, originUllageSupNo, preCheck,updateTime,replicateNo,invWarehouseCode)
|
|
|
|
values (#{id},
|
|
|
|
values (
|
|
|
|
|
|
|
|
#{id},
|
|
|
|
#{action},
|
|
|
|
#{action},
|
|
|
|
#{corpOrderId},
|
|
|
|
#{corpOrderId},
|
|
|
|
#{actDate},
|
|
|
|
#{actDate},
|
|
|
@ -93,7 +95,9 @@
|
|
|
|
#{originUllageSupNo},
|
|
|
|
#{originUllageSupNo},
|
|
|
|
#{preCheck},
|
|
|
|
#{preCheck},
|
|
|
|
#{updateTime},
|
|
|
|
#{updateTime},
|
|
|
|
#{replicateNo})
|
|
|
|
#{replicateNo},
|
|
|
|
|
|
|
|
#{invWarehouseCode}
|
|
|
|
|
|
|
|
)
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -182,7 +186,9 @@
|
|
|
|
<select id="filterListOr" parameterType="com.glxp.sale.admin.req.inout.OrderFilterRequest"
|
|
|
|
<select id="filterListOr" parameterType="com.glxp.sale.admin.req.inout.OrderFilterRequest"
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.OrderEntity">
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.OrderEntity">
|
|
|
|
SELECT io_order.* FROM io_order
|
|
|
|
SELECT io_order.* FROM io_order
|
|
|
|
INNER JOIN inv_warehouse_user on io_order.locStorageCode = inv_warehouse_user.`code`
|
|
|
|
LEFT JOIN inv_warehouse ON io_order.locStorageCode = inv_warehouse.`code`
|
|
|
|
|
|
|
|
LEFT JOIN inv_warehouse_sub ON inv_warehouse_sub.parentId = inv_warehouse.`code`
|
|
|
|
|
|
|
|
LEFT JOIN inv_warehouse_user on inv_warehouse_sub.code = inv_warehouse_user.`code`
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="id != '' and id!=null">
|
|
|
|
<if test="id != '' and id!=null">
|
|
|
|
and io_order.id =#{id}
|
|
|
|
and io_order.id =#{id}
|
|
|
@ -206,10 +212,10 @@
|
|
|
|
and exportStatus = #{exportStatus}
|
|
|
|
and exportStatus = #{exportStatus}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="status != '' and status!=null and status!=10">
|
|
|
|
<if test="status != '' and status!=null and status!=10">
|
|
|
|
and status = #{status}
|
|
|
|
and io_order.status = #{status}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="status ==10">
|
|
|
|
<if test="status ==10">
|
|
|
|
and ( status = 1 or status=-1)
|
|
|
|
and ( io_order.status = 1 or io_order.status=-1)
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="unionCtrStatus != '' and unionCtrStatus!=null">
|
|
|
|
<if test="unionCtrStatus != '' and unionCtrStatus!=null">
|
|
|
|
and (contrastStatus = 0 or contrastStatus = 2)
|
|
|
|
and (contrastStatus = 0 or contrastStatus = 2)
|
|
|
@ -241,9 +247,7 @@
|
|
|
|
<if test="reviewUser!=null">
|
|
|
|
<if test="reviewUser!=null">
|
|
|
|
and reviewUser =#{reviewUser}
|
|
|
|
and reviewUser =#{reviewUser}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="unionUser != '' and unionUser!=null">
|
|
|
|
|
|
|
|
and ((createUser =#{unionUser} or reviewUser =#{unionUser}) or (reviewUser is null and createUser is null) )
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="ullageSupNo != '' and ullageSupNo!=null">
|
|
|
|
<if test="ullageSupNo != '' and ullageSupNo!=null">
|
|
|
|
and ullageSupNo =#{ullageSupNo}
|
|
|
|
and ullageSupNo =#{ullageSupNo}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
@ -253,16 +257,27 @@
|
|
|
|
<if test="locStorageCode!=null">
|
|
|
|
<if test="locStorageCode!=null">
|
|
|
|
and locStorageCode =#{locStorageCode}
|
|
|
|
and locStorageCode =#{locStorageCode}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="invWarehouseCode!=null">
|
|
|
|
|
|
|
|
and invWarehouseCode =#{invWarehouseCode}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
group by io_order.id
|
|
|
|
group by io_order.id
|
|
|
|
ORDER BY actDate DESC
|
|
|
|
ORDER BY actDate DESC
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <if test="unionUser != '' and unionUser!=null">-->
|
|
|
|
|
|
|
|
<!-- and ((createUser =#{unionUser} or reviewUser =#{unionUser}) or (reviewUser is null and createUser is-->
|
|
|
|
|
|
|
|
<!-- null) )-->
|
|
|
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
|
|
|
|
|
|
|
<select id="filterList" parameterType="com.glxp.sale.admin.req.inout.OrderFilterRequest"
|
|
|
|
<select id="filterList" parameterType="com.glxp.sale.admin.req.inout.OrderFilterRequest"
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.OrderEntity">
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.OrderEntity">
|
|
|
|
SELECT io_order.* FROM io_order
|
|
|
|
SELECT io_order.* FROM io_order
|
|
|
|
INNER JOIN inv_warehouse_user on io_order.locStorageCode = inv_warehouse_user.`code`
|
|
|
|
LEFT JOIN inv_warehouse ON io_order.locStorageCode = inv_warehouse.`code`
|
|
|
|
|
|
|
|
LEFT JOIN inv_warehouse_sub ON inv_warehouse_sub.parentId = inv_warehouse.`code`
|
|
|
|
|
|
|
|
LEFT JOIN inv_warehouse_user on inv_warehouse_sub.code = inv_warehouse_user.`code`
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="id != '' and id!=null">
|
|
|
|
<if test="id != '' and id!=null">
|
|
|
|
and io_order.id =#{id}
|
|
|
|
and io_order.id =#{id}
|
|
|
@ -276,14 +291,11 @@
|
|
|
|
<if test="action != '' and action!=null">
|
|
|
|
<if test="action != '' and action!=null">
|
|
|
|
and action = #{action}
|
|
|
|
and action = #{action}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="action==null or action == ''">
|
|
|
|
|
|
|
|
and `action` <![CDATA[ <> ]]> 'StockCheck'
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="status != '' and status!=null and status!=10">
|
|
|
|
<if test="status != '' and status!=null and status!=10">
|
|
|
|
and status = #{status}
|
|
|
|
and io_order.status = #{status}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="status ==10">
|
|
|
|
<if test="status ==10">
|
|
|
|
and ( status = 1 or status=-1)
|
|
|
|
and ( io_order.status = 1 or io_order.status=-1)
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="exportStatus != '' and exportStatus!=null">
|
|
|
|
<if test="exportStatus != '' and exportStatus!=null">
|
|
|
|
and exportStatus = #{exportStatus}
|
|
|
|
and exportStatus = #{exportStatus}
|
|
|
@ -315,7 +327,7 @@
|
|
|
|
<if test="createUser!=null">
|
|
|
|
<if test="createUser!=null">
|
|
|
|
and createUser =#{createUser}
|
|
|
|
and createUser =#{createUser}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test=" reviewUser!=null">
|
|
|
|
<if test="reviewUser!=null">
|
|
|
|
and reviewUser =#{reviewUser}
|
|
|
|
and reviewUser =#{reviewUser}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="ullageSupNo != '' and ullageSupNo!=null">
|
|
|
|
<if test="ullageSupNo != '' and ullageSupNo!=null">
|
|
|
@ -327,6 +339,9 @@
|
|
|
|
<if test="locStorageCode!=null">
|
|
|
|
<if test="locStorageCode!=null">
|
|
|
|
and locStorageCode =#{locStorageCode}
|
|
|
|
and locStorageCode =#{locStorageCode}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="invWarehouseCode!=null">
|
|
|
|
|
|
|
|
and invWarehouseCode =#{invWarehouseCode}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
group by io_order.id
|
|
|
|
group by io_order.id
|
|
|
|
ORDER BY actDate DESC
|
|
|
|
ORDER BY actDate DESC
|
|
|
@ -336,7 +351,9 @@
|
|
|
|
<select id="filterListByUser" parameterType="com.glxp.sale.admin.req.inout.OrderFilterRequest"
|
|
|
|
<select id="filterListByUser" parameterType="com.glxp.sale.admin.req.inout.OrderFilterRequest"
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.OrderEntity">
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.OrderEntity">
|
|
|
|
SELECT io_order.* FROM io_order
|
|
|
|
SELECT io_order.* FROM io_order
|
|
|
|
INNER JOIN inv_warehouse_user on io_order.locStorageCode = inv_warehouse_user.`code`
|
|
|
|
LEFT JOIN inv_warehouse ON io_order.locStorageCode = inv_warehouse.`code`
|
|
|
|
|
|
|
|
LEFT JOIN inv_warehouse_sub ON inv_warehouse_sub.parentId = inv_warehouse.`code`
|
|
|
|
|
|
|
|
LEFT JOIN inv_warehouse_user on inv_warehouse_sub.code = inv_warehouse_user.`code`
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="id != '' and id!=null">
|
|
|
|
<if test="id != '' and id!=null">
|
|
|
|
and io_order.id =#{id}
|
|
|
|
and io_order.id =#{id}
|
|
|
@ -354,10 +371,10 @@
|
|
|
|
and `action` <![CDATA[ <> ]]> 'StockCheck'
|
|
|
|
and `action` <![CDATA[ <> ]]> 'StockCheck'
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="status != '' and status!=null and status!=10">
|
|
|
|
<if test="status != '' and status!=null and status!=10">
|
|
|
|
and status = #{status}
|
|
|
|
and io_order.status = #{status}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="status ==10">
|
|
|
|
<if test="status ==10">
|
|
|
|
and ( status = 1 or status=-1)
|
|
|
|
and ( io_order.status = 1 or io_order.status=-1)
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="exportStatus != '' and exportStatus!=null">
|
|
|
|
<if test="exportStatus != '' and exportStatus!=null">
|
|
|
|
and exportStatus = #{exportStatus}
|
|
|
|
and exportStatus = #{exportStatus}
|
|
|
@ -398,6 +415,9 @@
|
|
|
|
<if test="locStorageCode!=null">
|
|
|
|
<if test="locStorageCode!=null">
|
|
|
|
and locStorageCode =#{locStorageCode}
|
|
|
|
and locStorageCode =#{locStorageCode}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="invWarehouseCode!=null">
|
|
|
|
|
|
|
|
and invWarehouseCode =#{invWarehouseCode}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
group by io_order.id
|
|
|
|
group by io_order.id
|
|
|
|
ORDER BY actDate DESC
|
|
|
|
ORDER BY actDate DESC
|
|
|
@ -406,7 +426,9 @@
|
|
|
|
<select id="filterNoSort" parameterType="com.glxp.sale.admin.req.inout.OrderFilterRequest"
|
|
|
|
<select id="filterNoSort" parameterType="com.glxp.sale.admin.req.inout.OrderFilterRequest"
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.OrderEntity">
|
|
|
|
resultType="com.glxp.sale.admin.entity.inout.OrderEntity">
|
|
|
|
SELECT io_order.* FROM io_order
|
|
|
|
SELECT io_order.* FROM io_order
|
|
|
|
INNER JOIN inv_warehouse_user on io_order.locStorageCode = inv_warehouse_user.`code`
|
|
|
|
LEFT JOIN inv_warehouse ON io_order.locStorageCode = inv_warehouse.`code`
|
|
|
|
|
|
|
|
LEFT JOIN inv_warehouse_sub ON inv_warehouse_sub.parentId = inv_warehouse.`code`
|
|
|
|
|
|
|
|
LEFT JOIN inv_warehouse_user on inv_warehouse_sub.code = inv_warehouse_user.`code`
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="id != '' and id!=null">
|
|
|
|
<if test="id != '' and id!=null">
|
|
|
|
and io_order.id =#{id}
|
|
|
|
and io_order.id =#{id}
|
|
|
@ -421,7 +443,7 @@
|
|
|
|
and `action` <![CDATA[ <> ]]> 'StockCheck'
|
|
|
|
and `action` <![CDATA[ <> ]]> 'StockCheck'
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="status != '' and status!=null">
|
|
|
|
<if test="status != '' and status!=null">
|
|
|
|
and status = #{status}
|
|
|
|
and io_order.status = #{status}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="exportStatus != '' and exportStatus!=null">
|
|
|
|
<if test="exportStatus != '' and exportStatus!=null">
|
|
|
|
and exportStatus = #{exportStatus}
|
|
|
|
and exportStatus = #{exportStatus}
|
|
|
@ -462,6 +484,9 @@
|
|
|
|
<if test="locStorageCode!=null">
|
|
|
|
<if test="locStorageCode!=null">
|
|
|
|
and locStorageCode =#{locStorageCode}
|
|
|
|
and locStorageCode =#{locStorageCode}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="invWarehouseCode!=null">
|
|
|
|
|
|
|
|
and invWarehouseCode =#{invWarehouseCode}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
group by io_order.id
|
|
|
|
group by io_order.id
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
@ -506,7 +531,8 @@
|
|
|
|
and receiveStatus = #{receiveStatus}
|
|
|
|
and receiveStatus = #{receiveStatus}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
|
|
|
|
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
|
|
|
|
and <![CDATA[ DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
|
|
|
|
and
|
|
|
|
|
|
|
|
<![CDATA[ DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="filterActions!=null">
|
|
|
|
<if test="filterActions!=null">
|
|
|
|
and `action` in
|
|
|
|
and `action` in
|
|
|
@ -569,7 +595,7 @@
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectOrderNos" resultType="com.glxp.sale.admin.res.inout.OrderNoResult">
|
|
|
|
<select id="selectOrderNos" resultType="com.glxp.sale.admin.res.inout.OrderNoResult">
|
|
|
|
select id,supplementNo, originUllageSupNo, ullageSupNo, replicateNo
|
|
|
|
select id, supplementNo, originUllageSupNo, ullageSupNo, replicateNo
|
|
|
|
from io_order
|
|
|
|
from io_order
|
|
|
|
where id = #{id}
|
|
|
|
where id = #{id}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|