|
|
@ -28,6 +28,7 @@ import org.nl.wms.sch.task_manage.task.core.TaskStatus; |
|
|
|
import org.nl.wms.sch.task_manage.task.tasks.mapper.PointMapper; |
|
|
|
import org.nl.wms.util.PointUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.context.annotation.Lazy; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
@ -43,6 +44,7 @@ import java.util.stream.Collectors; |
|
|
|
@Slf4j |
|
|
|
@Component |
|
|
|
@TaskType("TBXBKJTask") |
|
|
|
@Lazy |
|
|
|
public class TBXBKJTask extends AbstractTask { |
|
|
|
private static String TASK_CONFIG_CODE = "TBXBKJTask"; |
|
|
|
/** |
|
|
@ -95,12 +97,6 @@ public class TBXBKJTask extends AbstractTask { |
|
|
|
task.setRemark(""); |
|
|
|
taskService.update(task); |
|
|
|
|
|
|
|
//发起任务时先把点位占用,防止发起重复任务
|
|
|
|
point.setIng_task_code(task.getTask_code()); |
|
|
|
//空固化架区别于组盘,任务完成后再扣除库存
|
|
|
|
// point.setVehicle_qty(point.getVehicle_qty() - 1);
|
|
|
|
pointService.update(point); |
|
|
|
|
|
|
|
//下发
|
|
|
|
this.renotifyAcs(task); |
|
|
|
} |
|
|
@ -122,7 +118,7 @@ public class TBXBKJTask extends AbstractTask { |
|
|
|
} |
|
|
|
List<SchBasePoint> schBasePointList = pointMapper.findPointByRegion(regionCode,"1"); |
|
|
|
for (SchBasePoint schBasePoint : schBasePointList) { |
|
|
|
if (schBasePoint.getVehicle_qty() > 0) { |
|
|
|
if (schBasePoint.getVehicle_qty() > 0&&ObjectUtil.isEmpty(schBasePoint.getIng_task_code())) { |
|
|
|
log.info("涂板线补空架找到当前符合条件的点位{}",schBasePoint.getPoint_code()); |
|
|
|
return schBasePoint; |
|
|
|
} |
|
|
@ -190,5 +186,10 @@ public class TBXBKJTask extends AbstractTask { |
|
|
|
.eq(SchBasePoint::getPoint_code, schBaseTask.getPoint_code2())); |
|
|
|
SchBasePoint point = this.findNextPoint(startPoint); |
|
|
|
schBaseTask.setPoint_code1(point.getPoint_code()); |
|
|
|
//重算点位时把点位占用,防止发起重复任务
|
|
|
|
point.setIng_task_code(schBaseTask.getTask_code()); |
|
|
|
//空固化架区别于组盘,任务完成后再扣除库存
|
|
|
|
// point.setVehicle_qty(point.getVehicle_qty() - 1);
|
|
|
|
pointService.update(point); |
|
|
|
} |
|
|
|
} |