no message
							parent
							
								
									b5c9dae720
								
							
						
					
					
						commit
						22e1c65d18
					
				| 
						 | 
					@ -1,7 +1,15 @@
 | 
				
			||||||
package com.dev.swms.server.service.shipping.pojo;
 | 
					package com.dev.swms.server.service.shipping.pojo;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.text.Collator;
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
 | 
					import java.util.Collections;
 | 
				
			||||||
 | 
					import java.util.Comparator;
 | 
				
			||||||
 | 
					import java.util.HashMap;
 | 
				
			||||||
 | 
					import java.util.HashSet;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					import java.util.Locale;
 | 
				
			||||||
 | 
					import java.util.Map;
 | 
				
			||||||
 | 
					import java.util.Set;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import net.sf.json.JSONObject;
 | 
					import net.sf.json.JSONObject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,8 +19,10 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.dev.energy.server.service.pojo.DefaultBaseManager;
 | 
					import com.dev.energy.server.service.pojo.DefaultBaseManager;
 | 
				
			||||||
import com.dev.swms.server.model.inventory.Task;
 | 
					import com.dev.swms.server.model.inventory.Task;
 | 
				
			||||||
 | 
					import com.dev.swms.server.model.receiving.LibraryTaskType.classification;
 | 
				
			||||||
import com.dev.swms.server.model.shipping.WaveDoc;
 | 
					import com.dev.swms.server.model.shipping.WaveDoc;
 | 
				
			||||||
import com.dev.swms.server.service.shipping.NewWaveManager;
 | 
					import com.dev.swms.server.service.shipping.NewWaveManager;
 | 
				
			||||||
 | 
					import com.dev.swms.server.utils.interfaceUtil;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import org.apache.log4j.Logger;
 | 
					import org.apache.log4j.Logger;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,7 +37,7 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	public  void allocateGZZ(String waveDocCode,List<Long> lx_gzz_ids,List<Long> hj_gzz_ids,List<Long> lk_gzz_ids){
 | 
						public  void allocateGZZ(String waveDocCode,List<Long> lx_gzz_ids,List<Long> hj_gzz_ids,List<Long> lk_gzz_ids){
 | 
				
			||||||
		Session session = ((HibernateDaoSupport) this.commonDao).getSessionFactory().openSession();
 | 
							Session session = ((HibernateDaoSupport) this.commonDao).getSessionFactory().openSession();
 | 
				
			||||||
		try {	
 | 
						/*	try {	*/
 | 
				
			||||||
			String sql ="select STUFF((select ','+CONVERT(nvarchar(10),b.id) "
 | 
								String sql ="select STUFF((select ','+CONVERT(nvarchar(10),b.id) "
 | 
				
			||||||
						+"from task b "
 | 
											+"from task b "
 | 
				
			||||||
						+"left join PICK_TICKET_DETAIL ptd1 on ptd1.id=b.PICK_TICKET_DETAIL_ID   "
 | 
											+"left join PICK_TICKET_DETAIL ptd1 on ptd1.id=b.PICK_TICKET_DETAIL_ID   "
 | 
				
			||||||
| 
						 | 
					@ -45,12 +55,11 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
 | 
				
			||||||
						+ "MAX(s2.LP) as rqh ,"
 | 
											+ "MAX(s2.LP) as rqh ,"
 | 
				
			||||||
						+ "t.BILLCODE as zrwh,"
 | 
											+ "t.BILLCODE as zrwh,"
 | 
				
			||||||
						+ "MAX(pt.code) as gdh,"
 | 
											+ "MAX(pt.code) as gdh,"
 | 
				
			||||||
						+ "max(pt.RELATED_BILL3) as twl,"
 | 
					 | 
				
			||||||
						+ "MAX(pt.LOGISTICS_COMPANY) as gzzx,"
 | 
											+ "MAX(pt.LOGISTICS_COMPANY) as gzzx,"
 | 
				
			||||||
						+ "loc.code as kwh,"
 | 
											+ "loc.code as kwh,"
 | 
				
			||||||
						+ "max(t.agv_Status) as rwzt,"
 | 
											+ "max(t.agv_Status) as rwzt,"
 | 
				
			||||||
						+"max(item.GOOD_TYPE) as wllx,"
 | 
											+"max(item.GOOD_TYPE) as wllx,"
 | 
				
			||||||
						+ "max(t.strBill8) as twlcfh "
 | 
											+ "max(t.strBill8) as twl "
 | 
				
			||||||
						+"from task t   "
 | 
											+"from task t   "
 | 
				
			||||||
						+"left join PICK_TICKET_DETAIL ptd on ptd.id=t.PICK_TICKET_DETAIL_ID   "
 | 
											+"left join PICK_TICKET_DETAIL ptd on ptd.id=t.PICK_TICKET_DETAIL_ID   "
 | 
				
			||||||
						+"left join PICK_TICKET pt on pt.id=ptd.PICK_TICKET_ID "   
 | 
											+"left join PICK_TICKET pt on pt.id=ptd.PICK_TICKET_ID "   
 | 
				
			||||||
| 
						 | 
					@ -68,35 +77,227 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
 | 
				
			||||||
			logger.info(sql);
 | 
								logger.info(sql);
 | 
				
			||||||
			Query   query   =   session.createSQLQuery(sql); 
 | 
								Query   query   =   session.createSQLQuery(sql); 
 | 
				
			||||||
			List<Object[]> list= (List<Object[]>)query.list();
 | 
								List<Object[]> list= (List<Object[]>)query.list();
 | 
				
			||||||
			logger.info(list.size());
 | 
								int dataSize=list.size();
 | 
				
			||||||
 | 
								
 | 
				
			||||||
			List<FenPei> list_fenpei= new ArrayList<FenPei>();
 | 
								List<FenPei> list_fenpei= new ArrayList<FenPei>();
 | 
				
			||||||
			for(int i=0;i<list.size();i++){
 | 
								for(int i=0;i<list.size();i++){
 | 
				
			||||||
				FenPei bean=new FenPei();
 | 
									FenPei bean=new FenPei();
 | 
				
			||||||
				bean.tsakId=(String)list.get(i)[0];
 | 
									bean.tsakId=getValueString(list.get(i),0);
 | 
				
			||||||
				bean.liaohao=(String)list.get(i)[1];
 | 
									bean.liaohao=getValueString(list.get(i),1);
 | 
				
			||||||
				logger.info(bean.tsakId+"---"+bean.liaohao);
 | 
									bean.kuqu=getValueString(list.get(i),2);
 | 
				
			||||||
 | 
									bean.gzz=getValueString(list.get(i),3);
 | 
				
			||||||
 | 
									bean.jhsl=getValueFloat(list.get(i),4);
 | 
				
			||||||
 | 
									bean.rqh=getValueString(list.get(i),5);
 | 
				
			||||||
 | 
									bean.zrwh=getValueString(list.get(i),6);
 | 
				
			||||||
 | 
									bean.gdh=getValueString(list.get(i),7);
 | 
				
			||||||
 | 
									bean.gzzx=getValueString(list.get(i),8);
 | 
				
			||||||
 | 
									bean.kwh=getValueString(list.get(i),9);
 | 
				
			||||||
 | 
									bean.rwzt=getValueInt(list.get(i),10);
 | 
				
			||||||
 | 
									bean.wllx=getValueString(list.get(i),11);
 | 
				
			||||||
 | 
									bean.twl=getValueString(list.get(i),12);
 | 
				
			||||||
 | 
									list_fenpei.add(bean);
 | 
				
			||||||
 | 
									logger.info(bean.gdh+"---"+bean.twl);
 | 
				
			||||||
				
 | 
									
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			for(FenPei fp:list_fenpei ){
 | 
								//1个工单对应一个头物料拆分号。
 | 
				
			||||||
				String[] ids=fp.tsakId.split(",");
 | 
								//工单号  ;				容器号  ;			料号   			物料类型  				;	库区  ;				工作中心 			//头物料 							拆分号        工单总行数      
 | 
				
			||||||
				for(int i=0;i<=ids.length;i++){
 | 
								//1100382814B			X8001315			A0101					A						3#料箱区			kanban				512-00004567-F04B			1					5
 | 
				
			||||||
					Task task=this.commonDao.get(Task.class, Long.parseLong(ids[i]));
 | 
								//1100382814B			X8001315			A0102					A						3#料箱区			kanban				512-00004567-F04B			1					5
 | 
				
			||||||
					//保留原有信息字段做对比分析
 | 
								//1100382814B			X8001315			A0101					A						3#料箱区			kanban				512-00004567-F04B			1					5
 | 
				
			||||||
					task.setOldGzz(fp.gzz);
 | 
								//1100382814B			X8001315			A0102					A						3#料箱区			kanban				512-00004567-F04B			1					5
 | 
				
			||||||
					task.setOldZrw(fp.zrwh);
 | 
								//1100382814B			X8001315			A0101					A						3#料箱区			kanban				512-00004567-F04B			1					5
 | 
				
			||||||
					this.commonDao.store(task);
 | 
								//1100382814A			X8001315			A0102					A						3#料箱区			kanban				512-00004567-F04A
 | 
				
			||||||
				}
 | 
								//1100382814A			X8001315			A0101					A						3#料箱区			kanban				512-00004567-F04A
 | 
				
			||||||
			}
 | 
								//1100382814A			X8001315			A0102					A						3#料箱区			kanban				512-00004567-F04A
 | 
				
			||||||
 | 
								//1100382814A			X8001315			A0101					A						3#料箱区			kanban				512-00004567-F04A
 | 
				
			||||||
 | 
								//1100382814A			X8001315			A0102					A						3#料箱区			kanban				512-00004567-F04A
 | 
				
			||||||
			
 | 
								
 | 
				
			||||||
		}catch (Exception e) {
 | 
								//计算同一工单总行数。
 | 
				
			||||||
 | 
								  Map<String, List<FenPei> > gdCount = new HashMap<>(); 
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								 for (FenPei fenPei : list_fenpei) {
 | 
				
			||||||
 | 
									 if(((java.util.Map) gdCount).containsKey(fenPei.gdh)){
 | 
				
			||||||
 | 
										 	List<FenPei> list_count=gdCount.get(fenPei.gdh);
 | 
				
			||||||
 | 
										 	list_count.add(fenPei);
 | 
				
			||||||
 | 
										 	gdCount.put(fenPei.gdh, list_count);
 | 
				
			||||||
 | 
									 }else{
 | 
				
			||||||
 | 
											List<FenPei> list_count= new ArrayList<FenPei>();
 | 
				
			||||||
 | 
											 list_count.add(fenPei);
 | 
				
			||||||
 | 
											 gdCount.put(fenPei.gdh, list_count);
 | 
				
			||||||
 | 
									 }
 | 
				
			||||||
 | 
								 }
 | 
				
			||||||
 | 
								 int sumCout=0;
 | 
				
			||||||
 | 
								 //记录每个工单 的数目
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
								 List<GdPaiXu> gd_paixuList =new ArrayList<GdPaiXu>();
 | 
				
			||||||
 | 
								 for (String key : gdCount.keySet()) {
 | 
				
			||||||
 | 
										logger.info("gdh:	"+key+"	count:"+gdCount.get(key).size());
 | 
				
			||||||
 | 
										sumCout=sumCout+gdCount.get(key).size();
 | 
				
			||||||
 | 
										List<FenPei> list_ll1=gdCount.get(key);
 | 
				
			||||||
 | 
										Collections.sort(list_ll1);
 | 
				
			||||||
 | 
										GdPaiXu gdPaiXu=new GdPaiXu(key, list_ll1);
 | 
				
			||||||
 | 
										gd_paixuList.add(gdPaiXu);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								 Collections.sort(gd_paixuList);
 | 
				
			||||||
 | 
								logger.info("sumCout"+sumCout+"___dataSize:"+dataSize);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								//先根据头物料分组   如果头物料相同 且工单总行数 差异小于4的工单分到一个组里面  (尽量分配到同一工作站)
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								 Map<String, List<GdPaiXu>> touwuliao_map = new HashMap<>(); 
 | 
				
			||||||
 | 
								 
 | 
				
			||||||
 | 
								 for (GdPaiXu gdPaiXu : gd_paixuList) {
 | 
				
			||||||
 | 
										
 | 
				
			||||||
 | 
									 //获取当前头物料
 | 
				
			||||||
 | 
									 String twl=gdPaiXu.twl;
 | 
				
			||||||
 | 
									 String gdh=gdPaiXu.gdh;
 | 
				
			||||||
 | 
									 //获取当前工单的数量
 | 
				
			||||||
 | 
									 int currCount=gdPaiXu.hangshu;
 | 
				
			||||||
 | 
									 logger.info("---gdh:"+gdh+"		currCount:"+currCount);
 | 
				
			||||||
 | 
									 //在touwuliao_map中进行匹配
 | 
				
			||||||
 | 
									 boolean isFind=false;
 | 
				
			||||||
 | 
									 for (String twlKey : touwuliao_map.keySet()) {
 | 
				
			||||||
 | 
										 String twl_in=touwuliao_map.get(twlKey).get(0).twl;
 | 
				
			||||||
 | 
										 String gdh_in=touwuliao_map.get(twlKey).get(0).gdh;
 | 
				
			||||||
 | 
										 int currCount_in=touwuliao_map.get(twlKey).get(0).hangshu;
 | 
				
			||||||
 | 
										 if(twl_in.equals(twl)&&Math.abs(currCount-currCount_in)<=4){
 | 
				
			||||||
 | 
											 //在分配好的数据中找到了相同的头物料 且 数量差小于4
 | 
				
			||||||
 | 
											 List<GdPaiXu> old=touwuliao_map.get(twlKey);
 | 
				
			||||||
 | 
											 old.add(gdPaiXu);
 | 
				
			||||||
 | 
											 touwuliao_map.put(twlKey, old);
 | 
				
			||||||
 | 
											 isFind=true;
 | 
				
			||||||
 | 
											 break ;
 | 
				
			||||||
 | 
										 }
 | 
				
			||||||
 | 
									 }
 | 
				
			||||||
 | 
									 if(!isFind){
 | 
				
			||||||
 | 
										 //未匹配到数据,自己单独一组
 | 
				
			||||||
 | 
										 List<GdPaiXu> llist=new ArrayList<GdPaiXu>();
 | 
				
			||||||
 | 
										 llist.add(gdPaiXu);
 | 
				
			||||||
 | 
										 touwuliao_map.put(twl+"_"+gdh,llist);
 | 
				
			||||||
 | 
										 
 | 
				
			||||||
 | 
									 }
 | 
				
			||||||
 | 
									 
 | 
				
			||||||
 | 
									 
 | 
				
			||||||
 | 
								 }
 | 
				
			||||||
 | 
								logger.info("-----------------------------------------------------------------------");
 | 
				
			||||||
 | 
								logger.info("-----------------------------------------------------------------------");
 | 
				
			||||||
 | 
								logger.info("---------------------------打印计算结果--------------------------------------------");
 | 
				
			||||||
 | 
								 int twl_count=0;
 | 
				
			||||||
 | 
								 for (String twlKey : touwuliao_map.keySet()) {
 | 
				
			||||||
 | 
									 List<GdPaiXu> list_show=touwuliao_map.get(twlKey);
 | 
				
			||||||
 | 
									 for (GdPaiXu fenPei2 : list_show) {
 | 
				
			||||||
 | 
											logger.info("twl"+fenPei2.twl+"		GDH:"+fenPei2.gdh+"		twlKey:"+twlKey+"		GDHCount:"+fenPei2.hangshu);
 | 
				
			||||||
 | 
											twl_count++;
 | 
				
			||||||
 | 
											StringBuffer rqm =new StringBuffer();
 | 
				
			||||||
 | 
											for (FenPei fff : fenPei2.list) {
 | 
				
			||||||
 | 
												rqm.append(fff.rqh+",");
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									logger.info("-----------------------------------------------------------------------");
 | 
				
			||||||
 | 
									 
 | 
				
			||||||
 | 
								 }
 | 
				
			||||||
 | 
								logger.info("twl_count"+twl_count+"___dataSize:"+dataSize);
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								//计算没个容器号出现得次数(在每个头物料得分组里面)
 | 
				
			||||||
 | 
								  
 | 
				
			||||||
 | 
								 logger.info("-------------------------------------------------------------------------------打印工单容器号----------------------------------------------------------------------------------------------------------------------------");
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								 for (String twlKey : touwuliao_map.keySet()) {
 | 
				
			||||||
 | 
									 List<GdPaiXu> list_show=touwuliao_map.get(twlKey);
 | 
				
			||||||
 | 
									 
 | 
				
			||||||
 | 
									  Map<String, Integer > rq_showTime = new HashMap<>(); 
 | 
				
			||||||
 | 
									 
 | 
				
			||||||
 | 
									 for (GdPaiXu fenPei2 : list_show) {
 | 
				
			||||||
 | 
										   Set<String> set_rqh = new HashSet<>();
 | 
				
			||||||
 | 
											StringBuffer rqm_str =new StringBuffer();
 | 
				
			||||||
 | 
											for (FenPei fff : fenPei2.list) {
 | 
				
			||||||
 | 
												//通过set记录容器号
 | 
				
			||||||
 | 
												set_rqh.add(fff.rqh);
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
											
 | 
				
			||||||
 | 
											for(String rqh : set_rqh){
 | 
				
			||||||
 | 
												if(rq_showTime.containsKey(rqh)){
 | 
				
			||||||
 | 
													int stt=rq_showTime.get(rqh);
 | 
				
			||||||
 | 
													rq_showTime.put(rqh, stt+1);
 | 
				
			||||||
 | 
													rqm_str.append(rqh+"    __"+stt+"("+rq_showTime.get(rqh)+")"+",");
 | 
				
			||||||
 | 
												}else{
 | 
				
			||||||
 | 
													rq_showTime.put(rqh, 1);
 | 
				
			||||||
 | 
													rqm_str.append(rqh+"    __"+0+"("+rq_showTime.get(rqh)+")"+",");
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
											
 | 
				
			||||||
 | 
											for(String key:rq_showTime.keySet()){
 | 
				
			||||||
 | 
											
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
											
 | 
				
			||||||
 | 
											logger.info("-----------"+rqm_str.toString());
 | 
				
			||||||
 | 
									 	}
 | 
				
			||||||
 | 
									 	logger.info("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");
 | 
				
			||||||
 | 
									 
 | 
				
			||||||
 | 
								 }
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
								// 计算拆分号 (为了15个为一组的工单)       拆分号等于 工单总行数 /15(可配置) 根据容器号。物料
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								//写入数据库
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
						/*	}catch (Exception e) {
 | 
				
			||||||
 | 
								logger.info(e.toString());
 | 
				
			||||||
			session.close();
 | 
								session.close();
 | 
				
			||||||
		}finally {
 | 
							}finally {
 | 
				
			||||||
			session.close();
 | 
								session.close();
 | 
				
			||||||
		}
 | 
							}*/
 | 
				
			||||||
 | 
								session.close();
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	class FenPei {
 | 
					
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						public void writeToDb(	List<FenPei> list_fenpei){
 | 
				
			||||||
 | 
							for(FenPei fp:list_fenpei ){
 | 
				
			||||||
 | 
								String[] ids=fp.tsakId.split(",");
 | 
				
			||||||
 | 
								for(int i=0;i<=ids.length;i++){
 | 
				
			||||||
 | 
									Task task=this.commonDao.get(Task.class, Long.parseLong(ids[i]));
 | 
				
			||||||
 | 
									//保留原有信息字段做对比分析
 | 
				
			||||||
 | 
									if(task.getOldGzz()==null){
 | 
				
			||||||
 | 
										task.setOldGzz(task.getEndRegion());
 | 
				
			||||||
 | 
										task.setOldZrw(task.getBillCode());
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									//对分析后的数据进行赋值
 | 
				
			||||||
 | 
									task.setEndRegion(null);
 | 
				
			||||||
 | 
									task.setBillCode(null);
 | 
				
			||||||
 | 
									this.commonDao.store(task);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						class GdPaiXu implements Comparable<GdPaiXu> {
 | 
				
			||||||
 | 
							public String gdh; //工单号
 | 
				
			||||||
 | 
							public int hangshu;//工单行数
 | 
				
			||||||
 | 
							public String twl;//头物料
 | 
				
			||||||
 | 
							public List<FenPei> list;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							public GdPaiXu(String gdh,List<FenPei> list ){
 | 
				
			||||||
 | 
								this.gdh=gdh;
 | 
				
			||||||
 | 
								this.hangshu=list.size();
 | 
				
			||||||
 | 
								this.twl=list.get(0).twl;
 | 
				
			||||||
 | 
								this.list=list;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							@Override
 | 
				
			||||||
 | 
							public int compareTo(GdPaiXu other) {
 | 
				
			||||||
 | 
								// TODO Auto-generated method stub
 | 
				
			||||||
 | 
								return Integer.compare(this.hangshu, other.hangshu);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						class FenPei implements Comparable<FenPei> {
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		public String tsakId; 
 | 
							public String tsakId; 
 | 
				
			||||||
		/**
 | 
							/**
 | 
				
			||||||
| 
						 | 
					@ -107,10 +308,14 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
 | 
				
			||||||
		 * 库区
 | 
							 * 库区
 | 
				
			||||||
		 */
 | 
							 */
 | 
				
			||||||
		public	String kuqu;
 | 
							public	String kuqu;
 | 
				
			||||||
 | 
							/**
 | 
				
			||||||
 | 
							 * 工作站
 | 
				
			||||||
 | 
							 */
 | 
				
			||||||
 | 
							public String gzz;
 | 
				
			||||||
		/**
 | 
							/**
 | 
				
			||||||
		 * 拣货数量
 | 
							 * 拣货数量
 | 
				
			||||||
		 */
 | 
							 */
 | 
				
			||||||
		public	int jhsl;
 | 
							public	float jhsl;
 | 
				
			||||||
		/**
 | 
							/**
 | 
				
			||||||
		 * 容器号
 | 
							 * 容器号
 | 
				
			||||||
		 */
 | 
							 */
 | 
				
			||||||
| 
						 | 
					@ -123,18 +328,13 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
 | 
				
			||||||
		 * 工单号
 | 
							 * 工单号
 | 
				
			||||||
		 */
 | 
							 */
 | 
				
			||||||
		public String gdh;
 | 
							public String gdh;
 | 
				
			||||||
		/**
 | 
					
 | 
				
			||||||
		 * 工作站
 | 
						
 | 
				
			||||||
		 */
 | 
					
 | 
				
			||||||
		public String gzz;
 | 
					 | 
				
			||||||
		/**
 | 
							/**
 | 
				
			||||||
		 * 工作中心
 | 
							 * 工作中心
 | 
				
			||||||
		 */
 | 
							 */
 | 
				
			||||||
		public String gzzx;
 | 
							public String gzzx;
 | 
				
			||||||
		/**
 | 
					 | 
				
			||||||
		 * 头物料
 | 
					 | 
				
			||||||
		 */
 | 
					 | 
				
			||||||
		public String twl;  //头物料
 | 
					 | 
				
			||||||
		/**
 | 
							/**
 | 
				
			||||||
		 * 库位号
 | 
							 * 库位号
 | 
				
			||||||
		 */
 | 
							 */
 | 
				
			||||||
| 
						 | 
					@ -142,16 +342,82 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
 | 
				
			||||||
		/**
 | 
							/**
 | 
				
			||||||
		 * 任务状态
 | 
							 * 任务状态
 | 
				
			||||||
		 */
 | 
							 */
 | 
				
			||||||
		public String rwzt;
 | 
							public int rwzt;
 | 
				
			||||||
		/**
 | 
							/**
 | 
				
			||||||
		 * 物料类型
 | 
							 * 物料类型
 | 
				
			||||||
		 */
 | 
							 */
 | 
				
			||||||
		public String wllx;
 | 
							public String wllx;
 | 
				
			||||||
		/**
 | 
							/**
 | 
				
			||||||
		 * 头物料拆分号
 | 
							 * 头物料
 | 
				
			||||||
		 */
 | 
							 */
 | 
				
			||||||
		public String twlcfh;
 | 
							public String twl;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							/**
 | 
				
			||||||
 | 
							 * 拆分号
 | 
				
			||||||
 | 
							 */
 | 
				
			||||||
 | 
							public String chf;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							public int paixu_type=0;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							public  int show_time=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							@Override
 | 
				
			||||||
 | 
							public int compareTo(FenPei old) {
 | 
				
			||||||
 | 
								// TODO Auto-generated method stub
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								if(paixu_type==0){
 | 
				
			||||||
 | 
									try{
 | 
				
			||||||
 | 
									     return this.rqh.compareTo(old.rqh);
 | 
				
			||||||
 | 
									}catch(Exception e){
 | 
				
			||||||
 | 
										return 0;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}else{
 | 
				
			||||||
 | 
									try{
 | 
				
			||||||
 | 
									     return this.show_time-old.show_time;
 | 
				
			||||||
 | 
									}catch(Exception e){
 | 
				
			||||||
 | 
										return 0;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						public int  getValueInt(Object[] obj,int i){
 | 
				
			||||||
 | 
							int str=-1;
 | 
				
			||||||
 | 
							try{
 | 
				
			||||||
 | 
								str=Integer.parseInt(obj[i].toString());
 | 
				
			||||||
 | 
							}catch(Exception e){
 | 
				
			||||||
 | 
								logger.info(i+""+e.toString());
 | 
				
			||||||
 | 
								str=-1;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							return str;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						public String  getValueString(Object[] obj,int i){
 | 
				
			||||||
 | 
							String str="";
 | 
				
			||||||
 | 
							try{
 | 
				
			||||||
 | 
								str=(String)obj[i];
 | 
				
			||||||
 | 
							}catch(Exception e){
 | 
				
			||||||
 | 
								logger.info(i+""+e.toString());
 | 
				
			||||||
 | 
								str="";
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							return str;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						public float  getValueFloat(Object[] obj ,int i){
 | 
				
			||||||
 | 
							float v=0.0f;
 | 
				
			||||||
 | 
							try{
 | 
				
			||||||
 | 
								v=Float.parseFloat(obj[i].toString());
 | 
				
			||||||
 | 
							}catch(Exception e){
 | 
				
			||||||
 | 
								v=0;
 | 
				
			||||||
 | 
								logger.info(i+""+e.toString());
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							return v;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
 | 
						
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue