|
@@ -4,7 +4,7 @@
|
|
|
|
|
|
|
|
|
<select id="getFabricLossData" resultType="org.jeecg.modules.report.entity.FabricLoss">
|
|
|
- select distinct * from VIEW_FabricLoss_Head_Clothes where (cCode like CONCAT('%',#{code},'%') and cCode not like '%样%')
|
|
|
+ select distinct * from VIEW_FabricLoss_Head_Clothes where (trim(cCode) like CONCAT('%',#{code},'%') and cCode not like '%样%')
|
|
|
</select>
|
|
|
|
|
|
<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 (cCode like CONCAT(#{code},'%') and cCode not like '%样%')
|
|
|
+ and (trim(cCode) like CONCAT(#{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 (cCode like CONCAT(#{code},'%') and cCode not like '%样%')
|
|
|
+ where (trim(cCode) like CONCAT(#{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
|
|
|
- (cCode like CONCAT(#{code},'%') and cCode not like '%样%')
|
|
|
+ (trim(cCode) like CONCAT(#{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 (a.cPOID like CONCAT(#{code},'%') and a.cPOID not like '%样%')
|
|
|
+ where (trim(a.cPOID) like CONCAT(#{code},'%') and a.cPOID not like '%样%')
|
|
|
and (c.cInvCCode LIKE '01%'
|
|
|
or c.cInvCCode LIKE '02%'
|
|
|
or c.cInvCCode LIKE '03%'
|
|
@@ -48,14 +48,14 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getOmOrderListAll" resultType="org.jeecg.modules.report.entity.FabricOMOrder">
|
|
|
- select MODetailsID,cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cComUnitCode,cColor,cColorNumber,
|
|
|
+ select MODetailsID,cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cComUnitCode,cColor,cColorNumber,cWidth,
|
|
|
sum(iQuantityOut) as iQuantityOut,sum(iQuantityIn) as iQuantityIn,sum(iQuantity) as iQuantity from (
|
|
|
(
|
|
|
SELECT b.MODetailsID,e.cVCName,d.cVenName ,d.cVenAbbName ,a.cVenCode ,c.cInvCode,c.cInvName,c.cComUnitCode,
|
|
|
isnull(b.cFree1,'') as cColor,
|
|
|
isnull((select sum(x.iQuantity-isnull(x.iSQuantity,0)) from rdrecords11 x where x.iOMoDID=b.MODetailsID),0) as iQuantityOut,
|
|
|
isnull((select sum(iQuantity) from RdRecords01 x where x.iOMoDID=b.MODetailsID),0) as iQuantityIn,
|
|
|
- b.iQuantity,isnull(b.cdefine30,'') as cColorNumber
|
|
|
+ b.iQuantity,isnull(b.cdefine30,'') as cColorNumber,isnull(b.cDefine23 ,'') as cWidth
|
|
|
FROM
|
|
|
om_momain a
|
|
|
INNER JOIN OM_MODetails b ON a.moid = b.moid
|
|
@@ -64,13 +64,13 @@
|
|
|
inner join VendorClass e on d.cVCCode =e.cVCCode
|
|
|
WHERE
|
|
|
c.cInvCCode NOT LIKE '19%'
|
|
|
- AND (a.cCode LIKE CONCAT(#{code},'%') and a.cCode not like '%样%')
|
|
|
+ AND (trim(a.cCode) LIKE CONCAT(#{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,
|
|
|
g.iQuantity as iQuantityOut,
|
|
|
0 as iQuantityIn,
|
|
|
- 0 as iQuantity,isnull(b.cdefine30,'') as cColorNumber
|
|
|
+ 0 as iQuantity,isnull(b.cdefine30,'') as cColorNumber,isnull(b.cDefine23 ,'') as cWidth
|
|
|
FROM
|
|
|
om_momain a
|
|
|
INNER JOIN OM_MODetails b ON a.moid = b.moid
|
|
@@ -82,12 +82,12 @@
|
|
|
inner join Inventory h on h.cinvcode=g.cinvcode
|
|
|
WHERE
|
|
|
c.cInvCCode NOT LIKE '19%'
|
|
|
- AND (a.cCode LIKE CONCAT(#{code},'%') and g.cMoCode LIKE CONCAT(#{code},'%')
|
|
|
+ AND (trim(a.cCode) LIKE CONCAT(#{code},'%') and trim(g.cMoCode) LIKE CONCAT(#{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
|
|
|
+ group by MODetailsID,cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cComUnitCode,cColor,cColorNumber,cWidth
|
|
|
|
|
|
- order by cVCName,cVenName,cInvCode,cInvName,cComUnitCode,cColor,cColorNumber
|
|
|
+ order by cVCName,cVenName,cInvCode,cInvName,cComUnitCode,cColor,cColorNumber,cWidth
|
|
|
|
|
|
|
|
|
</select>
|
|
@@ -103,9 +103,9 @@
|
|
|
inner join VendorClass e on d.cVCCode =e.cVCCode
|
|
|
WHERE
|
|
|
c.cInvCCode NOT LIKE '19%'
|
|
|
- AND (a.cCode LIKE CONCAT(#{code},'%') and a.cCode not like '%样%')
|
|
|
+ AND (trim(a.cCode) LIKE CONCAT(#{code},'%') and a.cCode not like '%样%')
|
|
|
and b.cInvCode+isnull(b.cFree1,'') in (
|
|
|
- select cInvCode+isnull(cFree1,'') from rdrecords32 where (cbatch like CONCAT(#{code},'%') and cbatch not like '%样%')
|
|
|
+ select cInvCode+isnull(cFree1,'') from rdrecords32 where (trim(cbatch) like CONCAT(#{code},'%') and cbatch not like '%样%')
|
|
|
)
|
|
|
|
|
|
</select>
|
|
@@ -126,12 +126,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 (d.cPOID like CONCAT(#{code},'%') and d.cPOID not like '%样%')
|
|
|
+ where (trim(d.cPOID) like CONCAT(#{code},'%') and d.cPOID not like '%样%')
|
|
|
</select>
|
|
|
|
|
|
<select id="getExpensesList" resultType="org.jeecg.modules.report.entity.FabricExpenses">
|
|
|
select * from VIEW_FabricLoss_Expenses
|
|
|
- where cSOCode like CONCAT(#{code},'%') and cSOCode not like '%样%'
|
|
|
+ where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
|
|
|
</select>
|
|
|
|
|
|
<select id="getOmInvoiceMoneyYfList" resultType="org.jeecg.modules.report.entity.FabricCostInvoice">
|
|
@@ -141,7 +141,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 (e.cdefine2 like CONCAT(#{code},'%') and e.cdefine2 not like '%样%')
|
|
|
+ where (trim(e.cdefine2) like CONCAT(#{code},'%') and e.cdefine2 not like '%样%')
|
|
|
and d.cInvCode='N3000002426'
|
|
|
and g.cVCName not like '成衣厂'
|
|
|
group by g.cVCName,f.cVenName ,f.cVenAbbName
|
|
@@ -155,7 +155,7 @@
|
|
|
select cPBVCode,cVenName,cVenAbbName,cShipTime,isnull(sum(iSum),0) as iSum,
|
|
|
isnull(sum(iOriSum),0) as iOriSum,isnull(sum(iQuantity),0) as iQuantity,
|
|
|
isnull(sum(iPBVQuantity),0) as iPBVQuantity,isnull(sum(iSQuantity),0) as iSQuantity
|
|
|
- from VIEW_FabricLoss_Cost_Clothes where cCode like CONCAT(#{code},'%') and cCode not like '%样%'
|
|
|
+ from VIEW_FabricLoss_Cost_Clothes where trim(cCode) like CONCAT(#{code},'%') and cCode not like '%样%'
|
|
|
group by
|
|
|
cPBVCode,cVenName,cVenAbbName,cShipTime
|
|
|
order by cPBVCode,cVenName,cVenAbbName,cShipTime
|
|
@@ -163,7 +163,7 @@
|
|
|
|
|
|
<select id="getCostAssistList" resultType="org.jeecg.modules.report.entity.FabricCostAssist">
|
|
|
|
|
|
- select * from VIEW_FabricLoss_Cost_Assist where cPoid like CONCAT(#{code},'%') and cPoid not like '%样%'
|
|
|
+ select * from VIEW_FabricLoss_Cost_Assist where trim(cPoid) like CONCAT(#{code},'%') and cPoid not like '%样%'
|
|
|
and cVenAbbName not in ('宁波森语','马菲羊','森语集团') and iquantityinvoice>0
|
|
|
order by cAccount,cPoid,cVenAbbName,cInvName,cComUnitName
|
|
|
</select>
|
|
@@ -171,7 +171,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 cSOCode like CONCAT(#{code},'%') and cSOCode not like '%样%'
|
|
|
+ from VIEW_FabricLoss_Cost_Cloth where trim(cSOCode) like CONCAT(#{code},'%') and cSOCode not like '%样%'
|
|
|
group by cVenName,cSOCode,cSBVCode,cShipTime,cInvName,iPrice
|
|
|
order by cVenName,cSBVCode,cInvName
|
|
|
</select>
|
|
@@ -183,12 +183,12 @@
|
|
|
(
|
|
|
select cInvCode,isnull(cFree1,'') as cColor,comcode as cCode,isnull(iSQuantity,iquantity) as iQuantity,iUnitCost as iPrice
|
|
|
from rdrecords11 where
|
|
|
- comcode not like CONCAT(#{code},'%') and comcode not like '%样%'
|
|
|
+ trim(comcode) not like CONCAT(#{code},'%') and comcode not like '%样%'
|
|
|
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 d.cPOID like CONCAT(#{code},'%') and d.cPOID not like '%样%'
|
|
|
+ where trim(d.cPOID) like CONCAT(#{code},'%') and d.cPOID not like '%样%'
|
|
|
)
|
|
|
or cInvCode+isnull(cFree1,'')+isnull(cbatch,'') in (
|
|
|
select cInvCode2+isnull(cColor2,'')+isnull(cAVBatch2,'') from VIEW_FabricLoss_AssemVouchs where
|
|
@@ -196,7 +196,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 d.cPOID like CONCAT(#{code},'%') and d.cPOID not like '%样%'
|
|
|
+ where trim(d.cPOID) like CONCAT(#{code},'%') and d.cPOID not like '%样%'
|
|
|
)
|
|
|
)
|
|
|
)
|
|
@@ -230,7 +230,7 @@
|
|
|
inner join VendorClass d on d.cVCCode =c.cVCCode
|
|
|
WHERE
|
|
|
y.cInvCCode NOT LIKE '19%'
|
|
|
- AND a.cCode LIKE CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
+ AND trim(a.cCode) LIKE CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
) as t1 group by cPlanCode,cCode,MODetailsID,cVCName,cVenName,cVenAbbName,cInvCCode,cInvCName,cInvCode,cInvName,cColor,cBatch,dDate
|
|
|
|
|
|
</select>
|
|
@@ -254,7 +254,7 @@
|
|
|
inner join Vendor x on x.cVenCode=a.cVenCode
|
|
|
WHERE
|
|
|
c.cInvCCode NOT LIKE '19%'
|
|
|
- AND a.cCode LIKE CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
+ AND trim(a.cCode) LIKE CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
) union all (
|
|
|
select b.MODetailsID,
|
|
|
g.cInvCode as cInvCodeOut,z.cInvName as cInvNameOut,isnull(g.cColor,'') as cColorOut,
|
|
@@ -273,7 +273,7 @@
|
|
|
inner join Vendor x on x.cVenCode=a.cVenCode
|
|
|
WHERE
|
|
|
c.cInvCCode NOT LIKE '19%'
|
|
|
- AND a.cCode LIKE CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
+ AND trim(a.cCode) LIKE CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
)) as t1
|
|
|
group by MODetailsID,cInvCodeOut,cInvNameOut,cColorOut,cBatchOut,cInvCCodeOut,cInvCNameOut,cOmCode,cOmVenAbbName
|
|
|
</select>
|
|
@@ -296,7 +296,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 a.cCode like CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
+ and trim(a.cCode) like CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
</select>
|
|
|
|
|
|
<select id="getPurchaseStockList" resultType="org.jeecg.modules.report.entity.FabricPoOrderOut">
|
|
@@ -310,7 +310,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 o.cPOID like CONCAT(#{code},'%') and o.cPOID not like '%样%'
|
|
|
+ where trim(o.cPOID) like CONCAT(#{code},'%') and o.cPOID not like '%样%'
|
|
|
and (q.cInvCCode LIKE '01%'
|
|
|
or q.cInvCCode LIKE '02%'
|
|
|
or q.cInvCCode LIKE '03%'
|
|
@@ -335,7 +335,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 ah.cDefine2 like CONCAT(#{code},'%') and ah.cDefine2 not like '%样%'
|
|
|
+ and inv.cInvName='事故单' and trim(ah.cDefine2) like CONCAT(#{code},'%') and ah.cDefine2 not like '%样%'
|
|
|
group by ah.cPBVMemo,ah.cPBVCode,VEN.cVenAbbName
|
|
|
|
|
|
</select>
|
|
@@ -434,12 +434,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
|
|
|
- (comcode not like CONCAT(#{code},'%') or comcode like '%样%')
|
|
|
+ (trim(comcode) not like CONCAT(#{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 f.cCode like CONCAT(#{code},'%') and f.cCode not like '%样%'
|
|
|
+ where trim(f.cCode) like CONCAT(#{code},'%') and f.cCode not like '%样%'
|
|
|
)
|
|
|
or cInvCode+isnull(cFree1,'')+isnull(cbatch,'') in (
|
|
|
select cInvCode2+isnull(cColor2,'')+isnull(cAVBatch2,'') from VIEW_FabricLoss_AssemVouchs where
|
|
@@ -447,7 +447,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 f.cCode like CONCAT(#{code},'%') and f.cCode not like '%样%'
|
|
|
+ where trim(f.cCode) like CONCAT(#{code},'%') and f.cCode not like '%样%'
|
|
|
)
|
|
|
)
|
|
|
)
|
|
@@ -466,7 +466,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 o.cCode like CONCAT(#{code},'%') and o.cCode not like '%样%'
|
|
|
+ where trim(o.cCode) like CONCAT(#{code},'%') and o.cCode not like '%样%'
|
|
|
)
|
|
|
</select>
|
|
|
|
|
@@ -477,7 +477,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 a.cCode like CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
+ and trim(a.cCode) like CONCAT(#{code},'%') and a.cCode not like '%样%'
|
|
|
)
|
|
|
)
|
|
|
</select>
|
|
@@ -590,7 +590,7 @@
|
|
|
|
|
|
<select id="getOmOutList19" resultType="org.jeecg.modules.report.entity.FabricMoOrderCK">
|
|
|
|
|
|
- select * from VIEW_OM_OUT_19 where cOmCode like CONCAT(#{code},'%') and cOmCode not like '%样%'
|
|
|
+ select * from VIEW_OM_OUT_19 where trim(cOmCode) like CONCAT(#{code},'%') and cOmCode not like '%样%'
|
|
|
|
|
|
</select>
|
|
|
|
|
@@ -636,9 +636,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 a.ccode like CONCAT(#{code},'%') and a.ccode not like '%样%' and
|
|
|
+ where trim(a.ccode) like CONCAT(#{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 e.cSOCode like CONCAT(#{code},'%')
|
|
|
+ ) or trim(e.cSOCode) like CONCAT(#{code},'%')
|
|
|
) as t1 where cInvCCode like '01%' or cInvCCode like '02%' or cInvCCode like '03%' or cInvCCode like '04%'
|
|
|
</select>
|
|
|
|
|
@@ -649,7 +649,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 a.cPOID like CONCAT(#{code},'%') and a.cPOID not like '%样%'
|
|
|
+ and trim(a.cPOID) like CONCAT(#{code},'%') and a.cPOID not like '%样%'
|
|
|
)
|
|
|
)
|
|
|
</select>
|