任务表添加agv任务状态

main
Comair 6 months ago
parent f0493682f1
commit b0bdf9ac3a
  1. 11
      shkj-wms/src/main/java/com/shkj/wcs/domain/BusinDataTask.java
  2. 8
      shkj-wms/src/main/java/com/shkj/wcs/service/impl/BusinDataTaskServiceImpl.java

@ -117,17 +117,11 @@ public class BusinDataTask implements Serializable {
@Excel(name = "AGV编号")
private String agvNo;
/** 冲孔机编号 */
@Excel(name = "冲孔机编号")
private String punchNo;
/** 立库输送线 */
@Excel(name = "立库输送线")
private String dpsNoOne;
/** 立库输送线 */
@Excel(name = "立库输送线")
private String dpsNoTwo;
/** 过点时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+7")
@ -172,5 +166,10 @@ public class BusinDataTask implements Serializable {
*/
private String destination;
/**
* AGV任务状态
*/
private String agvTaskStatus;
}

@ -172,20 +172,25 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B
return RcsResponseVo.error("未找到对应任务");
}
String taskType = businDataTask.getTaskType();
switch (method) {
case "start":
businDataTask.setTaskStarttime(new Date());
businDataTask.setTaskStatus(TaskStatusEnum.wait_callback.getValue());
break;
case "outbin":
businDataTask.setTaskStatus(TaskStatusEnum.wait_callback.getValue());
break;
case "end":
businDataTask.setTaskStatus(TaskStatusEnum.finished.getValue());
businDataTask.setDestination(slotName);
businDataTask.setTaskEntime(new Date());
break;
default:
return RcsResponseVo.error("任务状态未知!");
}
businDataTask.setAgvTaskStatus(method);
businDataTask.setUpdateTime(new Date());
businDataTask.setAgvNo(bo.getSingleRobotCode());
boolean isUpdated = iBusinDataTaskService.updateById(businDataTask);
if (!isUpdated) {
log.error("任务状态更新失败,任务号:{}", robotTaskCode);
@ -194,6 +199,7 @@ public class BusinDataTaskServiceImpl extends ServiceImpl<BusinDataTaskMapper, B
log.info("任务状态更新成功,任务号:{}", robotTaskCode);
UploadWCSTaskStatusDto uploadWCSTaskStatusDto = new UploadWCSTaskStatusDto();
WcsCreateTaskHeader header = new WcsCreateTaskHeader();
String taskType = businDataTask.getTaskType();
switch (taskType) {
case "1":
header.setBusinessType("stockOutReturn");

Loading…
Cancel
Save