Browse Source

更新

master
gengby 2 years ago
parent
commit
8614b37e6e
  1. 132
      acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  2. 2
      acs/nladmin-system/src/main/resources/config/application-prod.yml
  3. 2
      acs/nladmin-system/src/main/resources/config/application.yml
  4. 30
      acs/nladmin-ui/src/views/acs/instruction/index.vue
  5. 32
      acs/nladmin-ui/src/views/acs/task/index.vue

132
acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java

@ -710,7 +710,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
HttpResponse body = null;
boolean flag = false;
try {
// body = acstowmsService.feedbackTaskStatusToWms(ja);
body = acstowmsService.feedbackTaskStatusToWms(ja);
} catch (Exception e) {
flag = true;
message = e.getMessage();
@ -718,71 +718,71 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
} finally {
}
// if (flag) {
// if (ObjectUtil.isEmpty(feefbackdto)) {
// feefbackdto = new TaskFeedbackDto();
// feefbackdto.setTask_id(entity.getTask_id());
// feefbackdto.setTask_code(entity.getTask_code());
// feefbackdto.setTask_status(entity.getTask_status());
// feefbackdto.setVehicle_type(entity.getVehicle_type());
// feefbackdto.setVehicle_code(entity.getVehicle_code());
// feefbackdto.setStart_device_code(entity.getStart_device_code());
// feefbackdto.setStart_point_code(entity.getStart_point_code());
// feefbackdto.setNext_device_code(entity.getNext_device_code());
// feefbackdto.setNext_point_code(entity.getNext_point_code());
// feefbackdto.setError_code("400");
// feefbackdto.setIs_finished("0");
// feefbackdto.setRemark(message);
// taskFeedbackService.create(feefbackdto);
// } else {
// feefbackdto.setTask_status(entity.getTask_status());
// feefbackdto.setStart_device_code(entity.getStart_device_code());
// feefbackdto.setStart_point_code(entity.getStart_point_code());
// feefbackdto.setNext_device_code(entity.getNext_device_code());
// feefbackdto.setNext_point_code(entity.getNext_point_code());
// feefbackdto.setError_code("400");
// feefbackdto.setRemark(message);
// taskFeedbackService.update(feefbackdto);
// }
// } else {
// int status = body.getStatus();
// JSONObject jo = JSONObject.parseObject(body.body());
// if (ObjectUtil.isEmpty(feefbackdto)) {
// feefbackdto = new TaskFeedbackDto();
// feefbackdto.setTask_id(entity.getTask_id());
// feefbackdto.setTask_code(entity.getTask_code());
// feefbackdto.setTask_status(entity.getTask_status());
// feefbackdto.setVehicle_type(entity.getVehicle_type());
// feefbackdto.setVehicle_code(entity.getVehicle_code());
// feefbackdto.setError_code(String.valueOf(body.getStatus()));
// feefbackdto.setStart_device_code(entity.getStart_device_code());
// feefbackdto.setStart_point_code(entity.getNext_point_code());
// feefbackdto.setNext_device_code(entity.getNext_device_code());
// feefbackdto.setNext_point_code(entity.getNext_point_code());
// if (status == 200) {
// if (StrUtil.equals(entity.getTask_status(), "2")) {
// feefbackdto.setIs_finished("1");
// } else {
// feefbackdto.setIs_finished("0");
// }
// } else {
// feefbackdto.setIs_finished("0");
// feefbackdto.setRemark(jo.getString("message"));
// }
// taskFeedbackService.create(feefbackdto);
// } else {
// feefbackdto.setTask_status(entity.getTask_status());
// if (status == 200) {
// } else {
// if (StrUtil.equals(entity.getTask_status(), "2")) {
// feefbackdto.setIs_finished("1");
// } else {
// feefbackdto.setIs_finished("0");
// }
// }
// taskFeedbackService.update(feefbackdto);
// }
// }
if (flag) {
if (ObjectUtil.isEmpty(feefbackdto)) {
feefbackdto = new TaskFeedbackDto();
feefbackdto.setTask_id(entity.getTask_id());
feefbackdto.setTask_code(entity.getTask_code());
feefbackdto.setTask_status(entity.getTask_status());
feefbackdto.setVehicle_type(entity.getVehicle_type());
feefbackdto.setVehicle_code(entity.getVehicle_code());
feefbackdto.setStart_device_code(entity.getStart_device_code());
feefbackdto.setStart_point_code(entity.getStart_point_code());
feefbackdto.setNext_device_code(entity.getNext_device_code());
feefbackdto.setNext_point_code(entity.getNext_point_code());
feefbackdto.setError_code("400");
feefbackdto.setIs_finished("0");
feefbackdto.setRemark(message);
taskFeedbackService.create(feefbackdto);
} else {
feefbackdto.setTask_status(entity.getTask_status());
feefbackdto.setStart_device_code(entity.getStart_device_code());
feefbackdto.setStart_point_code(entity.getStart_point_code());
feefbackdto.setNext_device_code(entity.getNext_device_code());
feefbackdto.setNext_point_code(entity.getNext_point_code());
feefbackdto.setError_code("400");
feefbackdto.setRemark(message);
taskFeedbackService.update(feefbackdto);
}
} else {
int status = body.getStatus();
JSONObject jo = JSONObject.parseObject(body.body());
if (ObjectUtil.isEmpty(feefbackdto)) {
feefbackdto = new TaskFeedbackDto();
feefbackdto.setTask_id(entity.getTask_id());
feefbackdto.setTask_code(entity.getTask_code());
feefbackdto.setTask_status(entity.getTask_status());
feefbackdto.setVehicle_type(entity.getVehicle_type());
feefbackdto.setVehicle_code(entity.getVehicle_code());
feefbackdto.setError_code(String.valueOf(body.getStatus()));
feefbackdto.setStart_device_code(entity.getStart_device_code());
feefbackdto.setStart_point_code(entity.getNext_point_code());
feefbackdto.setNext_device_code(entity.getNext_device_code());
feefbackdto.setNext_point_code(entity.getNext_point_code());
if (status == 200) {
if (StrUtil.equals(entity.getTask_status(), "2")) {
feefbackdto.setIs_finished("1");
} else {
feefbackdto.setIs_finished("0");
}
} else {
feefbackdto.setIs_finished("0");
feefbackdto.setRemark(jo.getString("message"));
}
taskFeedbackService.create(feefbackdto);
} else {
feefbackdto.setTask_status(entity.getTask_status());
if (status == 200) {
} else {
if (StrUtil.equals(entity.getTask_status(), "2")) {
feefbackdto.setIs_finished("1");
} else {
feefbackdto.setIs_finished("0");
}
}
taskFeedbackService.update(feefbackdto);
}
}
}
}

2
acs/nladmin-system/src/main/resources/config/application-prod.yml

@ -11,7 +11,7 @@ spring:
druid:
db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://${DB_HOST:10.1.3.91}:${DB_PORT:3306}/${DB_NAME:acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:ztl_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
username: ${DB_USER:root}
password: ${DB_PWD:123456}
# 初始连接数

2
acs/nladmin-system/src/main/resources/config/application.yml

@ -2,7 +2,7 @@ spring:
freemarker:
check-template-location: false
profiles:
active: dev
active: prod
jackson:
time-zone: GMT+8
data:

30
acs/nladmin-ui/src/views/acs/instruction/index.vue

@ -22,18 +22,18 @@
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<el-select
v-model="query.material_type"
clearable
filterable
size="small"
placeholder="物料类型"
class="filter-item"
style="width: 190px"
@change="crud.toQuery"
>
<el-option v-for="item in materialList" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
<!-- <el-select-->
<!-- v-model="query.material_type"-->
<!-- clearable-->
<!-- filterable-->
<!-- size="small"-->
<!-- placeholder="物料类型"-->
<!-- class="filter-item"-->
<!-- style="width: 190px"-->
<!-- @change="crud.toQuery"-->
<!-- >-->
<!-- <el-option v-for="item in materialList" :key="item.id" :label="item.label" :value="item.value" />-->
<!-- </el-select>-->
<el-select
v-model="query.status"
clearable
@ -128,12 +128,10 @@
</el-table-column>
<!-- <el-table-column prop="link_num" label="关联编号" />-->
<el-table-column prop="task_code" label="任务号" />
<el-table-column prop="vehicle_code" label="载具号" />
<el-table-column prop="vehicle_code" label="载具号" width="200" />
<el-table-column prop="instruction_status" label="指令状态">
<template slot-scope="scope">
<span v-if="scope.row.instruction_status=='0' ">就绪</span>
<span v-if="scope.row.instruction_status=='1' ">执行中</span>
<span v-if="scope.row.instruction_status=='2' ">完成</span>
{{ dict.label.task_status[scope.row.instruction_status] }}
</template>
</el-table-column>
<el-table-column prop="send_status" label="下发状态">

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

@ -22,18 +22,18 @@
class="filter-item"
@keyup.enter.native="crud.toQuery"
/>
<el-select
v-model="query.material_type"
clearable
filterable
size="small"
placeholder="物料类型"
class="filter-item"
style="width: 190px"
@change="crud.toQuery"
>
<el-option v-for="item in materialList" :key="item.id" :label="item.label" :value="item.value" />
</el-select>
<!-- <el-select-->
<!-- v-model="query.material_type"-->
<!-- clearable-->
<!-- filterable-->
<!-- size="small"-->
<!-- placeholder="物料类型"-->
<!-- class="filter-item"-->
<!-- style="width: 190px"-->
<!-- @change="crud.toQuery"-->
<!-- >-->
<!-- <el-option v-for="item in materialList" :key="item.id" :label="item.label" :value="item.value" />-->
<!-- </el-select>-->
<el-select
v-model="query.status"
clearable
@ -332,12 +332,10 @@
</template>
</el-table-column>
<!-- <el-table-column prop="link_num" label="关联编号" />-->
<el-table-column prop="vehicle_code" label="载具号" width="100" />
<el-table-column prop="vehicle_code" label="载具号" width="200" />
<el-table-column prop="task_status" label="任务状态" width="100">
<template slot-scope="scope" width="60">
<span v-if="scope.row.task_status==='0' ">就绪</span>
<span v-if="scope.row.task_status==='1' ">执行中</span>
<span v-if="scope.row.task_status==='2' ">完成</span>
<template slot-scope="scope">
{{ dict.label.task_status[scope.row.task_status] }}
</template>
</el-table-column>
<el-table-column prop="priority" label="优先级" width="100" />

Loading…
Cancel
Save