拆分优化
							parent
							
								
									b5c5fd62b0
								
							
						
					
					
						commit
						7908df31f1
					
				| 
						 | 
					@ -546,7 +546,7 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements
 | 
				
			||||||
				logger.info(sb_gzzx.toString());
 | 
									logger.info(sb_gzzx.toString());
 | 
				
			||||||
				logger.info(sb_rqh.toString());
 | 
									logger.info(sb_rqh.toString());
 | 
				
			||||||
				logger.info("匹配上的容器号:	"+sb_pipei.toString());
 | 
									logger.info("匹配上的容器号:	"+sb_pipei.toString());
 | 
				
			||||||
				Boolean isPiPeiGzzx=false;
 | 
									Boolean isPiPeiGzzx=false;//true 优先按照工作中心匹配,再按照容器号。false直接按照容器号匹配散单
 | 
				
			||||||
				if(isPiPeiGzzx){
 | 
									if(isPiPeiGzzx){
 | 
				
			||||||
					if(max_gzzx==0 && gzzx==0 && rqh_count>max_rqh_count){
 | 
										if(max_gzzx==0 && gzzx==0 && rqh_count>max_rqh_count){
 | 
				
			||||||
						//如果工作中心未匹配过,且本次未匹配到工作中心  容器号 匹配 度大优先
 | 
											//如果工作中心未匹配过,且本次未匹配到工作中心  容器号 匹配 度大优先
 | 
				
			||||||
| 
						 | 
					@ -568,11 +568,17 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}else{
 | 
									}else{
 | 
				
			||||||
					if(rqh_count>max_rqh_count){
 | 
										if(rqh_count>max_rqh_count){
 | 
				
			||||||
						//如果工作中心未匹配过,且本次未匹配到工作中心  容器号 匹配 度大优先
 | 
											//无论工作中心是否匹配,容器号匹配次数优先
 | 
				
			||||||
 | 
											max_rqh_count=rqh_count;
 | 
				
			||||||
 | 
											max_gzzx=gzzx;
 | 
				
			||||||
 | 
											check=gzz;
 | 
				
			||||||
 | 
										}else if(rqh_count==max_rqh_count && gzzx==1 && max_gzzx==0){
 | 
				
			||||||
 | 
											//如果容器号匹配次数相同,且上次匹配工作站未匹配工作中心,本次匹配到了工作中心,本次匹配设为最优解
 | 
				
			||||||
						max_rqh_count=rqh_count;
 | 
											max_rqh_count=rqh_count;
 | 
				
			||||||
						max_gzzx=gzzx;
 | 
											max_gzzx=gzzx;
 | 
				
			||||||
						check=gzz;
 | 
											check=gzz;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
										
 | 
				
			||||||
				}	
 | 
									}	
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
| 
						 | 
					@ -796,42 +802,49 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
			Map<String, Integer> rq_last_show = new HashMap<>();
 | 
								Map<String, Integer> rq_last_show = new HashMap<>();
 | 
				
			||||||
			for(int i=0;i<max_len;i++){
 | 
								Map<String, Integer> rq_last_show2 = new HashMap<>();
 | 
				
			||||||
 | 
								for(int fz_col=0;fz_col<max_len;fz_col++){
 | 
				
			||||||
				//循环每列数据
 | 
									//循环每列数据
 | 
				
			||||||
				Map<String, Integer> rq_last_show2 = new HashMap<>();
 | 
					 | 
				
			||||||
				for(int gd_index=0;gd_index<list_show.size();gd_index++){
 | 
									for(int gd_index=0;gd_index<list_show.size();gd_index++){
 | 
				
			||||||
					//循环每个工单
 | 
										//循环每个工单
 | 
				
			||||||
					GongDanMingXi gdPaiXu =list_show.get(gd_index);
 | 
										GongDanMingXi gdPaiXu =list_show.get(gd_index);
 | 
				
			||||||
					List<FenPei> list_fen=gdPaiXu.list;
 | 
										List<FenPei> list_fen=gdPaiXu.list;
 | 
				
			||||||
					if(i<gdPaiXu.list.size()){
 | 
										if(fz_col<gdPaiXu.list.size()){
 | 
				
			||||||
						FenPei fenPei=list_fen.get(i);
 | 
											FenPei fenPei=list_fen.get(fz_col);
 | 
				
			||||||
						
 | 
											
 | 
				
			||||||
						rq_last_show2.put(fenPei.rqh, 1);
 | 
											rq_last_show2.put(fenPei.rqh, 1);
 | 
				
			||||||
						 if((i+1)%cfhs==1){
 | 
											 if((fz_col+1)%cfhs==1||(fz_col+1)%cfhs==2){
 | 
				
			||||||
							//第一列
 | 
												//第一列
 | 
				
			||||||
							 if(rq_last_show.containsKey(fenPei.rqh)){
 | 
												 if(rq_last_show.containsKey(fenPei.rqh)){
 | 
				
			||||||
									fenPei.chf_fz=(i)/cfhs;
 | 
														fenPei.chf_fz=(fz_col)/cfhs;
 | 
				
			||||||
									fenPei.chf=(i+1)+"";
 | 
														fenPei.chf=(fz_col+1)+"";
 | 
				
			||||||
									fenPei.twl_fz=twlKey;
 | 
														fenPei.twl_fz=twlKey;
 | 
				
			||||||
									list_new.add(fenPei);
 | 
														list_new.add(fenPei);
 | 
				
			||||||
							 }else{
 | 
												 }else{
 | 
				
			||||||
									fenPei.chf_fz=(i)/cfhs+1;
 | 
														fenPei.chf_fz=(fz_col)/cfhs+1;
 | 
				
			||||||
									fenPei.chf=(i+1)+"";
 | 
														fenPei.chf=(fz_col+1)+"";
 | 
				
			||||||
									fenPei.twl_fz=twlKey;
 | 
														fenPei.twl_fz=twlKey;
 | 
				
			||||||
									list_new.add(fenPei);
 | 
														list_new.add(fenPei);
 | 
				
			||||||
							 }
 | 
												 }
 | 
				
			||||||
						
 | 
											
 | 
				
			||||||
						}else{
 | 
											}else{
 | 
				
			||||||
							//其他列
 | 
												//其他列
 | 
				
			||||||
							fenPei.chf_fz=(i)/cfhs+1;
 | 
												fenPei.chf_fz=(fz_col)/cfhs+1;
 | 
				
			||||||
							fenPei.chf=(i+1)+"";
 | 
												fenPei.chf=(fz_col+1)+"";
 | 
				
			||||||
							fenPei.twl_fz=twlKey;
 | 
												fenPei.twl_fz=twlKey;
 | 
				
			||||||
							list_new.add(fenPei);
 | 
												list_new.add(fenPei);
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					
 | 
										
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				rq_last_show=rq_last_show2;
 | 
									
 | 
				
			||||||
 | 
									if((fz_col+1)%cfhs==0){
 | 
				
			||||||
 | 
										//拆分最大行数的时候
 | 
				
			||||||
 | 
										rq_last_show=rq_last_show2;
 | 
				
			||||||
 | 
										rq_last_show2= new HashMap<>();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									
 | 
				
			||||||
 | 
								
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue