瀏覽代碼

单证问题修改

zengtx 2 年之前
父節點
當前提交
cda948b003

+ 2 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/letterDeposit/mapper/xml/SyLetterDepositMapper.xml

@@ -100,7 +100,7 @@ total_gross_weight as totalGrossWeight,total_net_weight as totalNetWeight,total_
 container_code as containerCode,container_number as containerNumber,unit_price as unitPrice,sum(total_price) as totalPrice,
 hod,salesman,sales_Department as salesDepartment,spur_or_sub_order as spurOrSubOrder,supplier,client_abbreviation as clientAbbreviation
          from sy_letter_deposit_item
-         where del_flag = 0 and sy_letter_deposit_id = #{syId} group by groupid order by item_number,small_po desc) t GROUP BY letterGroupid
+         where del_flag = 0 and sy_letter_deposit_id = #{syId} group by groupid order by supplier,salesman,item_number,small_po,unit_price) t GROUP BY letterGroupid
 
     </select>
 
@@ -124,6 +124,6 @@ c.english_product_name as englishName,'PCS' as pcs, 'CTNS' as ctns,'KGS' as kgs,
          left join sy_declaration_elements c
          on b.elements_id = c.id
          where a.del_flag = 0 and a.sy_letter_deposit_id = #{id}  group by groupid  order by a.item_number,a.small_po desc
-         ) t GROUP BY t.itemNumber,t.smallPo,t.unitPrice order by t.supplier,t.itemNumber,t.smallPo,t.englishName,t.unitPrice
+         ) t GROUP BY t.itemNumber,t.smallPo,t.unitPrice order by t.supplier,t.salesman,t.itemNumber,t.smallPo,t.unitPrice
     </select>
 </mapper>

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

@@ -5,7 +5,7 @@
     <select id="queryOrderData" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.OrderDataVo">
 
         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,
+         b.colour as colour,b.size as size,GROUP_CONCAT(DISTINCT 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,guangpei_gate_width as guangpeiGateWidth,b.master_metering as masterMetering,
@@ -33,7 +33,7 @@ a.end_customer) as endCustomer,
 
             AND b.inventory_ccode like '19%'
         group by concat(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)
+        b.item_number,b.small_po,b.inventory_name,b.colour,b.distribution_point)
 
     </select>
 

+ 9 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/controller/SyShippingOrderController.java

@@ -650,6 +650,9 @@ public class SyShippingOrderController extends JeecgController<SyShippingOrder,
 			 } else {
 				 entity.setLatestDateOfShipment("");
 			 }
+			 String ddate = sf.format(entity.getShippingOrderDate());
+             entity.setDdate(ddate);
+
 			 int sort = 1;
 			 // 只要不是成品,需要做汇总操作,汇总条件为报关品名+HSCODE
 			 if (entity.getReadyFabric().equals("成衣")) {
@@ -914,6 +917,12 @@ public class SyShippingOrderController extends JeecgController<SyShippingOrder,
 						 excelWriter.fill(entity, fillConfig, writeSheet5);
 						 excelWriter.fill(list, fillConfig, writeSheet5);
 
+//---------------------------托书------------------------------
+						 WriteSheet writeSheet6 = EasyExcel.writerSheet("托书").build();
+						 excelWriter.fill(entity, fillConfig, writeSheet6);
+						 excelWriter.fill(new FillWrapper("list", list), fillConfig, writeSheet6);
+						 excelWriter.fill(new FillWrapper("maiTouList", maiTouList), fillConfig, writeSheet6);
+
 
 						 //关流
 						 excelWriter.finish();

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/entity/SyShippingOrder.java

@@ -298,6 +298,8 @@ public class SyShippingOrder {
 	//托书出口口岸中文
 	@TableField(exist = false)
 	private String exportPortName;
+	@TableField(exist = false)
+	private String ddate;
 
 	/**
 	 * 打印使用字段

+ 5 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/entity/SyShippingOrderItem.java

@@ -86,11 +86,13 @@ public class SyShippingOrderItem {
     @ApiModelProperty(value = "单价")
 	private java.math.BigDecimal unitPrice;
 	/**预发货日期*/
-	@Excel(name = "预发货日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+	@Excel(name = "预发货日期", width = 20, format = "yyyy-MM-dd")
+	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
     @ApiModelProperty(value = "预发货日期")
 	private java.util.Date preShipmentDate;
+	@TableField(exist = false)
+	private String preDate;
 	/**业务员*/
 	@Excel(name = "业务员", width = 15)
     @ApiModelProperty(value = "业务员")

+ 5 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/mapper/xml/SyShippingOrderMapper.xml

@@ -115,13 +115,13 @@ a.salesman, a.operating_department as operatingDepartment, a.purchase_outsourcin
             left join sy_packing_list_tailoring_item c
             on a.tailoring_fabric_item_id = c.id
             where a.del_flag = 0 and sy_shipping_order_item_id = #{id}
-            group by c.sy_packing_list_tailoring_id order by a.supplier,a.style_number,a.smail_po,a.english_name,a.unit_price
+            group by a.tailoring_fabric_id order by a.supplier,a.salesman,a.style_number,a.smail_po,a.unit_price
         </if>
         <if test='type == "面辅料"'>
             left join sy_packing_list_fabric_item c
             on a.tailoring_fabric_item_id = c.id
             where a.del_flag = 0 and sy_shipping_order_item_id = #{id}
-            group by a.sy_packing_list_fabric_id order by style_number,smail_po desc
+            group by a.tailoring_fabric_id order by style_number,smail_po desc
         </if>
 
     </select>
@@ -149,12 +149,12 @@ where a.sy_shipping_order_item_id =#{id}
     <!--    成衣托书发票-->
     <select id="queryEelement" resultType="org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrderItem">
 
-select t.supplier,t.id, t.hsCode,sum(t.boxNumber) as boxNumber, t.declarationName,t.englishProductName,sum(t.number) as number,round(t.unitPrice,2) as unitPrice,
+select t.preDate,t.supplier,t.id, t.hsCode,sum(t.boxNumber) as boxNumber, t.declarationName,t.englishProductName,sum(t.number) as number,round(t.unitPrice,2) as unitPrice,
 round(sum(t.totalPrice),2) as totalPrice,round(sum(t.grossWeight),2) as grossWeight,round(sum(t.netWeight),2) as netWeight,t.pcs,t.pacs,
 round(sum(t.volume),3) as volume,t.curr,t.dree,t.place,t.certificate,t.styleNumber,t.smailPo,t.orderNumber,t.ctns,t.kgs,t.cbm,pkOrg,t.factoryUnitPrice,
 t.outerBoxLength,t.outerBoxWidth,t.outerBoxHeight,t.hod,t.unIt,t.emp,t.purchaseOutsourcingOrderNo,t.packId,t.salesman,t.earliestDeliveryDate,t.declarationUnit,
 t.clientAbbreviation,t.pcGw,t.priceGw from (
-select a.garment_factory as garmentFactory,a.supplier,GROUP_CONCAT(a.id) as id,b.hs_code as hsCode,b.declaration_name as declarationName,b.english_product_name as englishProductName,sum(a.number) as number,a.unit_price as unitPrice,
+select DATE_FORMAT(a.pre_shipment_date,'%y-%m-%d') as preDate,a.garment_factory as garmentFactory,a.supplier,GROUP_CONCAT(a.id) as id,b.hs_code as hsCode,b.declaration_name as declarationName,b.english_product_name as englishProductName,sum(a.number) as number,a.unit_price as unitPrice,
 sum(a.number*a.unit_price) as totalPrice,a.gross_weight as grossWeight,a.net_weight as netWeight,a.master_metering as pcs,a.volume as volume,a.elements_Id as elementsId,
 'USD' as curr,'CHINA' as dree,'宁波其他/宁波象山县' as place,'照章征税' as certificate,a.style_number as styleNumber,a.smail_po as smailPo,a.box_number as boxNumber,
 a.order_number as orderNumber,a.client_abbreviation as clientAbbreviation,'PCS' as pacs,'CTNS' as ctns,'KGS' as kgs,'CBM' as cbm,c.salesman as salesman,'PC' as pcGw,'/PC' as priceGw,
@@ -166,7 +166,7 @@ on a.elements_Id = b.id
 left join sy_packing_list_tailoring_item c
 on a.tailoring_fabric_item_id = c.id
 where a.sy_shipping_order_item_id =#{id}
-group by c.group_id) t group by t.elementsId,t.styleNumber,t.smailPo,t.unitPrice order by t.garmentFactory,t.salesman,t.styleNumber
+group by c.group_id) t group by t.elementsId,t.styleNumber,t.smailPo,t.unitPrice order by t.supplier,t.salesman,t.styleNumber,t.smailPo,t.unitPrice
 
     </select>
 

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/service/impl/SyShippingOrderServiceImpl.java

@@ -292,8 +292,8 @@ public class SyShippingOrderServiceImpl extends ServiceImpl<SyShippingOrderMappe
                         syShippingOrderItem.setStyleNumber(li.getStyleNumber());//款号
                         syShippingOrderItem.setPurchaseOutsourcingOrderNo(lit.getSpurOrSubOrder());
                         syShippingOrderItem.setTotalPrice(lit.getTotalPrice());//金额
-                        syShippingOrderItem.setSupplier(null);
-                        syShippingOrderItem.setSupplierCode(null);
+                        syShippingOrderItem.setSupplier(lit.getSupplier());
+                        syShippingOrderItem.setSupplierCode(lit.getSupplierCode());
                         syShippingOrderItem.setRSupplier(null);//染厂供应商
                         syShippingOrderItem.setRSupplierCode(null);//染厂供应商编码
                         syShippingOrderItem.setGarmentFactory(lit.getGarmentFactory());//成衣工厂
@@ -821,7 +821,7 @@ public class SyShippingOrderServiceImpl extends ServiceImpl<SyShippingOrderMappe
             }
 
             //修改最大编码
-            purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(cCode),"09");
+            purchaseWarehousingMapper.updateVoucherHistoryCNumber(cCode,"09");
 
             //修改最大ID
             syShippingOrderMapper.updateUaIdentity(id,itemList.get(0).get("pkOrg").toString());