|  | @@ -685,23 +685,33 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 | 
											
												
													
														|  |  		for(String id:ids){
 |  |  		for(String id:ids){
 | 
											
												
													
														|  |  			num++;
 |  |  			num++;
 | 
											
												
													
														|  |  			QueryWrapper queryWrapper=new QueryWrapper();
 |  |  			QueryWrapper queryWrapper=new QueryWrapper();
 | 
											
												
													
														|  | -			queryWrapper.select("sum(net_Weight) net_Weight,sum(gross_Weight) grossWeight,rolls rolls");//获取净重合计、毛重、匹数合计
 |  | 
 | 
											
												
													
														|  | 
 |  | +			queryWrapper.select("sum(net_Weight) net_Weight,sum(gross_Weight) grossWeight,sum(rolls) rolls,inventory_code");//获取净重合计、毛重、匹数合计
 | 
											
												
													
														|  |  			queryWrapper.eq("sy_Packing_List_Fabric_Id",id);
 |  |  			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";
 |  | 
 | 
											
												
													
														|  | 
 |  | +			queryWrapper.groupBy("inventory_code");
 | 
											
												
													
														|  | 
 |  | +			List<SyPackingListFabricItem> fabricItems=syPackingListFabricItemService.list(queryWrapper);
 | 
											
												
													
														|  | 
 |  | +			boolean bool=true;
 | 
											
												
													
														|  | 
 |  | +			for (SyPackingListFabricItem fabricItem : fabricItems){
 | 
											
												
													
														|  | 
 |  | +				if(fabricItem.getNetWeight()==null||fabricItem.getNetWeight().doubleValue()==0){
 | 
											
												
													
														|  | 
 |  | +					message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"净重合计为0;\n";
 | 
											
												
													
														|  | 
 |  | +					bool=false;
 | 
											
												
													
														|  | 
 |  | +				}
 | 
											
												
													
														|  | 
 |  | +				else if(fabricItem.getGrossWeight()==null||fabricItem.getGrossWeight().doubleValue()==0){
 | 
											
												
													
														|  | 
 |  | +					message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"毛重合计为0;\n";
 | 
											
												
													
														|  | 
 |  | +					bool=false;
 | 
											
												
													
														|  | 
 |  | +				}
 | 
											
												
													
														|  | 
 |  | +				else if(fabricItem.getRolls()==null||fabricItem.getRolls().doubleValue()==0){
 | 
											
												
													
														|  | 
 |  | +					message+="第"+num+"条提交失败,物料"+fabricItem.getInventoryCode()+"匹数(箱数)合计为0;\n";
 | 
											
												
													
														|  | 
 |  | +					bool=false;
 | 
											
												
													
														|  | 
 |  | +				}
 | 
											
												
													
														|  | 
 |  | +				if (bool=false){
 | 
											
												
													
														|  | 
 |  | +					break;
 | 
											
												
													
														|  | 
 |  | +				}
 | 
											
												
													
														|  |  			}
 |  |  			}
 | 
											
												
													
														|  | -			else{
 |  | 
 | 
											
												
													
														|  | 
 |  | +			if (bool){
 | 
											
												
													
														|  |  				SyPackingListFabric syPackingListFabric=syPackingListFabricMapper.selectById(id);
 |  |  				SyPackingListFabric syPackingListFabric=syPackingListFabricMapper.selectById(id);
 | 
											
												
													
														|  |  				syPackingListFabric.setStatus("1");//提交
 |  |  				syPackingListFabric.setStatus("1");//提交
 | 
											
												
													
														|  |  				syPackingListFabricMapper.updateById(syPackingListFabric);//修改
 |  |  				syPackingListFabricMapper.updateById(syPackingListFabric);//修改
 | 
											
												
													
														|  | -				message+="第"+num+"条提交成功";
 |  | 
 | 
											
												
													
														|  | 
 |  | +				message+="第"+num+"条提交成功;\n";
 | 
											
												
													
														|  |  			}
 |  |  			}
 | 
											
												
													
														|  |  		}
 |  |  		}
 | 
											
												
													
														|  |  		if(message.indexOf("失败")<0&&message.indexOf("成功")>0){
 |  |  		if(message.indexOf("失败")<0&&message.indexOf("成功")>0){
 |