Browse Source

rev:任务校验及下发失败备注

master
gengby 6 months ago
parent
commit
92a19721ef
  1. 2
      acs/nladmin-ui/src/views/acs/task/index.vue
  2. 3
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java
  3. 20
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java

2
acs/nladmin-ui/src/views/acs/task/index.vue

@ -250,7 +250,7 @@
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
<el-table-column type="selection" width="25" />
<el-table-column v-if="false" prop="task_id" label="任务标识" />
<el-table-column prop="task_code" label="任务号" />
<el-table-column prop="task_code" label="任务号" min-width="150" show-overflow-tooltip />
<el-table-column prop="vehicle_code" label="载具号" />
<el-table-column prop="task_status" label="任务状态">
<template slot-scope="scope">

3
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/service/impl/PdaServiceImpl.java

@ -445,6 +445,9 @@ public class PdaServiceImpl implements PdaService {
Assert.notBlank(point_code, "出库点位不能为空!");
SchBasePoint point = pointService.getById(requestParam.getPoint_code());
Assert.notNull(point, point_code + "对应的点位信息不存在!");
if (point.getPoint_status().equals(PointStatusEnum.EMPTY_POINT.getCode())) {
throw new BadRequestException("回库请求失败, " + point_code + "点位为空位。");
}
if (!RegionEnum.JLHC.getRegion_code().equals(point.getRegion_code())) {
throw new BadRequestException("回库请求失败,出库点位所属区域不是" + RegionEnum.JLHC.getRegion_name());
}

20
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/task_manage/AbstractTask.java

@ -145,6 +145,26 @@ public abstract class AbstractTask {
}
}
taskService.updateBatchById(taskList);
} else {
JSONArray errArr = resultForAcs.getErrArr();
if (errArr.size() > 0) {
for (int i = 0; i < errArr.size(); i++) {
JSONObject jsonObject = errArr.getJSONObject(i);
String task_code = jsonObject.getString("task_code");
String message = jsonObject.getString("message");
SchBaseTask task = taskService.getByCode(task_code);
task.setRemark("下发失败," + message);
task.setUpdate_time(DateUtil.now());
taskService.updateById(task);
}
} else {
for (int i = 0; i < taskList.size(); i++) {
SchBaseTask schBaseTask = taskList.get(i);
schBaseTask.setRemark("下发失败" + resultForAcs.getMessage());
schBaseTask.setUpdate_time(DateUtil.now());
taskService.updateById(schBaseTask);
}
}
}
return resultForAcs;
}

Loading…
Cancel
Save