|
|
|
@ -13,6 +13,10 @@
|
|
|
|
|
<if test="code != '' and code != null">
|
|
|
|
|
AND a.code = #{code}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="lyInvType != null">
|
|
|
|
|
AND a.lyInvType = #{lyInvType}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
|
AND a.name like concat('%', #{name}, '%')
|
|
|
|
|
</if>
|
|
|
|
@ -83,7 +87,6 @@
|
|
|
|
|
INNER JOIN auth_warehouse_user on auth_warehouse.code = auth_warehouse_user.code
|
|
|
|
|
</if>
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
|
AND auth_warehouse.name like concat('%', #{name}, '%')
|
|
|
|
|
</if>
|
|
|
|
@ -210,58 +213,6 @@
|
|
|
|
|
WHERE parentId = #{code}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<update id="updateInvSubWarehouse" parameterType="com.glxp.api.entity.auth.InvWarehouseEntity">
|
|
|
|
|
UPDATE auth_warehouse
|
|
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
|
|
<if test="name != null">
|
|
|
|
|
name=#{name},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="code != null">
|
|
|
|
|
code=#{code},
|
|
|
|
|
</if>
|
|
|
|
|
<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>
|
|
|
|
|
<if test="thirdId != null">
|
|
|
|
|
thirdId=#{thirdId},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="thirdId1 != null">
|
|
|
|
|
thirdId1=#{thirdId1},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="thirdId2 != null">
|
|
|
|
|
thirdId2=#{thirdId2},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="thirdId3 != null">
|
|
|
|
|
thirdId3=#{thirdId3},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="thirdId4 != null">
|
|
|
|
|
thirdId4=#{thirdId4},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="advanceType != null">
|
|
|
|
|
advanceType=#{advanceType},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
updateTime=#{updateTime},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="spUse != null">
|
|
|
|
|
spUse=#{spUse},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
updateTime=#{updateTime},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
WHERE id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<insert id="importInvSubWarehouse" parameterType="java.util.List">
|
|
|
|
|
replace
|
|
|
|
|
into auth_warehouse
|
|
|
|
@ -324,32 +275,76 @@
|
|
|
|
|
b.name as parentName,
|
|
|
|
|
a.parentCode,
|
|
|
|
|
c.name parentInvName,
|
|
|
|
|
a.spUse
|
|
|
|
|
a.spUse,
|
|
|
|
|
a.lyInvType
|
|
|
|
|
FROM auth_warehouse a
|
|
|
|
|
left join auth_dept b on a.parentId = b.code
|
|
|
|
|
left join auth_warehouse c on a.parentCode = c.code
|
|
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
<if test="id != '' and id != null">
|
|
|
|
|
AND a.id = #{id}
|
|
|
|
|
AND a.id =
|
|
|
|
|
#{id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="code != '' and code != null">
|
|
|
|
|
AND a.code = #{code}
|
|
|
|
|
AND a
|
|
|
|
|
.
|
|
|
|
|
code
|
|
|
|
|
=
|
|
|
|
|
#{code}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="name != '' and name != null">
|
|
|
|
|
AND a.name like concat('%', #{name}, '%')
|
|
|
|
|
AND a
|
|
|
|
|
.
|
|
|
|
|
name
|
|
|
|
|
like
|
|
|
|
|
concat
|
|
|
|
|
(
|
|
|
|
|
'%',
|
|
|
|
|
#{name},
|
|
|
|
|
'%'
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
<if test="parentId != '' and parentId != null">
|
|
|
|
|
AND a.parentId = #{parentId}
|
|
|
|
|
AND a
|
|
|
|
|
.
|
|
|
|
|
parentId
|
|
|
|
|
=
|
|
|
|
|
#{parentId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="defaultInv != '' and defaultInv != null">
|
|
|
|
|
AND a.defaultInv = #{defaultInv}
|
|
|
|
|
AND a
|
|
|
|
|
.
|
|
|
|
|
defaultInv
|
|
|
|
|
=
|
|
|
|
|
#{defaultInv}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="advanceType != null">
|
|
|
|
|
AND a.advanceType = #{advanceType}
|
|
|
|
|
AND a
|
|
|
|
|
.
|
|
|
|
|
advanceType
|
|
|
|
|
=
|
|
|
|
|
#{advanceType}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="key != null and key != ''">
|
|
|
|
|
AND (a.name like concat('%', #{key}, '%') or
|
|
|
|
|
a.code = #{key})
|
|
|
|
|
AND (
|
|
|
|
|
a
|
|
|
|
|
.
|
|
|
|
|
name
|
|
|
|
|
like
|
|
|
|
|
concat
|
|
|
|
|
(
|
|
|
|
|
'%',
|
|
|
|
|
#{key},
|
|
|
|
|
'%'
|
|
|
|
|
)
|
|
|
|
|
or
|
|
|
|
|
a
|
|
|
|
|
.
|
|
|
|
|
code
|
|
|
|
|
=
|
|
|
|
|
#{key}
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|