|
@@ -4,7 +4,7 @@
|
|
|
|
|
|
<!-- 获取 头信息 主要是成衣委外及源头订单信息 -->
|
|
|
<select id="getFabricLossData" resultType="org.jeecg.modules.report.entity.FabricLoss">
|
|
|
- select distinct * from VIEW_FabricLoss_Head_Clothes where (trim(cCode) like CONCAT('%',#{code},'%') and cCode not like '%样%')
|
|
|
+ select distinct * from VIEW_FabricLoss_Head_Clothes where (trim(cCode) like '%${code}%' and cCode not like '%样%')
|
|
|
</select>
|
|
|
<!-- 获取计划员 103的面料委外制单人,供应商分类是染厂的 -->
|
|
|
<select id="getPlanner" resultType="java.lang.String">
|
|
@@ -14,17 +14,17 @@
|
|
|
(y.cInvCCode like '01%' or y.cInvCCode like '02%' or y.cInvCCode like '03%' or y.cInvCCode like '04%') )
|
|
|
and
|
|
|
exists (select x.cVenCode from Vendor x where x.cVenCode=om_momain.cVenCode and x.cVCCode in ('0104','0105','0102'))
|
|
|
- and (trim(cCode) like CONCAT(#{code},'%') and cCode not like '%样%')
|
|
|
+ and (trim(cCode) like '${code}%' and cCode not like '%样%')
|
|
|
</select>
|
|
|
<!-- 排单数量 -->
|
|
|
<select id="getNumber" resultType="java.lang.String">
|
|
|
select sum(isnull(iQuantity,0))as 'iQuantity' from VIEW_OM_MOMain_ALL_Clothes
|
|
|
- where (trim(cCode) like CONCAT(#{code},'%') and cCode not like '%样%')
|
|
|
+ where (trim(cCode) like '${code}%' and cCode not like '%样%')
|
|
|
</select>
|
|
|
<!-- 销售出库数量 -->
|
|
|
<select id="getSaleOutSum" resultType="java.lang.String">
|
|
|
select isnull(sum(iQuantity),0) as 'iQuantity' from VIEW_FabricLoss_Head_Clothes_SaleOut_Sum where
|
|
|
- (trim(cCode) like CONCAT(#{code},'%') and cCode not like '%样%')
|
|
|
+ (trim(cCode) like '${code}%' and cCode not like '%样%')
|
|
|
</select>
|
|
|
|
|
|
<!--获取采购订单,物料名为物料名+颜色-->
|
|
@@ -39,7 +39,7 @@
|
|
|
inner join Inventory c on b.cInvCode=c.cInvCode
|
|
|
inner join Vendor d on a.cVenCode=d.cVenCode
|
|
|
inner join VendorClass e on d.cVCCode =e.cVCCode
|
|
|
- where (trim(a.cPOID) like CONCAT(#{code},'%') and a.cPOID not like '%样%')
|
|
|
+ where (trim(a.cPOID) like '${code}%' and a.cPOID not like '%样%')
|
|
|
and (c.cInvCCode LIKE '01%'
|
|
|
or c.cInvCCode LIKE '02%'
|
|
|
or c.cInvCCode LIKE '03%'
|
|
@@ -64,7 +64,7 @@
|
|
|
inner join VendorClass e on d.cVCCode =e.cVCCode
|
|
|
WHERE
|
|
|
c.cInvCCode NOT LIKE '19%'
|
|
|
- AND (trim(a.cCode) LIKE CONCAT(#{code},'%') and a.cCode not like '%样%')
|
|
|
+ AND (trim(a.cCode) LIKE '${code}%' and a.cCode not like '%样%')
|
|
|
) union all (
|
|
|
SELECT b.MODetailsID,e.cVCName,d.cVenName ,d.cVenAbbName ,a.cVenCode ,c.cInvCode,c.cInvName,c.cComUnitCode,
|
|
|
isnull(b.cFree1,'') as cColor,
|
|
@@ -82,7 +82,7 @@
|
|
|
inner join Inventory h on h.cinvcode=g.cinvcode
|
|
|
WHERE
|
|
|
c.cInvCCode NOT LIKE '19%'
|
|
|
- AND (trim(a.cCode) LIKE CONCAT(#{code},'%') and trim(g.cMoCode) LIKE CONCAT(#{code},'%')
|
|
|
+ AND (trim(a.cCode) LIKE '${code}%' and trim(g.cMoCode) LIKE '${code}%'
|
|
|
and a.cCode not like '%样%' and g.cMoCode not like '%样%')
|
|
|
)) as t1
|
|
|
group by MODetailsID,cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cComUnitCode,cColor,cColorNumber,cWidth
|
|
@@ -104,7 +104,7 @@
|
|
|
inner join RdRecords01 x on x.iOMoDID=b.MODetailsID
|
|
|
WHERE
|
|
|
c.cInvCCode NOT LIKE '19%'
|
|
|
- AND (trim(a.cCode) LIKE CONCAT(#{code},'%') and a.cCode not like '%样%')
|
|
|
+ AND (trim(a.cCode) LIKE '${code}%' and a.cCode not like '%样%')
|
|
|
and x.cInvCode+isnull(x.cFree1,'')+isnull(x.cBatch,'') in (
|
|
|
select distinct cInvCode+isnull(cFree1,'')+isnull(cBatch,'') from rdrecords32
|
|
|
)
|
|
@@ -127,12 +127,12 @@
|
|
|
inner join Inventory e on b.cinvcode=e.cinvcode
|
|
|
inner join Vendor f on f.cVenCode=a.cVenCode
|
|
|
inner join VendorClass g on g.cVCCode =f.cVCCode
|
|
|
- where (trim(d.cPOID) like CONCAT(#{code},'%') and d.cPOID not like '%样%')
|
|
|
+ where (trim(d.cPOID) like '${code}%' and d.cPOID not like '%样%')
|
|
|
</select>
|
|
|
<!--获取费用支出-->
|
|
|
<select id="getExpensesList" resultType="org.jeecg.modules.report.entity.FabricExpenses">
|
|
|
select * from VIEW_FabricLoss_Expenses
|
|
|
- where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
|
|
|
+ where trim(cSOCode) like '${code}%' and cSOCode not like '%样%'
|
|
|
</select>
|
|
|
<!--获取委外订单运费发票金额-->
|
|
|
<select id="getOmInvoiceMoneyYfList" resultType="org.jeecg.modules.report.entity.FabricCostInvoice">
|
|
@@ -142,7 +142,7 @@
|
|
|
inner join PurBillVouch e on d.PBVID =e.PBVID
|
|
|
inner join Vendor f on f.cVenCode=e.cVenCode
|
|
|
inner join VendorClass g on g.cVCCode =f.cVCCode
|
|
|
- where (trim(e.cdefine2) like CONCAT(#{code},'%') and e.cdefine2 not like '%样%')
|
|
|
+ where (trim(e.cdefine2) like '${code}%' and e.cdefine2 not like '%样%')
|
|
|
and d.cInvCode='N3000002426'
|
|
|
and g.cVCName not like '成衣厂'
|
|
|
group by g.cVCName,f.cVenName ,f.cVenAbbName
|
|
@@ -157,7 +157,7 @@
|
|
|
isnull(sum(iOriSum),0) as iOriSum,isnull(sum(iQuantity),0) as iQuantity,
|
|
|
isnull(sum(iPBVQuantity),0) as iPBVQuantity,isnull(sum(iSQuantity),0) as iSQuantity,
|
|
|
isnull(sum(iSumBillQuantity ),0) as iSumBillQuantity
|
|
|
- from VIEW_FabricLoss_Cost_Clothes where trim(cCode) like CONCAT(#{code},'%') and cCode not like '%样%'
|
|
|
+ from VIEW_FabricLoss_Cost_Clothes where trim(cCode) like '${code}%' and cCode not like '%样%'
|
|
|
group by
|
|
|
cPBVCode,cVenName,cVenAbbName,cShipTime
|
|
|
order by cPBVCode,cVenName,cVenAbbName,cShipTime
|
|
@@ -165,7 +165,7 @@
|
|
|
<!--开票成本-辅料-->
|
|
|
<select id="getCostAssistList" resultType="org.jeecg.modules.report.entity.FabricCostAssist">
|
|
|
|
|
|
- select * from VIEW_FabricLoss_Cost_Assist where trim(cPoid) like CONCAT(#{code},'%') and cPoid not like '%样%'
|
|
|
+ select * from VIEW_FabricLoss_Cost_Assist where trim(cPoid) like '${code}%' and cPoid not like '%样%'
|
|
|
and cVenAbbName not in ('宁波森语','马菲羊','森语集团') and iquantityinvoice>0
|
|
|
order by cAccount,cPoid,cVenAbbName,cInvName,cComUnitName
|
|
|
</select>
|
|
@@ -173,7 +173,7 @@
|
|
|
<select id="getCostClothList" resultType="org.jeecg.modules.report.entity.FabricCostCloth">
|
|
|
|
|
|
select cVenName,cSOCode,cSBVCode,cShipTime,cInvName,isnull(iPrice,0) as iPrice,isnull(sum(iQuantity),0) as iQuantity,isnull(sum(iNatSum),0) as iNatSum
|
|
|
- from VIEW_FabricLoss_Cost_Cloth where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
|
|
|
+ from VIEW_FabricLoss_Cost_Cloth where trim(cSOCode) like '${code}%' and cSOCode not like '%样%'
|
|
|
group by cVenName,cSOCode,cSBVCode,cShipTime,cInvName,iPrice
|
|
|
order by cVenName,cSBVCode,cInvName
|
|
|
</select>
|
|
@@ -185,12 +185,12 @@
|
|
|
(
|
|
|
select cInvCode,isnull(cFree1,'') as cColor,comcode as cCode,isnull(iSQuantity,iquantity) as iQuantity,iUnitCost as iPrice
|
|
|
from rdrecords11 where
|
|
|
- trim(comcode) not like CONCAT(#{code},'%')
|
|
|
+ trim(comcode) not like '${code}%'
|
|
|
and (cInvCode+isnull(cFree1,'')+isnull(cbatch,'') in (
|
|
|
select b.cinvcode+isnull(b.cfree1,'')+isnull(b.cbatch,'') from RdRecords01 b
|
|
|
inner join PO_Podetails c on b.iposid=c.id
|
|
|
inner join PO_Pomain d on c.POID =d.POID
|
|
|
- where trim(d.cPOID) like CONCAT(#{code},'%') and d.cPOID not like '%样%'
|
|
|
+ where trim(d.cPOID) like '${code}%' and d.cPOID not like '%样%'
|
|
|
)
|
|
|
or cInvCode+isnull(cFree1,'')+isnull(cbatch,'') in (
|
|
|
select cInvCode2+isnull(cColor2,'')+isnull(cAVBatch2,'') from VIEW_FabricLoss_AssemVouchs where
|
|
@@ -198,7 +198,7 @@
|
|
|
select b.cinvcode+isnull(b.cfree1,'')+isnull(b.cbatch,'') from RdRecords01 b
|
|
|
inner join PO_Podetails c on b.iposid=c.id
|
|
|
inner join PO_Pomain d on c.POID =d.POID
|
|
|
- where trim(d.cPOID) like CONCAT(#{code},'%') and d.cPOID not like '%样%'
|
|
|
+ where trim(d.cPOID) like '${code}%' and d.cPOID not like '%样%'
|
|
|
)
|
|
|
)
|
|
|
)
|
|
@@ -232,7 +232,7 @@
|
|
|
inner join VendorClass d on d.cVCCode =c.cVCCode
|
|
|
WHERE
|
|
|
y.cInvCCode NOT LIKE '19%'
|
|
|
- AND trim(a.cCode) LIKE CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
+ AND trim(a.cCode) LIKE '${code}%' and a.cCode not like '%样%'
|
|
|
) as t1 group by cPlanCode,cCode,MODetailsID,cVCName,cVenName,cVenAbbName,cInvCCode,cInvCName,cInvCode,cInvName,cColor,cBatch,dDate
|
|
|
|
|
|
</select>
|
|
@@ -256,7 +256,7 @@
|
|
|
inner join Vendor x on x.cVenCode=a.cVenCode
|
|
|
WHERE
|
|
|
c.cInvCCode NOT LIKE '19%'
|
|
|
- AND trim(a.cCode) LIKE CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
+ AND trim(a.cCode) LIKE '${code}%' and a.cCode not like '%样%'
|
|
|
) union all (
|
|
|
select b.MODetailsID,
|
|
|
g.cInvCode as cInvCodeOut,z.cInvName as cInvNameOut,isnull(g.cColor,'') as cColorOut,
|
|
@@ -275,7 +275,7 @@
|
|
|
inner join Vendor x on x.cVenCode=a.cVenCode
|
|
|
WHERE
|
|
|
c.cInvCCode NOT LIKE '19%'
|
|
|
- AND trim(a.cCode) LIKE CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
+ AND trim(a.cCode) LIKE '${code}%' and a.cCode not like '%样%'
|
|
|
)) as t1
|
|
|
group by MODetailsID,cInvCodeOut,cInvNameOut,cColorOut,cBatchOut,cInvCCodeOut,cInvCNameOut,cOmCode,cOmVenAbbName
|
|
|
</select>
|
|
@@ -298,7 +298,7 @@
|
|
|
from OM_MOMain a inner join om_modetails b on a.moid=b.moid
|
|
|
inner join VoucherAccessories f on f.voucherid=a.moid
|
|
|
where f.vouchertypeid='OM01'
|
|
|
- and trim(a.cCode) like CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
+ and trim(a.cCode) like '${code}%' and a.cCode not like '%样%'
|
|
|
</select>
|
|
|
<!-- 获取采购入库仓库库存 -->
|
|
|
<select id="getPurchaseStockList" resultType="org.jeecg.modules.report.entity.FabricPoOrderOut">
|
|
@@ -312,7 +312,7 @@
|
|
|
inner join PO_Podetails p on o.POID =p.POID
|
|
|
inner join Inventory q on p.cInvCode=q.cInvCode
|
|
|
inner join RdRecords01 r on r.iposid=p.id
|
|
|
- where trim(o.cPOID) like CONCAT(#{code},'%') and o.cPOID not like '%样%'
|
|
|
+ where trim(o.cPOID) like '${code}%' and o.cPOID not like '%样%'
|
|
|
and (q.cInvCCode LIKE '01%'
|
|
|
or q.cInvCCode LIKE '02%'
|
|
|
or q.cInvCCode LIKE '03%'
|
|
@@ -337,7 +337,7 @@
|
|
|
left join Inventory inv on inv.cInvCode=a.cInvCode
|
|
|
left join Vendor ven on ven.cVenCode=ah.cvencode
|
|
|
where cPBVBillType='03'
|
|
|
- and inv.cInvName='事故单' and trim(ah.cDefine2) like CONCAT(#{code},'%') and ah.cDefine2 not like '%样%'
|
|
|
+ and inv.cInvName='事故单' and trim(ah.cDefine2) like '${code}%' and ah.cDefine2 not like '%样%'
|
|
|
group by ah.cPBVMemo,ah.cPBVCode,VEN.cVenAbbName
|
|
|
|
|
|
</select>
|
|
@@ -436,12 +436,12 @@
|
|
|
(
|
|
|
select cInvCode,isnull(cFree1,'') as cColor,isnull(cbatch,'') as cBatch,comcode as cCode,isnull(iSQuantity,iquantity) as iQuantity,0 as iPrice
|
|
|
from rdrecords11 where
|
|
|
- (trim(comcode) not like CONCAT(#{code},'%') or comcode like '%样%')
|
|
|
+ (trim(comcode) not like '${code}%' or comcode like '%样%')
|
|
|
and (cInvCode+isnull(cFree1,'')+isnull(cbatch,'') in (
|
|
|
select b.cinvcode+isnull(b.cfree1,'')+isnull(b.cbatch,'') from RdRecords01 b
|
|
|
INNER JOIN OM_MODetails e on b.iOMoDID=e.MODetailsID
|
|
|
inner join om_momain f on f.moid = e.moid
|
|
|
- where trim(f.cCode) like CONCAT(#{code},'%') and f.cCode not like '%样%'
|
|
|
+ where trim(f.cCode) like '${code}%' and f.cCode not like '%样%'
|
|
|
)
|
|
|
or cInvCode+isnull(cFree1,'')+isnull(cbatch,'') in (
|
|
|
select cInvCode2+isnull(cColor2,'')+isnull(cAVBatch2,'') from VIEW_FabricLoss_AssemVouchs where
|
|
@@ -449,7 +449,7 @@
|
|
|
select b.cinvcode+isnull(b.cfree1,'')+isnull(b.cbatch,'') from RdRecords01 b
|
|
|
INNER JOIN OM_MODetails e on b.iOMoDID=e.MODetailsID
|
|
|
inner join om_momain f on f.moid = e.moid
|
|
|
- where trim(f.cCode) like CONCAT(#{code},'%') and f.cCode not like '%样%'
|
|
|
+ where trim(f.cCode) like '${code}%' and f.cCode not like '%样%'
|
|
|
)
|
|
|
)
|
|
|
)
|
|
@@ -468,7 +468,7 @@
|
|
|
inner join OM_MODetails p on o.moid =p.moid
|
|
|
inner join Inventory q on p.cInvCode=q.cInvCode
|
|
|
inner join RdRecords01 r on r.iOMoDID=p.MODetailsID
|
|
|
- where trim(o.cCode) like CONCAT(#{code},'%') and o.cCode not like '%样%'
|
|
|
+ where trim(o.cCode) like '${code}%' and o.cCode not like '%样%'
|
|
|
)
|
|
|
</select>
|
|
|
<!--获取本次委外入库的形态转换-->
|
|
@@ -479,7 +479,7 @@
|
|
|
select cInvCode+isnull(cBatch,'')+isnull(cFree1,'') from RdRecords01
|
|
|
where iOMoDID in (
|
|
|
select b.MODetailsID from om_momain a inner join OM_MODetails b on a.moid =b.moid
|
|
|
- and trim(a.cCode) like CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
+ and trim(a.cCode) like '${code}%' and a.cCode not like '%样%'
|
|
|
)
|
|
|
)
|
|
|
</select>
|
|
@@ -598,7 +598,7 @@
|
|
|
<!-- 获取成衣委外出库 -->
|
|
|
<select id="getOmOutList19" resultType="org.jeecg.modules.report.entity.FabricMoOrderCK">
|
|
|
|
|
|
- select * from VIEW_OM_OUT_19 where trim(cOmCode) like CONCAT(#{code},'%') and cOmCode not like '%样%'
|
|
|
+ select * from VIEW_OM_OUT_19 where trim(cOmCode) like '${code}%' and cOmCode not like '%样%'
|
|
|
|
|
|
</select>
|
|
|
<!-- 根据委外订单子表id,获取入库详情-->
|
|
@@ -644,9 +644,9 @@
|
|
|
inner join rdrecords32 c on c.iorderdid =b.isosid and b.cinvcode=c.cinvcode
|
|
|
INNER JOIN Inventory d ON c.cinvcode = d.cinvcode
|
|
|
inner join SO_SODetails e on e.iSOsID=c.isodid
|
|
|
- where trim(a.ccode) like CONCAT(#{code},'%') and a.ccode not like '%样%' and
|
|
|
+ where trim(a.ccode) like '${code}%' and a.ccode not like '%样%' and
|
|
|
(d.cInvCCode like '01%' or d.cInvCCode like '02%' or d.cInvCCode like '03%' or d.cInvCCode like '04%')
|
|
|
- ) or trim(e.cSOCode) like CONCAT(#{code},'%')
|
|
|
+ ) or trim(e.cSOCode) like '${code}%'
|
|
|
) as t1 where (cInvCCode like '01%' or cInvCCode like '02%' or cInvCCode like '03%' or cInvCCode like '04%')
|
|
|
</select>
|
|
|
<!--获取本次采购入库的形态转换-->
|
|
@@ -657,7 +657,7 @@
|
|
|
select cInvCode+isnull(cBatch,'')+isnull(cFree1,'') from RdRecords01
|
|
|
where iposid in (
|
|
|
select b.id from PO_Pomain a inner join PO_Podetails b on a.poid =b.poid
|
|
|
- and trim(a.cPOID) like CONCAT(#{code},'%') and a.cPOID not like '%样%'
|
|
|
+ and trim(a.cPOID) like '${code}%' and a.cPOID not like '%样%'
|
|
|
)
|
|
|
)
|
|
|
</select>
|