opt:优化CTU出库逻辑
This commit is contained in:
@@ -85,8 +85,8 @@ public class SecondFloorAgvTransferTask extends AbstractTask {
|
|||||||
SchBaseTask schBaseTask = iSchBaseTaskService.getOne(new QueryWrapper<SchBaseTask>().eq("task_code", data.getString("task_code")));
|
SchBaseTask schBaseTask = iSchBaseTaskService.getOne(new QueryWrapper<SchBaseTask>().eq("task_code", data.getString("task_code")));
|
||||||
//货架解绑
|
//货架解绑
|
||||||
TableDataInfo tableDataInfo = wmsToAcsService.bindPodAndBerth(schBaseTask.getPoint_code3(), schBaseTask.getPoint_code1(), "0", "bindPodAndBerth");
|
TableDataInfo tableDataInfo = wmsToAcsService.bindPodAndBerth(schBaseTask.getPoint_code3(), schBaseTask.getPoint_code1(), "0", "bindPodAndBerth");
|
||||||
String bindResult = "200".equals(tableDataInfo.getCode()) ? "地面站点:" + schBaseTask.getPoint_code1() + "解绑" + schBaseTask.getPoint_code3() + "指令下发CTU,返回解绑成功!" :
|
String bindResult = "200".equals(tableDataInfo.getCode()) ?"任务:"+schBaseTask.getTask_code()+"完成,地面站点:"+ schBaseTask.getPoint_code1() + "解绑" + schBaseTask.getPoint_code3() + "指令下发CTU,返回解绑成功!" :
|
||||||
"地面站点:" + schBaseTask.getPoint_code1() + "解绑" + schBaseTask.getPoint_code3() + "指令下发CTU,返回解绑失败,请操作站点解绑,失败原因:" + tableDataInfo.getMsg();
|
"任务:"+schBaseTask.getTask_code()+"完成,地面站点:" + schBaseTask.getPoint_code1() + "解绑" + schBaseTask.getPoint_code3() + "指令下发CTU,返回解绑失败,请操作站点解绑,失败原因:" + tableDataInfo.getMsg();
|
||||||
iSchBaseTaskService.update(new LambdaUpdateWrapper<SchBaseTask>()
|
iSchBaseTaskService.update(new LambdaUpdateWrapper<SchBaseTask>()
|
||||||
.set(SchBaseTask::getRemark, bindResult)
|
.set(SchBaseTask::getRemark, bindResult)
|
||||||
.eq(SchBaseTask::getId, schBaseTask.getId()));
|
.eq(SchBaseTask::getId, schBaseTask.getId()));
|
||||||
|
|||||||
@@ -87,12 +87,19 @@ public class SecondFloorEmptyShelfTask extends AbstractTask {
|
|||||||
.eq(SchBasePoint::getCode, schBaseTask.getPoint_code1()));
|
.eq(SchBasePoint::getCode, schBaseTask.getPoint_code1()));
|
||||||
//货架绑定
|
//货架绑定
|
||||||
TableDataInfo tableDataInfo = iSchBasePointService.bindOrUnbind(schBaseTask.getPoint_code2(), schBaseTask.getVehicle_code(), "1");
|
TableDataInfo tableDataInfo = iSchBasePointService.bindOrUnbind(schBaseTask.getPoint_code2(), schBaseTask.getVehicle_code(), "1");
|
||||||
String bindResult = "200".equals(tableDataInfo.getCode()) ? "地面站点:" + schBaseTask.getPoint_code2() + "绑定" + schBaseTask.getVehicle_code() + "指令下发CTU,返回绑定成功!" :
|
String bindResult = "200".equals(tableDataInfo.getCode()) ? "任务:"+schBaseTask.getTask_code()+"完成,地面站点:" + schBaseTask.getPoint_code2() + "绑定" + schBaseTask.getVehicle_code() + "指令下发CTU,返回绑定成功!" :
|
||||||
"地面站点:" + schBaseTask.getPoint_code2() + "绑定" + schBaseTask.getVehicle_code() + "指令下发CTU,返回绑定失败,请操作站点绑定,失败原因:" + tableDataInfo.getMsg();
|
"任务:"+schBaseTask.getTask_code()+"完成,地面站点:"+ schBaseTask.getPoint_code2() + "绑定" + schBaseTask.getVehicle_code() + "指令下发CTU,返回绑定失败,请操作站点绑定,失败原因:" + tableDataInfo.getMsg();
|
||||||
iSchBaseTaskService.update(new LambdaUpdateWrapper<SchBaseTask>()
|
iSchBaseTaskService.update(new LambdaUpdateWrapper<SchBaseTask>()
|
||||||
|
.set(SchBaseTask::getUpdate_time, DateUtil.now())
|
||||||
.set(SchBaseTask::getRemark, bindResult)
|
.set(SchBaseTask::getRemark, bindResult)
|
||||||
|
.set(SchBaseTask::getUpdate_name, SecurityUtils.getCurrentNickName())
|
||||||
.eq(SchBaseTask::getId, schBaseTask.getId()));
|
.eq(SchBaseTask::getId, schBaseTask.getId()));
|
||||||
|
//点位状态更新
|
||||||
|
iSchBasePointService.update(new LambdaUpdateWrapper<SchBasePoint>()
|
||||||
|
.set(SchBasePoint::getUpdate_time, DateUtil.now())
|
||||||
|
.set(SchBasePoint::getRemark, bindResult)
|
||||||
|
.set(SchBasePoint::getUpdate_name, SecurityUtils.getCurrentNickName())
|
||||||
|
.eq(SchBasePoint::getCode,schBaseTask.getPoint_code2()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ public class ToPickPlatformTask extends AbstractTask {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISchBasePointService iSchBasePointService;
|
private ISchBasePointService iSchBasePointService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拣选出库任务
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public JSONObject createTask(JSONObject from) {
|
public JSONObject createTask(JSONObject from) {
|
||||||
@@ -84,6 +87,7 @@ public class ToPickPlatformTask extends AbstractTask {
|
|||||||
throw new BadRequestException("创建任务失败:未找到该物料对应起点仓位");
|
throw new BadRequestException("创建任务失败:未找到该物料对应起点仓位");
|
||||||
}
|
}
|
||||||
String start_struct_code = struct.getStruct_code();
|
String start_struct_code = struct.getStruct_code();
|
||||||
|
//移库判断
|
||||||
if (struct.getStor_code().equals("FStockId")){
|
if (struct.getStor_code().equals("FStockId")){
|
||||||
synchronized ("FStockId"){
|
synchronized ("FStockId"){
|
||||||
start_struct_code= SpringContextHolder.getBean(OutStorageTask.class).DoubleStor(struct);
|
start_struct_code= SpringContextHolder.getBean(OutStorageTask.class).DoubleStor(struct);
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ public class SchBaseTaskServiceImpl extends ServiceImpl<SchBaseTaskMapper, SchBa
|
|||||||
}
|
}
|
||||||
if (param.getString("status").equals(StatusEnum.FORM_STATUS.code("完成"))) {
|
if (param.getString("status").equals(StatusEnum.FORM_STATUS.code("完成"))) {
|
||||||
//CTU任务处理
|
//CTU任务处理
|
||||||
if (task.getAcs_type().equals(StatusEnum.ACS_TYPE.code("CTU任务"))) {
|
if (task.getProduct_area().equals(StatusEnum.PRODUCT_AREA.code("二层车间"))) {
|
||||||
handleFinishTask(param, task);
|
handleFinishTask(param, task);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user