|
|
|
@ -10,18 +10,18 @@
|
|
|
|
|
bp.cpmctymc,
|
|
|
|
|
bp.measname,
|
|
|
|
|
ip.relIdFk,
|
|
|
|
|
COALESCE(bp.ggxh,bp.bzgg) as ggxh,
|
|
|
|
|
COALESCE(bp.ggxh, bp.bzgg) as ggxh,
|
|
|
|
|
ip.batchNo,
|
|
|
|
|
ip.productionDate,
|
|
|
|
|
ip.expireDate,
|
|
|
|
|
COALESCE(bp.ylqxzcrbarmc,bp.manufactory) as ylqxzcrbarmc,
|
|
|
|
|
COALESCE(bp.ylqxzcrbarmc, bp.manufactory) as ylqxzcrbarmc,
|
|
|
|
|
bp.zczbhhzbapzbh,
|
|
|
|
|
bp.packUnit,
|
|
|
|
|
bp.prepnUnit,
|
|
|
|
|
bp.prepnSpec,
|
|
|
|
|
sum(ip.inCount) as inCount,
|
|
|
|
|
sum(ip.outCount) as outCount,
|
|
|
|
|
sum(ip.reCount) as reCount,
|
|
|
|
|
inCount,
|
|
|
|
|
outCount,
|
|
|
|
|
reCount,
|
|
|
|
|
ip.customerId,
|
|
|
|
|
basic_corp.name supName,
|
|
|
|
|
ip.supId,
|
|
|
|
@ -32,12 +32,11 @@
|
|
|
|
|
s.name spaceName,
|
|
|
|
|
ip.price
|
|
|
|
|
from inv_product ip
|
|
|
|
|
inner join basic_udirel on ip.relIdFk = basic_udirel.id
|
|
|
|
|
inner join basic_products bp on basic_udirel.uuid = bp.uuid
|
|
|
|
|
left join basic_corp on ip.supId = basic_corp.erpId
|
|
|
|
|
left join auth_dept on auth_dept.code = ip.deptCode
|
|
|
|
|
left join auth_warehouse on auth_warehouse.code = ip.invCode
|
|
|
|
|
left join auth_space s on ip.invSpaceCode = s.code
|
|
|
|
|
INNER JOIN basic_products bp ON ip.relIdFk = (SELECT id FROM basic_udirel WHERE uuid = bp.uuid)
|
|
|
|
|
LEFT JOIN basic_corp ON ip.supId = basic_corp.erpId
|
|
|
|
|
LEFT JOIN auth_dept ON auth_dept.CODE = ip.deptCode
|
|
|
|
|
LEFT JOIN auth_warehouse ON auth_warehouse.CODE = ip.invCode
|
|
|
|
|
LEFT JOIN auth_space s ON ip.invSpaceCode = s.CODE
|
|
|
|
|
<where>
|
|
|
|
|
bp.diType = 1
|
|
|
|
|
<if test="cpmctymc != null and cpmctymc != ''">
|
|
|
|
|