Browse Source

成本报表 辅料面料备注 辅料供应商

liuchaohui 2 years ago
parent
commit
8e5e50721f

+ 3 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationFabric.java

@@ -110,4 +110,7 @@ public class SyCostAllocationFabric implements Serializable {
     @Excel(name = "加工单位", width = 15)
     @ApiModelProperty(value = "加工单位")
     private String processUnit;
+
+    //备注
+    private String remarks;
 }

+ 6 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationIngredient.java

@@ -122,4 +122,10 @@ public class SyCostAllocationIngredient implements Serializable {
     @Excel(name = "加工单位", width = 15)
     @ApiModelProperty(value = "加工单位")
     private String processUnit;
+
+    //备注
+    private String remarks;
+
+    //供应商
+    private String supper;
 }

+ 5 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationIngredientMapper.xml

@@ -30,10 +30,11 @@
 		from 
 		(
 				select oti.cInvName as goodsName,max(ot.iUnitQuantity) as dosage,sum(ot.iSendQTY) as usageQuantity 
-				 ,sum(pb.rmbAmount) as rmbAmount,sum(pb.usdAmount) as usdAmount,sum(pb.priceExcludingtax) as priceExcludingtax,max(pb.iCost) as cost
+				 ,sum(pb.rmbAmount) as rmbAmount,sum(pb.usdAmount) as usdAmount,sum(pb.priceExcludingtax) as priceExcludingtax,max(pb.iCost) as cost,max(v.cVenAbbName) as supper
 				from UFDATA_103_2021.dbo.om_momain om
 				join UFDATA_103_2021.dbo.OM_MODetails od on om.moid=od.moid
 				join UFDATA_103_2021.dbo.OM_MOMaterials ot on ot.MoDetailsID=od.MODetailsID
+				JOIN UFDATA_103_2021.dbo.Vendor v ON om.cVenCode= v.cVenCode
 				join UFDATA_103_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 				join UFDATA_103_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
 				left join (
@@ -92,11 +93,12 @@
 				else (isnull(tab2.jian,0)-isnull(tab1.purchaseQuantity,0))*tab.cost end as transferCost
 		from
 		(
-				select oti.cInvName as goodsName,max(ot.iUnitQuantity) as dosage,sum(ot.iSendQTY) as usageQuantity 
-				 ,sum(pb.rmbAmount) as rmbAmount,sum(pb.usdAmount) as usdAmount,sum(pb.priceExcludingtax) as priceExcludingtax,max(pb.iCost) as cost
+				select oti.cInvName as goodsName,max(ot.iUnitQuantity) as dosage,sum(ot.iSendQTY) as usageQuantity
+				 ,sum(pb.rmbAmount) as rmbAmount,sum(pb.usdAmount) as usdAmount,sum(pb.priceExcludingtax) as priceExcludingtax,max(pb.iCost) as cost,max(v.cVenAbbName) as supper
 				from UFDATA_101_2021.dbo.om_momain om
 				join UFDATA_101_2021.dbo.OM_MODetails od on om.moid=od.moid
 				join UFDATA_101_2021.dbo.OM_MOMaterials ot on ot.MoDetailsID=od.MODetailsID
+				JOIN UFDATA_101_2021.dbo.Vendor v ON om.cVenCode= v.cVenCode
 				join UFDATA_101_2021.dbo.Inventory oti on oti.cInvCode=ot.cInvCode
 				join UFDATA_101_2021.dbo.Inventory omi on omi.cInvCode=od.cInvCode
 				left join (