分配工作站
parent
92322eeef7
commit
69e2722b5a
|
|
@ -0,0 +1,116 @@
|
||||||
|
package com.dev.swms.server.model.shipping;
|
||||||
|
|
||||||
|
public interface NewWaveFlag {
|
||||||
|
/**
|
||||||
|
* 料箱到人
|
||||||
|
*/
|
||||||
|
public static Long LXQ = 1763l;
|
||||||
|
/**
|
||||||
|
* 货架到人
|
||||||
|
*/
|
||||||
|
public static Long HJQ = 1765l;
|
||||||
|
/**
|
||||||
|
* 堆垛区
|
||||||
|
*/
|
||||||
|
public static Long LKQ = 1766l;
|
||||||
|
|
||||||
|
|
||||||
|
//工作站
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 料箱区201
|
||||||
|
*/
|
||||||
|
public static String LXQ_201 = "201";
|
||||||
|
/**
|
||||||
|
* 202
|
||||||
|
*/
|
||||||
|
public static String LXQ_202 = "202";
|
||||||
|
/**
|
||||||
|
* 203
|
||||||
|
*/
|
||||||
|
public static String LXQ_203 = "203";
|
||||||
|
/**
|
||||||
|
* 204
|
||||||
|
*/
|
||||||
|
public static String LXQ_204 = "204";
|
||||||
|
/**
|
||||||
|
* 205
|
||||||
|
*/
|
||||||
|
public static String LXQ_205 = "205";
|
||||||
|
/**
|
||||||
|
* 206
|
||||||
|
*/
|
||||||
|
public static String LXQ_206 = "206";
|
||||||
|
/**
|
||||||
|
* 207
|
||||||
|
*/
|
||||||
|
public static String LXQ_207 = "207";
|
||||||
|
/**
|
||||||
|
* 208
|
||||||
|
*/
|
||||||
|
public static String LXQ_208 = "208";
|
||||||
|
/**
|
||||||
|
* 209
|
||||||
|
*/
|
||||||
|
public static String LXQ_209 = "209";
|
||||||
|
/**
|
||||||
|
* 210
|
||||||
|
*/
|
||||||
|
public static String LXQ_210 = "210";
|
||||||
|
/**
|
||||||
|
* 211
|
||||||
|
*/
|
||||||
|
public static String LXQ_211 = "211";
|
||||||
|
/**
|
||||||
|
* 212
|
||||||
|
*/
|
||||||
|
public static String LXQ_212 = "212";
|
||||||
|
/**
|
||||||
|
*货架区 101
|
||||||
|
*/
|
||||||
|
public static String HJQ_101 = "101";
|
||||||
|
/**
|
||||||
|
* 102
|
||||||
|
*/
|
||||||
|
public static String HJQ_102 = "102";
|
||||||
|
/**
|
||||||
|
* 103
|
||||||
|
*/
|
||||||
|
public static String HJQ_103 = "103";
|
||||||
|
/**
|
||||||
|
* 104
|
||||||
|
*/
|
||||||
|
public static String HJQ_104 = "104";
|
||||||
|
/**
|
||||||
|
* 105
|
||||||
|
*/
|
||||||
|
public static String HJQ_105 = "105";
|
||||||
|
/**
|
||||||
|
* 106
|
||||||
|
*/
|
||||||
|
public static String HJQ_106 = "106";
|
||||||
|
/**
|
||||||
|
* 107
|
||||||
|
*/
|
||||||
|
public static String HJQ_107 = "107";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 立库区602
|
||||||
|
*/
|
||||||
|
public static String LKQ_602 = "602";
|
||||||
|
/**
|
||||||
|
* 603
|
||||||
|
*/
|
||||||
|
public static String LKQ_603 = "603";
|
||||||
|
/**
|
||||||
|
* 604
|
||||||
|
*/
|
||||||
|
public static String LKQ_604 = "604";
|
||||||
|
/**
|
||||||
|
* 605
|
||||||
|
*/
|
||||||
|
public static String LKQ_605 = "605";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -20,6 +20,7 @@ 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.receiving.LibraryTaskType.classification;
|
||||||
|
import com.dev.swms.server.model.shipping.NewWaveFlag;
|
||||||
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 com.dev.swms.server.utils.interfaceUtil;
|
||||||
|
|
@ -32,7 +33,7 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
|
||||||
public void allocateGZZ(List<Long> ids){
|
public void allocateGZZ(List<Long> ids){
|
||||||
for(Long id:ids){
|
for(Long id:ids){
|
||||||
WaveDoc waveDoc=commonDao.get(WaveDoc.class, id);
|
WaveDoc waveDoc=commonDao.get(WaveDoc.class, id);
|
||||||
allocateGZZ(waveDoc.getCode(),null,null,null);
|
allocateGZZ(waveDoc.getCode(),getGZZ(NewWaveFlag.LXQ),getGZZ(NewWaveFlag.HJQ),getGZZ(NewWaveFlag.LKQ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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){
|
||||||
|
|
@ -49,7 +50,7 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
|
||||||
//" and b.PLAN_QUANTITY_MU-b.MOVED_QUANTITY_MU>0 "+
|
//" and b.PLAN_QUANTITY_MU-b.MOVED_QUANTITY_MU>0 "+
|
||||||
+" for xml Path('')),1,1,'') as taskId,"
|
+" for xml Path('')),1,1,'') as taskId,"
|
||||||
+ "item.code as liaohao ,"
|
+ "item.code as liaohao ,"
|
||||||
+ "max(z.NAME) as kuqu,"
|
+ "max(z.id) as kuqu,"
|
||||||
+ "max(t.END_REGION) as gzz,"
|
+ "max(t.END_REGION) as gzz,"
|
||||||
+"sum(t.PLAN_QUANTITY_MU-t.MOVED_QUANTITY_MU) as jhsl,"
|
+"sum(t.PLAN_QUANTITY_MU-t.MOVED_QUANTITY_MU) as jhsl,"
|
||||||
+ "MAX(s2.LP) as rqh ,"
|
+ "MAX(s2.LP) as rqh ,"
|
||||||
|
|
@ -80,11 +81,12 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
|
||||||
int dataSize=list.size();
|
int dataSize=list.size();
|
||||||
|
|
||||||
List<FenPei> list_fenpei= new ArrayList<FenPei>();
|
List<FenPei> list_fenpei= new ArrayList<FenPei>();
|
||||||
|
List<FenPei> list_fenpei_wgzz= 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=getValueString(list.get(i),0);
|
bean.tsakId=getValueString(list.get(i),0);
|
||||||
bean.liaohao=getValueString(list.get(i),1);
|
bean.liaohao=getValueString(list.get(i),1);
|
||||||
bean.kuqu=getValueString(list.get(i),2);
|
bean.kuqu=getValueLong(list.get(i),2);
|
||||||
bean.gzz=getValueString(list.get(i),3);
|
bean.gzz=getValueString(list.get(i),3);
|
||||||
bean.jhsl=getValueFloat(list.get(i),4);
|
bean.jhsl=getValueFloat(list.get(i),4);
|
||||||
bean.rqh=getValueString(list.get(i),5);
|
bean.rqh=getValueString(list.get(i),5);
|
||||||
|
|
@ -95,7 +97,12 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
|
||||||
bean.rwzt=getValueInt(list.get(i),10);
|
bean.rwzt=getValueInt(list.get(i),10);
|
||||||
bean.wllx=getValueString(list.get(i),11);
|
bean.wllx=getValueString(list.get(i),11);
|
||||||
bean.twl=getValueString(list.get(i),12);
|
bean.twl=getValueString(list.get(i),12);
|
||||||
list_fenpei.add(bean);
|
if(bean.kuqu.equals(NewWaveFlag.LXQ)||bean.kuqu.equals(NewWaveFlag.HJQ)||bean.kuqu.equals(NewWaveFlag.LKQ)){
|
||||||
|
list_fenpei.add(bean);
|
||||||
|
}else{
|
||||||
|
list_fenpei_wgzz.add(bean);
|
||||||
|
}
|
||||||
|
|
||||||
logger.info(bean.gdh+"---"+bean.twl);
|
logger.info(bean.gdh+"---"+bean.twl);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -307,7 +314,7 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
|
||||||
/**
|
/**
|
||||||
* 库区
|
* 库区
|
||||||
*/
|
*/
|
||||||
public String kuqu;
|
public Long kuqu;
|
||||||
/**
|
/**
|
||||||
* 工作站
|
* 工作站
|
||||||
*/
|
*/
|
||||||
|
|
@ -407,6 +414,17 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getValueLong(Object[] obj,int i){
|
||||||
|
Long str=0l;
|
||||||
|
try{
|
||||||
|
str=Long.parseLong(obj[i].toString());
|
||||||
|
}catch(Exception e){
|
||||||
|
logger.info(i+""+e.toString());
|
||||||
|
str=0l;
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
public float getValueFloat(Object[] obj ,int i){
|
public float getValueFloat(Object[] obj ,int i){
|
||||||
float v=0.0f;
|
float v=0.0f;
|
||||||
try{
|
try{
|
||||||
|
|
@ -419,5 +437,11 @@ public class DefaultNewWaveManager extends DefaultBaseManager implements NewWave
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<Long> getGZZ(Long zone_id){
|
||||||
|
String hql="select id from LocationStorage l where l.type='拣货' and l.warehouseArea.id="+zone_id;//+" and l.beAuto=1";
|
||||||
|
List<Long> ids=commonDao.findByQuery(hql);
|
||||||
|
return ids;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue