|
|
@ -35,21 +35,23 @@
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBusTypePreResList" resultType="com.glxp.api.res.basic.BasicBusTypePreResponse">
|
|
|
|
<select id="selectBusTypePreResList" resultType="com.glxp.api.res.basic.BasicBusTypePreResponse">
|
|
|
|
SELECT basic_bustype_pre.*,
|
|
|
|
SELECT bbp.*,
|
|
|
|
awA.name defaultInvName,
|
|
|
|
awA.name AS defaultInvName,
|
|
|
|
awB.name invName,
|
|
|
|
awB.name AS invName,
|
|
|
|
(select name from basic_bussiness_type where action = basic_bustype_pre.originAction) originName,
|
|
|
|
bbt_origin.name AS originName,
|
|
|
|
(select name
|
|
|
|
bbt_target.name AS targetName,
|
|
|
|
from basic_bussiness_type
|
|
|
|
bbc.originName AS targetBusName
|
|
|
|
where basic_bussiness_type.action = basic_bustype_pre.action) targetName,
|
|
|
|
FROM basic_bustype_pre bbp
|
|
|
|
(select basic_bustype_change.originName
|
|
|
|
LEFT JOIN
|
|
|
|
from basic_bustype_change
|
|
|
|
auth_warehouse awA ON bbp.defaultInvCode = awA.code
|
|
|
|
where basic_bustype_change.originAction = basic_bustype_pre.targetBusAction) targetBusName
|
|
|
|
LEFT JOIN
|
|
|
|
FROM basic_bustype_pre
|
|
|
|
auth_warehouse awB ON bbp.invCode = awB.code
|
|
|
|
left JOIN auth_warehouse awA on basic_bustype_pre.defaultInvCode = awA.code
|
|
|
|
LEFT JOIN
|
|
|
|
left JOIN auth_warehouse awB on basic_bustype_pre.invCode = awB.code
|
|
|
|
basic_bussiness_type bbt_origin ON bbp.originAction = bbt_origin.action
|
|
|
|
left JOIN basic_bussiness_type busTypeA on basic_bustype_pre.originAction = busTypeA.action
|
|
|
|
LEFT JOIN
|
|
|
|
left join basic_bussiness_type busTypeB on basic_bustype_pre.action = busTypeB.action
|
|
|
|
basic_bussiness_type bbt_target ON bbp.action = bbt_target.action
|
|
|
|
|
|
|
|
LEFT JOIN
|
|
|
|
|
|
|
|
basic_bustype_change bbc ON bbc.originAction = bbp.targetBusAction
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="action != ''and action != null">
|
|
|
|
<if test="action != ''and action != null">
|
|
|
|
AND basic_bustype_pre.`action` = #{action}
|
|
|
|
AND basic_bustype_pre.`action` = #{action}
|
|
|
|