|
|
|
@ -34,7 +34,8 @@
|
|
|
|
|
receiveStatus, erpFk, stockCheckFk, customerId, supId,
|
|
|
|
|
exportFilePath, locStorageCode, supplementNo, ullageSupNo, createUser, reviewUser,
|
|
|
|
|
outChangeEnable, originUllageSupNo, preCheck, updateTime, replicateNo, invWarehouseCode,
|
|
|
|
|
fromSubInvCode, createTime, invStorageCode, deptCode, printRemark, codeFillCheck,preInBillNo,preOutBillNo)
|
|
|
|
|
fromSubInvCode, createTime, invStorageCode, deptCode, printRemark, codeFillCheck,
|
|
|
|
|
preInBillNo, preOutBillNo)
|
|
|
|
|
values (#{id},
|
|
|
|
|
#{action},
|
|
|
|
|
#{corpOrderId},
|
|
|
|
@ -57,56 +58,60 @@
|
|
|
|
|
#{updateTime}, #{replicateNo}, #{invWarehouseCode}, #{fromSubInvCode}, #{createTime}, #{invStorageCode},
|
|
|
|
|
#{deptCode},
|
|
|
|
|
#{printRemark},
|
|
|
|
|
#{codeFillCheck},#{preInBillNo},#{preOutBillNo})
|
|
|
|
|
#{codeFillCheck}, #{preInBillNo}, #{preOutBillNo})
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="importOrder" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inout.OrderEntity">
|
|
|
|
|
insert
|
|
|
|
|
ignore
|
|
|
|
|
ignore
|
|
|
|
|
INTO io_order(id, action, corpOrderId, actDate, fromCorpId, actor, mainAction,
|
|
|
|
|
fromCorp, status, remark, exportStatus, fromType, contrastStatus, signStatus,
|
|
|
|
|
receiveStatus, erpFk, stockCheckFk, customerId, supId,
|
|
|
|
|
exportFilePath, locStorageCode, supplementNo, ullageSupNo, createUser, reviewUser,
|
|
|
|
|
outChangeEnable, originUllageSupNo, preCheck, updateTime, replicateNo, invWarehouseCode,
|
|
|
|
|
fromSubInvCode, createTime, invStorageCode, deptCode, printRemark, codeFillCheck,preInBillNo,preOutBillNo)
|
|
|
|
|
values (#{id},
|
|
|
|
|
#{action},
|
|
|
|
|
#{corpOrderId},
|
|
|
|
|
#{actDate},
|
|
|
|
|
#{fromCorpId},
|
|
|
|
|
#{actor},
|
|
|
|
|
#{mainAction},
|
|
|
|
|
#{fromCorp},
|
|
|
|
|
#{status},
|
|
|
|
|
#{remark},
|
|
|
|
|
#{exportStatus},
|
|
|
|
|
#{fromType},
|
|
|
|
|
#{contrastStatus},
|
|
|
|
|
#{signStatus},
|
|
|
|
|
#{receiveStatus},
|
|
|
|
|
#{erpFk},
|
|
|
|
|
#{stockCheckFk},
|
|
|
|
|
#{customerId},
|
|
|
|
|
#{supId},
|
|
|
|
|
#{exportFilePath},
|
|
|
|
|
#{locStorageCode},
|
|
|
|
|
#{supplementNo},
|
|
|
|
|
#{ullageSupNo},
|
|
|
|
|
#{createUser},
|
|
|
|
|
#{reviewUser},
|
|
|
|
|
#{outChangeEnable},
|
|
|
|
|
#{originUllageSupNo},
|
|
|
|
|
#{preCheck},
|
|
|
|
|
#{updateTime},
|
|
|
|
|
#{replicateNo},
|
|
|
|
|
#{invWarehouseCode},
|
|
|
|
|
#{fromSubInvCode},
|
|
|
|
|
#{createTime},
|
|
|
|
|
#{invStorageCode},
|
|
|
|
|
#{deptCode},
|
|
|
|
|
#{printRemark},
|
|
|
|
|
#{codeFillCheck},#{preInBillNo},#{preOutBillNo})
|
|
|
|
|
values (
|
|
|
|
|
#{id},
|
|
|
|
|
#{action},
|
|
|
|
|
#{corpOrderId},
|
|
|
|
|
#{actDate},
|
|
|
|
|
#{fromCorpId},
|
|
|
|
|
#{actor},
|
|
|
|
|
#{mainAction},
|
|
|
|
|
#{fromCorp},
|
|
|
|
|
#{status},
|
|
|
|
|
#{remark},
|
|
|
|
|
#{exportStatus},
|
|
|
|
|
#{fromType},
|
|
|
|
|
#{contrastStatus},
|
|
|
|
|
#{signStatus},
|
|
|
|
|
#{receiveStatus},
|
|
|
|
|
#{erpFk},
|
|
|
|
|
#{stockCheckFk},
|
|
|
|
|
#{customerId},
|
|
|
|
|
#{supId},
|
|
|
|
|
#{exportFilePath},
|
|
|
|
|
#{locStorageCode},
|
|
|
|
|
#{supplementNo},
|
|
|
|
|
#{ullageSupNo},
|
|
|
|
|
#{createUser},
|
|
|
|
|
#{reviewUser},
|
|
|
|
|
#{outChangeEnable},
|
|
|
|
|
#{originUllageSupNo},
|
|
|
|
|
#{preCheck},
|
|
|
|
|
#{updateTime},
|
|
|
|
|
#{replicateNo},
|
|
|
|
|
#{invWarehouseCode},
|
|
|
|
|
#{fromSubInvCode},
|
|
|
|
|
#{createTime},
|
|
|
|
|
#{invStorageCode},
|
|
|
|
|
#{deptCode},
|
|
|
|
|
#{printRemark},
|
|
|
|
|
#{codeFillCheck},
|
|
|
|
|
#{preInBillNo},
|
|
|
|
|
#{preOutBillNo}
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -287,7 +292,9 @@
|
|
|
|
|
<if test="fromCorp != '' and fromCorp!=null">
|
|
|
|
|
and fromCorp =#{fromCorp}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="erpFk != '' and erpFk!=null">
|
|
|
|
|
and erpFk =#{erpFk}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="invWarehouseCode != '' and invWarehouseCode!=null">
|
|
|
|
|
and invWarehouseCode =#{invWarehouseCode}
|
|
|
|
|
<if test="userId != '' and userId!=null">
|
|
|
|
@ -326,7 +333,7 @@
|
|
|
|
|
and fromCorpId =#{fromCorpId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="action != '' and action!=null">
|
|
|
|
|
and action = #{action}
|
|
|
|
|
and `action` = #{action}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != '' and status!=null and status!=10">
|
|
|
|
|
and io_order.status = #{status}
|
|
|
|
@ -383,7 +390,9 @@
|
|
|
|
|
and (invWarehouseCode in (select code from inv_warehouse_user WHERE userId =#{userId}) or
|
|
|
|
|
invWarehouseCode is null or invWarehouseCode='')
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="erpFk != '' and erpFk!=null">
|
|
|
|
|
and erpFk like concat('%',#{erpFk},'%')
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
group by io_order.id
|
|
|
|
|
ORDER BY actDate DESC
|
|
|
|
@ -465,6 +474,9 @@
|
|
|
|
|
<if test="invWarehouseCode != '' and invWarehouseCode!=null">
|
|
|
|
|
and invWarehouseCode =#{invWarehouseCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="erpFk != '' and erpFk!=null">
|
|
|
|
|
and erpFk =#{erpFk}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
group by io_order.id
|
|
|
|
|
ORDER BY actDate DESC
|
|
|
|
@ -539,6 +551,9 @@
|
|
|
|
|
<if test="invWarehouseCode != '' and invWarehouseCode!=null">
|
|
|
|
|
and invWarehouseCode =#{invWarehouseCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="erpFk != '' and erpFk!=null">
|
|
|
|
|
and erpFk =#{erpFk}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
group by io_order.id
|
|
|
|
|
</select>
|
|
|
|
@ -568,6 +583,9 @@
|
|
|
|
|
<if test="ullageSupNo != '' and ullageSupNo!=null">
|
|
|
|
|
and ullageSupNo =#{ullageSupNo}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="erpFk != '' and erpFk!=null">
|
|
|
|
|
and erpFk =#{erpFk}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
limit 1
|
|
|
|
|
</select>
|
|
|
|
@ -592,7 +610,9 @@
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="erpFk != '' and erpFk!=null">
|
|
|
|
|
and erpFk =#{erpFk}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -623,7 +643,7 @@
|
|
|
|
|
from io_order
|
|
|
|
|
left join auth_dept on io_order.deptCode = auth_dept.code
|
|
|
|
|
where io_order.status = 4
|
|
|
|
|
and (io_order.id = #{billNo} or io_order.erpFk = #{billNo})
|
|
|
|
|
and (io_order.id = #{billNo} or io_order.erpFk = #{billNo}) limit 1
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectByIds" resultType="com.glxp.sale.admin.entity.inout.OrderEntity">
|
|
|
|
@ -655,7 +675,7 @@
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<select id="selectOrderNos" resultType="com.glxp.sale.admin.res.inout.OrderNoResult">
|
|
|
|
|
select id, supplementNo, originUllageSupNo, ullageSupNo, replicateNo,preInBillNo,preOutBillNo
|
|
|
|
|
select id, supplementNo, originUllageSupNo, ullageSupNo, replicateNo, preInBillNo, preOutBillNo
|
|
|
|
|
from io_order
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|