|
@@ -85,7 +85,7 @@
|
|
|
|
|
|
SELECT
|
|
|
'其他入库的纱' as cInvName,
|
|
|
- isnull(sum(a.iQuantity),0) as iQuantityIn
|
|
|
+ isnull(sum(a.iQuantity),0) as iQuantityOut
|
|
|
FROM
|
|
|
rdrecords11 a
|
|
|
INNER JOIN OM_MODetails b ON a.iOMoDID = b.MODetailsID
|
|
@@ -112,7 +112,7 @@
|
|
|
<select id="getPurchaseListOtherPurInList" resultType="org.jeecg.modules.report.entity.FabricPoOrder">
|
|
|
(
|
|
|
SELECT
|
|
|
- '来源余纱' as cInvName,isnull(sum(h.iQuantity),0) as iQuantityIn
|
|
|
+ '来源余纱' as cInvName,isnull(sum(h.iQuantity),0) as iQuantityOut
|
|
|
FROM
|
|
|
rdrecords11 h
|
|
|
WHERE
|
|
@@ -233,7 +233,7 @@
|
|
|
b.cInvName,
|
|
|
isnull( a.cFree1, '' ) AS cColor,
|
|
|
b.cInvCode,
|
|
|
- isnull( ( SELECT sum( iMSQuantity ) FROM OM_MatSettleVouchs WHERE OM_MatSettleVouchs.irdsid = a.AutoID ), a.iQuantity ) AS iQuantity,
|
|
|
+ isnull( a.iSQuantity, a.iQuantity ) AS iQuantity,
|
|
|
a.autoid,
|
|
|
a.iPrice
|
|
|
FROM
|
|
@@ -288,7 +288,7 @@
|
|
|
|
|
|
<select id="getOmInvoiceMoneyList" resultType="org.jeecg.modules.report.entity.FabricCostInvoice">
|
|
|
|
|
|
- select g.cVCName,f.cVenName ,f.cVenAbbName,sum(c.iSum) as iMoney
|
|
|
+ select g.cVCName,f.cVenName ,f.cVenAbbName,isnull(sum(c.iSum),0) as iMoney
|
|
|
from RdRecord01 a
|
|
|
inner join RdRecords01 b on a.id=b.id
|
|
|
inner join PurBillVouchs c on c.RdsId=b.autoid
|
|
@@ -298,14 +298,16 @@
|
|
|
inner join VendorClass g on g.cVCCode =f.cVCCode
|
|
|
where a.cbustype='委外加工'
|
|
|
and e.cCode like CONCAT(#{code},'%')
|
|
|
+ and g.cVCName not like '成衣厂'
|
|
|
group by g.cVCName,f.cVenName ,f.cVenAbbName
|
|
|
order by g.cVCName,f.cVenName ,f.cVenAbbName
|
|
|
</select>
|
|
|
|
|
|
<select id="getCostClothesList" resultType="org.jeecg.modules.report.entity.FabricCostClothes">
|
|
|
|
|
|
- select cPBVCode,cVenName,cVenAbbName,cShipTime,sum(iSum) as iSum,sum(iOriSum) as iOriSum,
|
|
|
- sum(iQuantity) as iQuantity,sum(iPBVQuantity) as iPBVQuantity,sum(iSQuantity) as iSQuantity
|
|
|
+ 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},'%')
|
|
|
group by
|
|
|
cPBVCode,cVenName,cVenAbbName,cShipTime
|
|
@@ -320,7 +322,7 @@
|
|
|
|
|
|
<select id="getCostClothList" resultType="org.jeecg.modules.report.entity.FabricCostCloth">
|
|
|
|
|
|
- select cVenName,cSOCode,cSBVCode,cShipTime,cInvName,iPrice,sum(iQuantity) as iQuantity,sum(iNatSum) as iNatSum
|
|
|
+ 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},'%')
|
|
|
group by cVenName,cSOCode,cSBVCode,cShipTime,cInvName,iPrice
|
|
|
order by cVenName,cSBVCode,cInvName
|