|
|
|
@ -121,14 +121,15 @@
|
|
|
|
|
parameterType="com.glxp.api.entity.inventory.InvSubWarehouseEntity">
|
|
|
|
|
replace
|
|
|
|
|
INTO inv_warehouse_sub
|
|
|
|
|
(id, code, `name`, parentId, remark,defaultInv)
|
|
|
|
|
(id, code, `name`, parentId, remark,defaultInv,parentCode)
|
|
|
|
|
values (
|
|
|
|
|
#{id},
|
|
|
|
|
#{code},
|
|
|
|
|
#{name},
|
|
|
|
|
#{parentId},
|
|
|
|
|
#{remark},
|
|
|
|
|
#{defaultInv}
|
|
|
|
|
#{defaultInv},
|
|
|
|
|
#{parentCode}
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -154,13 +155,14 @@
|
|
|
|
|
<if test="parentId != null">parentId=#{parentId},</if>
|
|
|
|
|
<if test="remark != null">remark=#{remark},</if>
|
|
|
|
|
<if test="defaultInv != null">defaultInv=#{defaultInv},</if>
|
|
|
|
|
<if test="parentCode != null">parentCode=#{parentCode},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
WHERE id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<insert id="importInvSubWarehouse" parameterType="java.util.List">
|
|
|
|
|
replace into inv_warehouse_sub
|
|
|
|
|
(id, code, `name`, parentId, remark,defaultInv)
|
|
|
|
|
(id, code, `name`, parentId, remark,defaultInv,parentCode)
|
|
|
|
|
values
|
|
|
|
|
<foreach collection="invWarehouseEntities" item="item" index="index" separator=",">
|
|
|
|
|
(
|
|
|
|
@ -168,7 +170,7 @@
|
|
|
|
|
#{item.code},
|
|
|
|
|
#{item.name},
|
|
|
|
|
#{item.parentId},
|
|
|
|
|
#{item.remark},#{item.defaultInv})
|
|
|
|
|
#{item.remark},#{item.defaultInv},#{item.parentCode})
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -194,9 +196,10 @@
|
|
|
|
|
<select id="filterInvSubWarehouseResponse"
|
|
|
|
|
resultType="com.glxp.api.res.inventory.InvSubWarehouseResponse">
|
|
|
|
|
select a.id, a.code, a.name, a.parentId, a.remark, a.defaultInv, a.thirdId, a.thirdId1, a.thirdId2,
|
|
|
|
|
a.thirdId3, a.thirdId4, b.name as parentName
|
|
|
|
|
a.thirdId3, a.thirdId4, b.name as parentName,a.parentCode,c.name parentInvName
|
|
|
|
|
FROM inv_warehouse_sub a
|
|
|
|
|
left join inv_warehouse b on a.parentId = b.code
|
|
|
|
|
left join inv_warehouse_sub c on a.parentCode = c.code
|
|
|
|
|
<where>
|
|
|
|
|
<if test="id != '' and id != null">
|
|
|
|
|
AND a.id = #{id}
|
|
|
|
@ -233,20 +236,20 @@
|
|
|
|
|
|
|
|
|
|
<select id="filterSubInvList" resultType="com.glxp.api.res.inventory.InvSubWarehouseResponse">
|
|
|
|
|
select a.id,
|
|
|
|
|
a.code,
|
|
|
|
|
a.name,
|
|
|
|
|
a.parentId,
|
|
|
|
|
a.remark,
|
|
|
|
|
a.defaultInv,
|
|
|
|
|
a.thirdId,
|
|
|
|
|
a.thirdId1,
|
|
|
|
|
a.thirdId2,
|
|
|
|
|
a.thirdId3,
|
|
|
|
|
a.thirdId4,
|
|
|
|
|
b.name parentName
|
|
|
|
|
a.code,
|
|
|
|
|
a.name,
|
|
|
|
|
a.parentId,
|
|
|
|
|
a.remark,
|
|
|
|
|
a.defaultInv,
|
|
|
|
|
a.thirdId,
|
|
|
|
|
a.thirdId1,
|
|
|
|
|
a.thirdId2,
|
|
|
|
|
a.thirdId3,
|
|
|
|
|
a.thirdId4,
|
|
|
|
|
b.name parentName,a.parentCode
|
|
|
|
|
from inv_warehouse_sub a
|
|
|
|
|
left join inv_warehouse b on a.parentId = b.code
|
|
|
|
|
left join inv_warehouse_user c on a.code = c.code
|
|
|
|
|
left join inv_warehouse b on a.parentId = b.code
|
|
|
|
|
left join inv_warehouse_user c on a.code = c.code
|
|
|
|
|
<where>
|
|
|
|
|
<if test="userId != null">
|
|
|
|
|
AND c.userId = #{userId}
|
|
|
|
|