no message
							parent
							
								
									7b3d1884fa
								
							
						
					
					
						commit
						1bedb7c004
					
				| 
						 | 
				
			
			@ -62,6 +62,7 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements
 | 
			
		|||
			int lkCount = 0;
 | 
			
		||||
		
 | 
			
		||||
			for (String code : lx_codes) {
 | 
			
		||||
				
 | 
			
		||||
				lxCount +=maps.get(code)==null?0:maps.get(code);
 | 
			
		||||
			}
 | 
			
		||||
			for (String code : hj_codes) {
 | 
			
		||||
| 
						 | 
				
			
			@ -327,36 +328,47 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements
 | 
			
		|||
		
 | 
			
		||||
		LogPrint(log_TouWuLiaoChaiFen,"GongDan_wuLiaoMingXiCout:"+GongDan_wuLiaoMingXiCout+"wlcountString:"+wlcountString);
 | 
			
		||||
		
 | 
			
		||||
		Map<String, GongZuoZhan> gzzMap = new HashMap<>();
 | 
			
		||||
		
 | 
			
		||||
		//工作站使用判定
 | 
			
		||||
		
 | 
			
		||||
	
 | 
			
		||||
		List<GongZuoZhan> gzlistGongZuoZhans =new ArrayList<DefaultNewWaveManager.GongZuoZhan>();
 | 
			
		||||
		for (String   gongzuozhancode : gzz_codes) {
 | 
			
		||||
			int notFinished=(gzz_maps.get(gongzuozhancode)==null?0:gzz_maps.get(gongzuozhancode));
 | 
			
		||||
			GongZuoZhan gongZuoZhan=new GongZuoZhan(gongzuozhancode,notFinished,0,true);
 | 
			
		||||
			gzlistGongZuoZhans.add(gongZuoZhan);
 | 
			
		||||
		}
 | 
			
		||||
		Collections.sort(gzlistGongZuoZhans);
 | 
			
		||||
		
 | 
			
		||||
		int count_all = syhs + list_fenpei.size();// 所有未处理的数据
 | 
			
		||||
		int gzz_nx_avg = count_all / gzz_codes.size();// 得到工作站的平均能效,
 | 
			
		||||
		Map<String, GongZuoZhan> gzzMap = new HashMap<>();
 | 
			
		||||
		
 | 
			
		||||
		if (gzz_nx_avg < jhxl) {
 | 
			
		||||
			// 小于默认值则取默认 ,且根据需要关闭多余的工作站
 | 
			
		||||
			gzz_nx_avg = jhxl;
 | 
			
		||||
			int fenpeiALl=0;
 | 
			
		||||
			for (String code : gzz_codes) {
 | 
			
		||||
				int notFinished=(gzz_maps.get(code)==null?0:gzz_maps.get(code));
 | 
			
		||||
			for (GongZuoZhan gongZuoZhan : gzlistGongZuoZhans) {
 | 
			
		||||
				int notFinished=gongZuoZhan.notFinished;
 | 
			
		||||
				int fenpeicount=gzz_nx_avg-notFinished;
 | 
			
		||||
				if(fenpeiALl-count_all<=0){ 
 | 
			
		||||
					fenpeiALl=fenpeiALl+fenpeicount;
 | 
			
		||||
					GongZuoZhan gzz=new GongZuoZhan(code, notFinished, gzz_nx_avg, true);
 | 
			
		||||
					gzzMap.put(code,gzz);
 | 
			
		||||
					GongZuoZhan gzz=new GongZuoZhan(gongZuoZhan.code, notFinished, gzz_nx_avg, true);
 | 
			
		||||
					gzzMap.put(gzz.code,gzz);
 | 
			
		||||
				}else{
 | 
			
		||||
					GongZuoZhan gzz=new GongZuoZhan(code, notFinished, gzz_nx_avg, true);
 | 
			
		||||
					gzzMap.put(code,gzz);
 | 
			
		||||
					GongZuoZhan gzz=new GongZuoZhan(gongZuoZhan.code, notFinished, gzz_nx_avg, true);
 | 
			
		||||
					gzzMap.put(gzz.code,gzz);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			
 | 
			
		||||
		}else{
 | 
			
		||||
			//计算能效大于默认能效,则每个工作站能效 扩大至 计算值。所有工作站都需要使用
 | 
			
		||||
			// 分配工作站,每个工作站剩余可分配订单数
 | 
			
		||||
			for (String code : gzz_codes) {
 | 
			
		||||
				int notFinished=(gzz_maps.get(code)==null?0:gzz_maps.get(code));
 | 
			
		||||
			for (GongZuoZhan gongZuoZhan : gzlistGongZuoZhans) {
 | 
			
		||||
				int notFinished=gongZuoZhan.notFinished;
 | 
			
		||||
				//int gzz_nx = gzz_nx_avg - notFinished;
 | 
			
		||||
				GongZuoZhan gzz=new GongZuoZhan(code, notFinished, gzz_nx_avg, true);
 | 
			
		||||
				gzzMap.put(code,gzz);
 | 
			
		||||
				GongZuoZhan gzz=new GongZuoZhan(gongZuoZhan.code, notFinished, gzz_nx_avg, true);
 | 
			
		||||
				gzzMap.put(gzz.code,gzz);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
		LogPrint(log_GongZuoZhanMinXi,"---------------------------------------------------工作站详情-----------------------------------------------------------------------------------------------");
 | 
			
		||||
		LogPrint(log_GongZuoZhanMinXi,"↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓");
 | 
			
		||||
		for (String  key : gzzMap.keySet()) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue