fenghaifu 2 лет назад
Родитель
Сommit
6b527a22e2
24 измененных файлов с 114 добавлено и 19 удалено
  1. BIN
      jeecg-boot-base/jeecg-boot-base-core/target/jeecg-boot-base-core-3.1.0.jar
  2. BIN
      jeecg-boot-module-demo/target/jeecg-boot-module-demo-3.1.0.jar
  3. 57 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricCostAssist.java
  4. 7 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricCostClothes.java
  5. 2 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricLoss.java
  6. 3 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/mapper/FabricLossMapper.java
  7. 12 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/mapper/xml/FabricLossMapper.xml
  8. 16 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/service/impl/FabricLossServiceImpl.java
  9. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.class
  10. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/controller/SyShippingDetailsController.class
  11. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/entity/VO/OrderDataVo.class
  12. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/entity/VO/SyShippingDetailsVo.class
  13. 3 3
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/mapper/xml/SyShippingDetailsMapper.xml
  14. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/entity/SyShippingOrderItem.class
  15. 2 2
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/mapper/xml/SyShippingOrderMapper.xml
  16. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/service/impl/SyShippingOrderServiceImpl.class
  17. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricCostAssist.class
  18. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricCostClothes.class
  19. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricLoss.class
  20. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/mapper/FabricLossMapper.class
  21. 12 6
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/mapper/xml/FabricLossMapper.xml
  22. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/service/impl/FabricLossServiceImpl.class
  23. BIN
      jeecg-boot-module-system/target/jeecg-boot-module-system-3.1.0.jar
  24. BIN
      jeecg-boot-module-system/target/jeecg-boot-module-system-3.1.0.jar.original

BIN
jeecg-boot-base/jeecg-boot-base-core/target/jeecg-boot-base-core-3.1.0.jar


BIN
jeecg-boot-module-demo/target/jeecg-boot-module-demo-3.1.0.jar


+ 57 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricCostAssist.java

@@ -0,0 +1,57 @@
+package org.jeecg.modules.report.entity;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @author fenghaifu
+ * @version V1.0
+ * @Copyright: 上海萃颠信息科技有限公司. All rights reserved.
+ * @Title:FabricCostAssist
+ * @projectName jeecg-boot-parent
+ * @Description:面料损耗 - 开票成本 - 辅料
+ * @date: 2022-08-25 21:17
+ * @updatehistory: 2022-08-25 21:17 新增
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="面料损耗-开票成本 - 辅料", description="面料损耗-开票成本 - 辅料")
+public class FabricCostAssist {
+	//账套号
+	@ApiModelProperty(value = "账套号")
+	private  String cAccount;
+	//采购订单号
+	@ApiModelProperty(value = "采购订单号")
+	private  String cPoid;
+	//供应商名称
+	@ApiModelProperty(value = "供应商名称")
+	private  String cVenName;
+	//供应商缩写
+	@ApiModelProperty(value = "供应商缩写")
+	private  String cVenAbbName;
+	//存货名称
+	@ApiModelProperty(value = "存货名称")
+	private  String cInvName;
+	//计量单位
+	@ApiModelProperty(value = "计量单位")
+	private  String cComUnitName;
+	//采购数量
+	@ApiModelProperty(value = "采购数量")
+	private  Double iQuantity;
+	//入库数量
+	@ApiModelProperty(value = "入库数量")
+	private  Double iQuantityIn;
+	//发票数量
+	@ApiModelProperty(value = "发票数量")
+	private  Double iQuantityInvoice;
+	//本币金额
+	@ApiModelProperty(value = "本币金额")
+	private  Double iSum;
+	//原币金额
+	@ApiModelProperty(value = "原币金额")
+	private  Double iOriSum;
+}

+ 7 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricCostClothes.java

@@ -42,4 +42,11 @@ public class FabricCostClothes {
 	//本币金额
 	@ApiModelProperty(value = "本币金额")
 	private  Double iSum;
+	//原币金额
+	@ApiModelProperty(value = "原币金额")
+	private  Double iOriSum;
+
+	// 出运日期
+	@ApiModelProperty(value = "出运日期")
+	private  String cShipTime;
 }

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricLoss.java

@@ -55,6 +55,8 @@ public class FabricLoss {
     List<FabricCostInvoice> fabricCostInvoiceList;
     // 开票成本-成衣
     List<FabricCostClothes> fabricCostClothesList;
+    // 开票成本-辅料
+    List<FabricCostAssist> fabricCostAssistList;
 
 
 }

+ 3 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/mapper/FabricLossMapper.java

@@ -91,4 +91,7 @@ public interface FabricLossMapper extends BaseMapper<FabricLoss> {
 	// 开票成本-成衣
 	@DS("multi-three")
 	List<FabricCostClothes> getCostClothesList(@Param("code")String code);
+	// 开票成本-辅料
+	@DS("multi-three")
+	List<FabricCostAssist> getCostAssistList(@Param("code")String code);
 }

+ 12 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/mapper/xml/FabricLossMapper.xml

@@ -64,7 +64,7 @@
 	<!--获取采购订单,物料名为物料名+颜色-->
 	<select id="getPurchaseList" resultType="org.jeecg.modules.report.entity.FabricPoOrder">
 		select cVenName,cVenAbbName,cInvCode,cInvName,cColor,cBatch,sum(iQuantity) as iQuantity,
-		sum(iQuantityIn) as iQuantityIn
+		isnull(sum(iQuantityIn),0) as iQuantityIn
 		 from (
 		select a.cPOID ,d.cVenName,d.cVenAbbName ,c.cInvCode,c.cInvName + ' ' + isnull(b.cFree1,'') as cInvName,isnull(b.cFree1,'') as cColor,b.iQuantity,
 		(select sum(iquantity) from RdRecords01 x where x.iposid=b.id) as iQuantityIn,
@@ -249,8 +249,8 @@
 	<select id="getPurchaseInList" resultType="org.jeecg.modules.report.entity.FabricPoOrderIn">
 		select a.cCode,a.cBusType,b.cInvCode,b.cFree1 as cColor,b.iQuantity,
 		isnull((select sum(iPBVQuantity ) from PurBillVouchs x where x.RdsId =b.autoid),0) as iQuantityInvoice,
-		(select sum(iSum)/sum(iPBVQuantity ) from PurBillVouchs  x where x.RdsId =b.autoid) as iPrice,
-		(select sum(iSVQuantity) from PurSettleVouchs  x where x.iRdsID=b.autoid) as iQuantitySettle
+		isnull((select sum(iSum)/sum(iPBVQuantity ) from PurBillVouchs  x where x.RdsId =b.autoid),0) as iPrice,
+		isnull((select sum(iSVQuantity) from PurSettleVouchs  x where x.iRdsID=b.autoid),0) as iQuantitySettle
 		from RdRecord01 a inner join RdRecords01 b on a.id=b.id
 		inner join PO_Podetails c on  b.iposid=c.id
 		inner join PO_Pomain d on d.poid=c.poid
@@ -290,11 +290,17 @@
 	<!--开票成本-成衣-->
 	<select id="getCostClothesList" resultType="org.jeecg.modules.report.entity.FabricCostClothes">
 
-		select cPBVCode,cVenName,cVenAbbName,sum(iSum) as iSum,
+		select cPBVCode,cVenName,cVenAbbName,cShipTime,sum(iSum) as iSum,sum(iOriSum) as iOriSum,
 		sum(iQuantity) as iQuantity,sum(iPBVQuantity) as iPBVQuantity
 		from VIEW_FabricLoss_Cost_Clothes where cCode like CONCAT(#{code},'%')
 		group by
-		cPBVCode,cVenName,cVenAbbName
-		order by cPBVCode,cVenName,cVenAbbName
+		cPBVCode,cVenName,cVenAbbName,cShipTime
+		order by cPBVCode,cVenName,cVenAbbName,cShipTime
+	</select>
+	<!--开票成本-辅料-->
+	<select id="getCostAssistList" resultType="org.jeecg.modules.report.entity.FabricCostAssist">
+
+		select * from VIEW_FabricLoss_Cost_Assist where cPoid like CONCAT(#{code},'%')
+		order by cAccount,cPoid,cVenAbbName,cInvName,cComUnitName
 	</select>
 </mapper>

+ 16 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/service/impl/FabricLossServiceImpl.java

@@ -169,7 +169,10 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
 				BigDecimal bLeftSum = new BigDecimal(leftSum);
 				leftSum = bLeftSum.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
 				fabricPoOrder.setIQuantityLeft(leftSum);
-				double leftRate = leftSum/fabricPoOrder.getIQuantityIn();
+				double leftRate = 0;
+				if (fabricPoOrder.getIQuantityIn() != 0) {
+					leftRate = leftSum / fabricPoOrder.getIQuantityIn();
+				}
 				BigDecimal bLeftRate = new BigDecimal(leftRate);
 				leftRate = bLeftRate.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
 				fabricPoOrder.setIQuantityLeftRate(leftRate);
@@ -198,7 +201,10 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
 			// 委外订单所有
 			List<FabricOMOrder> fabricOMOrderList1 = fabricLossMapper.getOmOrderListAll(code);
 			for (FabricOMOrder fabricOMOrder : fabricOMOrderList1){
-				double dLoss = (1-fabricOMOrder.getIQuantityIn()/fabricOMOrder.getIQuantityOut())*100;
+				double dLoss = 0;
+				if (fabricOMOrder.getIQuantityOut()!=0) {
+					dLoss = (1 - fabricOMOrder.getIQuantityIn() / fabricOMOrder.getIQuantityOut()) * 100;
+				}
 				BigDecimal bDLoss = new BigDecimal(dLoss);
 				fabricOMOrder.setCQuantityLoss(bDLoss.setScale(2, BigDecimal.ROUND_HALF_UP).toString()+"%");
 				double dMoreLess = fabricOMOrder.getIQuantityIn()-fabricOMOrder.getIQuantity();
@@ -256,6 +262,14 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
 			//开票成本 - 成衣
 			List<FabricCostClothes> fabricCostClothesList = fabricLossMapper.getCostClothesList(code);
 			ret.setFabricCostClothesList(fabricCostClothesList);
+			for (FabricCostClothes fabricCostClothes : fabricCostClothesList){
+				if (fabricCostClothes.getCShipTime() != null && fabricCostClothes.getCShipTime().length()>10){
+					fabricCostClothes.setCShipTime(fabricCostClothes.getCShipTime().substring(0, 10));
+				}
+			}
+			//开票成本 - 辅料
+			List<FabricCostAssist> fabricCostAssistList = fabricLossMapper.getCostAssistList(code);
+			ret.setFabricCostAssistList(fabricCostAssistList);
 
 			return  ret;
 		}

BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/controller/SyShippingDetailsController.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/entity/VO/OrderDataVo.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/entity/VO/SyShippingDetailsVo.class


+ 3 - 3
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/mapper/xml/SyShippingDetailsMapper.xml

@@ -62,7 +62,7 @@
     b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,b.end_customer as endCustomer,
     b.order_remarks as orderRemarks,b.price_remarks as priceRemarks,b.order_change_description as orderChangeDescription,b.pre_completion_date as preCompletionDate,
     b.sales_type_text as salesTypeText,b.customer_name as customerName,b.exchange_rate as exchangeRate,a.whole_order_total as wholeOrderTotal,
-    b.declaration_elements as declarationElements,b.number_of_sets as numberOfSets,a.chinese_name as chineseName,a.account as account,
+    b.declaration_elements as declarationElements,b.number_of_sets as numberOfSets,a.chinese_name as chineseName,a.account as account,b.supplier as supplier,
     a.english_product_name as englishProductName,b.garment_factory as garmentFactory,b.elements_id as elementsId from sy_shipping_details a
 left join sy_shipping_details_item b
 on a.id = b.shipping_details_id and b.del_flag = 0
@@ -87,7 +87,7 @@ ${ew.customSqlSegment}
     b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,b.end_customer as endCustomer,
     b.order_remarks as orderRemarks,b.price_remarks as priceRemarks,b.order_change_description as orderChangeDescription,b.pre_completion_date as preCompletionDate,
     b.sales_type_text as salesTypeText,b.customer_name as customerName,b.exchange_rate as exchangeRate,a.whole_order_total as wholeOrderTotal,
-    b.declaration_elements as declarationElements,b.number_of_sets as numberOfSets,a.chinese_name as chineseName,a.account as account,
+    b.declaration_elements as declarationElements,b.number_of_sets as numberOfSets,a.chinese_name as chineseName,a.account as account,b.supplier as supplier,
     a.english_product_name as englishProductName,b.garment_factory as garmentFactory,b.elements_id as elementsId from sy_shipping_details a
 left join sy_shipping_details_item b
 on a.id = b.shipping_details_id and b.del_flag = 0
@@ -138,7 +138,7 @@ ${ew.customSqlSegment}
          b.colour as colour,b.size as size,b.coding_rules as codingRules,b.quantity as quantity,a.business_type_value as businessTypeText,a.customer_order_number as customerOrderNumber,
            a.sales_type_text as salesTypeText,a.customer_abbreviation as customerAbbreviation,a.customer_name as customerName,b.surplus_num as surplusNum,DATE_FORMAT(b.pre_completion_date,'%Y-%m-%d') as preCompletionDate,
            a.brand_side as brandSide,a.exchange_rate as exchangeRate,b.specification_and_model as specificationAndModel,a.account as account,b.inventory_code as inventoryCode,
-           b.distribution_point as distributionPoint,b.pack_id as packId,b.unit_price_including_tax as unitPriceIncludingTax,
+           b.distribution_point as distributionPoint,b.pack_id as packId,b.unit_price_including_tax as unitPriceIncludingTax,b.number_of_sets as numberOfSets,
            b.supplier_code as supplierCode,a.garment_nmb as garmentNmb,a.garment_factory as garmentFactory,DATE_FORMAT(b.pre_delivery_date,'%Y-%m-%d') as preDeliveryDate,b.box_number as boxNumber,
            a.whole_order_total as wholeOrderTotal,a.sales_department as salesDepartment,a.salesman as salesman,a.currency_text as currencyText,a.third_party as thirdParty,
             a.deposit_ratio as depositRatio,a.deposit as deposit,a.collaborative_route as collaborativeRoute,a.term_of_payment as termOfPayment,a.end_customer as endCustomer,

BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/entity/SyShippingOrderItem.class


+ 2 - 2
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/mapper/xml/SyShippingOrderMapper.xml

@@ -19,7 +19,7 @@
 <!--    查询装箱单-成衣-->
   <select id="queryTailoring" resultType="org.jeecg.modules.documents.syShippingOrder.entity.VO.SyPackingList">
 
-    select a.id as id ,GROUP_CONCAT(b.id) as itemId, a.document_No as documentNo,a.depositary_receipt_no as depositaryReceiptNo,
+    select a.id as id ,GROUP_CONCAT(b.id) as itemId, a.document_No as documentNo,a.depositary_receipt_no as depositaryReceiptNo,b.elements_id as elementsId,
      a.item_number as itemNumber,b.inventory_name as inventoryName,b.distribution_point as distributionPoint,a.customer_abbreviation as customerAbbreviation,
      b.item_code as itemCode,b.starting_box_number as startingBoxNumber,b.end_case_number as endCaseNumber,b.hod as preDeliveryDate,b.small_Po as smallPo,
      b.colour as colour,b.pieces_box as piecesBox,b.box_number as boxNumber,b.total as total,b.outer_box_length as outerBoxLength,a.customer as customer,a.order_number as orderNumber,
@@ -42,7 +42,7 @@
     a.depositary_receipt_no as depositaryReceiptNo,b.order_Type as orderType,sum(b.gross_weight) as totalGrossWeight,sum(b.total_Price) as totalPrice,
      b.inventory_name as inventoryName,sum(b.inventory_quantity) as planQuantity,sum(b.net_weight) as totalNetWeight,a.container_Code as containerCode,
      b.inventory_Code as itemCode,a.memo as memo,a.container_number as containerNumber,
-     b.colour as colour,
+     b.colour as colour,b.elements_id as elementsId,
      '面料' as readyFabric
        from sy_packing_list_fabric a
     left join sy_packing_list_fabric_item b

BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/service/impl/SyShippingOrderServiceImpl.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricCostAssist.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricCostClothes.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricLoss.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/report/mapper/FabricLossMapper.class


+ 12 - 6
jeecg-boot-module-system/target/classes/org/jeecg/modules/report/mapper/xml/FabricLossMapper.xml

@@ -64,7 +64,7 @@
 	<!--获取采购订单,物料名为物料名+颜色-->
 	<select id="getPurchaseList" resultType="org.jeecg.modules.report.entity.FabricPoOrder">
 		select cVenName,cVenAbbName,cInvCode,cInvName,cColor,cBatch,sum(iQuantity) as iQuantity,
-		sum(iQuantityIn) as iQuantityIn
+		isnull(sum(iQuantityIn),0) as iQuantityIn
 		 from (
 		select a.cPOID ,d.cVenName,d.cVenAbbName ,c.cInvCode,c.cInvName + ' ' + isnull(b.cFree1,'') as cInvName,isnull(b.cFree1,'') as cColor,b.iQuantity,
 		(select sum(iquantity) from RdRecords01 x where x.iposid=b.id) as iQuantityIn,
@@ -249,8 +249,8 @@
 	<select id="getPurchaseInList" resultType="org.jeecg.modules.report.entity.FabricPoOrderIn">
 		select a.cCode,a.cBusType,b.cInvCode,b.cFree1 as cColor,b.iQuantity,
 		isnull((select sum(iPBVQuantity ) from PurBillVouchs x where x.RdsId =b.autoid),0) as iQuantityInvoice,
-		(select sum(iSum)/sum(iPBVQuantity ) from PurBillVouchs  x where x.RdsId =b.autoid) as iPrice,
-		(select sum(iSVQuantity) from PurSettleVouchs  x where x.iRdsID=b.autoid) as iQuantitySettle
+		isnull((select sum(iSum)/sum(iPBVQuantity ) from PurBillVouchs  x where x.RdsId =b.autoid),0) as iPrice,
+		isnull((select sum(iSVQuantity) from PurSettleVouchs  x where x.iRdsID=b.autoid),0) as iQuantitySettle
 		from RdRecord01 a inner join RdRecords01 b on a.id=b.id
 		inner join PO_Podetails c on  b.iposid=c.id
 		inner join PO_Pomain d on d.poid=c.poid
@@ -290,11 +290,17 @@
 	<!--开票成本-成衣-->
 	<select id="getCostClothesList" resultType="org.jeecg.modules.report.entity.FabricCostClothes">
 
-		select cPBVCode,cVenName,cVenAbbName,sum(iSum) as iSum,
+		select cPBVCode,cVenName,cVenAbbName,cShipTime,sum(iSum) as iSum,sum(iOriSum) as iOriSum,
 		sum(iQuantity) as iQuantity,sum(iPBVQuantity) as iPBVQuantity
 		from VIEW_FabricLoss_Cost_Clothes where cCode like CONCAT(#{code},'%')
 		group by
-		cPBVCode,cVenName,cVenAbbName
-		order by cPBVCode,cVenName,cVenAbbName
+		cPBVCode,cVenName,cVenAbbName,cShipTime
+		order by cPBVCode,cVenName,cVenAbbName,cShipTime
+	</select>
+	<!--开票成本-辅料-->
+	<select id="getCostAssistList" resultType="org.jeecg.modules.report.entity.FabricCostAssist">
+
+		select * from VIEW_FabricLoss_Cost_Assist where cPoid like CONCAT(#{code},'%')
+		order by cAccount,cPoid,cVenAbbName,cInvName,cComUnitName
 	</select>
 </mapper>

BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/report/service/impl/FabricLossServiceImpl.class


BIN
jeecg-boot-module-system/target/jeecg-boot-module-system-3.1.0.jar


BIN
jeecg-boot-module-system/target/jeecg-boot-module-system-3.1.0.jar.original