|
|
|
@ -131,15 +131,6 @@
|
|
|
|
|
select *
|
|
|
|
|
from inv_product
|
|
|
|
|
<where>
|
|
|
|
|
<!-- <if test="code != null and code != ''">-->
|
|
|
|
|
<!-- AND code like concat('%', #{code}, '%')-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<!-- <if test="mainAction != null and mainAction != ''">-->
|
|
|
|
|
<!-- AND mainAction = #{mainAction}-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<!-- <if test="action != null and action != ''">-->
|
|
|
|
|
<!-- AND action = #{action}-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<if test="supId != null and supId != ''">
|
|
|
|
|
and supId = #{supId}
|
|
|
|
|
</if>
|
|
|
|
@ -149,9 +140,6 @@
|
|
|
|
|
<if test="nameCode != null and nameCode != ''">
|
|
|
|
|
AND nameCode like concat('%', #{nameCode}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="orderId != null and orderId != ''">-->
|
|
|
|
|
<!-- AND orderId = #{orderId}-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<if test="deptCode != null and deptCode != ''">
|
|
|
|
|
AND deptCode = #{deptCode}
|
|
|
|
|
</if>
|
|
|
|
@ -300,17 +288,24 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getInvPlaceOrderList" resultType="com.glxp.api.res.inout.IoOrderResponse">
|
|
|
|
|
select odr.orderIdFk billNo,
|
|
|
|
|
(select name from basic_bussiness_type where action = o.action) billTypeName,
|
|
|
|
|
o.mainAction,
|
|
|
|
|
o.fromCorp,
|
|
|
|
|
o.corpOrderId,
|
|
|
|
|
o.fromType,
|
|
|
|
|
o.createTime,
|
|
|
|
|
o.auditTime,
|
|
|
|
|
(select employeeName from auth_user where id = o.reviewUser) reviewUserName
|
|
|
|
|
from io_order_detail_biz odr
|
|
|
|
|
left join io_order o on o.billNo = odr.orderIdFk
|
|
|
|
|
SELECT
|
|
|
|
|
odr.orderIdFk AS billNo,
|
|
|
|
|
bbt.NAME AS billTypeName,
|
|
|
|
|
o.mainAction,
|
|
|
|
|
o.fromCorp,
|
|
|
|
|
o.corpOrderId,
|
|
|
|
|
o.fromType,
|
|
|
|
|
o.createTime,
|
|
|
|
|
o.auditTime,
|
|
|
|
|
au.employeeName AS reviewUserName
|
|
|
|
|
FROM
|
|
|
|
|
io_order_detail_biz odr
|
|
|
|
|
LEFT JOIN
|
|
|
|
|
io_order o ON o.billNo = odr.orderIdFk
|
|
|
|
|
LEFT JOIN
|
|
|
|
|
basic_bussiness_type bbt ON bbt.action = o.action
|
|
|
|
|
LEFT JOIN
|
|
|
|
|
auth_user au ON au.id = o.reviewUser
|
|
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
<if test="invCode != null and invCode != ''">
|
|
|
|
@ -331,34 +326,37 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="filterSpaceList" resultType="com.glxp.api.res.inv.InvPlaceDetailResponse">
|
|
|
|
|
SELECT t1.nameCode,
|
|
|
|
|
t1.relIdFk as relId,
|
|
|
|
|
(SELECT NAME FROM auth_dept WHERE auth_dept.`code` = t1.deptCode) AS deptName,
|
|
|
|
|
(SELECT NAME FROM auth_warehouse WHERE auth_warehouse.`code` = t1.invCode) AS invName,
|
|
|
|
|
(SELECT NAME FROM auth_space WHERE auth_space.`code` = t1.invSpaceCode) AS invSpaceName,
|
|
|
|
|
<include refid="inOrOutcount"/> as count,
|
|
|
|
|
bp.cpmctymc as productName,
|
|
|
|
|
bp.ggxh,
|
|
|
|
|
t1.batchNo,
|
|
|
|
|
t1.productionDate as produceDate as productionDate,
|
|
|
|
|
t1.expireDate,
|
|
|
|
|
bp.measname,
|
|
|
|
|
bp.zczbhhzbapzbh,
|
|
|
|
|
bp.ylqxzcrbarmc,
|
|
|
|
|
bp.manufactory,
|
|
|
|
|
(SELECT `name` FROM basic_corp WHERE erpId = t1.supId) supName
|
|
|
|
|
FROM inv_product t1
|
|
|
|
|
LEFT JOIN basic_udirel bu ON bu.id = t1.relIdFk
|
|
|
|
|
LEFT JOIN basic_products bp ON bp.uuid = bu.uuid
|
|
|
|
|
SELECT
|
|
|
|
|
t1.nameCode,
|
|
|
|
|
t1.relIdFk AS relId,
|
|
|
|
|
dept.NAME AS deptName,
|
|
|
|
|
warehouse.NAME AS invName,
|
|
|
|
|
space.NAME AS invSpaceName,
|
|
|
|
|
<include refid="inOrOutcount"/> AS count,
|
|
|
|
|
bp.cpmctymc AS productName,
|
|
|
|
|
bp.ggxh,
|
|
|
|
|
t1.batchNo,
|
|
|
|
|
t1.productionDate AS produceDate,
|
|
|
|
|
t1.expireDate,
|
|
|
|
|
bp.measname,
|
|
|
|
|
bp.zczbhhzbapzbh,
|
|
|
|
|
bp.ylqxzcrbarmc,
|
|
|
|
|
bp.manufactory,
|
|
|
|
|
corp.name AS supName
|
|
|
|
|
FROM
|
|
|
|
|
inv_product t1
|
|
|
|
|
LEFT JOIN basic_udirel bu ON bu.id = t1.relIdFk
|
|
|
|
|
LEFT JOIN basic_products bp ON bp.uuid = bu.uuid
|
|
|
|
|
LEFT JOIN auth_dept dept ON dept.code = t1.deptCode
|
|
|
|
|
LEFT JOIN auth_warehouse warehouse ON warehouse.code = t1.invCode
|
|
|
|
|
LEFT JOIN auth_space space ON space.code = t1.invSpaceCode
|
|
|
|
|
LEFT JOIN basic_corp corp ON corp.erpId = t1.supId
|
|
|
|
|
<where>
|
|
|
|
|
<!-- <if test="code != null and code != ''">-->
|
|
|
|
|
<!-- AND t1.code = #{code}-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<if test="invSpaceCode != null and invSpaceCode != ''">
|
|
|
|
|
AND t1.invSpaceCode = #{invSpaceCode}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
GROUP BY invSpaceCode
|
|
|
|
|
GROUP BY t1.invSpaceCode
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -372,9 +370,6 @@
|
|
|
|
|
<if test="invCode != null and invCode != ''">
|
|
|
|
|
AND invCode = #{invCode}
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="mainAction != null and mainAction != ''">-->
|
|
|
|
|
<!-- AND mainAction = #{mainAction}-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<if test="batchNo != null and batchNo != ''">
|
|
|
|
|
AND batchNo = #{batchNo}
|
|
|
|
|
</if>
|
|
|
|
@ -395,9 +390,6 @@
|
|
|
|
|
<if test="invCode != null and invCode != ''">
|
|
|
|
|
AND invCode = #{invCode}
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="mainAction != null and mainAction != ''">-->
|
|
|
|
|
<!-- AND mainAction = #{mainAction}-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<if test="batchNo != null and batchNo != ''">
|
|
|
|
|
AND batchNo = #{batchNo}
|
|
|
|
|
</if>
|
|
|
|
@ -424,9 +416,6 @@
|
|
|
|
|
<if test="inBatchNo != null and inBatchNo != ''">
|
|
|
|
|
AND inBatchNo = #{inBatchNo}
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="mainAction != null and mainAction != ''">-->
|
|
|
|
|
<!-- AND mainAction = #{mainAction}-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<if test="batchNo != null and batchNo != ''">
|
|
|
|
|
AND batchNo = #{batchNo}
|
|
|
|
|
</if>
|
|
|
|
@ -448,9 +437,6 @@
|
|
|
|
|
<if test="invCode != null and invCode != ''">
|
|
|
|
|
AND invCode = #{invCode}
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="mainAction != null and mainAction != ''">-->
|
|
|
|
|
<!-- AND mainAction = #{mainAction}-->
|
|
|
|
|
<!-- </if>-->
|
|
|
|
|
<if test="batchNo != null and batchNo != ''">
|
|
|
|
|
AND batchNo = #{batchNo}
|
|
|
|
|
</if>
|
|
|
|
|