huxy преди 2 години
родител
ревизия
b4160390d2

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/controller/SyPreAssembledPackingListController.java

@@ -896,7 +896,7 @@ public class SyPreAssembledPackingListController extends JeecgController<SyPreAs
         Result result=new Result();
         long startTime = System.currentTimeMillis();
         try{
-            List<SyPreAssembledPackingListVo> pageLists = syPreAssembledPackingListService.selectPage(page, queryWrapper).getRecords();
+            List<SyPreAssembledPackingListVo> pageLists = syPreAssembledPackingListService.selectPage4(page, queryWrapper).getRecords();
             if(pageLists.size()==0){
                 result.setResult(null);
                 result.setMessage("导出失败!没有查询到数据");

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/mapper/SyPreAssembledPackingListMapper.java

@@ -28,6 +28,8 @@ public interface SyPreAssembledPackingListMapper extends BaseMapper<SyPreAssembl
 
    IPage<SyPreAssembledPackingListVo> selectPage(IPage<SyPreAssembledPackingListVo> page, @Param("ew") QueryWrapper<SyPreAssembledPackingListVo> queryWrapper);
 
+   IPage<SyPreAssembledPackingListVo> selectPage4(IPage<SyPreAssembledPackingListVo> page, @Param("ew") QueryWrapper<SyPreAssembledPackingListVo> queryWrapper);
+
    List<SyPreAssembledPackingListVo> selectPage2(  @Param("ew") QueryWrapper<SyPreAssembledPackingListVo> queryWrapper);
 
    List<SyPreAssembledPackingList> selectPage3(  @Param("ew") QueryWrapper<SyPreAssembledPackingListVo> queryWrapper);

+ 48 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/mapper/xml/SyPreAssembledPackingListMapper.xml

@@ -91,6 +91,54 @@
     ORDER BY a.`create_time` DESC
 	</select>
 
+    <select id="selectPage4" resultType="org.jeecg.modules.spapl.vo.SyPreAssembledPackingListVo">
+    /*获取汇总数据*/
+    SELECT
+        a.id,/*主键id*/
+        a.document_No,/*单据号*/
+        a.order_number,/*订单号*/
+        a.item_number, /*款号*/
+	    c.english_product_name englishProductName ,/*中文品名*/
+	    c.declaration_name  productName,/*英文品名*/
+        a.size_range,/*尺码范围*/
+        a.customer,/*客户名称*/
+        a.container_code,/*集装箱号*/
+        a.container_number,/*集装箱代号*/
+        a.u8_remarks,/*备注*/
+        b.garment_factory,/*成衣工厂*/
+        a.depositary_receipt_no,/*预托书号*/
+        a.memo,/*备注*/
+        a.order_type,/*订单类型*/
+        a.customer_abbreviation,/*客户简称*/
+        a.`update_time`,/*修改日期*/
+        a.`status`,/*单据状态*/
+        a.total_Boxes totalboxes,/*总箱数*/
+        a.`push_Status`,/*推送状态*/
+        a.is_Reference,/*是否被参照*/
+        b.master_Metering,/*计量单位*/
+        SUM(b.total) total,/*件数*/
+        b.hod as  preDeliveryDate,/*预发货日期*/
+        a.total_net_weight totalnetweight,/*总净重*/
+        a.total_gross_weight totalgrossweight,/*总毛重*/
+        a.total_volume totalvolume,/*总体积*/
+        a.total_price totalprice,/*总价*/
+        /*sum(b.total) totalquantity,*/
+        b.factory_Unit_Price factoryUnitPrice,/*工厂单价*/
+        a.spur_or_sub_order,/*采购委外订单号*/
+        b.inventory_name,/*存货名称*/
+        b.small_po,/*小po*/
+        b.colour,/*颜色*/
+        b.distribution_point/*分销点*/
+    FROM Sy_Pre_Assembled_Packing_List  a
+    LEFT JOIN Sy_Pre_Assembled_Packing_List_item  b
+    ON a.id=b.sy_pre_assembled_packing_list_id  AND b.del_flag='0'
+    left join sy_declaration_elements c
+    on a.elements_Id=c.id
+    ${ew.customSqlSegment}
+    GROUP BY a.id
+    ORDER BY b.garment_Factory,a.item_Number,b.small_Po
+	</select>
+
     <select id="selectPage3" resultType="org.jeecg.modules.spapl.entity.SyPreAssembledPackingList">
     /*获取汇总数据*/
     SELECT

+ 8 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/service/ISyPreAssembledPackingListService.java

@@ -67,6 +67,14 @@ public interface ISyPreAssembledPackingListService extends IService<SyPreAssembl
 	 */
 	public IPage<SyPreAssembledPackingListVo> selectPage(IPage<SyPreAssembledPackingListVo> page, QueryWrapper<SyPreAssembledPackingListVo> queryWrapper);
 
+	/**
+	 * 汇总预装箱单
+	 * @param page,queryWrapper
+	 * @return
+	 */
+	public IPage<SyPreAssembledPackingListVo> selectPage4(IPage<SyPreAssembledPackingListVo> page, QueryWrapper<SyPreAssembledPackingListVo> queryWrapper);
+
+
 	/**
 	 * 汇总预装箱单
 	 * @param queryWrapper

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/spapl/service/impl/SyPreAssembledPackingListServiceImpl.java

@@ -481,6 +481,11 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
 		return syPreAssembledPackingListMapper.selectPage(page,queryWrapper);
 	}
 
+	@Override
+	public IPage<SyPreAssembledPackingListVo> selectPage4(IPage<SyPreAssembledPackingListVo> page, QueryWrapper<SyPreAssembledPackingListVo> queryWrapper) {
+		return syPreAssembledPackingListMapper.selectPage4(page,queryWrapper);
+	}
+
 	@Override
 	public List<SyPreAssembledPackingListVo> selectPage2( QueryWrapper<SyPreAssembledPackingListVo> queryWrapper) {
 		return syPreAssembledPackingListMapper.selectPage2(queryWrapper);

+ 6 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splfi/controller/SyPackingListFabricController.java

@@ -1045,14 +1045,14 @@ public class SyPackingListFabricController {
 				 map.put("poid","one");//销售订单id
 				 for (int x=0;x<3;x++){//最多循环3次
 					 try {
-						 if (map.get("account").equals("903")){
-							 account="903";
+						 if (map.get("account").equals("103")){
+							 account="103";
 							 message+=syPackingListFabricService.three(main,map)+";";
-						 }else if(map.get("account").equals("902")){
-							 account="902";
+						 }else if(map.get("account").equals("102")){
+							 account="102";
 							 message+=syPackingListFabricService.two(main,map)+";";
-						 }else if(map.get("account").equals("901")){
-							 account="901";
+						 }else if(map.get("account").equals("101")){
+							 account="101";
 							 message+=syPackingListFabricService.one(main,map)+";";
 						 }else{
 						 	// 业务员,克重,包装方式,处理方式,是否手册纱,手册纱占比,尺码

+ 27 - 27
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splfi/service/impl/SyPackingListFabricServiceImpl.java

@@ -1079,11 +1079,11 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 				map6.put("CDEFINE12",venName);//供应商(打印)全称
 			}
 
-			if(mapt.get("account").equals("901")){
+			if(mapt.get("account").equals("101")){
 				map5.put("CDEFINE4",main.getLatestDateOfShipment2());//最终船期
 			}
 
-			if(mapt.get("account").equals("903")){//查询委外订单主表数据	顺序---1
+			if(mapt.get("account").equals("103")){//查询委外订单主表数据	顺序---1
 				orderData=syPackingListTailoringMapper.getOmOrPo("om_momain","cCode='"+mapt.get("mpOrder")+"'","moid");
 				map.put("CRDCODE","12");//入库类别(采购入库/委外入库)
 				map.put("CGLTYPE","委外订单");//来源单据类型
@@ -1091,7 +1091,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 				//map5.put("CGLTYPE","委外订单");//来源单据类型
 				map6.put("CGLTYPE","销售出库单");//来源单据类型
 			}else {//查询采购订单表数据
-				if(mapt.get("account1").equals("901")){
+				if(mapt.get("account1").equals("101")){
 					orderData=syPackingListTailoringMapper.getOmOrPo("om_momain","cCode='"+mapt.get("mpOrder")+"'","moid");
 					map.put("CRDCODE","12");//入库类别(采购入库/委外入库)
 					map.put("CGLTYPE","委外订单");//来源单据类型
@@ -1135,7 +1135,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 			int num1=1;
 			Map<String,BigDecimal> bigDecimalMap=new HashMap<>();//k:委外采购订单id v:合计数量
 			Map<String,Boolean> booleanMap=new HashMap<>();
-			if(mapt.get("account").equals("901")){//901账套
+			if(mapt.get("account").equals("101")){//101账套
 				for (SyPackingListFabricItem item : main.getSyPackingListFabricItem()){
 					//System.out.println("inventoryCcode\t"+item.getInventoryCcode());
 					if(item.getInventoryCcode().indexOf("04")!=-1||item.getInventoryCcode().indexOf("03")!=-1){
@@ -1158,7 +1158,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 				}
 			}
 			for (SyPackingListFabricItem item : main.getSyPackingListFabricItem()){
-				if(mapt.get("account").equals("901")&&booleanMap.containsKey(item.getInventoryCode())){
+				if(mapt.get("account").equals("101")&&booleanMap.containsKey(item.getInventoryCode())){
 					System.out.println("inventoryCode\t"+item.getInventoryCode());
 					if(booleanMap.get(item.getInventoryCode())){//为true就退出循环
 						continue;
@@ -1180,7 +1180,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 				map6.put("CACCID",mapt.get("account"));//账套号
 				map7.put("CACCID",mapt.get("account"));//账套号
 
-				if(mapt.get("account").equals("903")){
+				if(mapt.get("account").equals("103")){
 					mapItem.put("CBATCH",item.getDyelotNumber());//批号-缸号
 					mapItem4.put("CBATCH",item.getDyelotNumber());//批号-缸号
 				}else{
@@ -1193,7 +1193,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 				}
 				num1++;
 				Map<String,Object> orderDataItem=null;// inum
-				if(!mapt.get("account").equals("903")&&!mapt.get("account1").equals("901")){ //采购订单子表数据  顺序---2
+				if(!mapt.get("account").equals("103")&&!mapt.get("account1").equals("101")){ //采购订单子表数据  顺序---2
 					if(!mapt.containsKey("itemSort")){  //第一次进行循环
 						orderDataItem=syPackingListTailoringMapper.getOmOrPoItem("PO_PoDetails", "ID='"+item.getOmpoIdItem()+"'","ID");
 					}else{
@@ -1235,7 +1235,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 					mapItem.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
 					mapItem.put("CBATCHPROPERTY3",item.getRolls());
 					//map5.put("CGLTYPE","委外订单");
-					if(item.getInventoryCcode()!=null&&item.getInventoryCcode().indexOf("040")>-1&&mapt.get("account").equals("903")){//903账套中物料分类为040的印花面料
+					if(item.getInventoryCcode()!=null&&item.getInventoryCcode().indexOf("040")>-1&&mapt.get("account").equals("103")){//103账套中物料分类为040的印花面料
 						List<Map<String,Object>> orderDataItem3 =syPackingListFabricMapper.getOM_MOMaterials(item.getOmpoIdItem(),item.getInventoryCode());//委外订单子表
 						Map<String,Object> mapStr1=syPackingListFabricMapper.getOM_MOMain(item.getOmpoIdItem(),item.getInventoryCode());//供应商编码,存货编码
 						//System.out.println("mapStr1\n"+mapStr1);
@@ -1314,9 +1314,9 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 					mapItem3.put("SOAUTOIDCOL","ISOSID");//来源单据明细ID对应字段名(如果取销售订单主键,需传固定值ISOSID)
 					mapItem3.put("AUTOID_SO",orderDataItem2.get("iSOsID"));//来源单据明细ID
 					mapt.put("poid", orderDataItem2.get("id"));
-				}else if(mapt.get("account").equals("903")) {
+				}else if(mapt.get("account").equals("103")) {
 					throw new JeecgBootException(mapt.get("account")+"账套,委外订单子表行id"+mapItem.get("AUTOID_PO")+"的isosid为空");
-				}else if(mapt.get("account").equals("902")) {
+				}else if(mapt.get("account").equals("102")) {
 					throw new JeecgBootException(mapt.get("account")+"账套,委外订单子表行id"+mapItem.get("AUTOID_PO")+"的isosid为空");
 				}
 				//}
@@ -1370,7 +1370,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 					mapItem6.put("IQUANTITY",item.getActualDeclaredQuantity());//数量
 				}
 
-				if(mapt.get("account").equals("901")&&(item.getInventoryCcode().indexOf("04")!=-1||item.getInventoryCcode().indexOf("03")!=-1)){
+				if(mapt.get("account").equals("101")&&(item.getInventoryCcode().indexOf("04")!=-1||item.getInventoryCcode().indexOf("03")!=-1)){
 					mapItem.put("IQUANTITY",bigDecimalMap.get(item.getInventoryCode()));//入库单数量
 					mapItem5.put("IQUANTITY",bigDecimalMap.get(item.getInventoryCode()));//采购单数量
 				}
@@ -1414,12 +1414,12 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 			mapList5.add(map5);
 			map6.put("DETAILList",mapItems6);//明细集合
 			mapList6.add(map6);
-			if(mapt.get("customerCode").equals("T020001")&&!mapt.get("account").equals("901")){
-				mapt.put("account","901");//账套号
-			}else if(mapt.get("customerCode").equals("0001")&&!mapt.get("account").equals("902")){
-				mapt.put("account","902");//账套号
+			if(mapt.get("customerCode").equals("T020001")&&!mapt.get("account").equals("101")){
+				mapt.put("account","101");//账套号
+			}else if(mapt.get("customerCode").equals("0001")&&!mapt.get("account").equals("102")){
+				mapt.put("account","102");//账套号
 			}else{
-				mapt.put("account","904");//账套号
+				mapt.put("account","104");//账套号
 			}
 			mapt.put("itemSort",mapSort);
 			System.out.println("mapsort\n"+mapSort);
@@ -1480,17 +1480,17 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 							}
 						}
 						text(mapList5,"采购发票单");
-						if(!((Map) mapList.get(0)).get("CACCID").toString().equals("903")){
+						if(!((Map) mapList.get(0)).get("CACCID").toString().equals("103")){
 							JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");//采购发票单
 							recording=result(main,resturn5,"采购发票单",((Map) mapList.get(0)).get("CACCID").toString(),"2");//采购发票单
 							recording(main,recording);
 							this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn5.getJSONObject(0).get("U8ReceiptNo").toString()),"109");
-							if(((Map) mapList.get(0)).get("CACCID").toString().equals("901")){
+							if(((Map) mapList.get(0)).get("CACCID").toString().equals("101")){
 								return account+"账套推送成功!";
 							}
 						}
 					case "2":
-						if(account.equals("901")){
+						if(account.equals("101")){
 							return account+"账套推送成功!";
 						}
 						text(mapList3,"销售发货单");
@@ -1576,14 +1576,14 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 
 		text(mapList3,"销售发货单");
 		text(mapList5,"采购发票单");
-		if(!((Map) mapList.get(0)).get("CACCID").toString().equals("903")){
+		if(!((Map) mapList.get(0)).get("CACCID").toString().equals("103")){
 			JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");//采购发票单
 			recording=result(main,resturn5,"采购发票单",((Map) mapList.get(0)).get("CACCID").toString(),"2");//采购发票单
 			recording(main,recording);
 			this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn5.getJSONObject(0).get("U8ReceiptNo").toString()),"109");
 
 		}
-		if(((Map) mapList.get(0)).get("CACCID").toString().equals("901")){
+		if(((Map) mapList.get(0)).get("CACCID").toString().equals("101")){
 			return mapList.getJSONObject(0).get("CACCID").toString()+"账套推送成功!";
 		}
 
@@ -1858,10 +1858,10 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 					"or cWhCode='PT0005') "+//辅料
 					"and cCusCode='T020001'" ;//获取所有id
 			List<Map<String, Object>> listMain = new ArrayList<>();
-			if (account.equals("903")) {
-				listMain = senYuDataSourceThree.queryForList(sql);//903
+			if (account.equals("103")) {
+				listMain = senYuDataSourceThree.queryForList(sql);//103
 			} else {
-				listMain = senYuDataSourceTwo.queryForList(sql);//902
+				listMain = senYuDataSourceTwo.queryForList(sql);//102
 			}
 			if (listMain.size() == 0) {
 				continue;//退出本次循环
@@ -1938,10 +1938,10 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 							"and cCusCode='T020001' and\n" +
 							" a.ID  = "+sy.getU8Id().substring(3,sy.getU8Id().length());//查询主表全部拉取
 					List<Map<String, Object>> list = new ArrayList<>();
-					if (account.equals("903")) {
-						list = senYuDataSourceThree.queryForList(sql2);//903
+					if (account.equals("103")) {
+						list = senYuDataSourceThree.queryForList(sql2);//103
 					} else {
-						list = senYuDataSourceTwo.queryForList(sql2);//902
+						list = senYuDataSourceTwo.queryForList(sql2);//102
 					}
 					List<JSONObject> jianSon = JsonChangeUtils.toJSONObject(list);
 					List<SyPackingListFabricItem> items=new ArrayList<>();

+ 3 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/controller/SyPackingListTailoringController.java

@@ -981,10 +981,6 @@ public class SyPackingListTailoringController {
 					 }
 				 }
 				 if(x>3){
-					 //序号	账套号	ITEMCODE	PREPACK SKU	启始箱号	结束箱号	颜色(中英文)
-					 //外箱长度	外箱宽度	外箱高度	外箱净重	外箱毛重	NN.W
-					 //1	903	item_code	pre_packsku	1	20	COBALT
-					 //100.000	120.000	90.000	5.00	6.00	95.00	1583299233241485314	81b3eda8d70c415b8faf1f0685f47f26-295aa78ae43b49afaf85c9aec17c0276-9653c5da934f4342b9e49fc54ff16816
 					 SyPackingListTailoringItem item=new SyPackingListTailoringItem(
 							 		str.substring(0,str.length()-1).split(","),
 									 str1.substring(0,str1.length()-1).split(","),
@@ -1377,11 +1373,11 @@ public class SyPackingListTailoringController {
 				map.put("poid","one");//销售订单id
 				for (int x=0;x<3;x++){//最多循环3次
 					try {
-						if (map.get("account").equals("903")){
+						if (map.get("account").equals("103")){
 							message+=syPackingListTailoringService.three(main,map);
-						}else if(map.get("account").equals("902")){
+						}else if(map.get("account").equals("102")){
 							message+=syPackingListTailoringService.two(main,map);
-						}else if(map.get("account").equals("901")){
+						}else if(map.get("account").equals("101")){
 							message+=syPackingListTailoringService.one(main,map);
 						}else{
 							break;

+ 9 - 9
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/service/impl/SyPackingListTailoringServiceImpl.java

@@ -993,11 +993,11 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 				System.out.println("供应商全称\t"+venName);
 			}
 
-			if(mapt.get("account").equals("901")){
+			if(mapt.get("account").equals("101")){
 				map5.put("CDEFINE4",main.getLatestDateOfShipment2());//最终船期
 			}
 
-			if(mapt.get("account").equals("903")){//查询委外订单主表数据	顺序---1
+			if(mapt.get("account").equals("103")){//查询委外订单主表数据	顺序---1
 				orderData=syPackingListTailoringMapper.getOmOrPo("om_momain","cCode='"+mapt.get("mpOrder")+"'","moid");
 				map.put("CRDCODE","12");//入库类别(采购入库/委外入库)
 				map.put("CGLTYPE","委外订单");//来源单据类型
@@ -1005,7 +1005,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 				map5.put("CGLTYPE","委外订单");//来源单据类型
 				map6.put("CGLTYPE","销售出库单");//来源单据类型
 			}else {//查询采购订单表数据
-				if(mapt.get("account1").equals("901")){
+				if(mapt.get("account1").equals("101")){
 					orderData=syPackingListTailoringMapper.getOmOrPo("om_momain","cCode='"+mapt.get("mpOrder")+"'","moid");
 					map.put("CRDCODE","12");//入库类别(采购入库/委外入库)
 					map.put("CGLTYPE","委外订单");//来源单据类型
@@ -1063,7 +1063,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 
 
 				Map<String,Object> orderDataItem=null;// inum
-				if(!mapt.get("account").equals("903")&&!mapt.get("account1").equals("901")){ //采购订单子表数据  顺序---2
+				if(!mapt.get("account").equals("103")&&!mapt.get("account1").equals("101")){ //采购订单子表数据  顺序---2
 					System.out.println("mapt.get(\"orderNumber\")\n"+mapt.get("orderNumber"));
 					System.out.println("mapt.containsKey(\"itemSort\")\t"+mapt.containsKey("itemSort"));
 					System.out.println("item.getOmpoIdItem()\t"+item.getOmpoIdItem());
@@ -1212,12 +1212,12 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 			map6.put("DETAILList",mapItems6);//明细集合
 			mapList6.add(map6);
 
-			if(mapt.get("customerCode").equals("T020001")&&!mapt.get("account").equals("901")){
-				mapt.put("account","901");//账套号
-			}else if(mapt.get("customerCode").equals("0001")&&!mapt.get("account").equals("902")){
-				mapt.put("account","902");//账套号
+			if(mapt.get("customerCode").equals("T020001")&&!mapt.get("account").equals("101")){
+				mapt.put("account","101");//账套号
+			}else if(mapt.get("customerCode").equals("0001")&&!mapt.get("account").equals("102")){
+				mapt.put("account","102");//账套号
 			}else{
-				mapt.put("account","904");//账套号
+				mapt.put("account","104");//账套号
 			}
 			mapt.put("itemSort",mapSort);
 		}