fenghaifu пре 3 година
родитељ
комит
a192f88224
40 измењених фајлова са 314 додато и 30 уклоњено
  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. 7 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricCostAssist.java
  4. 37 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricCostAssistDetail.java
  5. 53 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricCostCloth.java
  6. 36 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricCostClothDetail.java
  7. 36 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricCostClothesDetail.java
  8. 2 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricLoss.java
  9. 6 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricOMOrder.java
  10. 3 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/mapper/FabricLossMapper.java
  11. 35 14
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/mapper/xml/FabricLossMapper.xml
  12. 59 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/service/impl/FabricLossServiceImpl.java
  13. BIN
      jeecg-boot-module-system/target/boot-dev.jar
  14. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.class
  15. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/orderData/entity/SyOrderDataItem.class
  16. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/orderData/entity/SyOrderDataVO.class
  17. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/orderData/service/impl/SyOrderDataServiceImpl.class
  18. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/controller/SyShippingDetailsController.class
  19. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/entity/VO/OrderDataVo.class
  20. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/openApi/mapper/DxpDataPlanMapper.class
  21. 3 0
      jeecg-boot-module-system/target/classes/org/jeecg/modules/openApi/mapper/xml/DxpDataPlanMapper.xml
  22. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/openApi/service/IDxpDataPlanService.class
  23. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/openApi/service/impl/DxpDataPlanServiceImpl.class
  24. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/openApi/service/impl/PurchaseWarehousingServiceImpl.class
  25. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricCostAssist.class
  26. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricCostAssistDetail.class
  27. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricCostCloth.class
  28. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricCostClothDetail.class
  29. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricCostClothesDetail.class
  30. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricLoss.class
  31. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricOMOrder.class
  32. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/mapper/FabricLossMapper.class
  33. 35 14
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/mapper/xml/FabricLossMapper.xml
  34. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/service/impl/FabricLossServiceImpl.class
  35. 2 0
      jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/mapper/xml/SyPreAssembledPackingListItemMapper.xml
  36. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/controller/SyPackingListTailoringController.class
  37. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/entity/SyPackingListTailoring.class
  38. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/entity/SyPackingListTailoringItem.class
  39. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/service/impl/SyPackingListTailoringServiceImpl.class
  40. 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


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

@@ -6,6 +6,8 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import java.util.List;
+
 /**
  * @author fenghaifu
  * @version V1.0
@@ -48,10 +50,15 @@ public class FabricCostAssist {
 	//发票数量
 	@ApiModelProperty(value = "发票数量")
 	private  Double iQuantityInvoice;
+	//结算数量
+	@ApiModelProperty(value = "结算数量")
+	private  Double iQuantitySettle;
 	//本币金额
 	@ApiModelProperty(value = "本币金额")
 	private  Double iSum;
 	//原币金额
 	@ApiModelProperty(value = "原币金额")
 	private  Double iOriSum;
+
+	List<FabricCostAssistDetail> fabricCostAssistDetailList;
 }

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

@@ -0,0 +1,37 @@
+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:FabricCostAssistDetail
+ * @projectName jeecg-boot-parent
+ * @Description:面料损耗 - 开票成本 - 辅料 - 详情
+ * @date: 2022-08-29 17:47
+ * @updatehistory: 2022-08-29 17:47 新增
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="面料损耗-开票成本 - 辅料 - 详情", description="面料损耗-开票成本 - 辅料 - 详情")
+public class FabricCostAssistDetail {
+	//开票数量
+	@ApiModelProperty(value = "开票数量")
+	private  Double iQuantityInvoice;
+	//未开票数量
+	@ApiModelProperty(value = "未开票数量")
+	private  Double iQuantityInvoiceN;
+	//结算数量
+	@ApiModelProperty(value = "结算数量")
+	private  Double iQuantitySettle;
+	//未结算数量
+	@ApiModelProperty(value = "未结算数量")
+	private  Double iQuantitySettleN;
+
+}

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

@@ -0,0 +1,53 @@
+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;
+
+import java.util.List;
+
+/**
+ * @author fenghaifu
+ * @version V1.0
+ * @Copyright: 上海萃颠信息科技有限公司. All rights reserved.
+ * @Title:FabricCostCloth
+ * @projectName jeecg-boot-parent
+ * @Description:面料损耗 - 开票成本 - 面料
+ * @date: 2022-08-29 16:33
+ * @updatehistory: 2022-08-29 16:33 新增
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="面料损耗-开票成本 - 面料", description="面料损耗-开票成本 - 面料")
+public class FabricCostCloth {
+	//销售订单号
+	@ApiModelProperty(value = "销售订单号")
+	private  String cSOCode;
+	//供应商名称
+	@ApiModelProperty(value = "供应商名称")
+	private  String cVenName;
+	//发票号码
+	@ApiModelProperty(value = "发票号码")
+	private  String cSBVCode;
+	//出运日期
+	@ApiModelProperty(value = "出运日期")
+	private  String cShipTime;
+	//存货名称
+	@ApiModelProperty(value = "存货名称")
+	private  String cInvName;
+	//数量
+	@ApiModelProperty(value = "数量")
+	private  Double iQuantity;
+	//本币含税单价
+	@ApiModelProperty(value = "本币含税单价")
+	private  Double iPrice;
+	//本币价税合计
+	@ApiModelProperty(value = "本币价税合计")
+	private  Double iNatSum;
+
+	// 点击详情
+	List<FabricCostClothDetail> fabricCostClothDetailList;
+}

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

@@ -0,0 +1,36 @@
+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:FabricCostClothDetail
+ * @projectName jeecg-boot-parent
+ * @Description:面料损耗 - 开票成本 - 面料 - 详情
+ * @date: 2022-08-29 18:36
+ * @updatehistory: 2022-08-29 18:36 新增
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="面料损耗-开票成本 - 面料 - 详情", description="面料损耗-开票成本 - 面料 - 详情")
+public class FabricCostClothDetail {
+	//存货名称
+	@ApiModelProperty(value = "存货名称")
+	private  String cInvName;
+	//数量
+	@ApiModelProperty(value = "数量")
+	private  Double iQuantity;
+	//本币含税单价
+	@ApiModelProperty(value = "本币含税单价")
+	private  Double iPrice;
+	//本币价税合计
+	@ApiModelProperty(value = "本币价税合计")
+	private  Double iNatSum;
+}

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

@@ -0,0 +1,36 @@
+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:FabricCostClothesDetail
+ * @projectName jeecg-boot-parent
+ * @Description:面料损耗 - 开票成本 - 成衣 - 详情
+ * @date: 2022-08-29 18:34
+ * @updatehistory: 2022-08-29 18:34 新增
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="面料损耗-开票成本 - 详情", description="面料损耗-开票成本 - 详情")
+public class FabricCostClothesDetail {
+	//发票号码
+	@ApiModelProperty(value = "发票号码")
+	private  String cPBVCode;
+	//供应商名称
+	@ApiModelProperty(value = "供应商名称")
+	private  String cVenName;
+	//供应商缩写
+	@ApiModelProperty(value = "供应商缩写")
+	private  String cVenAbbName;
+	//入库数量
+	@ApiModelProperty(value = "入库数量")
+	private  Double iQuantity;
+}

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

@@ -57,6 +57,7 @@ public class FabricLoss {
     List<FabricCostClothes> fabricCostClothesList;
     // 开票成本-辅料
     List<FabricCostAssist> fabricCostAssistList;
-
+    // 开票成本-面料
+    List<FabricCostCloth> fabricCostClothList;
 
 }

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

@@ -30,10 +30,16 @@ public class FabricOMOrder {
     private  String cInvCode;
     @ApiModelProperty(value = "物料名称")
     private String cInvName;
+    @ApiModelProperty(value = "计量单位编码 02(PCS)根,04(M)米")
+    private  String cComUnitCode;
     @ApiModelProperty(value = "颜色")
     private  String cColor;
     @ApiModelProperty(value = "委外订单数量")
     private  Double iQuantity;
+    @ApiModelProperty(value = "委外订单数量根")
+    private  Double iQuantityPCS;
+    @ApiModelProperty(value = "委外订单数量米")
+    private  Double iQuantityM;
     @ApiModelProperty(value = "多发少发")
     private  Double iQuantityMoreLess;
     @ApiModelProperty(value = "损耗")

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

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

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

@@ -74,6 +74,10 @@
 		inner join Inventory c on b.cInvCode=c.cInvCode
 		inner join Vendor  d on a.cVenCode=d.cVenCode
 		where a.cPOID like CONCAT(#{code},'%')
+		and (c.cInvCCode LIKE '01%'
+		or c.cInvCCode LIKE '02%'
+		or c.cInvCCode LIKE '03%'
+		or c.cInvCCode LIKE '04%')
 		) as t1 group by cVenName,cVenAbbName,cInvCode,cInvName,cColor,cBatch
 	</select>
 	<!-- 其他入库纱,找委外订单的材料出库单,获取物料号+批号,物料号+批号再其他入库单 -->
@@ -88,7 +92,10 @@
 			INNER JOIN om_momain c ON c.moid = b.moid
 			INNER JOIN Inventory d ON b.cinvcode = d.cinvcode
 		WHERE
-			d.cInvCCode NOT LIKE '19%'
+			(d.cInvCCode LIKE '01%'
+			or d.cInvCCode LIKE '02%'
+			or d.cInvCCode LIKE '03%'
+			or d.cInvCCode LIKE '04%')
 			AND c.cCode LIKE CONCAT(#{code},'%')
 			AND a.cInvCode + isnull( a.cFree1, '' ) + isnull( a.cBatch, '' ) IN (
 		SELECT
@@ -117,7 +124,10 @@
 			INNER JOIN OM_MODetails b ON a.moid = b.moid
 			INNER JOIN Inventory c ON b.cinvcode = c.cinvcode
 		WHERE
-			c.cInvCCode NOT LIKE '19%'
+			(c.cInvCCode LIKE '01%'
+			or c.cInvCCode LIKE '02%'
+			or c.cInvCCode LIKE '03%'
+			or c.cInvCCode LIKE '04%')
 			AND a.cCode LIKE CONCAT(#{code},'%')
 			)
 			AND cInvCode + isnull( cBatch, '' ) IN ( SELECT cinvcode + isnull( cavbatch, '' ) FROM AssemVouchs WHERE bavtype = '转换后' )
@@ -147,7 +157,10 @@
 				INNER JOIN OM_MODetails b ON a.moid = b.moid
 				INNER JOIN Inventory c ON b.cinvcode = c.cinvcode
 			WHERE
-				c.cInvCCode NOT LIKE '19%'
+				(c.cInvCCode LIKE '01%'
+				or c.cInvCCode LIKE '02%'
+				or c.cInvCCode LIKE '03%'
+				or c.cInvCCode LIKE '04%')
 				AND a.cCode LIKE CONCAT(#{code},'%')
 				)
 				AND cInvCode + isnull( cBatch, '' ) NOT IN ( SELECT cinvcode + isnull( cavbatch, '' ) FROM AssemVouchs WHERE bavtype = '转换后' )
@@ -157,15 +170,15 @@
 				)
 		)
 	</select>
-	<!--获取所有委外订单-->
+	<!--获取所有委外订单 cComUnitCode : 计量单位,02(PCS)根,04(M)米-->
 	<select id="getOmOrderListAll" resultType="org.jeecg.modules.report.entity.FabricOMOrder">
-		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,cColor,
+		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,cComUnitCode,cColor,
 			isnull(sum(iQuantityOut),0) as iQuantityOut,
 			isnull(sum(iQuantity),0) as iQuantity,
 			isnull(sum(iQuantityIn),0) as iQuantityIn
 		from
 		(
-			SELECT e.cVCName,d.cVenName ,d.cVenAbbName ,a.cVenCode ,c.cInvCode,c.cInvName,b.cFree1 as cColor,
+			SELECT e.cVCName,d.cVenName ,d.cVenAbbName ,a.cVenCode ,c.cInvCode,c.cInvName,c.cComUnitCode,b.cFree1 as cColor,
 				(select sum(iQuantity) from rdrecords11 x where x.iOMoDID=b.MODetailsID) as iQuantityOut,
 				(select sum(iQuantity) from RdRecords01 x where x.iOMoDID=b.MODetailsID) as iQuantityIn,
 				b.iQuantity,b.MODetailsID
@@ -179,19 +192,19 @@
 				c.cInvCCode NOT LIKE '19%'
 				AND a.cCode LIKE CONCAT(#{code},'%')
 
-		) as t1 group by cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cColor
-		order by cVCName,cVenName,cInvCode,cInvName,cColor
+		) as t1 group by cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cComUnitCode,cColor
+		order by cVCName,cVenName,cInvCode,cInvName,cComUnitCode,cColor
 
 	</select>
-	<!--获取销售出库委外订单:物料+颜色在销售出库表中-->
+	<!--获取销售出库委外订单:物料+颜色在销售出库表中,cComUnitCode : 计量单位,02(PCS)根,04(M)米-->
 	<select id="getOmOrderListGw" resultType="org.jeecg.modules.report.entity.FabricOMOrder">
-		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,cColor,
+		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,cComUnitCode,cColor,
 			isnull(sum(iQuantityOut),0) as iQuantityOut,
 			isnull(sum(iQuantity),0) as iQuantity,
 			isnull(sum(iQuantityIn),0) as iQuantityIn
 		from
 		(
-			SELECT e.cVCName,d.cVenName ,d.cVenAbbName ,a.cVenCode ,c.cInvCode,c.cInvName,b.cFree1 as cColor,
+			SELECT e.cVCName,d.cVenName ,d.cVenAbbName ,a.cVenCode ,c.cInvCode,c.cInvName,c.cComUnitCode,b.cFree1 as cColor,
 				(select sum(iQuantity) from rdrecords11 x where x.iOMoDID=b.MODetailsID) as iQuantityOut,
 				(select sum(iQuantity) from RdRecords01 x where x.iOMoDID=b.MODetailsID) as iQuantityIn,
 				b.iQuantity,b.MODetailsID
@@ -207,8 +220,8 @@
 				and b.cInvCode+isnull(b.cFree1,'') in (
 				select cInvCode+isnull(cFree1,'') from rdrecords32 where cbatch like CONCAT(#{code},'%')
 				)
-		) as t1 group by cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cColor
-		order by cVCName,cVenName,cInvCode,cInvName,cColor
+		) as t1 group by cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cComUnitCode,cColor
+		order by cVCName,cVenName,cInvCode,cInvName,cComUnitCode,cColor
 
 	</select>
 	<!--获取委外材料出库单,已核销的取核销数量-->
@@ -269,7 +282,7 @@
 		inner join Vendor  d on a.cVenCode=d.cVenCode
 		inner join VendorClass e on d.cVCCode =e.cVCCode
 		inner join RdRecords01 c on c.iposid=b.id
-		where a.cPOID like CONCAT(#{code},'%')
+		where a.cPOID like CONCAT(#{code},'%') and e.cVCName not like '成衣厂'
 	</select>
 	<!--获取委外订单发票金额-->
 	<select id="getOmInvoiceMoneyList" resultType="org.jeecg.modules.report.entity.FabricCostInvoice">
@@ -303,4 +316,12 @@
 		select * from VIEW_FabricLoss_Cost_Assist where cPoid like CONCAT(#{code},'%')
 		order by cAccount,cPoid,cVenAbbName,cInvName,cComUnitName
 	</select>
+	<!--开票成本-面料-->
+	<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
+		 from VIEW_FabricLoss_Cost_Cloth where cSOCode like CONCAT(#{code},'%')
+		 group by cVenName,cSOCode,cSBVCode,cShipTime,cInvName,iPrice
+		order by cVenName,cSBVCode,cInvName
+	</select>
 </mapper>

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

@@ -37,6 +37,7 @@ import org.springframework.transaction.annotation.Transactional;
 import javax.annotation.Resource;
 import java.math.BigDecimal;
 import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
@@ -188,7 +189,8 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
 			if (fabricPoOrderTempList.size()>0){
 				FabricPoOrder fabricPoOrderFirst = fabricPoOrderTempList.get(0);
 				for (int i=1; i<fabricPoOrderTempList.size(); i++){
-					fabricPoOrderFirst.setIQuantityIn(fabricPoOrderFirst.getIQuantityIn()+fabricPoOrderTempList.get(i).getIQuantityIn());
+					BigDecimal bdVal = new BigDecimal(fabricPoOrderFirst.getIQuantityIn()+fabricPoOrderTempList.get(i).getIQuantityIn());
+					fabricPoOrderFirst.setIQuantityIn(bdVal.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue());
 				}
 				fabricPoOrderList.add(fabricPoOrderFirst);
 			}
@@ -205,6 +207,12 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
 				if (fabricOMOrder.getIQuantityOut()!=0) {
 					dLoss = (1 - fabricOMOrder.getIQuantityIn() / fabricOMOrder.getIQuantityOut()) * 100;
 				}
+
+				if ("02".equals(fabricOMOrder.getCComUnitCode())){  // 根
+					fabricOMOrder.setIQuantityPCS(fabricOMOrder.getIQuantity());
+				}else if ("04".equals(fabricOMOrder.getCComUnitCode())){    // 米
+					fabricOMOrder.setIQuantityM(fabricOMOrder.getIQuantity());
+				}
 				BigDecimal bDLoss = new BigDecimal(dLoss);
 				fabricOMOrder.setCQuantityLoss(bDLoss.setScale(2, BigDecimal.ROUND_HALF_UP).toString()+"%");
 				double dMoreLess = fabricOMOrder.getIQuantityIn()-fabricOMOrder.getIQuantity();
@@ -269,7 +277,57 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
 			}
 			//开票成本 - 辅料
 			List<FabricCostAssist> fabricCostAssistList = fabricLossMapper.getCostAssistList(code);
+			for (FabricCostAssist fabricCostAssist : fabricCostAssistList){
+				List<FabricCostAssistDetail> fabricCostAssistDetailList = new ArrayList<>();
+				FabricCostAssistDetail fabricCostAssistDetail = new FabricCostAssistDetail();
+				fabricCostAssistDetail.setIQuantityInvoice(fabricCostAssist.getIQuantityInvoice());
+				BigDecimal bdValue = new BigDecimal(fabricCostAssist.getIQuantityIn()-fabricCostAssist.getIQuantityInvoice());
+				fabricCostAssistDetail.setIQuantityInvoiceN(bdValue.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue());
+				fabricCostAssistDetail.setIQuantitySettle(fabricCostAssist.getIQuantitySettle());
+				bdValue = new BigDecimal(fabricCostAssist.getIQuantityIn()-fabricCostAssist.getIQuantitySettle());
+				fabricCostAssistDetail.setIQuantitySettleN(bdValue.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue());
+				fabricCostAssistDetailList.add(fabricCostAssistDetail);
+				fabricCostAssist.setFabricCostAssistDetailList(fabricCostAssistDetailList);
+			}
 			ret.setFabricCostAssistList(fabricCostAssistList);
+			//开票成本 - 面料
+			List<FabricCostCloth> fabricCostClothList = fabricLossMapper.getCostClothList(code);
+			// 分组
+			List<FabricCostCloth> fabricCostClothGroupList = new ArrayList<>();
+			for (FabricCostCloth fabricCostCloth : fabricCostClothList){
+				FabricCostCloth fabricCostClothGroup = new FabricCostCloth();
+				Optional<FabricCostCloth> findObject = fabricCostClothGroupList.stream().filter(e->e.getCVenName().equals(fabricCostCloth.getCVenName()) &&
+						e.getCSBVCode().equals(fabricCostCloth.getCSBVCode()) &&
+						e.getCShipTime().equals(fabricCostCloth.getCShipTime())).findFirst();
+				if (findObject.isPresent()){
+					fabricCostClothGroup = findObject.get();
+					fabricCostClothGroup.setINatSum(fabricCostClothGroup.getINatSum()+fabricCostCloth.getINatSum());
+				}else{
+					fabricCostClothGroup.setFabricCostClothDetailList(new ArrayList<>());
+					fabricCostClothGroup.setCVenName(fabricCostCloth.getCVenName());
+					fabricCostClothGroup.setCSBVCode(fabricCostCloth.getCSBVCode());
+					fabricCostClothGroup.setCShipTime(fabricCostCloth.getCShipTime());
+					fabricCostClothGroup.setINatSum(fabricCostCloth.getINatSum());
+					fabricCostClothGroupList.add(fabricCostClothGroup);
+				}
+				FabricCostClothDetail fabricCostClothDetail = new FabricCostClothDetail();
+				fabricCostClothDetail.setCInvName(fabricCostCloth.getCInvName());
+				fabricCostClothDetail.setIQuantity(fabricCostCloth.getIQuantity());
+				fabricCostClothDetail.setIPrice(fabricCostCloth.getIPrice());
+				fabricCostClothDetail.setINatSum(fabricCostCloth.getINatSum());
+
+				fabricCostClothGroup.getFabricCostClothDetailList().add(fabricCostClothDetail);
+
+			}
+			// 设置时间
+			for (FabricCostCloth fabricCostCloth : fabricCostClothGroupList){
+				if (fabricCostCloth.getCShipTime() != null && fabricCostCloth.getCShipTime().length()>10){
+					fabricCostCloth.setCShipTime(fabricCostCloth.getCShipTime().substring(0, 10));
+				}
+				BigDecimal bdValue = new BigDecimal(fabricCostCloth.getINatSum());
+				fabricCostCloth.setINatSum(bdValue.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
+			}
+			ret.setFabricCostClothList(fabricCostClothGroupList);
 
 			return  ret;
 		}

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


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/orderData/entity/SyOrderDataItem.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/orderData/entity/SyOrderDataVO.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/orderData/service/impl/SyOrderDataServiceImpl.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/openApi/mapper/DxpDataPlanMapper.class


+ 3 - 0
jeecg-boot-module-system/target/classes/org/jeecg/modules/openApi/mapper/xml/DxpDataPlanMapper.xml

@@ -7,4 +7,7 @@
         update dxp_data_plan set last_time = #{time} where code = #{code}
     </update>
 
+    <update id="updateLastTime2">
+        update dxp_data_plan set last_time = #{time} where code = #{code}
+    </update>
 </mapper>

BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/openApi/service/IDxpDataPlanService.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/openApi/service/impl/DxpDataPlanServiceImpl.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/openApi/service/impl/PurchaseWarehousingServiceImpl.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/FabricCostAssistDetail.class


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


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


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricCostClothesDetail.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/entity/FabricOMOrder.class


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


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

@@ -74,6 +74,10 @@
 		inner join Inventory c on b.cInvCode=c.cInvCode
 		inner join Vendor  d on a.cVenCode=d.cVenCode
 		where a.cPOID like CONCAT(#{code},'%')
+		and (c.cInvCCode LIKE '01%'
+		or c.cInvCCode LIKE '02%'
+		or c.cInvCCode LIKE '03%'
+		or c.cInvCCode LIKE '04%')
 		) as t1 group by cVenName,cVenAbbName,cInvCode,cInvName,cColor,cBatch
 	</select>
 	<!-- 其他入库纱,找委外订单的材料出库单,获取物料号+批号,物料号+批号再其他入库单 -->
@@ -88,7 +92,10 @@
 			INNER JOIN om_momain c ON c.moid = b.moid
 			INNER JOIN Inventory d ON b.cinvcode = d.cinvcode
 		WHERE
-			d.cInvCCode NOT LIKE '19%'
+			(d.cInvCCode LIKE '01%'
+			or d.cInvCCode LIKE '02%'
+			or d.cInvCCode LIKE '03%'
+			or d.cInvCCode LIKE '04%')
 			AND c.cCode LIKE CONCAT(#{code},'%')
 			AND a.cInvCode + isnull( a.cFree1, '' ) + isnull( a.cBatch, '' ) IN (
 		SELECT
@@ -117,7 +124,10 @@
 			INNER JOIN OM_MODetails b ON a.moid = b.moid
 			INNER JOIN Inventory c ON b.cinvcode = c.cinvcode
 		WHERE
-			c.cInvCCode NOT LIKE '19%'
+			(c.cInvCCode LIKE '01%'
+			or c.cInvCCode LIKE '02%'
+			or c.cInvCCode LIKE '03%'
+			or c.cInvCCode LIKE '04%')
 			AND a.cCode LIKE CONCAT(#{code},'%')
 			)
 			AND cInvCode + isnull( cBatch, '' ) IN ( SELECT cinvcode + isnull( cavbatch, '' ) FROM AssemVouchs WHERE bavtype = '转换后' )
@@ -147,7 +157,10 @@
 				INNER JOIN OM_MODetails b ON a.moid = b.moid
 				INNER JOIN Inventory c ON b.cinvcode = c.cinvcode
 			WHERE
-				c.cInvCCode NOT LIKE '19%'
+				(c.cInvCCode LIKE '01%'
+				or c.cInvCCode LIKE '02%'
+				or c.cInvCCode LIKE '03%'
+				or c.cInvCCode LIKE '04%')
 				AND a.cCode LIKE CONCAT(#{code},'%')
 				)
 				AND cInvCode + isnull( cBatch, '' ) NOT IN ( SELECT cinvcode + isnull( cavbatch, '' ) FROM AssemVouchs WHERE bavtype = '转换后' )
@@ -157,15 +170,15 @@
 				)
 		)
 	</select>
-	<!--获取所有委外订单-->
+	<!--获取所有委外订单 cComUnitCode : 计量单位,02(PCS)根,04(M)米-->
 	<select id="getOmOrderListAll" resultType="org.jeecg.modules.report.entity.FabricOMOrder">
-		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,cColor,
+		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,cComUnitCode,cColor,
 			isnull(sum(iQuantityOut),0) as iQuantityOut,
 			isnull(sum(iQuantity),0) as iQuantity,
 			isnull(sum(iQuantityIn),0) as iQuantityIn
 		from
 		(
-			SELECT e.cVCName,d.cVenName ,d.cVenAbbName ,a.cVenCode ,c.cInvCode,c.cInvName,b.cFree1 as cColor,
+			SELECT e.cVCName,d.cVenName ,d.cVenAbbName ,a.cVenCode ,c.cInvCode,c.cInvName,c.cComUnitCode,b.cFree1 as cColor,
 				(select sum(iQuantity) from rdrecords11 x where x.iOMoDID=b.MODetailsID) as iQuantityOut,
 				(select sum(iQuantity) from RdRecords01 x where x.iOMoDID=b.MODetailsID) as iQuantityIn,
 				b.iQuantity,b.MODetailsID
@@ -179,19 +192,19 @@
 				c.cInvCCode NOT LIKE '19%'
 				AND a.cCode LIKE CONCAT(#{code},'%')
 
-		) as t1 group by cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cColor
-		order by cVCName,cVenName,cInvCode,cInvName,cColor
+		) as t1 group by cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cComUnitCode,cColor
+		order by cVCName,cVenName,cInvCode,cInvName,cComUnitCode,cColor
 
 	</select>
-	<!--获取销售出库委外订单:物料+颜色在销售出库表中-->
+	<!--获取销售出库委外订单:物料+颜色在销售出库表中,cComUnitCode : 计量单位,02(PCS)根,04(M)米-->
 	<select id="getOmOrderListGw" resultType="org.jeecg.modules.report.entity.FabricOMOrder">
-		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,cColor,
+		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,cComUnitCode,cColor,
 			isnull(sum(iQuantityOut),0) as iQuantityOut,
 			isnull(sum(iQuantity),0) as iQuantity,
 			isnull(sum(iQuantityIn),0) as iQuantityIn
 		from
 		(
-			SELECT e.cVCName,d.cVenName ,d.cVenAbbName ,a.cVenCode ,c.cInvCode,c.cInvName,b.cFree1 as cColor,
+			SELECT e.cVCName,d.cVenName ,d.cVenAbbName ,a.cVenCode ,c.cInvCode,c.cInvName,c.cComUnitCode,b.cFree1 as cColor,
 				(select sum(iQuantity) from rdrecords11 x where x.iOMoDID=b.MODetailsID) as iQuantityOut,
 				(select sum(iQuantity) from RdRecords01 x where x.iOMoDID=b.MODetailsID) as iQuantityIn,
 				b.iQuantity,b.MODetailsID
@@ -207,8 +220,8 @@
 				and b.cInvCode+isnull(b.cFree1,'') in (
 				select cInvCode+isnull(cFree1,'') from rdrecords32 where cbatch like CONCAT(#{code},'%')
 				)
-		) as t1 group by cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cColor
-		order by cVCName,cVenName,cInvCode,cInvName,cColor
+		) as t1 group by cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cComUnitCode,cColor
+		order by cVCName,cVenName,cInvCode,cInvName,cComUnitCode,cColor
 
 	</select>
 	<!--获取委外材料出库单,已核销的取核销数量-->
@@ -269,7 +282,7 @@
 		inner join Vendor  d on a.cVenCode=d.cVenCode
 		inner join VendorClass e on d.cVCCode =e.cVCCode
 		inner join RdRecords01 c on c.iposid=b.id
-		where a.cPOID like CONCAT(#{code},'%')
+		where a.cPOID like CONCAT(#{code},'%') and e.cVCName not like '成衣厂'
 	</select>
 	<!--获取委外订单发票金额-->
 	<select id="getOmInvoiceMoneyList" resultType="org.jeecg.modules.report.entity.FabricCostInvoice">
@@ -303,4 +316,12 @@
 		select * from VIEW_FabricLoss_Cost_Assist where cPoid like CONCAT(#{code},'%')
 		order by cAccount,cPoid,cVenAbbName,cInvName,cComUnitName
 	</select>
+	<!--开票成本-面料-->
+	<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
+		 from VIEW_FabricLoss_Cost_Cloth where cSOCode like CONCAT(#{code},'%')
+		 group by cVenName,cSOCode,cSBVCode,cShipTime,cInvName,iPrice
+		order by cVenName,cSBVCode,cInvName
+	</select>
 </mapper>

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


+ 2 - 0
jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/mapper/xml/SyPreAssembledPackingListItemMapper.xml

@@ -15,6 +15,7 @@
 			sy_pre_assembled_packing_list_id,
 			sy_declaration_elements_id,
 			sy_order_data_id,
+			item_Code,
 			ac_set_no,
 			garment_factory,
 			hod,
@@ -76,6 +77,7 @@
 		 	sy_shipping_details_item.sy_order_data_id sy_order_data_id,/*订单数据主表id s*/
 		 	sy_shipping_details_item.sy_order_data_item_id sy_order_data_item_id,/*订单数据子表id s*/
             sy_shipping_details_item.pre_delivery_date hod, /*预发货日期 m*/
+			sy_shipping_details_item.pack_Id as item_Code,/*item_code*/
           	sy_shipping_details_item.small_Po poNo, /*pono 发育明细子表订单号 sxx*/
           	sy_shipping_details_item.small_Po small_Po, /*小po*/
 		 	sy_shipping_details_item.account acSetNo,/*单据号 s*/

BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/controller/SyPackingListTailoringController.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/entity/SyPackingListTailoring.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/entity/SyPackingListTailoringItem.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/service/impl/SyPackingListTailoringServiceImpl.class


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