zengtx hace 2 años
padre
commit
f9648b1128

+ 4 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/controller/SyShippingDetailsController.java

@@ -465,11 +465,11 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 		  queryWrapper.eq("a.account", account);
 	  }
 	  queryWrapper.eq("a.del_flag", 0);
+	  queryWrapper.eq("b.del_flag", 0);
 	  queryWrapper.gt("b.surplus_num", 0);
-	  queryWrapper.groupBy("a.order_number,a.order_date,a.customer_order_number,a.sales_type_text,a.customer_abbreviation,a.customer_name,a.supplier," +
-			  "a.sales_department,a.salesman,a.price_remarks,a.order_remarks,a.account,a.business_type_text," +
-			  "a.order_change_description,a.collaborative_route,b.item_number,b.small_po,b.inventory_name,b.colour,b.distribution_point,b.pack_id,b.coding_rules");
-	  queryWrapper.orderByDesc("a.order_number");
+//	  queryWrapper.gt("a.order_date","2021-12-30");
+	  queryWrapper.groupBy("a.order_number,a.customer_abbreviation,a.sales_department,a.salesman,a.account,b.pre_delivery_date,a.order_remarks," +
+			  "b.item_number,b.small_po,b.inventory_name,b.colour,b.distribution_point,b.pack_id,b.coding_rules");
 
 	  IPage<OrderDataVo> pageList = syShippingDetailsService.queryOrderData(page, queryWrapper);
 	  result.setSuccess(true);

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/SyShippingDetailsItem.java

@@ -283,4 +283,9 @@ public class SyShippingDetailsItem {
 	@ApiModelProperty(value = "分组ID")
 	private String groupId;
 
+	@Excel(name = "剩余数量", width = 15)
+	@ApiModelProperty(value = "剩余数量")
+	private java.math.BigDecimal surplusQuantity;
+
+
 }

+ 23 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/VO/OrderDataVo.java

@@ -186,4 +186,27 @@ public class OrderDataVo {
     //分组ID
     private String groupId;
 
+    @Excel(name = "供应商编码", width = 15)
+    @ApiModelProperty(value = "供应商编码")
+    private String supplierCode;
+
+    @Excel(name = "成衣件数", width = 15)
+    @ApiModelProperty(value = "成衣件数")
+    private String garmentNmb;
+
+    @Excel(name = "成衣工厂", width = 15)
+    @ApiModelProperty(value = "成衣工厂")
+    private String garmentFactory;
+
+    @Excel(name = "预发货日期", width = 15,format = "yyyy-MM-dd")
+    private String preDeliveryDate;
+
+    @Excel(name = "预完工日期", width = 15,format = "yyyy-MM-dd")
+    private String preCompletionDate;
+
+    @Excel(name = "箱数", width = 15)
+    @ApiModelProperty(value = "箱数")
+    private String boxNumber;
+
+
 }

+ 6 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/mapper/xml/SyShippingDetailsMapper.xml

@@ -6,17 +6,18 @@
 
         select b.sy_order_data_id as syOrderDataId,GROUP_CONCAT(b.id) as syOrderDataItemId ,a.order_number as orderNumber,b.item_number as itemNumber,b.small_po as smallPo,b.pk_org as pkOrg,a.order_date as orderDate,b.inventory_name as inventoryName,
          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,
+           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,a.supplier as supplier,b.unit_price_including_tax as unitPriceIncludingTax,
+           a.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,
-             a.order_remarks as orderRemarks,a.price_remarks as priceRemarks,a.order_change_description as orderChangeDescription from sy_order_data a
-        left join sy_order_data_item b
-        on a.id = b.sy_order_data_id and b.del_flag = 0
+             a.order_remarks as orderRemarks,a.price_remarks as priceRemarks,a.order_change_description as orderChangeDescription
+             from sy_order_data_item b
+        left join sy_order_data a
+        on a.id = b.sy_order_data_id
         ${ew.customSqlSegment}
 
-
     </select>
 
 <select id="queryShippingDetails" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo">

+ 1 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/service/impl/SyShippingDetailsServiceImpl.java

@@ -88,6 +88,7 @@ public class SyShippingDetailsServiceImpl extends ServiceImpl<SyShippingDetailsM
                  //设置主表自建
                  li.setShippingDetailsId(id);
                  li.setId(oConvertUtils.id());
+                 li.setSurplusQuantity(li.getShipmentQuantity());//剩余数量
                  syShippingDetailsItemList.add(li);
 
                  //回写销售订单剩余数量