rev:库存区满了可以去空架区
This commit is contained in:
@@ -35,6 +35,11 @@ public class QPMES098RequestBody {
|
|||||||
private String ZGG;
|
private String ZGG;
|
||||||
private String ZGYTCL;
|
private String ZGYTCL;
|
||||||
private String FXXDM;
|
private String FXXDM;
|
||||||
|
/**
|
||||||
|
* 1代表下达
|
||||||
|
* 2代表关闭
|
||||||
|
* 3代表删除
|
||||||
|
*/
|
||||||
private String ZSTAT;
|
private String ZSTAT;
|
||||||
private String UEBTK;
|
private String UEBTK;
|
||||||
private String ZRSV01;
|
private String ZRSV01;
|
||||||
|
|||||||
@@ -82,9 +82,7 @@ public class YCLCKTask extends AbstractTask {
|
|||||||
protected void create() throws BadRequestException {
|
protected void create() throws BadRequestException {
|
||||||
// 获取任务
|
// 获取任务
|
||||||
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
|
List<SchBaseTask> tasks = taskService.findTasksByTaskStatus(TASK_CONFIG_CODE, TaskStatus.APPLY);
|
||||||
// 配置信息
|
|
||||||
SchBaseTaskconfig taskConfig = taskConfigService.getOne(new LambdaQueryWrapper<SchBaseTaskconfig>()
|
|
||||||
.eq(SchBaseTaskconfig::getConfig_code, TASK_CONFIG_CODE));
|
|
||||||
for (SchBaseTask task : tasks) {
|
for (SchBaseTask task : tasks) {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(task.getExt_group_data());
|
JSONObject jsonObject = JSONObject.parseObject(task.getExt_group_data());
|
||||||
String region;
|
String region;
|
||||||
|
|||||||
@@ -123,15 +123,36 @@ public class YCLRKTask extends AbstractTask {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private SchBasePoint findNextPoint(String sub_tray) {
|
private SchBasePoint findNextPoint(String sub_tray) {
|
||||||
String regionCode = "YL";
|
//人工录入的子托盘号以YBHC开头
|
||||||
if(sub_tray.startsWith("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");
|
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode, "0");
|
||||||
for (SchBasePoint schBasePoint : schBasePointList) {
|
for (SchBasePoint schBasePoint : schBasePointList) {
|
||||||
if (schBasePoint.getIs_used()
|
if (schBasePoint.getIs_used()
|
||||||
&& schBasePoint.getVehicle_qty() ==0 &&ObjectUtil.isEmpty(schBasePoint.getIng_task_code())) {
|
&& schBasePoint.getVehicle_qty() ==0 &&ObjectUtil.isEmpty(schBasePoint.getIng_task_code())) {
|
||||||
log.info("原材料入库找到当前符合条件的点位{}", schBasePoint.getPoint_code());
|
log.info("原材料入库找到当前符合条件的点位{}", schBasePoint.getPoint_code());
|
||||||
|
|
||||||
return schBasePoint;
|
return schBasePoint;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user