|
|
|
@ -134,7 +134,7 @@
|
|
|
|
|
parameterType="com.glxp.api.entity.auth.InvWarehouseEntity">
|
|
|
|
|
replace
|
|
|
|
|
INTO auth_warehouse
|
|
|
|
|
( id, code, `name`, parentId, remark, defaultInv, advanceType, spUse,parentCode
|
|
|
|
|
( id, code, `name`, parentId, remark, defaultInv, advanceType, spUse, parentCode
|
|
|
|
|
, thirdId, thirdId1, thirdId2, thirdId3, thirdId4)
|
|
|
|
|
values (#{id},
|
|
|
|
|
#{code},
|
|
|
|
@ -159,13 +159,13 @@
|
|
|
|
|
WHERE id = #{id}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<select id="getByWareId" resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
|
|
|
|
|
select *
|
|
|
|
|
<select id="getByWareId" resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
|
|
|
|
|
select *
|
|
|
|
|
FROM auth_warehouse
|
|
|
|
|
WHERE id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getByWarePcode" resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
|
|
|
|
|
<select id="getByWarePcode" resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
|
|
|
|
|
select *
|
|
|
|
|
FROM auth_warehouse
|
|
|
|
|
WHERE parentCode = #{parentCode}
|
|
|
|
@ -217,6 +217,9 @@
|
|
|
|
|
<if test="advanceType != null">
|
|
|
|
|
advanceType=#{advanceType},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
updateTime=#{updateTime},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="spUse != null">
|
|
|
|
|
spUse=#{spUse},
|
|
|
|
|
</if>
|
|
|
|
@ -311,8 +314,8 @@
|
|
|
|
|
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>
|
|
|
|
@ -371,7 +374,7 @@
|
|
|
|
|
auth_dept.name warehouseName
|
|
|
|
|
from auth_warehouse
|
|
|
|
|
inner join auth_dept on auth_warehouse.parentId = auth_dept.code
|
|
|
|
|
LEFT join auth_warehouse_user on auth_warehouse.code = auth_warehouse_user.code
|
|
|
|
|
LEFT join auth_warehouse_user on auth_warehouse.code = auth_warehouse_user.code
|
|
|
|
|
<where>
|
|
|
|
|
<if test="userId != null">
|
|
|
|
|
AND auth_warehouse_user.userId = #{userId}
|
|
|
|
@ -435,12 +438,18 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectLowWarehouseAll" parameterType="java.lang.String" resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
|
|
|
|
|
<select id="selectLowWarehouseAll" parameterType="java.lang.String"
|
|
|
|
|
resultType="com.glxp.api.entity.auth.InvWarehouseEntity">
|
|
|
|
|
with recursive table_a as (
|
|
|
|
|
select * from auth_warehouse ta where parentCode = #{pcode}
|
|
|
|
|
union all
|
|
|
|
|
select tb.* from auth_warehouse tb inner join table_a on table_a.code = tb.parentCode
|
|
|
|
|
)
|
|
|
|
|
select * from table_a
|
|
|
|
|
select *
|
|
|
|
|
from auth_warehouse ta
|
|
|
|
|
where parentCode = #{pcode}
|
|
|
|
|
union all
|
|
|
|
|
select tb.*
|
|
|
|
|
from auth_warehouse tb
|
|
|
|
|
inner join table_a on table_a.code = tb.parentCode
|
|
|
|
|
)
|
|
|
|
|
select *
|
|
|
|
|
from table_a
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|