|
|
|
@ -128,24 +128,39 @@
|
|
|
|
|
|
|
|
|
|
<select id="filterJoinByUser" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest"
|
|
|
|
|
resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
|
|
|
|
|
SELECT basic_bustype_local.id,basic_bustype_local.name localName, basic_bustype_local.action
|
|
|
|
|
localAction,originAction,
|
|
|
|
|
basic_bussiness_type.name ,
|
|
|
|
|
basic_bussiness_type.action,basic_bussiness_type.checkEnable,basic_bustype_local.advanceType,basic_bustype_local.changeEnable,
|
|
|
|
|
basic_bustype_local.spUse,basic_bussiness_type.storageCode,basic_bussiness_type.corpType,basic_bussiness_type.mainAction,
|
|
|
|
|
basic_bussiness_type.defaultUnit,basic_bussiness_type.genUnit,basic_bustype_origin.action
|
|
|
|
|
thirdAction,basic_bustype_origin.thirdSys,basic_bussiness_type.prefix,basic_bustype_local.prefix
|
|
|
|
|
localPrefix,preIn,
|
|
|
|
|
basic_bussiness_type.ullageFill, basic_bussiness_type.scanPreIn, basic_bussiness_type.vailInv,
|
|
|
|
|
basic_bussiness_type.codeFillCheck,supplementAll
|
|
|
|
|
FROM basic_bustype_local
|
|
|
|
|
inner join basic_bussiness_type on basic_bustype_local.action = basic_bussiness_type.localAction
|
|
|
|
|
INNER JOIN inv_warehouse_bussiness_type on basic_bussiness_type.action = inv_warehouse_bussiness_type.action
|
|
|
|
|
INNER JOIN inv_warehouse_sub on inv_warehouse_sub.`code` = inv_warehouse_bussiness_type.code
|
|
|
|
|
INNER JOIN inv_warehouse on inv_warehouse_sub.parentId = inv_warehouse.`code`
|
|
|
|
|
INNER JOIN inv_warehouse_user on inv_warehouse_sub.`code` =inv_warehouse_user.`code`
|
|
|
|
|
left join basic_bustype_origin on basic_bustype_local.originAction = basic_bustype_origin.action
|
|
|
|
|
INNER JOIN inv_bustype_user on inv_warehouse_bussiness_type.action = inv_bustype_user.scAction
|
|
|
|
|
SELECT
|
|
|
|
|
basic_bustype_local.id,
|
|
|
|
|
basic_bustype_local.NAME localName,
|
|
|
|
|
basic_bustype_local.action localAction,
|
|
|
|
|
originAction,
|
|
|
|
|
basic_bussiness_type.NAME,
|
|
|
|
|
basic_bussiness_type.action,
|
|
|
|
|
basic_bussiness_type.checkEnable,
|
|
|
|
|
basic_bustype_local.advanceType,
|
|
|
|
|
basic_bustype_local.changeEnable,
|
|
|
|
|
basic_bustype_local.spUse,
|
|
|
|
|
basic_bussiness_type.storageCode,
|
|
|
|
|
basic_bussiness_type.corpType,
|
|
|
|
|
basic_bussiness_type.mainAction,
|
|
|
|
|
basic_bussiness_type.defaultUnit,
|
|
|
|
|
basic_bussiness_type.genUnit,
|
|
|
|
|
basic_bussiness_type.prefix,
|
|
|
|
|
basic_bustype_local.prefix,
|
|
|
|
|
basic_bussiness_type.ullageFill,
|
|
|
|
|
basic_bussiness_type.scanPreIn,
|
|
|
|
|
basic_bussiness_type.vailInv,
|
|
|
|
|
basic_bussiness_type.codeFillCheck,
|
|
|
|
|
basic_bussiness_type.prefix,
|
|
|
|
|
basic_bustype_local.prefix localPrefix,
|
|
|
|
|
basic_bussiness_type.ullageFill,
|
|
|
|
|
basic_bussiness_type.scanPreIn,
|
|
|
|
|
basic_bussiness_type.vailInv,
|
|
|
|
|
basic_bussiness_type.codeFillCheck,
|
|
|
|
|
supplementAll
|
|
|
|
|
FROM
|
|
|
|
|
basic_bustype_local
|
|
|
|
|
INNER JOIN basic_bussiness_type ON basic_bustype_local.action = basic_bussiness_type.localAction
|
|
|
|
|
INNER JOIN inv_bustype_user ON basic_bussiness_type.action = inv_bustype_user.scAction
|
|
|
|
|
<where>
|
|
|
|
|
<if test="name != ''and name != null">
|
|
|
|
|
AND basic_bustype_local.name LIKE concat('%',#{name},'%')
|
|
|
|
@ -159,11 +174,9 @@
|
|
|
|
|
<if test="spUse != ''and spUse != null">
|
|
|
|
|
AND basic_bustype_local.spUse =#{spUse}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="code != ''and code != null">
|
|
|
|
|
AND inv_warehouse_user.`code` = #{code}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="invWarehouseCode != ''and invWarehouseCode != null">
|
|
|
|
|
AND inv_warehouse_sub.`code` = #{invWarehouseCode}
|
|
|
|
|
AND subInvCode = #{code}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="userId != ''and userId != null">
|
|
|
|
|
AND inv_bustype_user.`userId` = #{userId}
|
|
|
|
|