|
|
@ -123,15 +123,36 @@ public class YCLRKTask extends AbstractTask { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private SchBasePoint findNextPoint(String sub_tray) { |
|
|
|
String regionCode = "YL"; |
|
|
|
//人工录入的子托盘号以YBHC开头
|
|
|
|
if(sub_tray.startsWith("YBHC")) { |
|
|
|
regionCode = "YLHC"; |
|
|
|
String regionCode = "YLHC"; |
|
|
|
return getSchBasePoint(regionCode); |
|
|
|
}else {//非人工录入子托盘
|
|
|
|
//1、优先从原料库存区查找
|
|
|
|
String regionCode = "YL"; |
|
|
|
SchBasePoint point = getSchBasePoint(regionCode); |
|
|
|
if (ObjectUtil.isNotEmpty(point)){ |
|
|
|
return point; |
|
|
|
}else {//2、原料库存区未找到,则去空架缓存区查找
|
|
|
|
regionCode="KJHC"; |
|
|
|
;return getSchBasePoint(regionCode); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据区域编码查找合适的点位 |
|
|
|
* @param regionCode |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private SchBasePoint getSchBasePoint(String regionCode) { |
|
|
|
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode, "0"); |
|
|
|
for (SchBasePoint schBasePoint : schBasePointList) { |
|
|
|
if (schBasePoint.getIs_used() |
|
|
|
&& schBasePoint.getVehicle_qty() ==0 &&ObjectUtil.isEmpty(schBasePoint.getIng_task_code())) { |
|
|
|
log.info("原材料入库找到当前符合条件的点位{}", schBasePoint.getPoint_code()); |
|
|
|
|
|
|
|
return schBasePoint; |
|
|
|
} |
|
|
|
} |
|
|
|