浏览代码

装箱单修改成正式服账套

huxy 2 年之前
父节点
当前提交
e9de4e0be9

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

@@ -1093,14 +1093,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

@@ -1118,11 +1118,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","委外订单");//来源单据类型
@@ -1130,7 +1130,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","委外订单");//来源单据类型
@@ -1174,7 +1174,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){
@@ -1197,7 +1197,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;
@@ -1219,7 +1219,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{
@@ -1232,7 +1232,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{
@@ -1274,7 +1274,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);
@@ -1353,9 +1353,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为空");
 				}
 				//}
@@ -1409,7 +1409,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()));//采购单数量
 				}
@@ -1453,12 +1453,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);
@@ -1519,17 +1519,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,"销售发货单");
@@ -1615,14 +1615,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()+"账套推送成功!";
 		}
 
@@ -1897,10 +1897,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;//退出本次循环
@@ -1977,10 +1977,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 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/controller/SyPackingListTailoringController.java

@@ -1381,11 +1381,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

@@ -1128,11 +1128,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","委外订单");//来源单据类型
@@ -1140,7 +1140,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","委外订单");//来源单据类型
@@ -1198,7 +1198,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());
@@ -1347,12 +1347,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);
 		}