Commit cdca2200 LN

物料类型定义修改

1 个父辈 0ac0b2c5
......@@ -172,7 +172,8 @@ public class MicronStatusController {
Map<String, UsageItem> itemMap= storage.getUsageMap();
for (UsageItem item :
itemMap.values()) {
String type=MicronDataCache.GetMaterialType(storage.getCid(), storage.getId(),item.getW(),item.getH());
// String type=MicronDataCache.GetMaterialType(storage.getCid(), storage.getId(),item.getW(),item.getH());
String type=MicronDataCache.GetReelType(item.getW(),item.getH());
PosUsageItem posUsageItem=items.getOrDefault(type,null );
if(posUsageItem==null){
posUsageItem=new PosUsageItem(type,item.getUsedCount(),item.getTotalCount()) ;
......
......@@ -82,67 +82,88 @@ public class MicronDataCache {
return new MicronEquipStatus();
}
public static String GetReelType( int w,int h) {
// 310*80 = pcb 330*120= tray 386*86 =shoe box 400X70 Pizza box 其他的都是料盘
if (w== 310 && h == 80) {
return PCB;
} else if (w == 330 &&h == 120) {
return TRAY;
} else if (w== 386&&h==86) {
return SHOEBOX;
}else if(w==400&&h==70){
return PIZZABOX;
}
return REEL;
}
public static String PIZZABOX="pizzaBox";
public static String PCB="pcb";
public static String TRAY="tray";
public static String REEL="reel";
public static String GetMaterialType(String cid,String storageId,int w,int h){
String[] pizzaCids=new String[]{"SBSH1","SBSH2","SBDH1-1","SBDH1-2","SBDH2-1","SBDH2-2"};
for (String pizzaCid :
pizzaCids) {
if ( cid.contains(pizzaCid)) {
return PIZZABOX;
}
}
if(cid.contains("SBDH3-1")) {
if (w== 310 && h == 80) {
return PCB;
} else if (w == 330 &&h == 120) {
return TRAY;
} else if (w== 13) {
return PCB;
}
}
else if(cid.contains("SBDH3-2")){
return PCB;
}
// else if(storage.isType(new DeviceType[] {DeviceType.SMDBOX_THIRD} )){
// return REEL;
// }
return REEL;
//SBSH1,SBSH2,SBDH1-1,SBDH1-2,SBDH2-1.SBDH2-2这些都是Pizza box,对应的料架是M01开头的,每个料架可以放5盘料
//SBDH3-1里面有pcb,对应的料架是M02开头,每个料架可以放5盘料。 310*80是PCB, 330*120是tray
//SBDH3-2里面是pcb物料
// tray对应的料架是M03开头,每个料架可以放4盘料,
// 还有reel料盘尺寸是13*44,13*56,13*72
public static String SHOEBOX="shoebox";
// public static String GetMaterialType(String cid,String storageId,int w,int h){
// String[] pizzaCids=new String[]{"SBSH1","SBSH2","SBDH1-1","SBDH1-2","SBDH2-1","SBDH2-2"};
//
// for (String pizzaCid :
// pizzaCids) {
// if ( cid.contains(pizzaCid)) {
// return PIZZABOX;
// }
// }
// if(cid.contains("SBDH3-1")) {
// if (w== 310 && h == 80) {
// return PCB;
// } else if (w == 330 &&h == 120) {
// return TRAY;
// } else if (w== 13) {
// return PCB;
// }
// }
// else if(cid.contains("SBDH3-2")){
// return PCB;
// }
//
// 13*72的入13*44,13*56,13*72的料盘
//386*86的这个库位设计的时候错了,就不使用了
//pizzaBox (料架M01,每个料架5盘) SBSH1,SBSH2,SBDH1-1,SBDH1-2,SBDH2-1.SBDH2-2
//pcb (料架M02,每个料架5盘) SBDH3-2,SBDH3-1部分
//tray (料架M03,每个料架4盘) SBDH3-1 里
//reel (料架S007,每个料架35盘) SBDH3-1 13*44,13*56,13*72
}
//// else if(storage.isType(new DeviceType[] {DeviceType.SMDBOX_THIRD} )){
//// return REEL;
//// }
// return REEL;
// //SBSH1,SBSH2,SBDH1-1,SBDH1-2,SBDH2-1.SBDH2-2这些都是Pizza box,对应的料架是M01开头的,每个料架可以放5盘料
// //SBDH3-1里面有pcb,对应的料架是M02开头,每个料架可以放5盘料。 310*80是PCB, 330*120是tray
// //SBDH3-2里面是pcb物料
// // tray对应的料架是M03开头,每个料架可以放4盘料,
// // 还有reel料盘尺寸是13*44,13*56,13*72
//
//
////
////
//// 13*72的入13*44,13*56,13*72的料盘
// //386*86的这个库位设计的时候错了,就不使用了
//
// //pizzaBox (料架M01,每个料架5盘) SBSH1,SBSH2,SBDH1-1,SBDH1-2,SBDH2-1.SBDH2-2
// //pcb (料架M02,每个料架5盘) SBDH3-2,SBDH3-1部分
// //tray (料架M03,每个料架4盘) SBDH3-1 里
// //reel (料架S007,每个料架35盘) SBDH3-1 13*44,13*56,13*72
// }
public static String GetMaterialType(DataLog dataLog){
return GetMaterialType(dataLog.getCid(),dataLog.getStorageId(),dataLog.getW(),dataLog.getH());
// return GetMaterialType(dataLog.getCid(),dataLog.getStorageId(),dataLog.getW(),dataLog.getH());
return GetReelType(dataLog.getW(),dataLog.getH());
}
public static String getShelfType(DataLog dataLog){
String mType=GetMaterialType(dataLog);
return getShelfType(mType);
}
public static String getShelfType(String materialType){
// L1_M01_1,PizzaBOX料格
// L1_M02_1,PCB料格
// L1_M03_1,Tray料格
// L1_M04_1,ShoeBOX料格
if(materialType.equals(PIZZABOX)){
return "M01";
}else if(materialType.equals(PCB)){
return "M02";
}else if(materialType.equals(TRAY)){
return "M03";
}else if(materialType.equals(SHOEBOX)){
return "M04";
}
return "S007";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!