|
@@ -144,149 +144,43 @@
|
|
|
|
|
|
<select id="excel001" resultType="org.jeecg.modules.scas.entity.vo.SupplierCapacityVo1">
|
|
|
--部门 供应商 月份 数量 累计入库数量 能耗(能耗相加的汇总)--汇合
|
|
|
- /* select
|
|
|
- p.cDepCode,
|
|
|
- p.cVenCode,
|
|
|
- p.arriveMonth,
|
|
|
- sum(p.iQuantity) iQuantity,
|
|
|
- sum(p.iReceivedQTY) iReceivedQTY,
|
|
|
- sum(p.coefficient) coefficient
|
|
|
- from (
|
|
|
- select cDepname cDepCode,
|
|
|
- cVenName cVenCode,
|
|
|
- month(dArriveDate) arriveMonth,
|
|
|
- iQuantity iQuantity,
|
|
|
- iReceivedQTY iReceivedQTY,
|
|
|
- cast(isnull(cInvDefine1,'0') as decimal) coefficient
|
|
|
- from PO_Pomain
|
|
|
- left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
|
|
|
- left join Department on Department.cdepcode=PO_Pomain.cDepCode
|
|
|
- left join Person on Person.cPersonCode=PO_Pomain.cPersonCode
|
|
|
- left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
|
|
|
- left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
|
|
|
- left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
|
|
|
- --order by cDepCode,cVenCode,arriveMonth
|
|
|
- union all
|
|
|
- select cDepname cDepCode,
|
|
|
- cVenName cVenCode,
|
|
|
- month(dArriveDate) arriveMonth,
|
|
|
- iQuantity,
|
|
|
- iReceivedQTY,
|
|
|
- cast(isnull(cInvDefine1,'0') as decimal) coefficient
|
|
|
- from OM_MOMain
|
|
|
- left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
|
|
|
- left join Department on Department.cdepcode=OM_MOMain.cDepCode
|
|
|
- left join Person on Person.cPersonCode=OM_MOMain.cPersonCode
|
|
|
- left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
|
|
|
- left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
|
|
|
- left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
|
|
|
- --order by cDepCode,cVenCode,arriveMonth
|
|
|
- )p
|
|
|
- group by p.cDepCode,p.cVenCode,p.arriveMonth
|
|
|
- order by p.cDepCode,p.cVenCode,p.arriveMonth*/
|
|
|
select
|
|
|
- p.cDepCode,
|
|
|
- p.cVenCode,
|
|
|
- p.dArriveDate,
|
|
|
- sum(p.iQuantity) iQuantity,
|
|
|
- sum(p.iReceivedQTY) iReceivedQTY,
|
|
|
- sum(p.coefficient*p.iQuantity) coefficient
|
|
|
- from Supplier_Capacity_Test p
|
|
|
- ${ew.customSqlSegment}
|
|
|
- group by p.cDepCode,p.cVenCode,p.dArriveDate
|
|
|
- order by p.cDepCode,p.cVenCode,p.dArriveDate
|
|
|
+ p.cDepCode,
|
|
|
+ p.cVenCode,
|
|
|
+ p.dArriveDate,
|
|
|
+ ideporder,
|
|
|
+ sum(p.iQuantity) iQuantity,
|
|
|
+ sum(p.iReceivedQTY) iReceivedQTY,
|
|
|
+ sum(p.coefficient*p.iQuantity) coefficient
|
|
|
+ from Supplier_Capacity_Test p
|
|
|
+ left join Department
|
|
|
+ on p.cDepCode=cdepname
|
|
|
+ ${ew.customSqlSegment}
|
|
|
+ group by p.cDepCode,p.dArriveDate,ideporder, p.cVenCode
|
|
|
+ order by ideporder,p.dArriveDate
|
|
|
</select>
|
|
|
|
|
|
<select id="excel002" resultType="org.jeecg.modules.scas.entity.vo.SupplierCapacityVo2">
|
|
|
+ --部门 月份 数量 累计入库数量 能耗(能耗相加的汇总)
|
|
|
+ select
|
|
|
+ p.cDepCode,
|
|
|
+ p.dArriveDate,
|
|
|
+ ideporder,
|
|
|
+ sum(p.iQuantity) iQuantity,
|
|
|
+ sum(p.iReceivedQTY) iReceivedQTY,
|
|
|
+ sum(p.coefficient*p.iQuantity) coefficient
|
|
|
+ from Supplier_Capacity_Test p
|
|
|
+ left join Department
|
|
|
+ on p.cDepCode=cdepname
|
|
|
+ ${ew.customSqlSegment}
|
|
|
+ group by p.cDepCode,p.dArriveDate,ideporder
|
|
|
+ order by ideporder,p.dArriveDate
|
|
|
|
|
|
- --部门 月份 数量 累计入库数量 能耗(能耗相加的汇总)
|
|
|
- /* select p.cDepCode,
|
|
|
- p.arriveMonth,
|
|
|
- sum(p.iQuantity) iQuantity,
|
|
|
- sum(p.iReceivedQTY) iReceivedQTY,
|
|
|
- sum(p.coefficient) coefficient
|
|
|
- from(
|
|
|
- select
|
|
|
- cDepname cDepCode,
|
|
|
- month(dArriveDate) arriveMonth,
|
|
|
- iQuantity,
|
|
|
- iReceivedQTY,
|
|
|
- cast(isnull(cInvDefine1,'0') as decimal) coefficient
|
|
|
- from PO_Pomain
|
|
|
- left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
|
|
|
- left join Department on Department.cdepcode=PO_Pomain.cDepCode
|
|
|
- left join Person on Person.cPersonCode=PO_Pomain.cPersonCode
|
|
|
- left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
|
|
|
- left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
|
|
|
- left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
|
|
|
- union all
|
|
|
- select
|
|
|
- cDepname cDepCode,
|
|
|
- month(dArriveDate) arriveMonth,
|
|
|
- iQuantity,
|
|
|
- iReceivedQTY,
|
|
|
- cast(isnull(cInvDefine1,'0') as decimal) coefficient
|
|
|
- from OM_MOMain
|
|
|
- left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
|
|
|
- left join Department on Department.cdepcode=OM_MOMain.cDepCode
|
|
|
- left join Person on Person.cPersonCode=OM_MOMain.cPersonCode
|
|
|
- left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
|
|
|
- left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
|
|
|
- left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
|
|
|
- )p
|
|
|
- group by p.cDepCode,p.arriveMonth
|
|
|
- order by p.cDepCode,p.arriveMonth*/
|
|
|
- select
|
|
|
- p.cDepCode,
|
|
|
- p.dArriveDate,
|
|
|
- sum(p.iQuantity) iQuantity,
|
|
|
- sum(p.iReceivedQTY) iReceivedQTY,
|
|
|
- sum(p.coefficient*p.iQuantity) coefficient
|
|
|
- from Supplier_Capacity_Test p
|
|
|
- ${ew.customSqlSegment}
|
|
|
- group by p.cDepCode,p.dArriveDate
|
|
|
- order by p.cDepCode,p.dArriveDate
|
|
|
</select>
|
|
|
|
|
|
|
|
|
<select id="excel003" resultType="org.jeecg.modules.scas.entity.vo.SupplierCapacityVo3">
|
|
|
--供应商 月份 数量 累计入库数量 能耗(能耗相加的汇总)
|
|
|
- /*select
|
|
|
- p.cVenCode,
|
|
|
- p.arriveMonth,
|
|
|
- sum(p.iQuantity) iQuantity,
|
|
|
- sum(p.iReceivedQTY) iReceivedQTY,
|
|
|
- sum(p.coefficient) coefficient
|
|
|
- from(
|
|
|
- select ROW_NUMBER() OVER(ORDER BY cVenName) index1,
|
|
|
- cVenName cVenCode,
|
|
|
- month(dArriveDate) arriveMonth,
|
|
|
- iQuantity iQuantity,
|
|
|
- iReceivedQTY iReceivedQTY,
|
|
|
- cast(isnull(cInvDefine1,'0') as decimal) coefficient
|
|
|
- from PO_Pomain
|
|
|
- left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
|
|
|
- left join Department on Department.cdepcode=PO_Pomain.cDepCode
|
|
|
- left join Person on Person.cPersonCode=PO_Pomain.cPersonCode
|
|
|
- left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
|
|
|
- left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
|
|
|
- left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
|
|
|
- union all
|
|
|
- select ROW_NUMBER() OVER(ORDER BY cVenName) index1,
|
|
|
- cVenName cVenCode,
|
|
|
- month(dArriveDate) arriveMonth,
|
|
|
- iQuantity iQuantity,
|
|
|
- iReceivedQTY iReceivedQTY,
|
|
|
- cast(isnull(cInvDefine1,'0') as decimal) coefficient
|
|
|
- from OM_MOMain
|
|
|
- left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
|
|
|
- left join Department on Department.cdepcode=OM_MOMain.cDepCode
|
|
|
- left join Person on Person.cPersonCode=OM_MOMain.cPersonCode
|
|
|
- left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
|
|
|
- left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
|
|
|
- left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
|
|
|
- )p group by p.cVenCode,p.arriveMonth
|
|
|
- order by p.cVenCode,p.arriveMonth*/
|
|
|
select
|
|
|
p.cVenCode,
|
|
|
p.dArriveDate,
|
|
@@ -294,7 +188,7 @@
|
|
|
sum(p.iReceivedQTY) iReceivedQTY,
|
|
|
sum(p.coefficient*p.iQuantity) coefficient
|
|
|
from Supplier_Capacity_Test p
|
|
|
- ${ew.customSqlSegment}
|
|
|
+ ${ew.customSqlSegment}
|
|
|
group by p.cVenCode,p.dArriveDate
|
|
|
order by p.cVenCode,p.dArriveDate
|
|
|
</select>
|