Browse Source

成衣托书导出文档 合并规则 原款号+PO 现更改为 款号+PO+单价

zengtx 2 years ago
parent
commit
b82f6e3a31

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

@@ -1057,8 +1057,8 @@ public class SyShippingOrderController extends JeecgController<SyShippingOrder,
 					 //查询数据字典-公司抬头
 					 List<DictModel> test = sysDictService.queryDictItemsByCode("company_title");
 
-					 if (oConvertUtils.isNotEmpty(list.get(0).getClientAbbreviation())) {
-						 if (list.get(0).getClientAbbreviation().equals("宁波森语")) {
+					 if (oConvertUtils.isNotEmpty(list.get(0).getPkOrg())) {
+						 if (list.get(0).getPkOrg().equals("901")) {
 							 String split[] = test.get(0).getValue().split("\\+");
 							 for (int i = 0; i < split.length; i++) {
 								 Map<String, Object> maiTou = new HashMap<>();
@@ -1066,7 +1066,7 @@ public class SyShippingOrderController extends JeecgController<SyShippingOrder,
 								 taitouList.add(maiTou);
 							 }
 							 entity.setClientAbbreviation(split[0]);
-						 } else {
+						 } else if (list.get(0).getPkOrg().equals("902")){
 							 String split[] = test.get(1).getValue().split("\\+");
 							 for (int i = 0; i < split.length; i++) {
 								 Map<String, Object> maiTou = new HashMap<>();
@@ -1074,16 +1074,25 @@ public class SyShippingOrderController extends JeecgController<SyShippingOrder,
 								 taitouList.add(maiTou);
 							 }
 							 entity.setClientAbbreviation(split[0]);
+						 }if (list.get(0).getPkOrg().equals("903")){
+							 String split[] = test.get(1).getValue().split("\\+");
+							 for (int i = 0; i < split.length; i++) {
+								 Map<String, Object> maiTou = new HashMap<>();
+								 maiTou.put("name", split[i]);
+								 taitouList.add(maiTou);
+							 }
 						 }
-					 } else {
-						 String split[] = test.get(1).getValue().split("\\+");
-						 for (int i = 0; i < split.length; i++) {
-							 Map<String, Object> maiTou = new HashMap<>();
-							 maiTou.put("name", split[i]);
-							 taitouList.add(maiTou);
-						 }
-						 entity.setClientAbbreviation(split[0]);
 					 }
+					 //2023.1.13注释
+//					 else {
+//						 String split[] = test.get(1).getValue().split("\\+");
+//						 for (int i = 0; i < split.length; i++) {
+//							 Map<String, Object> maiTou = new HashMap<>();
+//							 maiTou.put("name", split[i]);
+//							 taitouList.add(maiTou);
+//						 }
+//						 entity.setClientAbbreviation(split[0]);
+//					 }
 
 					 //转map
 					 Field[] fields = entity.getClass().getDeclaredFields();

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

@@ -118,17 +118,17 @@ where a.sy_shipping_order_item_id =#{id}
 
 select 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,
-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,
+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.clientAbbreviation from (
 select 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,'CHIAN' 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,'CTNS' as ctns,'KGS' as kgs,'CBM' as cbm
+a.order_number as orderNumber,a.client_abbreviation as clientAbbreviation,'CTNS' as ctns,'KGS' as kgs,'CBM' as cbm,a.pk_org as pkOrg
  from sy_shipping_order_item a
 left join sy_declaration_elements b
 on a.elements_Id = b.id
 where a.sy_shipping_order_item_id =#{id}
-group by a.group_id) t group by t.elementsId,t.smailPo order by t.styleNumber,t.smailPo desc
+group by a.group_id) t group by t.elementsId,t.styleNumber,t.smailPo,t.unitPrice order by t.styleNumber,t.smailPo desc
 
     </select>