opt: LMS解包区任务完成点位赋值,ACS数据初始化结构

This commit is contained in:
2025-08-12 17:29:49 +08:00
parent 2e87d667c6
commit 0f2cb09f22
15 changed files with 1862 additions and 13 deletions

View File

@@ -58,6 +58,12 @@ public class PdaSchPointController {
public ResponseEntity<Object> regionList(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(pdaSchPointService.regionList(whereJson), HttpStatus.OK);
}
@PostMapping("/allRegionList")
@Log("获取区域下拉框数组")
@SaIgnore
public ResponseEntity<Object> allRegionList(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(pdaSchPointService.allRegionList(whereJson), HttpStatus.OK);
}
@PostMapping("/pointList")
@Log("获取点位下拉框数组")
@SaIgnore

View File

@@ -49,4 +49,6 @@ public interface PdaSchPointService extends IService<SchBasePoint> {
PdaResponse regionList(JSONObject whereJson);
PdaResponse pointListByRegion(JSONObject whereJson);
PdaResponse allRegionList(JSONObject whereJson);
}

View File

@@ -101,4 +101,16 @@ public class PdaSchPointServiceImpl extends ServiceImpl<SchBasePointMapper, SchB
.collect(Collectors.toList());
return PdaResponse.requestParamOk(list);
}
@Override
public PdaResponse allRegionList(JSONObject whereJson) {
List<SelectItemVo> list = regionService.list(new LambdaQueryWrapper<SchBaseRegion>()
.orderByAsc(SchBaseRegion::getOrder_seq)).stream().map(p -> SelectItemVo
.builder()
.text(p.getRegion_name())
.value(p.getRegion_code())
.build())
.collect(Collectors.toList());
return PdaResponse.requestParamOk(list);
}
}

View File

@@ -1,6 +1,7 @@
package org.nl.wms.sch_manage.controller;
import cn.dev33.satoken.annotation.SaIgnore;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.base.TableDataInfo;
import org.nl.common.domain.query.PageQuery;

View File

@@ -1,5 +1,6 @@
package org.nl.wms.sch_manage.service.dao;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
@@ -48,10 +49,10 @@ public class SchBasePoint implements Serializable {
private Integer vehicle_max_qty;
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String vehicle_type;
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String vehicle_code;

View File

@@ -31,6 +31,7 @@ import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
@@ -154,21 +155,49 @@ public class JbDownAgvTask extends AbstractTask {
SchBasePoint khgPoint = pointService.getById(taskObj.getPoint_code2());
khgPoint.setPoint_status("2");
khgPoint.setUpdate_time(DateUtil.now());
pointService.updateById(khgPoint);
// 终点保存数据 空缓存点
SchBasePoint khcPoint = pointService.getById(taskObj.getPoint_code4());
khcPoint.setPoint_status("2");
khcPoint.setVehicle_code(taskObj.getVehicle_code());
khcPoint.setVehicle_type(taskObj.getVehicle_type());
khcPoint.setUpdate_time(DateUtil.now());
pointService.updateBatchById(Arrays.asList(khcPoint, khgPoint));
}
if ("2".equals(taskObj.getTask_group_seq().toString())) {
SchBasePoint jbjPoint = pointService.getById(taskObj.getPoint_code1());
SchBasePoint mhcPoint = pointService.getById(taskObj.getPoint_code2());
SchBasePoint khcPoint = pointService.getById(taskObj.getPoint_code3());
// 空缓存点清空
khcPoint.setPoint_status("1");
khcPoint.setVehicle_code(null);
khcPoint.setVehicle_type(null);
khcPoint.setUpdate_time(DateUtil.now());
// 满缓存点设置值
mhcPoint.setPoint_status("3");
mhcPoint.setVehicle_code(taskObj.getVehicle_code2());
mhcPoint.setVehicle_type(taskObj.getVehicle_type());
mhcPoint.setUpdate_time(DateUtil.now());
// 对接位设置空桶
jbjPoint.setPoint_status("2");
jbjPoint.setVehicle_type(taskObj.getVehicle_type());
jbjPoint.setVehicle_code(taskObj.getVehicle_code());
jbjPoint.setUpdate_time(DateUtil.now());
pointService.updateById(jbjPoint);
pointService.updateBatchById(Arrays.asList(jbjPoint, khcPoint, mhcPoint));
}
if ("3".equals(taskObj.getTask_group_seq().toString())) {
// 开盖设置成空位
SchBasePoint khgPoint = pointService.getById(taskObj.getPoint_code2());
SchBasePoint mhcPoint = pointService.getById(taskObj.getPoint_code1());
// 开盖设置成空位
khgPoint.setPoint_status("1");
khgPoint.setUpdate_time(DateUtil.now());
pointService.updateById(khgPoint);
// 满点清空
mhcPoint.setPoint_status("1");
mhcPoint.setVehicle_code(null);
mhcPoint.setVehicle_type(null);
mhcPoint.setUpdate_time(DateUtil.now());
pointService.updateBatchById(Arrays.asList(khgPoint, mhcPoint));
// 3条任务完成
SchBaseTask task = new SchBaseTask();
task.setTask_status(TaskStatus.FINISHED.getCode());
TaskUtils.setUpdateByType(task, taskFinishedType);
@@ -176,6 +205,7 @@ public class JbDownAgvTask extends AbstractTask {
task.setFinished_type(taskFinishedType.getCode());
taskService.update(task, new LambdaQueryWrapper<SchBaseTask>()
.eq(SchBaseTask::getTask_group_id, taskObj.getTask_group_id()));
// 出库完成
inBillService.taskFinish(taskObj);
return;
}

View File

@@ -705,6 +705,7 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
task1.put("point_code2", cfgjPoint.getPoint_code());
task1.put("point_code3", cfgjPoint.getPoint_code());
task1.put("point_code4", emptyPoint.getPoint_code());
task1.put("vehicle_type", inStruct.getStoragevehicle_type());
task1.put("seq", 1);
// 空托盘
task1.put("vehicle_code", inStruct.getStoragevehicle_code());
@@ -726,6 +727,7 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
task2.put("seq", 2);
// 空托盘
task2.put("vehicle_code", inStruct.getStoragevehicle_code());
task2.put("vehicle_type", inStruct.getStoragevehicle_type());
// 入库的满托盘
task2.put("vehicle_code2", map.get("storagevehicle_code"));
@@ -744,6 +746,7 @@ public class InBillServiceImpl extends ServiceImpl<IOStorInvMapper, IOStorInv> i
task3.put("seq", 3);
// 空托盘
task3.put("vehicle_code", inStruct.getStoragevehicle_code());
task3.put("vehicle_type", inStruct.getStoragevehicle_type());
// 入库的满托盘
task3.put("vehicle_code2", map.get("storagevehicle_code"));
List<JSONObject> jsonObjects = Arrays.asList(task1, task2, task3);