rev:成品出库设置站点修改

This commit is contained in:
zhangzhiqiang
2023-07-27 20:35:36 +08:00
parent ed000b6f56
commit e02421418c

View File

@@ -412,27 +412,31 @@ public class StIvtIostorinvCpOutServiceImpl extends ServiceImpl<StIvtIostorinvCp
.ne(StIvtIostorinvdisCp::getWork_status, IOSEnum.WORK_STATUS.code("未生成"))
, false
);
if (ObjectUtil.isNotEmpty(disIsnull)) throw new BadRequestException("此货位已生成任务!");
// 2.下发任务
SchBasePoint pointDao = iSchBasePointService.getOne(
new QueryWrapper<SchBasePoint>().lambda()
.eq(SchBasePoint::getPoint_code, whereJson.getString("point_code"))
);
PointEvent event = PointEvent.builder()
.type(AcsTaskEnum.TASK_STRUCT_CP_OUT)
.acs_task_type("8")
.task_group_id(IdUtil.getStringId())
.point_code1(disDao.getStruct_code())
.point_code3(pointDao.getPoint_code())
.vehicle_code(disDao.getStoragevehicle_code())
.product_area("A1") // 暂时写死
.callback((Consumer<String>) disDao::setTask_id)
.build();
BussEventMulticaster.Publish(event);
SchBasePoint pointDao;
if (ObjectUtil.isNotEmpty(disIsnull)) {
disDao.setTask_id(disIsnull.getTask_id());
pointDao = new SchBasePoint();
pointDao.setPoint_id(disDao.getPoint_id());
pointDao.setPoint_code(disDao.getPoint_code());
pointDao.setPoint_name(disDao.getPoint_name());
}else {
// 2.下发任务
pointDao = iSchBasePointService.getOne(
new QueryWrapper<SchBasePoint>().lambda()
.eq(SchBasePoint::getPoint_code, whereJson.getString("point_code"))
);
PointEvent event = PointEvent.builder()
.type(AcsTaskEnum.TASK_STRUCT_CP_OUT)
.acs_task_type("8")
.task_group_id(IdUtil.getStringId())
.point_code1(disDao.getStruct_code())
.point_code3(pointDao.getPoint_code())
.vehicle_code(disDao.getStoragevehicle_code())
.product_area("A1") // 暂时写死
.callback((Consumer<String>) disDao::setTask_id)
.build();
BussEventMulticaster.Publish(event);
}
// 3.更新分配表
iostorinvdisCpService.update(
new UpdateWrapper<StIvtIostorinvdisCp>().lambda()