|
|
|
@ -30,7 +30,7 @@
|
|
|
|
|
thirdSysFk, status, statusInfo, type, sourceType,
|
|
|
|
|
printStatus, unitIdFk, customerId, thirdOrderFk, orderIdFk,
|
|
|
|
|
totalPrice, locStorageCode, supplementNo, createUser, reviewUser, entrustEnd, auditTime,
|
|
|
|
|
updateTime, invWarehouseCode, fromSubInvCode)
|
|
|
|
|
updateTime, invWarehouseCode, fromSubInvCode,dept)
|
|
|
|
|
values (#{id},
|
|
|
|
|
#{billNo},
|
|
|
|
|
#{billdate},
|
|
|
|
@ -45,7 +45,7 @@
|
|
|
|
|
#{sourceType},
|
|
|
|
|
#{printStatus}, #{unitIdFk}, #{customerId}, #{thirdOrderFk}, #{orderIdFk}, #{totalPrice},
|
|
|
|
|
#{locStorageCode}, #{supplementNo}, #{createUser}, #{reviewUser}, #{entrustEnd}, #{auditTime},
|
|
|
|
|
#{updateTime}, #{invWarehouseCode}, #{fromSubInvCode})
|
|
|
|
|
#{updateTime}, #{invWarehouseCode}, #{fromSubInvCode},#{dept})
|
|
|
|
|
</insert>
|
|
|
|
|
<update id="updateById" parameterType="com.glxp.api.admin.entity.business.StockOrderEntity">
|
|
|
|
|
UPDATE stock_order
|
|
|
|
@ -76,6 +76,7 @@
|
|
|
|
|
<if test="updateTime != null">updateTime=#{updateTime},</if>
|
|
|
|
|
<if test="invWarehouseCode != null">invWarehouseCode=#{invWarehouseCode},</if>
|
|
|
|
|
<if test="fromSubInvCode != null">fromSubInvCode=#{fromSubInvCode},</if>
|
|
|
|
|
<if test="dept != null">dept=#{dept},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
WHERE id = #{id}
|
|
|
|
|
</update>
|
|
|
|
@ -105,14 +106,14 @@
|
|
|
|
|
|
|
|
|
|
<select id="filterListOr" parameterType="com.glxp.api.admin.req.business.StockOrderFilterRequest"
|
|
|
|
|
resultType="com.glxp.api.admin.entity.business.StockOrderEntity">
|
|
|
|
|
SELECT stock_order.* ,inv_warehouse.name invName, iws.name subInvName ,basic_bustype_local.name
|
|
|
|
|
billTypeName,iws2.name fromSubInvName FROM stock_order
|
|
|
|
|
SELECT stock_order.* ,inv_warehouse.name invName, iws.name subInvName ,basic_bustype_local.name billTypeName,iws2.name fromSubInvName,auth_dept.name deptName FROM stock_order
|
|
|
|
|
left join basic_bustype_local on stock_order.billType = basic_bustype_local.action
|
|
|
|
|
LEFT JOIN inv_warehouse ON stock_order.locStorageCode = inv_warehouse.`code`
|
|
|
|
|
LEFT JOIN inv_warehouse_sub ON stock_order.locStorageCode = inv_warehouse.`code`
|
|
|
|
|
LEFT JOIN inv_warehouse_sub iws ON stock_order.invWarehouseCode = iws.`code`
|
|
|
|
|
LEFT JOIN inv_warehouse_sub iws2 ON stock_order.fromSubInvCode = iws2.`code`
|
|
|
|
|
LEFT JOIN inv_warehouse_user on inv_warehouse_sub.code = inv_warehouse_user.`code`
|
|
|
|
|
left join auth_dept on stock_order.dept =auth_dept.code
|
|
|
|
|
<where>
|
|
|
|
|
<if test="id != '' and id!=null">
|
|
|
|
|
and stock_order.id =#{id}
|
|
|
|
@ -188,7 +189,7 @@
|
|
|
|
|
(select basic_bussiness_type.localAction from inv_bustype_user INNER JOIN basic_bussiness_type on
|
|
|
|
|
inv_bustype_user.scAction = basic_bussiness_type.action
|
|
|
|
|
WHERE userId =#{userId} and invWarehouseCode =#{invWarehouseCode}
|
|
|
|
|
GROUP BY inv_bustype_user.id) br
|
|
|
|
|
GROUP BY inv_bustype_user.id)
|
|
|
|
|
</if>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createUser!=null">
|
|
|
|
|