Browse Source

面料损耗表第二版

fenghaifu 3 years ago
parent
commit
5d4b0e4690
85 changed files with 849 additions and 178 deletions
  1. BIN
      jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/target/jeecg-system-local-api-3.1.0.jar
  2. BIN
      jeecg-boot-base/jeecg-boot-base-core/target/jeecg-boot-base-core-3.1.0.jar
  3. BIN
      jeecg-boot-base/jeecg-boot-base-tools/target/jeecg-boot-base-tools-3.1.0.jar
  4. BIN
      jeecg-boot-module-demo/target/jeecg-boot-module-demo-3.1.0.jar
  5. 45 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricCostInvoice.java
  6. 48 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricExpenses.java
  7. 4 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricLoss.java
  8. 6 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricOMOrder.java
  9. 10 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricPoOrder.java
  10. 54 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricPoOrderIn.java
  11. 23 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricPoOrderOut.java
  12. 25 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/mapper/FabricLossMapper.java
  13. 135 26
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/mapper/xml/FabricLossMapper.xml
  14. 122 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/service/impl/FabricLossServiceImpl.java
  15. 2 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/service/impl/FabricMoOrderServiceImpl.java
  16. 3 3
      jeecg-boot-module-system/src/main/resources/application-fhf.yml
  17. 3 3
      jeecg-boot-module-system/target/classes/application-fhf.yml
  18. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/cost/entity/SyCostAllocationCostpay.class
  19. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.class
  20. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/letterDeposit/controller/SyLetterDepositController.class
  21. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/letterDeposit/entity/SyLetterDeposit.class
  22. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/letterDeposit/entity/SyLetterDepositItem.class
  23. 6 5
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/letterDeposit/mapper/xml/SyLetterDepositMapper.xml
  24. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/letterDeposit/service/impl/SyLetterDepositServiceImpl.class
  25. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/orderData/entity/SyOrderData.class
  26. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/orderData/entity/SyOrderDataVO.class
  27. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/orderData/service/impl/SyGetOrderServiceImpl.class
  28. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/orderData/service/impl/SyOrderDataServiceImpl.class
  29. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/controller/SyShippingDetailsController.class
  30. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/entity/SyShippingDetailsItem.class
  31. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/entity/VO/OrderDataVo.class
  32. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/entity/VO/PushShippingDeialVo.class
  33. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/entity/VO/PushShippingVO.class
  34. 21 36
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/mapper/xml/SyShippingDetailsMapper.xml
  35. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/shippingDetails/service/impl/SyShippingDetailsServiceImpl.class
  36. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/controller/SyShippingOrderController.class
  37. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/entity/SyShippingOrderItem.class
  38. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/entity/VO/SyPackingList.class
  39. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/mapper/SyShippingOrderMapper.class
  40. 33 9
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/mapper/xml/SyShippingOrderMapper.xml
  41. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/service/impl/SyShippingOrderServiceImpl.class
  42. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/openApi/service/impl/PurchaseWarehousingServiceImpl.class
  43. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricCostInvoice.class
  44. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricExpenses.class
  45. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricLoss.class
  46. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricOMOrder.class
  47. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricPoOrder.class
  48. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricPoOrderIn.class
  49. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/entity/FabricPoOrderOut.class
  50. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/mapper/FabricLossMapper.class
  51. 136 27
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/mapper/xml/FabricLossMapper.xml
  52. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/service/impl/FabricLossServiceImpl.class
  53. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/report/service/impl/FabricMoOrderServiceImpl.class
  54. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/controller/SyPreAssembledPackingListController.class
  55. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/entity/SyPreAssembledPackingList.class
  56. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/entity/SyPreAssembledPackingListItem.class
  57. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/mapper/SyPreAssembledPackingListItemMapper.class
  58. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/mapper/SyPreAssembledPackingListMapper.class
  59. 2 2
      jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/mapper/xml/SyPreAssembledPackingListItemMapper.xml
  60. 10 5
      jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/mapper/xml/SyPreAssembledPackingListMapper.xml
  61. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/service/ISyPreAssembledPackingListItemService.class
  62. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/service/impl/SyPreAssembledPackingListItemServiceImpl.class
  63. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/service/impl/SyPreAssembledPackingListServiceImpl.class
  64. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/controller/SyPackingListFabricController.class
  65. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/entity/SyPackingListFabric.class
  66. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/entity/SyPackingListFabricItem.class
  67. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/mapper/SyPackingListFabricItemMapper.class
  68. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/mapper/SyPackingListFabricMapper.class
  69. 16 5
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/mapper/xml/SyPackingListFabricItemMapper.xml
  70. 11 8
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/mapper/xml/SyPackingListFabricMapper.xml
  71. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/service/ISyPackingListFabricService.class
  72. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/service/impl/SyPackingListFabricServiceImpl.class
  73. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/controller/SyPackingListTailoringController.class
  74. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/entity/SyPackingListTailoring.class
  75. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/entity/SyPackingListTailoringItem.class
  76. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/mapper/SyPackingListTailoringMapper.class
  77. 26 3
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/mapper/xml/syPackingListTailoringItemMapper.xml
  78. 108 24
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/mapper/xml/syPackingListTailoringMapper.xml
  79. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/service/ISyPackingListTailoringService.class
  80. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/service/impl/SyPackingListTailoringServiceImpl.class
  81. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/vo/SyPackingListTailoringVo.class
  82. BIN
      jeecg-boot-module-system/target/classes/org/jeecg/modules/system/util/InterfaceConnUtils.class
  83. BIN
      jeecg-boot-module-system/target/classes/static/paking.xlsx
  84. BIN
      jeecg-boot-module-system/target/jeecg-boot-module-system-3.1.0.jar
  85. BIN
      jeecg-boot-module-system/target/jeecg-boot-module-system-3.1.0.jar.original

BIN
jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/target/jeecg-system-local-api-3.1.0.jar


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


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


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


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

@@ -0,0 +1,45 @@
+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:FabricCostInvoice
+ * @projectName jeecg-boot-parent
+ * @Description:面料损耗 - 成本发票
+ * @date: 2022-08-23 19:04
+ * @updatehistory: 2022-08-23 19:04 新增
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="面料损耗-成本发票", description="面料损耗-成本发票")
+public class FabricCostInvoice {
+	//供应商分类
+	@ApiModelProperty(value = "供应商分类")
+	private  String cVCName;
+	//供应商名称
+	@ApiModelProperty(value = "供应商名称")
+	private  String cVenName;
+	//供应商缩写
+	@ApiModelProperty(value = "供应商缩写")
+	private  String cVenAbbName;
+	//单价
+	@ApiModelProperty(value = "单价")
+	private  Double iUnitCost;
+	//存货编码
+	@ApiModelProperty(value = "存货编码")
+	private  String cInvCode;
+	//颜色
+	@ApiModelProperty(value = "颜色")
+	private  String cColor;
+	//金额
+	@ApiModelProperty(value = "金额")
+	private  Double iMoney;
+}

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

@@ -0,0 +1,48 @@
+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:FabricExpenses
+ * @projectName jeecg-boot-parent
+ * @Description:面料损耗 - 费用支出
+ * @date: 2022-08-23 17:46
+ * @updatehistory: 2022-08-23 17:46 新增
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="面料损耗-费用支出", description="面料损耗-费用支出")
+public class FabricExpenses {
+	//账套号
+	@ApiModelProperty(value = "账套号")
+	private  String cAccount;
+	//订单号
+	@ApiModelProperty(value = "订单号")
+	private  String cSOCode;
+	//费用单号
+	@ApiModelProperty(value = "费用单号")
+	private  String cSPVCode;
+	//外销发票号
+	@ApiModelProperty(value = "外销发票号")
+	private  String cInvoinceNo;
+	//制单人
+	@ApiModelProperty(value = "制单人")
+	private  String cMaker;
+	//费用项目
+	@ApiModelProperty(value = "费用项目")
+	private  String cExpName;
+	//原币支出金额
+	@ApiModelProperty(value = "原币支出金额 ")
+	private Double iMoney;
+	//本币支出金额
+	@ApiModelProperty(value = "本币支出金额 ")
+	private Double INatMoney;
+}

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

@@ -49,6 +49,10 @@ public class FabricLoss {
     List<FabricOMOrder> fabricOMOrderList1;
     // 委外订单国外
     List<FabricOMOrder> fabricOMOrderList2;
+    // 费用支出
+    List<FabricExpenses> fabricExpensesList;
+    // 成本发票
+    List<FabricCostInvoice> fabricCostInvoiceList;
 
 
 

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

@@ -23,21 +23,21 @@ public class FabricOMOrder {
     @ApiModelProperty(value = "工厂缩写")
     private String cVenAbbName;
     @ApiModelProperty(value = "材料出库数量")
-    private  double iOutQuantity;
+    private  Double iQuantityOut;
     @ApiModelProperty(value = "采购入库数量")
-    private  double iQuantityRK;
+    private  Double iQuantityIn;
     @ApiModelProperty(value = "物料编码")
     private  String cInvCode;
     @ApiModelProperty(value = "物料名称")
     private String cInvName;
     @ApiModelProperty(value = "颜色")
-    private  String cfree1;
+    private  String cColor;
     @ApiModelProperty(value = "委外订单数量")
-    private  double iQuantity;
+    private  Double iQuantity;
     @ApiModelProperty(value = "多发少发")
-    private  String sum;
+    private  Double iQuantityMoreLess;
     @ApiModelProperty(value = "损耗")
-    private  String count;
+    private  String cQuantityLoss;
     @ApiModelProperty(value = "子表id")
     private  String iOMoDID;
     @ApiModelProperty(value = "单位类型(入库)")

+ 10 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/report/entity/FabricPoOrder.java

@@ -6,6 +6,8 @@ import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import java.util.List;
+
 //面料损耗-采购订单
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -32,7 +34,7 @@ public class FabricPoOrder {
     private  Double iQuantityIn;
     //分配数量
     @ApiModelProperty(value = "分配数量")
-    private  String iquantitys;
+    private  Double iQuantityOut;
     //采购供应商
     @ApiModelProperty(value = "采购供应商")
     private  String cVenName;
@@ -44,13 +46,16 @@ public class FabricPoOrder {
     private  String omcVenAbbName;
     //余纱
     @ApiModelProperty(value = "余纱")
-    private  String sum;
+    private  Double iQuantityLeft;
     //采购损耗
     @ApiModelProperty(value = "采购损耗")
-    private  String isum;
+    private  Double iQuantityLeftRate;
     //计划号
     @ApiModelProperty(value = "计划号")
     private  String code;
+    //颜色
+    @ApiModelProperty(value = "颜色")
+    private  String cColor;
     //存货自定义项1
     @ApiModelProperty(value = "存货自定义项1")
     private  String cfree1;
@@ -60,4 +65,6 @@ public class FabricPoOrder {
     //存货自定义项3
     @ApiModelProperty(value = "存货自定义项3")
     private  String cfree3;
+
+    List<FabricPoOrderIn> fabricPoOrderInList;
 }

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

@@ -0,0 +1,54 @@
+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:FabricPoOrderIn
+ * @projectName jeecg-boot-parent
+ * @Description:面料损耗-采购订单-入库
+ * @date: 2022-08-23 15:27
+ * @updatehistory: 2022-08-23 15:27 新增
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="面料损耗-采购订单-入库", description="面料损耗-采购订单-入库")
+public class FabricPoOrderIn {
+	//单据号-采购入库单号
+	@ApiModelProperty(value = "单据号")
+	private  String cCode;
+	//单据类型
+	@ApiModelProperty(value = "单据类型")
+	private  String cBusType;
+	//存货编码
+	@ApiModelProperty(value = "存货编码")
+	private  String cInvCode;
+	//颜色
+	@ApiModelProperty(value = "颜色")
+	private String cColor;
+	//入库数量
+	@ApiModelProperty(value = "入库数量")
+	private Double iQuantity;
+	//含税单价-采购发票单价
+	@ApiModelProperty(value = "含税单价")
+	private Double iPrice;
+	//开票数量
+	@ApiModelProperty(value = "开票数量")
+	private Double iQuantityInvoice;
+	//未开票数量
+	@ApiModelProperty(value = "未开票数量")
+	private Double iQuantityNInvoice;
+	//结算数量
+	@ApiModelProperty(value = "结算数量")
+	private Double iQuantitySettle;
+	//未结算数量
+	@ApiModelProperty(value = "未结算数量")
+	private Double iQuantityNSettle;
+}

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

@@ -0,0 +1,23 @@
+package org.jeecg.modules.report.entity;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @author fenghaifu
+ * @version V1.0
+ * @Copyright: 上海萃颠信息科技有限公司. All rights reserved.
+ * @Title:FabricPoOrderOut
+ * @projectName jeecg-boot-parent
+ * @Description:面料损耗-采购订单-出库
+ * @date: 2022-08-23 15:28
+ * @updatehistory: 2022-08-23 15:28 新增
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="面料损耗-采购订单-出库", description="面料损耗-采购订单-出库")
+public class FabricPoOrderOut {
+}

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

@@ -7,14 +7,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Constants;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import org.apache.ibatis.annotations.Param;
-import org.jeecg.modules.report.entity.FabricLoss;
-import org.jeecg.modules.report.entity.FabricOMOrder;
-import org.jeecg.modules.report.entity.FabricPoOrder;
+import org.jeecg.modules.report.entity.*;
 import org.jeecg.modules.system.entity.SysUser;
 import org.jeecg.modules.system.model.SysUserSysDepartModel;
 import org.jeecg.modules.system.vo.SysUserDepVo;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>
@@ -65,7 +64,28 @@ public interface FabricLossMapper extends BaseMapper<FabricLoss> {
 	//来源余纱,找委外订单的材料出库单,获取物料号+批号。如果物料号+批号在形态转换单中,取转换前物料+批号。判断物料+批号,是否在其他采购入库里
 	@DS("multi-three")
 	List<FabricPoOrder> getPurchaseListOtherPurInList(@Param("code")String code);
-
+	// 获取所有委外订单
+	@DS("multi-three")
+	List<FabricOMOrder> getOmOrderListAll(@Param("code")String code);
+	// 获取销售出库委外订单:物料+颜色在销售出库表中
+	@DS("multi-three")
+	List<FabricOMOrder> getOmOrderListGw(@Param("code")String code);
+	// 获取委外材料出库单,已核销的取核销数量
+	@DS("multi-three")
+	List<Map<String,Object>> getOmOutList(@Param("code")String code);
+	// 获取本次采购入库的形态转换
+	@DS("multi-three")
+	List<Map<String,Object>> getAssemVouchList(@Param("code")String code);
+	// 获取本次采购入库单,含发票和结算数据
+	@DS("multi-three")
+	List<FabricPoOrderIn> getPurchaseInList(@Param("code")String code);
+	// 获取费用支出
+	@DS("multi-three")
+	List<FabricExpenses> getExpensesList(@Param("code")String code);
+	// 获取采购入库价格列表
+	@DS("multi-three")
+	List<FabricCostInvoice> getPurchuseInPriceList(@Param("code")String code);
+	// 获取委外订单发票金额
 	@DS("multi-three")
-	List<FabricOMOrder> getOmOrderList(@Param("code")String code);
+	List<FabricCostInvoice> getOmInvoiceMoneyList(@Param("code")String code);
 }

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

@@ -61,12 +61,12 @@
 		</if>
 	</select>
 
-	<!--获取采购订单-->
+	<!--获取采购订单,物料名为物料名+颜色-->
 	<select id="getPurchaseList" resultType="org.jeecg.modules.report.entity.FabricPoOrder">
-		select cVenName,cVenAbbName,cInvCode,cInvName,cBatch,sum(iQuantity) as iQuantity,
+		select cVenName,cVenAbbName,cInvCode,cInvName,cColor,cBatch,sum(iQuantity) as iQuantity,
 		sum(iQuantityIn) as iQuantityIn
 		 from (
-		select a.cPOID ,d.cVenName,d.cVenAbbName ,c.cInvCode,c.cInvName,b.iQuantity,
+		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,
 		stuff((SELECT ',' + cbatch FROM RdRecords01 x where x.iposid=b.id FOR XML path('') ), 1, 1, '') as cBatch
 		from PO_Pomain a
@@ -74,28 +74,31 @@
 		inner join Inventory c on b.cInvCode=c.cInvCode
 		inner join Vendor  d on a.cVenCode=d.cVenCode
 		where a.cPOID like CONCAT(#{code},'%')
-		) as t1 group by cVenName,cVenAbbName,cInvCode,cInvName,cBatch
+		) as t1 group by cVenName,cVenAbbName,cInvCode,cInvName,cColor,cBatch
 	</select>
 	<!-- 其他入库纱,找委外订单的材料出库单,获取物料号+批号,物料号+批号再其他入库单 -->
 	<select id="getPurchaseListOtherInList" resultType="org.jeecg.modules.report.entity.FabricPoOrder">
+
 		SELECT
 			'其他入库的纱' as cInvName,
-			isnull(sum(iQuantity),0) as iQuantityIn
+			isnull(sum(a.iQuantity),0) as iQuantityIn
 		FROM
-			rdrecords11
+			rdrecords11 a
+			INNER JOIN OM_MODetails b ON a.iOMoDID = b.MODetailsID
+			INNER JOIN om_momain c ON c.moid = b.moid
+			INNER JOIN Inventory d ON b.cinvcode = d.cinvcode
 		WHERE
-			comcode IN (
-				SELECT DISTINCT
-					a.cCode
-				FROM
-					om_momain a
-					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%'
-					AND a.cCode LIKE CONCAT(#{code},'%')
+			d.cInvCCode NOT LIKE '19%'
+			AND c.cCode LIKE CONCAT(#{code},'%')
+			AND a.cInvCode + isnull( a.cFree1, '' ) + isnull( a.cBatch, '' ) IN (
+		SELECT
+			b.cInvCode + isnull( b.cFree1, '' ) + isnull( b.cBatch, '' )
+		FROM
+			RdRecords08 b
+			INNER JOIN rdrecord08 a ON a.id = b.ID
+		WHERE
+			a.cbustype = '其他入库'
 			)
-			AND cInvCode + isnull( cBatch, '' ) IN ( SELECT cInvCode + isnull( cBatch, '' ) FROM RdRecords08 )
 
 	</select>
 	<!-- 来源余纱,找委外订单的材料出库单,获取物料号+批号。如果物料号+批号在形态转换单中,取转换前物料+批号。判断物料+批号,是否在其他采购入库里 -->
@@ -154,15 +157,17 @@
 				)
 		)
 	</select>
-	<!--获取委外订单-->
-	<select id="getOmOrderList" resultType="org.jeecg.modules.report.entity.FabricOMOrder">
-		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,
-			isnull(sum(iOutQuantity),0) as iOutQuantity,
-			isnull(sum(iQuantity),0) as iQuantity
+	<!--获取所有委外订单-->
+	<select id="getOmOrderListAll" resultType="org.jeecg.modules.report.entity.FabricOMOrder">
+		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,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,
-				(select sum(iQuantity) from rdrecords11 x where x.iOMoDID=b.MODetailsID) as iOutQuantity,
+			SELECT e.cVCName,d.cVenName ,d.cVenAbbName ,a.cVenCode ,c.cInvCode,c.cInvName,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
 			FROM
 				om_momain a
@@ -174,8 +179,112 @@
 				c.cInvCCode NOT LIKE '19%'
 				AND a.cCode LIKE CONCAT(#{code},'%')
 
-		) as t1 group by cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName
-		order by cVCName,cVenName,cInvCode,cInvName
+		) as t1 group by cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName,cColor
+		order by cVCName,cVenName,cInvCode,cInvName,cColor
+
+	</select>
+	<!--获取销售出库委外订单:物料+颜色在销售出库表中-->
+	<select id="getOmOrderListGw" resultType="org.jeecg.modules.report.entity.FabricOMOrder">
+		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,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 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
+			FROM
+				om_momain a
+				INNER JOIN OM_MODetails b ON a.moid = b.moid
+				INNER JOIN Inventory c ON b.cinvcode = c.cinvcode
+				inner join Vendor  d on a.cVenCode=d.cVenCode
+				inner join VendorClass e on d.cVCCode =e.cVCCode
+			WHERE
+				c.cInvCCode NOT LIKE '19%'
+				AND a.cCode LIKE CONCAT(#{code},'%')
+				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
+
+	</select>
+	<!--获取委外材料出库单,已核销的取核销数量-->
+	<select id="getOmOutList" resultType="map">
+		SELECT
+			g.cVenName,
+			g.cVenAbbName,
+			e.cCode,
+			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,
+			a.autoid
+		FROM
+			rdrecords11 a
+			INNER JOIN Inventory b ON a.cInvCode = b.cInvCode
+			INNER JOIN OM_MODetails d ON d.MODetailsID = a.iOMoDID
+			INNER JOIN om_momain e ON e.moid = d.moid
+			INNER JOIN vendor g ON e.cVenCode = g.cVenCode
+		WHERE
+			b.cInvCCode NOT LIKE '19%'
+			AND e.cCode LIKE CONCAT(#{code},'%')
+
+	</select>
+	<!--获取本次采购入库的形态转换-->
+	<select id="getAssemVouchList" resultType="map">
+
+		select * from VIEW_FabricLoss_AssemVouchs where
+		cInvCode+isnull(cAVBatch,'')+isnull(cColor,'') in (
+			select cInvCode+isnull(cBatch,'')+isnull(cFree1,'')  from RdRecords01
+			where iposid in (
+			select b.id from PO_Pomain a inner join PO_Podetails b on a.POID  =b.POID
+			and a.cPOID like CONCAT(#{code},'%')
+			)
+		)
+	</select>
+	<!--获取本次采购入库单,含发票和结算数据-->
+	<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
+		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
+		where d.cPOID like CONCAT(#{code},'%')
+	</select>
+	<!--获取费用支出-->
+	<select id="getExpensesList" resultType="org.jeecg.modules.report.entity.FabricExpenses">
+		select * from VIEW_FabricLoss_Expenses
+		where cSOCode like CONCAT(#{code},'%')
+	</select>
+	<!--获取采购入库价格列表-->
+	<select id="getPurchuseInPriceList" resultType="org.jeecg.modules.report.entity.FabricCostInvoice">
+		select distinct e.cVCName,d.cVenName ,d.cVenAbbName,c.iUnitCost ,c.cInvCode,c.cFree1 as cColor
+		from PO_Pomain a
+		inner join PO_Podetails b on  a.poid=b.poid
+		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},'%')
+	</select>
+	<!--获取委外订单发票金额-->
+	<select id="getOmInvoiceMoneyList" resultType="org.jeecg.modules.report.entity.FabricCostInvoice">
 
+		select g.cVCName,f.cVenName ,f.cVenAbbName,sum(c.iSum) as iMoney
+			from RdRecord01 a
+			inner join RdRecords01 b on a.id=b.id
+			inner join PurBillVouchs c on c.RdsId=b.autoid
+			inner join OM_MODetails d on d.MODetailsID=b.iOMoDID
+			inner join om_momain e on d.moid = e.moid
+			inner join Vendor  f on f.cVenCode=e.cVenCode
+		inner join VendorClass g on g.cVCCode =f.cVCCode
+			where a.cbustype='委外加工'
+			and e.cCode  like CONCAT(#{code},'%')
+			group by g.cVCName,f.cVenName ,f.cVenAbbName
+			order by g.cVCName,f.cVenName ,f.cVenAbbName
 	</select>
 </mapper>

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

@@ -17,9 +17,7 @@ import org.jeecg.common.util.PasswordUtil;
 import org.jeecg.common.util.UUIDGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.base.service.BaseCommonService;
-import org.jeecg.modules.report.entity.FabricLoss;
-import org.jeecg.modules.report.entity.FabricOMOrder;
-import org.jeecg.modules.report.entity.FabricPoOrder;
+import org.jeecg.modules.report.entity.*;
 import org.jeecg.modules.report.mapper.FabricLossMapper;
 import org.jeecg.modules.report.service.IFabricLossService;
 import org.jeecg.modules.report.service.IFabricOmOrderService;
@@ -118,6 +116,70 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
 			ret.setOutboundNumber(oConvertUtils.getDouble(fabricLossMapper.getSaleOutSum(code),0));
 			// 采购入库数据
 			List<FabricPoOrder> fabricPoOrderList = fabricLossMapper.getPurchaseList(code);
+			// 获取委外材料出库单,已核销的取核销数量
+			List<Map<String,Object>> fabricOmOutList = fabricLossMapper.getOmOutList(code);
+			// 获取本次采购入库的形态转换
+			List<Map<String,Object>> fabricAssemVouchList = fabricLossMapper.getAssemVouchList(code);
+			// 获取本次采购入库详情
+			List<FabricPoOrderIn> fabricPoOrderInList = fabricLossMapper.getPurchaseInList(code);
+			for (FabricPoOrderIn fabricPoOrderIn: fabricPoOrderInList){
+				BigDecimal bNum = new BigDecimal(fabricPoOrderIn.getIQuantity()-fabricPoOrderIn.getIQuantityInvoice());
+				fabricPoOrderIn.setIQuantityNInvoice(bNum.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue());
+				bNum = new BigDecimal(fabricPoOrderIn.getIQuantity()-fabricPoOrderIn.getIQuantitySettle());
+				fabricPoOrderIn.setIQuantityNSettle(bNum.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue());
+			}
+			// 采购订单设置分配数量、委外供应商、余纱、采购损耗
+			for (FabricPoOrder fabricPoOrder : fabricPoOrderList){
+				// 获取采购形态转换物料
+				List<Map<String, Object>> tmpAssemVouchList = fabricAssemVouchList.stream().filter(e->
+						oConvertUtils.getString(e.get("cInvCode")).equals(fabricPoOrder.getCInvCode()) &&
+						oConvertUtils.getString(e.get("cColor")).equals(fabricPoOrder.getCColor())).collect(Collectors.toList());
+				// 未形态转换物料
+				List<Map<String, Object>> tmpOmOutList1 = fabricOmOutList.stream().filter(e->
+						oConvertUtils.getString(e.get("cInvCode")).equals(fabricPoOrder.getCInvCode()) &&
+						oConvertUtils.getString(e.get("cColor")).equals(fabricPoOrder.getCColor())).collect(Collectors.toList());
+
+				// 形态转换物料
+				List<Map<String, Object>> tmpOmOutList2 = fabricOmOutList.stream().filter(out->{
+				return tmpAssemVouchList.stream().filter(e ->
+						oConvertUtils.getString(e.get("cInvCode2")).equals(oConvertUtils.getString(out.get("cInvCode"))) &&
+						oConvertUtils.getString(e.get("cColor2")).equals(oConvertUtils.getString(out.get("cColor")))
+				).count() > 0;
+				}).collect(Collectors.toList());
+
+				tmpOmOutList1.addAll(tmpOmOutList2);
+
+				List<String> omcVenAbbNameList = new ArrayList<>();
+				double outSum = 0;
+				for (Map<String, Object> out : tmpOmOutList1){
+					outSum += oConvertUtils.getDouble(out.get("iQuantity").toString(),0);
+					String omcVenAbbName = oConvertUtils.getString(out.get("cVenAbbName").toString());
+					if (!omcVenAbbNameList.contains(omcVenAbbName)){
+						omcVenAbbNameList.add(omcVenAbbName);
+					}
+				}
+				if (omcVenAbbNameList.size()>0){
+					fabricPoOrder.setOmcVenAbbName(String.join(",", omcVenAbbNameList));
+				}
+
+				BigDecimal bOutSum = new BigDecimal(outSum);
+				outSum = bOutSum.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
+				fabricPoOrder.setIQuantityOut(outSum);
+				double leftSum = fabricPoOrder.getIQuantityIn()-fabricPoOrder.getIQuantityOut();
+				BigDecimal bLeftSum = new BigDecimal(leftSum);
+				leftSum = bLeftSum.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
+				fabricPoOrder.setIQuantityLeft(leftSum);
+				double leftRate = leftSum/fabricPoOrder.getIQuantityIn();
+				BigDecimal bLeftRate = new BigDecimal(leftRate);
+				leftRate = bLeftRate.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();
+				fabricPoOrder.setIQuantityLeftRate(leftRate);
+
+				// 设置入库信息
+				List<FabricPoOrderIn> tmpFabricPoOrderInList = fabricPoOrderInList.stream().filter(e->
+						e.getCInvCode().equals(fabricPoOrder.getCInvCode()) &&
+						oConvertUtils.getString(e.getCColor()).equals(oConvertUtils.getString(fabricPoOrder.getCColor()))).collect(Collectors.toList());
+				fabricPoOrder.setFabricPoOrderInList(tmpFabricPoOrderInList);
+			}
 			// 采购入库-来源余纱
 			List<FabricPoOrder> fabricPoOrderTempList = fabricLossMapper.getPurchaseListOtherPurInList(code);
 			if (fabricPoOrderTempList.size()>0){
@@ -133,10 +195,64 @@ public class FabricLossServiceImpl extends ServiceImpl<FabricLossMapper, FabricL
 				fabricPoOrderList.add(fabricPoOrderTempList.get(0));
 			}
 			ret.setFabricPoOrderList(fabricPoOrderList);
-			// 委外订单
-			List<FabricOMOrder> fabricOMOrderList1 = fabricLossMapper.getOmOrderList(code);
-			ret.setFabricOMOrderList1(fabricOMOrderList1);
+			// 委外订单所有
+			List<FabricOMOrder> fabricOMOrderList1 = fabricLossMapper.getOmOrderListAll(code);
+			for (FabricOMOrder fabricOMOrder : fabricOMOrderList1){
+				double 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();
+				BigDecimal bDMoreLess = new BigDecimal(dMoreLess);
+				fabricOMOrder.setIQuantityMoreLess(bDMoreLess.setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue());
+			}
+			// 委外订单国外
+			List<FabricOMOrder> fabricOMOrderList2 = fabricLossMapper.getOmOrderListGw(code);
+			List<FabricOMOrder> fabricOMOrderListGn = fabricOMOrderList1.stream().filter(all->{
+				return fabricOMOrderList2.stream().filter(gw->
+						all.getCInvCode().equals(gw.getCInvCode()) &&
+						all.getCColor().equals(gw.getCColor())).count() ==0;
+			}).collect(Collectors.toList());
+			List<FabricOMOrder> fabricOMOrderListGw = fabricOMOrderList1.stream().filter(all->{
+				return fabricOMOrderList2.stream().filter(gw->
+						all.getCInvCode().equals(gw.getCInvCode()) &&
+								all.getCColor().equals(gw.getCColor())).count() >0;
+			}).collect(Collectors.toList());
+			ret.setFabricOMOrderList1(fabricOMOrderListGn);
+			ret.setFabricOMOrderList2(fabricOMOrderListGw);
+			// 费用支出单
+			List<FabricExpenses> fabricExpensesList = fabricLossMapper.getExpensesList(code);
+			ret.setFabricExpensesList(fabricExpensesList);
+			// 获取采购入库价格列表
+			List<FabricCostInvoice> fabricCostInvoiceList1 = fabricLossMapper.getPurchuseInPriceList(code);
+			List<FabricCostInvoice> fabricCostInvoiceList = new ArrayList<>();
+			for (FabricCostInvoice fabricCostInvoice : fabricCostInvoiceList1){
+				Optional<FabricCostInvoice> findItem = fabricCostInvoiceList.stream().filter(e->
+						e.getCVCName().equals(fabricCostInvoice.getCVCName())&&
+						e.getCVenAbbName().equals(fabricCostInvoice.getCVenAbbName())).findFirst();
+				FabricCostInvoice newItem = new FabricCostInvoice();
+				if (findItem.isPresent()) {
+					newItem = findItem.get();
+				}else{
+					newItem.setIMoney(new Double(0));
+					newItem.setCVCName(fabricCostInvoice.getCVCName());
+					newItem.setCVenName(fabricCostInvoice.getCVenName());
+					newItem.setCVenAbbName(fabricCostInvoice.getCVenAbbName());
+					newItem.setIUnitCost(fabricCostInvoice.getIUnitCost());
+				}
+				double outSum = fabricOMOrderList1.stream().filter(e->
+						e.getCVCName().equals(fabricCostInvoice.getCVCName()) &&
+						e.getCVenAbbName().equals(fabricCostInvoice.getCVenAbbName()) &&
+						e.getCInvCode().equals(fabricCostInvoice.getCInvCode())).mapToDouble(FabricOMOrder::getIQuantityOut).sum();
+				outSum *=newItem.getIUnitCost();
+				outSum += newItem.getIMoney();
+
+				newItem.setIMoney(outSum);
+			}
 
+			//获取委外订单发票金额
+			List<FabricCostInvoice> fabricCostInvoiceList2 = fabricLossMapper.getOmInvoiceMoneyList(code);
+			fabricCostInvoiceList.addAll(fabricCostInvoiceList2);
+			ret.setFabricCostInvoiceList(fabricCostInvoiceList);
 
 			return  ret;
 		}

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

@@ -45,9 +45,9 @@ public class FabricMoOrderServiceImpl extends ServiceImpl<FabricOmOrderMapper, F
 				map.put("m","");
 				maps.put("g","");
 				if (oConvertUtils.isNotEmpty(str.getType())&&str.getType().equals("M")){
-					map.put("m",str.getIOutQuantity());
+					map.put("m",str.getIQuantityOut());
 				}else  if (oConvertUtils.isNotEmpty(str.getType())&&str.getType().equals("PCS")){
-					maps.put("g",str.getIOutQuantity());
+					maps.put("g",str.getIQuantityOut());
 				}
 				list.add(map);
 				list.add(maps);

+ 3 - 3
jeecg-boot-module-system/src/main/resources/application-fhf.yml

@@ -137,17 +137,17 @@ spring:
           driver-class-name: com.mysql.cj.jdbc.Driver
           # 多数据源配置
         multi-one:
-          url: jdbc:sqlserver://192.168.5.108;DatabaseName=UFDATA_901_2021
+          url: jdbc:sqlserver://192.168.5.103;DatabaseName=UFDATA_901_2021
           username: sa
           password: Windows2008R2
           driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
         multi-two:
-          url: jdbc:sqlserver://192.168.5.108;DatabaseName=UFDATA_902_2021
+          url: jdbc:sqlserver://192.168.5.103;DatabaseName=UFDATA_902_2021
           username: sa
           password: Windows2008R2
           driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
         multi-three:
-          url: jdbc:sqlserver://192.168.5.108;DatabaseName=UFDATA_903_2021
+          url: jdbc:sqlserver://192.168.5.103;DatabaseName=UFDATA_903_2021
           username: sa
           password: Windows2008R2
           driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver

+ 3 - 3
jeecg-boot-module-system/target/classes/application-fhf.yml

@@ -137,17 +137,17 @@ spring:
           driver-class-name: com.mysql.cj.jdbc.Driver
           # 多数据源配置
         multi-one:
-          url: jdbc:sqlserver://192.168.5.108;DatabaseName=UFDATA_901_2021
+          url: jdbc:sqlserver://192.168.5.103;DatabaseName=UFDATA_901_2021
           username: sa
           password: Windows2008R2
           driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
         multi-two:
-          url: jdbc:sqlserver://192.168.5.108;DatabaseName=UFDATA_902_2021
+          url: jdbc:sqlserver://192.168.5.103;DatabaseName=UFDATA_902_2021
           username: sa
           password: Windows2008R2
           driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
         multi-three:
-          url: jdbc:sqlserver://192.168.5.108;DatabaseName=UFDATA_903_2021
+          url: jdbc:sqlserver://192.168.5.103;DatabaseName=UFDATA_903_2021
           username: sa
           password: Windows2008R2
           driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver

BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/cost/entity/SyCostAllocationCostpay.class


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/letterDeposit/controller/SyLetterDepositController.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/letterDeposit/entity/SyLetterDeposit.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/letterDeposit/entity/SyLetterDepositItem.class


+ 6 - 5
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/letterDeposit/mapper/xml/SyLetterDepositMapper.xml

@@ -7,11 +7,12 @@
 
 select a.document_No as documentNo,a.id as id,GROUP_CONCAT(b.id) as itemId,a.item_number as itemNumber,b.hod as preDeliveryDate ,b.inventory_name as inventoryName,b.po_no as poNo,b.distribution_point as distributionPoint,
 a.memo,a.customer,b.colour,sum(b.box_number) as  boxNumber,b.ac_set_no as acSetNo,sum(b.total) as total,a.customer_abbreviation as customerAbbreviation,
-sum(b.total_net_weight) as totalNetWeight,a.order_type as orderType,b.total_quantity as totalQuantity,b.small_Po as smallPo,b.unit_price as unitPrice,
+sum(b.total_net_weight) as totalNetWeight,a.order_type as orderType,b.plan_Quantity as totalQuantity,b.small_po as smallPo,b.unit_price as unitPrice,
 sum(b.total_gross_weight) as totalGrossWeight,sum(b.total_volume) as totalVolume,sum(b.total_price) as totalPrice,b.factory_unit_price as factoryUnitPrice,
 a.depositary_receipt_no as depositaryReceiptNo,a.spur_Or_Sub_Order as spurOrSubOrder,sum(b.pieces_box) as piecesBox,b.size,a.order_number as orderNumber,
 b.starting_box_number as startingBoxNumber,b.end_case_number as endCaseNumber,b.outer_box_length as outerBoxLength,b.outer_box_width as outerBoxWidth,b.outer_box_height as outerBoxHeight,
-b.garment_factory as garmentFactory,b.hod as hod,b.style_no as styleNo,b.prepack_sku as prepackSku,a.salesman as salesman,a.sales_department
+b.garment_factory as garmentFactory,b.hod as hod,b.style_no as styleNo,b.prepack_sku as prepackSku,
+b.salesman as salesman,b.sales_Department as salesDepartment
 from sy_pre_assembled_packing_list_item b
 left join sy_pre_assembled_packing_list a
 on a.id = b.sy_pre_assembled_packing_list_id
@@ -79,8 +80,8 @@ on a.id = b.sy_pre_assembled_packing_list_id
 
     <select id="querySyLetterDeposit" resultType="org.jeecg.modules.documents.letterDeposit.entity.SyLetterDeposit">
 select a.id as id,a.depositary_receipt_no as depositaryReceiptNo,b.order_number as orderNumber,a.export_invoice_no as exportInvoiceNo,
-a.client_abbreviation as clientAbbreviation,a.exchange_earnings_value as exchangeEarningsValue,
-a.distribution_point as distributionPoint,a.unit_in_operation as unitInOperation,sum(b.box_number) as boxNumber,sum(b.total_gross_weight) as totalGrossWeight,sum(b.total_volume) as totalVolume,
+b.client_abbreviation as clientAbbreviation,a.exchange_earnings_value as exchangeEarningsValue,b.sy_pre_assembled_packing_list_id as syPreAssembledPackingListId,
+b.distribution_point as distributionPoint,a.unit_in_operation as unitInOperation,sum(b.box_number) as boxNumber,sum(b.total_gross_weight) as totalGrossWeight,sum(b.total_volume) as totalVolume,
 sum(a.money) as money,a.the_actual_shipping_date as theActualShippingDate,a.exchange_earnings_text as exchangeEarningsText,a.consignee as consignee,a.bill_of_lading_or_carriage_receipt as billOfLadingOrCarriageReceipt,
 a.addressee as addressee,a.trade_country as tradeCountry,a.arrive_in_country as arriveInCountry,a.export_port as exportPort,a.notifier as notifier,a.nottfy as nottfy,a.destination_port as destinationPort,
 a.the_documents_state as theDocumentsState from sy_letter_deposit a
@@ -95,7 +96,7 @@ on a.id = b.sy_letter_deposit_id
         select item_number as itemNumber,small_po as smallPo,total,box_number as boxNumber,pre_ids as preIds,sy_pre_assembled_packing_list_id as syPreAssembledPackingListId,
 total_gross_weight as totalGrossWeight,total_net_weight as totalNetWeight,total_volume as totalVolume,distribution_point as distributionPoint,
 container_code as containerCode,container_number as containerNumber,unit_price as unitPrice,total_price as totalPrice,
-hod
+hod,salesman,sales_Department as salesDepartment,spur_or_sub_order as spurOrSubOrder
          from sy_letter_deposit_item
          where del_flag = 0 and sy_letter_deposit_id = #{syId} group by letter_groupid
 

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


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/orderData/entity/SyOrderData.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/SyGetOrderServiceImpl.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/SyShippingDetailsItem.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/PushShippingDeialVo.class


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


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

@@ -8,7 +8,7 @@
          b.colour as colour,b.size as size,b.coding_rules as codingRules,sum(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,sum(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,guangpei_gate_width as guangpeiGateWidth,
            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,
@@ -33,7 +33,7 @@
          b.colour as colour,b.size as size,b.coding_rules as codingRules,sum(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,sum(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,guangpei_gate_width as guangpeiGateWidth,
            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,
@@ -106,45 +106,30 @@ ${ew.customSqlSegment}
     </update>
 
 
-    <select id="pushSyShipping" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingVO">
-
-        select
-        document_no as packingHeaderNum,--装箱单编号-(发运明细单号)
-        'ACCESSORIES' as packingType,--装箱单类型-(发运明细类型,默认ACCESSORIES)
-        'NEW' as packingStatus,--装箱单状态-(发运明细状态,默认NEW)
-         '01000229' as supplierNumber,--供应商编码(收货)(收货方供应商编码)
-          create_by as preparer,--制单人
-          create_time as preparationTime--制单时间
-          from sy_shipping_details
-          where del_flag = 0 and id = #{id}
+    <select id="pushSyShipping" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingDeialVo">
+      select
+       concat(a.document_no,'-',b.sort) as packingHeaderNum,a.document_no as attributeString1,
+          'ACCESSORIES' as packingType,'NEW' as packingStatus,b.order_number as poNo,
+          b.sy_order_data_id as attributeBigint1,b.supplier_code as supplierNumber,'成衣工厂' as factory,
+           a.create_by as preparer,a.create_time as preparationTime
+          from sy_shipping_details a
+          where a.del_flag = 0 and a.id = #{id}
 
     </select>
 
     <select id="pushSyShippingDeial" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingDeialVo">
 
-        select
-          a.sort as packingLineNum, -- 行号-(发运明细行号)
-          a.order_number as poNo,--计划单号-(订单号)
-          a.sy_order_data_id as moDetailId,--计划单号行ID-(订单号行ID(母件))
-          a.item_number as styleNo, --款号
-           b.colour as color,--颜色
-           a.inventory_code as itemCode,--物料编码-(存货编码)
-          a.inventory_name as itemDesc,--项目(辅料品名)-(存货名称)
-          '' as declarationName,--报关品名
-          a.material_composition as composition,--成分-(物料成分)
-          b.guangpei_gate_width as width,--门幅
-          '' as rolls,--匹数
-          a.shipment_quantity as planPackingQty,--计划装箱数量-(发货数量)
-          a.treatment_method as treatmentMethod,--处理方式
-          a.manual_yarn_flag as manualYarnFlag,--是否手册纱
-          a.manual_yarn_unit_price as manualYarnUnitPrice,--手册纱单价
-          a.manual_yarn_proportion as manualYarnProportion,--手册纱占比
-          a.memo as remark,--备注
-          '111' as cabinetNum
-          from sy_shipping_details_item a
-          left join sy_order_data_item b
-          on a.sy_order_data_item_id = b.id
-          where a.del_flag = 0 and a.shipping_details_id = #{shippingDetailsId}
+      select b.sort as packingLineNum,
+           b.sy_order_data_item_id as moDetailId,b.item_number as styleNo,b.colour as color,
+           b.inventory_code as itemCode,b.inventory_name as itemDesc,c.declaration_name as declarationName,
+           b.material_composition as composition,'0' as width,'0' as rolls,b.shipment_quantity as planPackingQty,
+           b.treatment_method as treatmentMethod,b.manual_yarn_flag as manualYarnFlag,
+           manual_yarn_unit_price as manualYarnUnitPrice,b.manual_yarn_proportion as manualYarnProportion,
+           '' as remark,b.submit_status as submitStatus
+        from sy_shipping_details_item b
+        left join sy_declaration_elements c
+        on b.elements_id = c.id
+        where b.del_flag = 0 and b.shipping_details_id = #{shippingDetailsId}
     </select>
 
 

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


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/controller/SyShippingOrderController.class


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


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


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/documents/syShippingOrder/mapper/SyShippingOrderMapper.class


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

@@ -4,7 +4,7 @@
 
     <select id="syShippingOrderPageList" resultType="org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrder">
 
-  select shipping_order_number as shippingOrderNumber,order_number as orderNumber,export_invoice_no as exportInvoiceNo,
+  select id,shipping_order_number as shippingOrderNumber,order_number as orderNumber,export_invoice_no as exportInvoiceNo,
   distribution_point as distributionPoint,unit_in_operation as unitInOperation,box_number as boxNumber,total_gross_weight as totalGrossWeight,
   total_volume as totalVolume,
   money,the_actual_shipping_date as theActualShippingDate,exchange_earnings_text as exchangeEarningsText,
@@ -20,11 +20,12 @@
   <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.order_number as orderNumber,a.depositary_receipt_no as depositaryReceiptNo,
-     a.item_number as itemNumber,b.inventory_name as productName,b.distribution_point as distributionPoint,
-     b.item_code as itemCode,b.starting_box_number as startingBoxNumber,b.end_case_number as endCaseNumber,
-     b.colour as colour,b.pieces_box as piecesBox,b.box_number as boxNumber,b.total as total,b.outer_box_length as outerBoxLength,
-     b.outer_box_width as outerBoxWidth,b.outer_box_height as outerBoxHeight,b.total_volume as totalVolume,b.total_net_weight as totalNetWeight,
-     b.total_gross_weight as totalGrossWeight,'成衣' as readyFabric
+     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,b.order_Number as orderNumber,
+     b.outer_box_width as outerBoxWidth,b.outer_box_height as outerBoxHeight,sum(b.total_volume) as totalVolume,sum(b.total_net_weight) as totalNetWeight,b.spur_Or_Sub_Order as purOrSubOrder,
+     sum(b.total_gross_weight) as totalGrossWeight,'成衣' as readyFabric,a.memo as memo,b.salesman as salesman,b.factory_Unit_Price as factoryUnitPrice,sum(b.total_price) as totalPrice,
+     sum(b.plan_Quantity) as planQuantity,sum(b.actual_Packing_Qty) as actualPackingQty,a.container_code as containerCode,a.container_number as containerNumber
        from sy_packing_list_tailoring a
     left join sy_packing_list_tailoring_item b
     on a.id = b.sy_packing_list_tailoring_id
@@ -35,9 +36,12 @@
     <!--    查询装箱单-面料-->
     <select id="queryFabric" 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.order_number as orderNumber,a.depositary_receipt_no as depositaryReceiptNo,
-     b.inventory_name as productName,
-     b.inventory_Code as itemCode,
+    select a.id as id ,GROUP_CONCAT(b.id) as itemId, a.document_No as documentNo,b.order_number as orderNumber,
+    b.item_Number as itemNumber,a.customer_Abbreviation as customerAbbreviation,a.customer,b.small_Po as smallPo,b.distribution_Point as distributionPoint,
+    b.salesman as salesman,b.pur_Or_Sub_Order as purOrSubOrder,b.factory_Unit_Price as factoryUnitPrice,'0' as totalVolume,'0' as actualPackingQty,
+    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,
      '面料' as readyFabric
        from sy_packing_list_fabric a
@@ -54,4 +58,24 @@
         where sy_shipping_order_item_id = #{id}
     </update>
 
+    <select id="queryListRmb" resultType="org.jeecg.modules.documents.letterDeposit.entity.SyRmb">
+        select id,sy_letter_deposit_id as syLetterDepositId,freight_forwarder as freightForwarder,
+         amount,item_column as itemColumn  from sy_rmb where del_flag = 0 and sy_letter_deposit_id = #{syLetterDepositId}
+    </select>
+
+    <select id="queryListUsd" resultType="org.jeecg.modules.documents.letterDeposit.entity.SyUsd">
+        select id,sy_letter_deposit_id as syLetterDepositId,freight_forwarder as freightForwarder,
+         amount,item_column as itemColumn  from sy_usd where del_flag = 0 and sy_letter_deposit_id = #{syLetterDepositId}
+    </select>
+
+    <select id="queryItem" resultType="org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrderItem">
+SELECT GROUP_CONCAT(id) as id, sy_shipping_order_item_id as syShippingOrderItemId, english_name as englishName, style_number as styleNumber, smail_po as smailPo,
+sum(number) as number, sum(box_number) as boxNumber, sum(gross_weight) as grossWeight, sum(net_weight) as netWeight, sum(volume) as volume,
+distribution_point as distributionPoint, container_code as containerCode, container_number as containerNumber, unit_price as unitPrice, pre_shipment_date as preShipmentDate,
+salesman, operating_department as operatingDepartment, purchase_outsourcing_order_no as purchaseOutsourcingOrderNo, outsourcing_factory_for_procurement as outsourcingFactoryForProcurement,
+ memo, sort, ready_fabric as readyFabric, tailoring_fabric_id as tailoringFabricId, tailoring_fabric_item_id as tailoringFabricItemId
+ FROM sy_shipping_order_item where del_flag = 0 and sy_shipping_order_item_id = #{id}
+group by sy_shipping_order_item_id
+
+    </select>
 </mapper>

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/openApi/service/impl/PurchaseWarehousingServiceImpl.class


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


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


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


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


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


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

@@ -61,12 +61,12 @@
 		</if>
 	</select>
 
-	<!--获取采购订单-->
+	<!--获取采购订单,物料名为物料名+颜色-->
 	<select id="getPurchaseList" resultType="org.jeecg.modules.report.entity.FabricPoOrder">
-		select cVenName,cVenAbbName,cInvCode,cInvName,cBatch,sum(iQuantity) as iQuantity,
+		select cVenName,cVenAbbName,cInvCode,cInvName,cColor,cBatch,sum(iQuantity) as iQuantity,
 		sum(iQuantityIn) as iQuantityIn
 		 from (
-		select a.cPOID ,d.cVenName,d.cVenAbbName ,c.cInvCode,c.cInvName,b.iQuantity,
+		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,
 		stuff((SELECT ',' + cbatch FROM RdRecords01 x where x.iposid=b.id FOR XML path('') ), 1, 1, '') as cBatch
 		from PO_Pomain a
@@ -74,28 +74,31 @@
 		inner join Inventory c on b.cInvCode=c.cInvCode
 		inner join Vendor  d on a.cVenCode=d.cVenCode
 		where a.cPOID like CONCAT(#{code},'%')
-		) as t1 group by cVenName,cVenAbbName,cInvCode,cInvName,cBatch
+		) as t1 group by cVenName,cVenAbbName,cInvCode,cInvName,cColor,cBatch
 	</select>
 	<!-- 其他入库纱,找委外订单的材料出库单,获取物料号+批号,物料号+批号再其他入库单 -->
 	<select id="getPurchaseListOtherInList" resultType="org.jeecg.modules.report.entity.FabricPoOrder">
+
 		SELECT
 			'其他入库的纱' as cInvName,
-			isnull(sum(iQuantity),0) as iQuantityIn
+			isnull(sum(a.iQuantity),0) as iQuantityIn
 		FROM
-			rdrecords11
+			rdrecords11 a
+			INNER JOIN OM_MODetails b ON a.iOMoDID = b.MODetailsID
+			INNER JOIN om_momain c ON c.moid = b.moid
+			INNER JOIN Inventory d ON b.cinvcode = d.cinvcode
 		WHERE
-			comcode IN (
-				SELECT DISTINCT
-					a.cCode
-				FROM
-					om_momain a
-					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%'
-					AND a.cCode LIKE CONCAT(#{code},'%')
+			d.cInvCCode NOT LIKE '19%'
+			AND c.cCode LIKE CONCAT(#{code},'%')
+			AND a.cInvCode + isnull( a.cFree1, '' ) + isnull( a.cBatch, '' ) IN (
+		SELECT
+			b.cInvCode + isnull( b.cFree1, '' ) + isnull( b.cBatch, '' )
+		FROM
+			RdRecords08 b
+			INNER JOIN rdrecord08 a ON a.id = b.ID
+		WHERE
+			a.cbustype = '其他入库'
 			)
-			AND cInvCode + isnull( cBatch, '' ) IN ( SELECT cInvCode + isnull( cBatch, '' ) FROM RdRecords08 )
 
 	</select>
 	<!-- 来源余纱,找委外订单的材料出库单,获取物料号+批号。如果物料号+批号在形态转换单中,取转换前物料+批号。判断物料+批号,是否在其他采购入库里 -->
@@ -154,15 +157,43 @@
 				)
 		)
 	</select>
-	<!--获取委外订单-->
-	<select id="getOmOrderList" resultType="org.jeecg.modules.report.entity.FabricOMOrder">
-		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,
-			isnull(sum(iOutQuantity),0) as iOutQuantity,
-			isnull(sum(iQuantity),0) as iQuantity
+	<!--获取所有委外订单-->
+	<select id="getOmOrderListAll" resultType="org.jeecg.modules.report.entity.FabricOMOrder">
+		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,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 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
+			FROM
+				om_momain a
+				INNER JOIN OM_MODetails b ON a.moid = b.moid
+				INNER JOIN Inventory c ON b.cinvcode = c.cinvcode
+				inner join Vendor  d on a.cVenCode=d.cVenCode
+				inner join VendorClass e on d.cVCCode =e.cVCCode
+			WHERE
+				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
+
+	</select>
+	<!--获取销售出库委外订单:物料+颜色在销售出库表中-->
+	<select id="getOmOrderListGw" resultType="org.jeecg.modules.report.entity.FabricOMOrder">
+		select cVCName,cVenName ,cVenAbbName ,cVenCode ,cInvCode,cInvName,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,
-				(select sum(iQuantity) from rdrecords11 x where x.iOMoDID=b.MODetailsID) as iOutQuantity,
+			SELECT e.cVCName,d.cVenName ,d.cVenAbbName ,a.cVenCode ,c.cInvCode,c.cInvName,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
 			FROM
 				om_momain a
@@ -173,9 +204,87 @@
 			WHERE
 				c.cInvCCode NOT LIKE '19%'
 				AND a.cCode LIKE CONCAT(#{code},'%')
+				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
+
+	</select>
+	<!--获取委外材料出库单,已核销的取核销数量-->
+	<select id="getOmOutList" resultType="map">
+		SELECT
+			g.cVenName,
+			g.cVenAbbName,
+			e.cCode,
+			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,
+			a.autoid
+		FROM
+			rdrecords11 a
+			INNER JOIN Inventory b ON a.cInvCode = b.cInvCode
+			INNER JOIN OM_MODetails d ON d.MODetailsID = a.iOMoDID
+			INNER JOIN om_momain e ON e.moid = d.moid
+			INNER JOIN vendor g ON e.cVenCode = g.cVenCode
+		WHERE
+			b.cInvCCode NOT LIKE '19%'
+			AND e.cCode LIKE CONCAT(#{code},'%')
+
+	</select>
+	<!--获取本次采购入库的形态转换-->
+	<select id="getAssemVouchList" resultType="map">
+
+		select * from VIEW_FabricLoss_AssemVouchs where
+		cInvCode+isnull(cAVBatch,'')+isnull(cColor,'') in (
+			select cInvCode+isnull(cBatch,'')+isnull(cFree1,'')  from RdRecords01
+			where iposid in (
+			select b.id from PO_Pomain a inner join PO_Podetails b on a.POID  =b.POID
+			and a.cPOID like CONCAT(#{code},'%')
+			)
+		)
+	</select>
+	<!--获取本次采购入库单,含发票和结算数据-->
+	<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
+		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
+		where d.cPOID like CONCAT(#{code},'%')
+	</select>
+	<!--获取费用支出-->
+	<select id="getExpensesList" resultType="org.jeecg.modules.report.entity.FabricExpenses">
+		select * from VIEW_FabricLoss_Expenses
+		where cSOCode like CONCAT(#{code},'%')
+	</select>
+	<!--获取采购入库价格列表-->
+	<select id="getPurchuseInPriceList" resultType="org.jeecg.modules.report.entity.FabricCostInvoice">
+		select distinct e.cVCName,d.cVenName ,d.cVenAbbName,c.iUnitCost ,c.cInvCode,c.cFree1 as cColor
+		from PO_Pomain a
+		inner join PO_Podetails b on  a.poid=b.poid
+		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},'%')
+	</select>
+	<!--获取委外订单发票金额-->
+	<select id="getOmInvoiceMoneyList" resultType="org.jeecg.modules.report.entity.FabricCostInvoice">
 
-		) as t1 group by cVCName,cVenName,cVenAbbName,cVenCode,cInvCode,cInvName
-		order by cVCName,cVenName,cInvCode,cInvName
-	
+		select g.cVCName,f.cVenName ,f.cVenAbbName,sum(c.iSum) as iMoney
+			from RdRecord01 a
+			inner join RdRecords01 b on a.id=b.id
+			inner join PurBillVouchs c on c.RdsId=b.autoid
+			inner join OM_MODetails d on d.MODetailsID=b.iOMoDID
+			inner join om_momain e on d.moid = e.moid
+			inner join Vendor  f on f.cVenCode=e.cVenCode
+		inner join VendorClass g on g.cVCCode =f.cVCCode
+			where a.cbustype='委外加工'
+			and e.cCode  like CONCAT(#{code},'%')
+			group by g.cVCName,f.cVenName ,f.cVenAbbName
+			order by g.cVCName,f.cVenName ,f.cVenAbbName
 	</select>
 </mapper>

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


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


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/controller/SyPreAssembledPackingListController.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/entity/SyPreAssembledPackingList.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/entity/SyPreAssembledPackingListItem.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/mapper/SyPreAssembledPackingListItemMapper.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/mapper/SyPreAssembledPackingListMapper.class


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

@@ -113,7 +113,7 @@
 		 where sy_shipping_details_item.del_flag = 0
 		 and shipping_details_id =#{id}
 		 and sy_shipping_details_item.group_id=#{groupId}
-		group by  sy_shipping_details_item.colour
+		group by  sy_shipping_details_item.group_id
 	</select>
 
 	<select id="selectSize" resultType="org.jeecg.modules.spapl.entity.SizeTable" parameterType="java.lang.String">
@@ -131,8 +131,8 @@
 		WHERE shipping_details_id =#{value }
 		AND sy_shipping_details_item.size IS NOT NULL
 		and sy_shipping_details_item.del_flag=0
+		and sy_shipping_details_item.group_id=#{groupId}
 		ORDER BY sizetable.num
-
 	</select>
 
 	<!--获取所有id的所有尺码去重并排序2-->

+ 10 - 5
jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/mapper/xml/SyPreAssembledPackingListMapper.xml

@@ -10,14 +10,16 @@
     SELECT
         sy_shipping_details.id AS syDeclarationElementsId, /*发运明细主表id*/
         (SELECT sy_shipping_details_item.`order_Number` FROM sy_shipping_details_item
-        WHERE shipping_details_id=sy_shipping_details.id LIMIT 1) as orderNumber,/*销售订单号*/
+        WHERE shipping_details_id=sy_shipping_details.id and sy_shipping_details_item.group_id=#{groupId}
+         LIMIT 1) as orderNumber,/*销售订单号*/
         sy_order_data.id AS sy_order_data_id, /*订单数据主表id*/
 /*        sy_shipping_details.chinese_Name AS productName,中文品名-->品名
         sy_shipping_details.english_product_name,英文品名*/
         sy_shipping_details.customer AS customer, /*客户 customer */
         /* sy_order_data.customer_Abbreviation AS customerAbbreviation,客户简称 customer */
         (SELECT sy_shipping_details_item.`customer_Abbreviation` FROM sy_shipping_details_item
-        WHERE shipping_details_id=sy_shipping_details.id LIMIT 1) customer_Abbreviation,/*客户简称*/
+        WHERE shipping_details_id=sy_shipping_details.id and sy_shipping_details_item.group_id=#{groupId}
+         LIMIT 1) customer_Abbreviation,/*客户简称*/
         sy_order_data.customer_Code AS customerCode, /*客户编码 customer */
         sy_order_data.business_Type_Value,/*业务类型*/
         sy_order_data.salesman,/*业务员*/
@@ -26,11 +28,14 @@
         sy_order_data.garment_Factory AS garmentFactory, /*成衣工厂 garmentFactory m*/
         sy_shipping_details.order_Type AS  orderType, /*订单类型 m*/
         (SELECT sy_shipping_details_item.`pur_or_sub_order` FROM sy_shipping_details_item
-        WHERE shipping_details_id=sy_shipping_details.id LIMIT 1) spur_Or_Sub_Order,/*采购/委外订单号*/
+        WHERE shipping_details_id=sy_shipping_details.id and sy_shipping_details_item.group_id=#{groupId}
+         LIMIT 1) spur_Or_Sub_Order,/*采购/委外订单号*/
         (SELECT sy_shipping_details_item.`ompo_Id` FROM sy_shipping_details_item
-        WHERE shipping_details_id=sy_shipping_details.id LIMIT 1) ompo_Id,/*采购/委外订单id*/
+        WHERE shipping_details_id=sy_shipping_details.id   and sy_shipping_details_item.group_id=#{groupId}
+         LIMIT 1) ompo_Id,/*采购/委外订单id*/
         (SELECT sy_shipping_details_item.`elements_id` FROM sy_shipping_details_item
-        WHERE shipping_details_id=sy_shipping_details.id LIMIT 1) elements_id /*申报要素ID*/
+        WHERE shipping_details_id=sy_shipping_details.id and sy_shipping_details_item.group_id=#{groupId}
+         LIMIT 1) elements_id /*申报要素ID*/
     FROM sy_shipping_details
     LEFT JOIN sy_order_data
     ON sy_shipping_details.`sy_order_data_id`=sy_order_data.`id`

BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/service/ISyPreAssembledPackingListItemService.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/service/impl/SyPreAssembledPackingListItemServiceImpl.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/spapl/service/impl/SyPreAssembledPackingListServiceImpl.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/controller/SyPackingListFabricController.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/entity/SyPackingListFabric.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/entity/SyPackingListFabricItem.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/mapper/SyPackingListFabricItemMapper.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/mapper/SyPackingListFabricMapper.class


+ 16 - 5
jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/mapper/xml/SyPackingListFabricItemMapper.xml

@@ -18,12 +18,15 @@
 			a.id syShippingDetailsId,
 			b.id syShippingDetailsItemId,
 			/*IF(INSTR(c.OMPO_id,'-')>0,LEFT(c.OMPO_id,INSTR(c.OMPO_id,'-')-1),c.OMPO_id) PlanLotNumber,*/
-	IF(INSTR(b.pur_or_sub_order,'-')>0,LEFT(b.pur_or_sub_order,INSTR(b.pur_or_sub_order,'-')-1),b.pur_or_sub_order) PlanLotNumber,
-			a.declaration_Name,/*报关品名*/
+			IF(INSTR(b.pur_or_sub_order,'-')>0,LEFT(b.pur_or_sub_order,INSTR(b.pur_or_sub_order,'-')-1),b.pur_or_sub_order) PlanLotNumber,
+			/*a.declaration_Name,报关品名*/
+			(select declaration_Name from sy_declaration_elements where id=b.elements_Id) as declaration_Name,
 			c.master_Metering,/*主计量*/
+			c.weight as gramWeight,/*克重*/
 			b.salesman,/*业务员*/
 			b.item_Number,/*款号*/
 			b.order_Number,/*订单号*/
+			b.u8_Remarks memo,/*备注*/
 			b.colour,/*颜色*/
 			b.inventory_Code,/*物料编码*/
 			b.inventory_Name,/*物料名称*/
@@ -35,6 +38,7 @@
 			b.manual_Yarn_Unit_Price,/*手册纱单价*/
 			b.manual_Yarn_Proportion,/*手册纱占比*/
 			b.shipment_Quantity AS inventoryQuantity,/*入库数量*/
+			b.elements_Id,/*申报要素*/
 			b.specification_And_Model,/*规格型号*/
 			b.excess_Quantity	/*excessQuantity*/
 		FROM
@@ -52,17 +56,20 @@
 		SELECT
 			a.id syShippingDetailsId,
 			b.id syShippingDetailsItemId,
-			/*IF(INSTR(c.OMPO_id,'-')>0,LEFT(c.OMPO_id,INSTR(c.OMPO_id,'-')-1),c.OMPO_id) PlanLotNumber,*/
+			a.order_Type,
+			(select declaration_Name from sy_declaration_elements where id=b.elements_Id) as declaration_Name,
 			IF(INSTR(b.pur_or_sub_order,'-')>0,LEFT(b.pur_or_sub_order,INSTR(b.pur_or_sub_order,'-')-1),b.pur_or_sub_order) PlanLotNumber,
-			a.declaration_Name,/*报关品名*/
 			c.master_Metering,/*主计量*/
 			b.salesman,/*业务员*/
+			b.sales_Department,/*业务部门*/
 			b.item_Number,/*款号*/
 			b.colour,/*颜色*/
+			b.u8_Remarks memo,/*备注*/
 			b.inventory_Code,/*物料编码*/
 			b.inventory_Name,/*物料名称*/
 			b.material_Composition AS Composition,/*成分/Composition*/
-			b.guangpei_Gate_Width AS Width,/*门幅/Width*/
+			if(INSTR(c.Weight,'克')>0,left(c.Weight,char_length(c.Weight)-1),0) gramWeight,
+			(if(ifnull(b.guangpei_Gate_Width,'x') REGEXP '[^0-9.]'>0,'0',b.guangpei_Gate_Width)) as Width,
 			b.sales_Unit_Price AS price,/*价格*/
 			b.treatment_Method,/*处理方式*/
 			b.manual_Yarn_Flag,/*是否手册纱*/
@@ -83,6 +90,10 @@
 		<foreach collection="ids" item="value" index="index" open="(" separator="," close=")">
 			#{value}
 		</foreach>
+		and b.group_id in
+		<foreach collection="groupIds" item="value" index="index" open="(" separator="," close=")">
+			#{value}
+		</foreach>
 	</select>
 
 	<select id="selectByMainId2" parameterType="java.lang.String" resultType="org.jeecg.modules.splfi.entity.SyPackingListFabricItem">

+ 11 - 8
jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/mapper/xml/SyPackingListFabricMapper.xml

@@ -53,6 +53,7 @@
         a.whole_order_total AS wholeOrderTotal,
         b.declaration_elements AS declarationElements,
         b.number_of_sets AS numberOfSets,
+        b.group_id as group_id,
         a.chinese_name AS chineseName,
         b.account AS account,
         a.english_product_name AS englishProductName,
@@ -64,8 +65,8 @@
     WHERE  a.del_flag = 0  /*查询未删除的数据*/
     and b.submit_status=1  /*查询已提交的数据*/
     AND ( inventory_ccode NOT LIKE '19%' OR inventory_ccode IS NULL)/*查询不是成衣的数据*/
-    group by b.group_id
-    ORDER BY a.document_no DESC
+    group by a.id,b.group_id
+   /* ORDER BY a.document_no DESC*/
     ) AS t
     ${ew.customSqlSegment}
     </select>
@@ -74,6 +75,8 @@
         SELECT
             sy_shipping_details.id AS syDeclarationElementsId,
             sy_shipping_details_item.garment_Factory,
+            sy_shipping_details_item.customer_Abbreviation,
+            sy_shipping_details.customer,
             sy_shipping_details_item.order_Number
         FROM sy_shipping_details
         LEFT JOIN sy_shipping_details_item
@@ -83,6 +86,7 @@
             #{value}
         </foreach>
         GROUP BY sy_shipping_details.id
+        limit 1     /*最多只能获取一条数据*/
     </select>
 
     <update id="deleteByMainId"  parameterType="java.lang.String">
@@ -91,12 +95,11 @@
 
     <select id="queryMain" resultType="org.jeecg.modules.splfi.entity.SyPackingListFabric">
 		SELECT
-			a.*,
-			b.group_id
+			a.*
 		FROM `sy_packing_list_fabric` a
-		left join sy_packing_list_fabric_item b
-		on a.id=b.sy_packing_list_fabric_id
-		and b.del_flag
+		/*left join sy_packing_list_fabric_item b
+		on a.id=b.sy_packing_list_fabric_id*/
+		/*and b.del_flag*/
 		${ew.customSqlSegment}
 		group by a.id
 	</select>
@@ -108,7 +111,7 @@
 		FROM `sy_packing_list_fabric` a
 		left join sy_packing_list_fabric_item b
 		on a.id=b.sy_packing_list_fabric_id
-		and b.del_flag
+		and b.del_flag=0
 		where a.id=#{id }
 		/*and b.group_id=#{groupId }*/
 		group by a.id

BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/service/ISyPackingListFabricService.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/splfi/service/impl/SyPackingListFabricServiceImpl.class


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/mapper/SyPackingListTailoringMapper.class


+ 26 - 3
jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/mapper/xml/syPackingListTailoringItemMapper.xml

@@ -32,6 +32,7 @@
 			end_case_number,
 			colour,
 			pieces_box,
+			master_Metering,/*计量单位*/
 			box_number,
 			sum(total) total,/*件数*/
 			sum(total) plan_Quantity,/*计划装箱数量*/
@@ -51,11 +52,22 @@
 			small_po,
 			inventory_name,
 			spur_or_sub_order,
-			factory_unit_price,
+			factory_unit_price,/*成衣工厂*/
+			order_Number/*销售订单号号*/
+			inventory_Code,/*存货编码*/
+			inventory_Ccode,/*区分成衣跟面辅料*/
+			supplier_Code,/*最底层供应商编码*/
+			supplier,/*最底层供应商名称*/
+			ompo_Account,/*采购委外账套号*/
+			ompo_Id,/*采购委外订单主表id*/
+			ompo_Id_Item,/*采购委外订单子表id*/
+			salesman,/*业务员*/
+			sales_Department,/*业务部门*/
+			ymoney,/*佣金*/
 			group_id
 		FROM  sy_pre_assembled_packing_list_item
 		WHERE sy_pre_assembled_packing_list_id = #{value} AND del_flag = 0
-		GROUP BY group_id/*根据发运明细主表id分组 改为了按照 颜色进行分组*/
+		GROUP BY group_id/*根据发运明细主表物料颜色 -> 改为了按照进行groupId分组*/
 	</select>
 
 	<select id="queryId" resultType="org.jeecg.modules.splt.entity.SyPackingListTailoringItem">
@@ -92,7 +104,18 @@
 		with_code,
 		inventory_name,
 		/*spur_or_sub_order,*/
-		factory_unit_price,
+		factory_unit_price,/*成衣工厂*/
+		order_Number/*销售订单号号*/
+		master_Metering,/*计量单位*/
+		inventory_Code,/*存货编码*/
+		inventory_Ccode,/*区分成衣跟面辅料*/
+		supplier_Code,/*最底层供应商编码*/
+		supplier,/*最底层供应商名称*/
+		ompo_Account,/*采购委外账套号*/
+		ompo_Id,/*采购委外订单主表id*/
+		ompo_Id_Item,/*采购委外订单子表id*/
+		ymoney,/*佣金*/
+		plan_Size,/*计划尺码数量*/
 		group_id
 	FROM  sy_packing_list_tailoring_item
 	WHERE sy_packing_list_tailoring_id =#{value} AND del_flag = 0

+ 108 - 24
jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/mapper/xml/syPackingListTailoringMapper.xml

@@ -3,23 +3,38 @@
 <mapper namespace="org.jeecg.modules.splt.mapper.SyPackingListTailoringMapper">
     <select id="querySpaplId" resultType="org.jeecg.modules.splt.entity.SyPackingListTailoring">
         select
-        id syPreAssembledPackingListId,
-        order_Number,
-        item_Number,
-        product_Name,
-        size_Range,
-        customer,
-        container_Code,
-        container_Number,
-        u8_Remarks,
-        garment_Factory,
-        total_Boxes,
-        depositary_Receipt_No,
-        pre_Delivery_Date,
-        order_Type
-        from sy_pre_assembled_packing_list
+
+        a.id syPreAssembledPackingListId,/*预装箱单主表id*/
+        a.order_Number,/*订单号*/
+        a.item_Number,/*款号*/
+       /* a.product_Name,品名*/
+        a.size_Range,/*尺码范围*/
+        a.customer,/*客户*/
+        a.customer_Abbreviation,/*客户简称*/
+        a.spur_Or_Sub_Order purchase,/*采购/委外订单号*/
+        a.ompo_Id,/*采购/委外订单号id*/
+        a.container_Number,/*集装箱号*/
+        a.container_Code,/*集装箱代号*/
+        a.u8_Remarks,/*备注*/
+        (SELECT english_product_name FROM  sy_declaration_elements WHERE id=a.elements_id) englishProductName ,/*中文品名*/
+	    (SELECT declaration_name FROM  sy_declaration_elements WHERE id=a.elements_id) productName,/*英文品名*/
+        a.depositary_Receipt_No,/*预托书号*/
+        (SELECT export_Invoice_No FROM  sy_letter_deposit
+        LEFT JOIN sy_letter_deposit_item ON
+        sy_letter_deposit.id=sy_letter_deposit_item.`sy_letter_deposit_id`
+        WHERE sy_letter_deposit_item.`sy_pre_assembled_packing_list_id`=a.id
+        LIMIT 1) exportInvoiceNo,/*外销发票号-预托书主表数据*/
+        a.salesman,/*业务员*/
+        a.sales_Department,/*业务部门(销售部门)*/
+        a.business_Type_Value,/*业务类型*/
+        a.elements_Id,/*申报要素id*/
+        order_Type /*订单类型*/
+        /*a.pre_Delivery_Date,预发货日期*/
+        /*a.total_Boxes,总箱数*/
+        /*a.garment_Factory,成衣工厂*/
+        from sy_pre_assembled_packing_list a
         where id=#{value}
-        and del_flag=0
+        and a.del_flag=0
 
     </select>
 
@@ -27,21 +42,50 @@
         update sy_packing_list_tailoring set del_flag='1' where id=#{value}
     </update>
     
-    <select id="selectList" resultType="org.jeecg.modules.splt.vo.SyPackingListTailoringVo">
-       SELECT a.*,
+    <select id="selectList2" resultType="org.jeecg.modules.splt.vo.SyPackingListTailoringVo">
+       SELECT
+         a.id,
+         a.sy_pre_assembled_packing_list_id,
+         a.document_No ,
+         a.pk_org ,
+         a.del_flag ,
+         a.order_number ,
+         a.item_number ,
+         a.size_range ,
+         a.customer ,
+         a.customer_abbreviation ,
+         a.container_code ,
+         a.container_number ,
+         a.export_invoice_no ,
+         a.u8_remarks,
+         a.shipping_order_number ,
+        (SELECT english_product_name FROM  sy_declaration_elements WHERE id=a.elements_id) englishProductName ,/*中文品名*/
+	    (SELECT declaration_name FROM  sy_declaration_elements WHERE id=a.elements_id) productName,/*英文品名*/
+         a.depositary_receipt_no ,
+         a.purchase ,
+         a.order_type ,
+         a.the_factory_price ,
+         a.Push_state ,
+         a.status ,
+         a.cause ,
+         a.whether_cloud_factory_push ,
+         a.accessory ,
+         a.total_Boxes ,
+         a.total ,
+         a.total_Net_Weight ,
+         a.total_Gross_Weight ,
+         a.total_Volume ,
+         a.total_Price ,
+         a.elements_Id ,
          b.ac_set_no,
+         b.garment_Factory,
          b.hod,
          b.style_No,
          b.po_No,
          b.item_Code,
          b.distribution_Point,
          b.prepack_Sku,
-        /*SUM(b.total) total2,
-         sum(b.total_Net_Weight)  totalNetWeight2,
-         sum(b.total_Gross_Weight)  totalGrossWeight2,
-         sum(b.total_Volume)  totalVolume2,
-         sum(b.total_Price)  totalPrice2,*/
-         b.master_Metering,
+         b.master_Metering,/*计量单位*/
          b.inventory_Name,
          b.colour,
          b.small_Po,
@@ -51,5 +95,45 @@
          ON a.id=b.sy_packing_list_tailoring_id and b.del_flag=0
          ${ew.customSqlSegment}
          GROUP BY a.id
+         order by a.create_time desc /*倒序*/
+    </select>
+
+    <select id="getMainId" resultType="org.jeecg.modules.splt.entity.SyPackingListTailoring">
+       select a.id,
+         a.sy_pre_assembled_packing_list_id,
+         a.document_No ,
+         a.pk_org ,
+         a.del_flag ,
+         a.order_number ,
+         a.item_number ,
+         a.size_range ,
+         a.customer ,
+         a.customer_abbreviation ,
+         a.container_code ,
+         a.container_number ,
+         a.export_invoice_no ,
+         a.u8_remarks,
+         a.shipping_order_number ,
+        (SELECT english_product_name FROM  sy_declaration_elements WHERE id=a.elements_id) englishProductName ,/*中文品名*/
+	    (SELECT declaration_name FROM  sy_declaration_elements WHERE id=a.elements_id) productName,/*英文品名*/
+         a.depositary_receipt_no ,
+         a.purchase ,
+         a.order_type ,
+         a.the_factory_price ,
+         a.Push_state ,
+         a.status ,
+         a.cause ,
+         a.whether_cloud_factory_push ,
+         a.accessory ,
+         a.total_Boxes ,
+         a.total ,
+         a.total_Net_Weight ,
+         a.total_Gross_Weight ,
+         a.total_Volume ,
+         a.total_Price ,
+        (SELECT english_product_name FROM  sy_declaration_elements WHERE id=a.elements_id) englishProductName ,/*英文文品名*/
+	    (SELECT declaration_name FROM  sy_declaration_elements WHERE id=a.elements_id) productName/*中文品名*/
+       from  sy_packing_list_tailoring a
+       where id=#{value}
     </select>
 </mapper>

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


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


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/splt/vo/SyPackingListTailoringVo.class


BIN
jeecg-boot-module-system/target/classes/org/jeecg/modules/system/util/InterfaceConnUtils.class


BIN
jeecg-boot-module-system/target/classes/static/paking.xlsx


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