Browse Source

出运明细导出调整

zengtx 2 years ago
parent
commit
4a59c04859

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

@@ -1213,6 +1213,7 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 			 syDeclarationElementsEntityNull.setItemNumber(zero.getItemNumber());
 			 syDeclarationElementsEntityNull.setInventoryName(zero.getInventoryName());
 			 syDeclarationElementsEntityNull.setOrderNumber(zero.getOrderNumber());
+			 syDeclarationElementsEntityNull.setEnglishProductName(zero.getInventoryEnglishName());
 
 			 List<SyDeclarationElementsItem> entityList = new ArrayList<>();
 			 syDeclarationElementsEntityNull.setSyDeclarationElementsItemList(entityList);
@@ -1508,6 +1509,17 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 			 //集合转map
 			 for (SyShippingDetailsVo li : pageList.getRecords()) {
 
+			 	//处理季节
+				 String seasonSplit[] = li.getOrderNumber().split("-");
+				 li.setSeason(seasonSplit[0]);
+				 //处理客户部门
+				 if(oConvertUtils.isNotEmpty(li.getInventoryCurrencyName())) {
+					 String CurrencyNameSplit[] = li.getInventoryCurrencyName().split("-");
+					 li.setInventoryCurrencyName(CurrencyNameSplit[0]);
+					 //处理类型
+					 li.setType(CurrencyNameSplit[1]);
+				 }
+
 			 	li.setPreDeliveryDate1(sf.format(li.getPreDeliveryDate()));
 				 orderQuantity = orderQuantity.add(li.getOrderQuantity());
 				 BigDecimal p = new BigDecimal(li.getSalesUnitPrice()).multiply(li.getOrderQuantity());

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

@@ -386,6 +386,19 @@ public class SyShippingDetailsItem {
 	private String isPull;
 	@Excel(name = "下游箱单回写的剩余数量", width = 15)
 	private BigDecimal packSurplus;
+	/**运输方式*/
+	@Excel(name = "运输方式", width = 15)
+	@ApiModelProperty(value = "运输方式")
+	private String typeOfShipping;
+
+	/**客户部门*/
+	@Excel(name = "客户部门", width = 15)
+	@ApiModelProperty(value = "客户部门")
+	private String inventoryCurrencyName;
+	/**U8英文名称*/
+	@Excel(name = "U8英文名称", width = 15)
+	@ApiModelProperty(value = "U8英文名称")
+	private String inventoryEnglishName;
 
 	public SyShippingDetailsItem(){}
 
@@ -472,6 +485,8 @@ public class SyShippingDetailsItem {
         this.dArriveDate = orderDataVo.getDArriveDate();
         this.masterMetering = orderDataVo.getMasterMetering();
         this.isTc = orderDataVo.getIsTc();
+        this.inventoryCurrencyName = orderDataVo.getInventoryCurrencyName();
+        this.inventoryEnglishName = orderDataVo.getInventoryEnglishName();
 
 	}
 }

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

@@ -282,4 +282,13 @@ public class OrderDataVo {
     private String refer;
 
     private String isTc;
+
+    /**客户部门*/
+    @Excel(name = "客户部门", width = 15)
+    @ApiModelProperty(value = "客户部门")
+    private String inventoryCurrencyName;
+    /**U8英文名称*/
+    @Excel(name = "U8英文名称", width = 15)
+    @ApiModelProperty(value = "U8英文名称")
+    private String inventoryEnglishName;
 }

+ 17 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/VO/SyShippingDetailsVo.java

@@ -127,8 +127,6 @@ public class SyShippingDetailsVo {
     private java.util.Date preCompletionDate;
 
   //  @Excel(name = "到货日期", width = 20, format = "yyyy-MM-dd")
-    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
-    @DateTimeFormat(pattern="yyyy-MM-dd")
     @ApiModelProperty(value = "到货日期")
     private String arrivalDate;
     @Excel(name = "存货编码", width = 15)
@@ -279,6 +277,15 @@ public class SyShippingDetailsVo {
     @ApiModelProperty(value = "规格型号")
     private String specificationAndModel;
 
+    /**客户部门*/
+    @Excel(name = "客户部门", width = 15)
+    @ApiModelProperty(value = "客户部门")
+    private String inventoryCurrencyName;
+    /**U8英文名称*/
+    @Excel(name = "U8英文名称", width = 15)
+    @ApiModelProperty(value = "U8英文名称")
+    private String inventoryEnglishName;
+
 
     //0-面辅料/1-成衣
     private String flourOrGarment;
@@ -315,12 +322,20 @@ public class SyShippingDetailsVo {
     private String guangpeiGateWidth;
     @ApiModelProperty(value = "克重")
     private String weight;
+    @ApiModelProperty(value = "运输方式")
+    private String typeOfShipping;
+
+    //出运明细列表导出类型
+    private String type;
 
     //单位
     private String masterMetering;
     //金额
     private BigDecimal price;
 
+    //季节
+    private String season;
+
     //报关数量
     private String customsQuantity;
 

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

@@ -71,21 +71,21 @@ a.end_customer) as endCustomer,
     b.small_po as smallPo,b.pack_id as packId,b.pre_delivery_date as preDeliveryDate,b.order_date as orderDate,b.inventory_ccode as inventoryCcode,
     sum(b.shipment_quantity) as shipmentQuantity,b.customs_declaration_unit_price as customsDeclarationUnitPrice,sum(b.order_quantity) as orderQuantity,
     b.is_tc as isTc,b.distribution_point as distributionPoint,b.item_number as itemNumber,b.business_type_text as businessTypeText,
-    b.arrival_date as arrivalDate,b.inventory_name as inventoryName,b.sales_unit_price as salesUnitPrice,b.order_remaining_quantity as orderRemainingQuantity,
+    b.inventory_name as inventoryName,b.sales_unit_price as salesUnitPrice,b.order_remaining_quantity as orderRemainingQuantity,
     b.pur_or_sub_order as purOrSubOrder,a.order_type as orderType,b.factory_unit_price as factoryUnitPrice,b.third_party as thirdParty,b.customer_order as customerOrder,
     b.material_composition as materialComposition,b.currency_text as currencyText,b.brand_side as brandSide,b.deposit_ratio as depositRatio,
-    b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,
+    b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,b.type_of_shipping as typeOfShipping,
     if(left(b.inventory_ccode,2)='19',
     case customer_abbreviation
     when 'International Apparel Group' then end_customer
     when '宁波森语' then end_customer
     else customer_abbreviation end ,
-    end_customer) as endCustomer,
+    end_customer) as endCustomer,b.inventory_currency_name as inventoryCurrencyName,b.inventory_english_name as inventoryEnglishName,
     b.order_remarks as orderRemarks,b.price_remarks as priceRemarks,b.order_change_description as orderChangeDescription,b.pre_completion_date as preCompletionDate,
     b.sales_type_text as salesTypeText,b.customer_name as customerName,b.exchange_rate as exchangeRate,a.whole_order_total as wholeOrderTotal,
     b.declaration_elements as declarationElements,b.number_of_sets as numberOfSets,a.chinese_name as chineseName,b.account as account,b.supplier as supplier,
     b.garment_factory as garmentFactory,b.elements_id as elementsId,b.coding_rules as codingRules,b.colour as colour,b.group_id as groupId,
-     c.declaration_name as declarationName,c.hs_code as hsCode,c.english_product_name as englishProductName,b.d_arrive_date as dArriveDate
+     c.declaration_name as declarationName,c.hs_code as hsCode,c.english_product_name as englishProductName,FROM_UNIXTIME(left(b.d_arrive_date,10),'%Y-%m-%d') as arrivalDate
      from sy_shipping_details a
 left join sy_shipping_details_item b
 on a.id = b.shipping_details_id and b.del_flag = 0
@@ -104,21 +104,21 @@ ${ew.customSqlSegment} and  t.inventoryCcode LIKE '19%' order by t.itemNumber,t.
     b.small_po as smallPo,b.pack_id as packId,b.pre_delivery_date as preDeliveryDate,b.order_date as orderDate,b.inventory_ccode as inventoryCcode,
     sum(b.shipment_quantity) as shipmentQuantity,b.customs_declaration_unit_price as customsDeclarationUnitPrice,sum(b.order_quantity) as orderQuantity,
     b.is_tc as isTc,b.distribution_point as distributionPoint,b.item_number as itemNumber,b.business_type_text as businessTypeText,
-    b.arrival_date as arrivalDate,b.inventory_name as inventoryName,b.sales_unit_price as salesUnitPrice,b.order_remaining_quantity as orderRemainingQuantity,
+    b.inventory_name as inventoryName,b.sales_unit_price as salesUnitPrice,b.order_remaining_quantity as orderRemainingQuantity,
     b.pur_or_sub_order as purOrSubOrder,a.order_type as orderType,b.factory_unit_price as factoryUnitPrice,b.third_party as thirdParty,b.customer_order as customerOrder,
     b.material_composition as materialComposition,b.currency_text as currencyText,b.brand_side as brandSide,b.deposit_ratio as depositRatio,
-    b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,
+    b.deposit as deposit,b.collaborative_route as collaborativeRoute,b.term_of_payment as termOfPayment,b.type_of_shipping as typeOfShipping,
       if(left(b.inventory_ccode,2)='19',
     case customer_abbreviation
     when 'International Apparel Group' then end_customer
     when '宁波森语' then end_customer
     else customer_abbreviation end ,
-    end_customer) as endCustomer,
+    end_customer) as endCustomer,b.inventory_currency_name as inventoryCurrencyName,b.inventory_english_name as inventoryEnglishName,
     b.order_remarks as orderRemarks,b.price_remarks as priceRemarks,b.order_change_description as orderChangeDescription,b.pre_completion_date as preCompletionDate,
     b.sales_type_text as salesTypeText,b.customer_name as customerName,b.exchange_rate as exchangeRate,a.whole_order_total as wholeOrderTotal,
     b.declaration_elements as declarationElements,b.number_of_sets as numberOfSets,a.chinese_name as chineseName,b.account as account,b.supplier as supplier,
     b.garment_factory as garmentFactory,b.elements_id as elementsId,b.coding_rules as codingRules,b.colour as colour,b.group_id as groupId,
-     c.declaration_name as declarationName,c.hs_code as hsCode,c.english_product_name as englishProductName,b.d_arrive_date as dArriveDate
+     c.declaration_name as declarationName,c.hs_code as hsCode,c.english_product_name as englishProductName,FROM_UNIXTIME(left(b.d_arrive_date,10),'%Y-%m-%d') as arrivalDate
      from sy_shipping_details a
 left join sy_shipping_details_item b
 on a.id = b.shipping_details_id and b.del_flag = 0
@@ -184,7 +184,7 @@ ${ew.customSqlSegment} and  t.inventoryCcode not LIKE '19%'
             when '宁波森语' then a.end_customer
             else a.customer_abbreviation end ,
             a.end_customer) as endCustomer,
-            b.is_tc as isTc,
+            b.is_tc as isTc,b.inventory_currency_name as inventoryCurrencyName,b.inventory_english_name as inventoryEnglishName,
              a.order_remarks as orderRemarks,a.price_remarks as priceRemarks,a.order_change_description as orderChangeDescription,b.supplier as supplier,b.i_tax_price as iTaxPrice,
              case when b.ymoney is null then '0' else b.ymoney end as ymoney,b.ompo_id as ompoId,b.inventory_ccode as inventoryCcode,b.d_arrive_date as dArriveDate,b.master_metering as masterMetering,
              b.ompo_id_item as ompoIdItem,b.ompo_account as ompoAccount,b.ompo_code as purOrSubOrder,b.r_supplier_code as rSupplierCode,b.r_supplier as rSupplier

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

@@ -117,6 +117,7 @@ public class SyShippingDetailsServiceImpl extends ServiceImpl<SyShippingDetailsM
             for (OrderDataVo li:pageList.getRecords()){
                 //实现构造函数方法赋值
                 SyShippingDetailsItem entity = new SyShippingDetailsItem(li);
+                entity.setTypeOfShipping("BY SEA");//运输方式默认海运
                 //设置分组ID
                 if(ids.contains(li.getSyOrderDataItemId())){
                     entity.setGroupId(gourpid);