|  | @@ -715,21 +715,35 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 | 
	
		
			
				|  |  |  	 */
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  |  	@Transactional
 | 
	
		
			
				|  |  | -	public boolean submitBatch(String[] ids) {
 | 
	
		
			
				|  |  | -		boolean bool=false;
 | 
	
		
			
				|  |  | -		try{
 | 
	
		
			
				|  |  | -			for(String id:ids){
 | 
	
		
			
				|  |  | +	public String submitBatch(String[] ids) {
 | 
	
		
			
				|  |  | +		String message="";
 | 
	
		
			
				|  |  | +		int num=0;
 | 
	
		
			
				|  |  | +		for(String id:ids){
 | 
	
		
			
				|  |  | +			num++;
 | 
	
		
			
				|  |  | +			QueryWrapper queryWrapper=new QueryWrapper();
 | 
	
		
			
				|  |  | +			queryWrapper.select("sum(net_Weight) net_Weight,sum(gross_Weight) grossWeight,rolls rolls");//获取净重合计、毛重、匹数合计
 | 
	
		
			
				|  |  | +			queryWrapper.eq("sy_Packing_List_Fabric_Id",id);
 | 
	
		
			
				|  |  | +			SyPackingListFabricItem fabricItem=syPackingListFabricItemService.getOne(queryWrapper);
 | 
	
		
			
				|  |  | +			if(fabricItem.getNetWeight()==null||fabricItem.getNetWeight().doubleValue()==0){
 | 
	
		
			
				|  |  | +				 message+="第"+num+"条提交失败,净重未填或净重为0";
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			else if(fabricItem.getGrossWeight()==null||fabricItem.getGrossWeight().doubleValue()==0){
 | 
	
		
			
				|  |  | +				message+="第"+num+"条提交失败,毛重未填或毛重为0";
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			else if(fabricItem.getNetWeight()==null||fabricItem.getNetWeight().doubleValue()==0){
 | 
	
		
			
				|  |  | +				message+="第"+num+"条提交失败,匹数(箱数)未填或匹数(箱数)为0";
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			else{
 | 
	
		
			
				|  |  |  				SyPackingListFabric syPackingListFabric=syPackingListFabricMapper.selectById(id);
 | 
	
		
			
				|  |  |  				syPackingListFabric.setStatus("1");//提交
 | 
	
		
			
				|  |  |  				syPackingListFabricMapper.updateById(syPackingListFabric);//修改
 | 
	
		
			
				|  |  | +				message+="第"+num+"条提交成功";
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  | -			bool=true;
 | 
	
		
			
				|  |  | -		}catch (Exception e){
 | 
	
		
			
				|  |  | -			log.error(e.getMessage());
 | 
	
		
			
				|  |  | -			bool=false;
 | 
	
		
			
				|  |  | -		}finally {
 | 
	
		
			
				|  |  | -			return bool;
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | +		if(message.indexOf("失败")<0&&message.indexOf("成功")>0){
 | 
	
		
			
				|  |  | +			message="全部提交成功";
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		return message;
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	/**
 | 
	
	
		
			
				|  | @@ -1200,7 +1214,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 | 
	
		
			
				|  |  |  		boolean ycIsPush=true;
 | 
	
		
			
				|  |  |  		if (main!=null){
 | 
	
		
			
				|  |  |  			Map<String, Order> mapSort=new HashMap<>();
 | 
	
		
			
				|  |  | -			String date2 = main.getLatestDateOfShipment2().substring(0,10);//装柜日期
 | 
	
		
			
				|  |  | +			String date2 = main.getTheFinalShippingDate().substring(0,10);//装柜日期
 | 
	
		
			
				|  |  |  			String createBy="进出口平台管理员";
 | 
	
		
			
				|  |  |  			String istc=main.getSyPackingListFabricItem().get(0).getIsTc();
 | 
	
		
			
				|  |  |  			if (istc!=null&&istc.equals("1")){
 | 
	
	
		
			
				|  | @@ -1735,24 +1749,24 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 | 
	
		
			
				|  |  |  		String isSucceed=null;
 | 
	
		
			
				|  |  |  		//try{
 | 
	
		
			
				|  |  |  			if(mapList2!=null&&mapList2.size()>0&&main.getIsSucceed()!=null&&main.getIsSucceed().indexOf("-7-")>0&&ycIsPush){//印花
 | 
	
		
			
				|  |  | +				redisUtil.set("pushsno006", pushsno006);//材料出库单
 | 
	
		
			
				|  |  |  				JSONArray resturn2 = InterfaceConnUtils.doPost(mapList2,"materialout_import");//材料出库单
 | 
	
		
			
				|  |  |  				isSucceed=result(main,resturn2,"材料出库单",((Map) mapList2.get(0)).get("CACCID").toString(),"2");//材料出库单
 | 
	
		
			
				|  |  | -				redisUtil.set("pushsno006", pushsno006);//材料出库单
 | 
	
		
			
				|  |  |  				isSucceed(main,isSucceed);
 | 
	
		
			
				|  |  |  				//this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn2.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  			else if(mapList2!=null&&mapList2.size()>0&&main.getIsSucceed()==null){
 | 
	
		
			
				|  |  | +				redisUtil.set("pushsno001", pushsno007);//印厂采购入库单
 | 
	
		
			
				|  |  |  				JSONArray resturn7 = InterfaceConnUtils.doPost(mapList7,"purchasein_import");//采购入库单
 | 
	
		
			
				|  |  |  				isSucceed=result(main,resturn7,"印厂采购入库单",((Map) mapList.get(0)).get("CACCID").toString(),"7");//采购入库单
 | 
	
		
			
				|  |  | -				redisUtil.set("pushsno001", pushsno007);//印厂采购入库单
 | 
	
		
			
				|  |  |  				pushsno001=org.jeecg.modules.system.util.oConvertUtils.addOne(pushsno001);
 | 
	
		
			
				|  |  |  				isSucceed(main,isSucceed);
 | 
	
		
			
				|  |  |  				//this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn7.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +				redisUtil.set("pushsno006", pushsno006);//材料出库单
 | 
	
		
			
				|  |  |  				JSONArray resturn2 = InterfaceConnUtils.doPost(mapList2,"materialout_import");//材料出库单
 | 
	
		
			
				|  |  |  				isSucceed=result(main,resturn2,"材料出库单",((Map) mapList2.get(0)).get("CACCID").toString(),"2");//材料出库单
 | 
	
		
			
				|  |  |  				isSucceed(main,isSucceed);
 | 
	
		
			
				|  |  | -				redisUtil.set("pushsno006", pushsno006);//材料出库单
 | 
	
		
			
				|  |  |  				//this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn2.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  //		}catch (Exception e){
 | 
	
	
		
			
				|  | @@ -1794,9 +1808,9 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 | 
	
		
			
				|  |  |  						}
 | 
	
		
			
				|  |  |  						text(mapList5,mapt.get("ordertype")+"发票单");
 | 
	
		
			
				|  |  |  						if(!((Map) mapList.get(0)).get("CACCID").toString().equals("103")){
 | 
	
		
			
				|  |  | +							redisUtil.set("pushsno002", pushsno002);//采购委外入库单
 | 
	
		
			
				|  |  |  							JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");//采购发票单
 | 
	
		
			
				|  |  |  							recording=result(main,resturn5,mapt.get("ordertype")+"发票单",((Map) mapList.get(0)).get("CACCID").toString(),"2");//采购发票单
 | 
	
		
			
				|  |  | -							redisUtil.set("pushsno002", pushsno002);//采购委外入库单
 | 
	
		
			
				|  |  |  							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("101")){
 | 
	
	
		
			
				|  | @@ -1808,9 +1822,9 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 | 
	
		
			
				|  |  |  							return account+"账套推送成功!";
 | 
	
		
			
				|  |  |  						}
 | 
	
		
			
				|  |  |  						text(mapList3,"销售发货单");
 | 
	
		
			
				|  |  | +						redisUtil.set("pushsno003", pushsno003);//采购委外入库单
 | 
	
		
			
				|  |  |  						JSONArray resturn3 = InterfaceConnUtils.doPost(mapList3,"consignment_import");//销售发货单
 | 
	
		
			
				|  |  |  						recording=result(main,resturn3,"销售发货单",((Map) mapList.get(0)).get("CACCID").toString(),"3");//销售发货单
 | 
	
		
			
				|  |  | -						redisUtil.set("pushsno003", pushsno003);//采购委外入库单
 | 
	
		
			
				|  |  |  						maps.get(account).put("code",resturn3.getJSONObject(0).get("U8ReceiptNo").toString());
 | 
	
		
			
				|  |  |  						recording(main,recording);
 | 
	
		
			
				|  |  |  						String u8ReceiptNo103= resturn3.getJSONObject(0).get("U8ReceiptNo").toString();
 | 
	
	
		
			
				|  | @@ -1838,9 +1852,9 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 | 
	
		
			
				|  |  |  						}
 | 
	
		
			
				|  |  |  						text(mapList4,"销售出库单");
 | 
	
		
			
				|  |  |  						//return null;//提示报错测试数据
 | 
	
		
			
				|  |  | +						redisUtil.set("pushsno004", pushsno004);//采购委外入库单
 | 
	
		
			
				|  |  |  						JSONArray resturn4 = InterfaceConnUtils.doPost(mapList4,"saleout_import");
 | 
	
		
			
				|  |  |  						recording=result(main,resturn4,"销售出库单",((Map) mapList.get(0)).get("CACCID").toString(),"4");//销售出库单
 | 
	
		
			
				|  |  | -						redisUtil.set("pushsno004", pushsno004);//采购委外入库单
 | 
	
		
			
				|  |  |  						maps.get(account).put("code",resturn4.getJSONObject(0).get("U8ReceiptNo").toString());
 | 
	
		
			
				|  |  |  						recording(main,recording);
 | 
	
		
			
				|  |  |  					case "4":
 | 
	
	
		
			
				|  | @@ -1867,18 +1881,18 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 | 
	
		
			
				|  |  |  							}
 | 
	
		
			
				|  |  |  						}
 | 
	
		
			
				|  |  |  						text(mapList6,"销售发票单");
 | 
	
		
			
				|  |  | +						redisUtil.set("pushsno005", pushsno005);//采购委外入库单
 | 
	
		
			
				|  |  |  						JSONArray resturn6 = InterfaceConnUtils.doPost(mapList6,"saleinvoice_import");//销售发票单
 | 
	
		
			
				|  |  |  						recording=result(main,resturn6,"销售发票单",((Map) mapList.get(0)).get("CACCID").toString(),"5");//销售发票单
 | 
	
		
			
				|  |  | -						redisUtil.set("pushsno005", pushsno005);//采购委外入库单
 | 
	
		
			
				|  |  |  						recording(main,recording);
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  |  				return account+"账套推送成功!";
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +		redisUtil.set("pushsno001", pushsno001);//采购委外入库单
 | 
	
		
			
				|  |  |  		JSONArray resturn1 = InterfaceConnUtils.doPost(mapList,"purchasein_import");//采购入库单
 | 
	
		
			
				|  |  |  		recording=result(main,resturn1,mapt.get("ordertype")+"入库单",((Map) mapList.get(0)).get("CACCID").toString(),"1");//采购入库单
 | 
	
		
			
				|  |  | -		redisUtil.set("pushsno001", pushsno001);//采购委外入库单
 | 
	
		
			
				|  |  |  		recording(main,recording);
 | 
	
		
			
				|  |  |  		//this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn1.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1905,9 +1919,9 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		text(mapList5,mapt.get("ordertype")+"发票单");
 | 
	
		
			
				|  |  |  		if(!((Map) mapList.get(0)).get("CACCID").toString().equals("103")){
 | 
	
		
			
				|  |  | +			redisUtil.set("pushsno002", pushsno002);//采购委外入库单
 | 
	
		
			
				|  |  |  			JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");//采购发票单
 | 
	
		
			
				|  |  |  			recording=result(main,resturn5,mapt.get("ordertype")+"发票单",((Map) mapList.get(0)).get("CACCID").toString(),"2");//采购发票单
 | 
	
		
			
				|  |  | -			redisUtil.set("pushsno002", pushsno002);//采购委外入库单
 | 
	
		
			
				|  |  |  			recording(main,recording);
 | 
	
		
			
				|  |  |  			//this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn5.getJSONObject(0).get("U8ReceiptNo").toString()),"109");
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -1917,9 +1931,9 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		text(mapList3,"销售发货单");
 | 
	
		
			
				|  |  | +		redisUtil.set("pushsno003", pushsno003);//采购委外入库单
 | 
	
		
			
				|  |  |  		JSONArray resturn3 = InterfaceConnUtils.doPost(mapList3,"consignment_import");//销售发货单
 | 
	
		
			
				|  |  |  		recording=result(main,resturn3,"销售发货单",((Map) mapList.get(0)).get("CACCID").toString(),"3");//销售发货单
 | 
	
		
			
				|  |  | -		redisUtil.set("pushsno003", pushsno003);//采购委外入库单
 | 
	
		
			
				|  |  |  		recording(main,recording);
 | 
	
		
			
				|  |  |  		String u8ReceiptNo103= resturn3.getJSONObject(0).get("U8ReceiptNo").toString();
 | 
	
		
			
				|  |  |  		//this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(u8ReceiptNo103,"108");
 | 
	
	
		
			
				|  | @@ -1947,9 +1961,9 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		text(mapList4,"销售出库单");
 | 
	
		
			
				|  |  | +		redisUtil.set("pushsno004", pushsno004);//采购委外入库单
 | 
	
		
			
				|  |  |  		JSONArray resturn4 = InterfaceConnUtils.doPost(mapList4,"saleout_import");//
 | 
	
		
			
				|  |  |  		recording=result(main,resturn4,"销售出库单",((Map) mapList.get(0)).get("CACCID").toString(),"4");//销售出库单
 | 
	
		
			
				|  |  | -		redisUtil.set("pushsno004", pushsno004);//采购委外入库单
 | 
	
		
			
				|  |  |  		recording(main,recording);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  		JSONObject jsonObject4=resturn4.getJSONObject(0);//销售出库单
 | 
	
	
		
			
				|  | @@ -1977,9 +1991,9 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		text(mapList6,"销售发票单");
 | 
	
		
			
				|  |  | +		redisUtil.set("pushsno005", pushsno005);//采购委外入库单
 | 
	
		
			
				|  |  |  		JSONArray resturn6 = InterfaceConnUtils.doPost(mapList6,"saleinvoice_import");//销售发票单
 | 
	
		
			
				|  |  |  		recording=result(main,resturn6,"销售发票单",((Map) mapList.get(0)).get("CACCID").toString(),"5");//销售发票单
 | 
	
		
			
				|  |  | -		redisUtil.set("pushsno005", pushsno005);//采购委外入库单
 | 
	
		
			
				|  |  |  		recording(main,recording);
 | 
	
		
			
				|  |  |  		//this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn6.getJSONObject(0).get("U8ReceiptNo").toString()),"120");
 | 
	
		
			
				|  |  |  		return mapList.getJSONObject(0).get("CACCID").toString()+"账套推送成功!";
 |