From 8614b37e6e82cb34422d9993e9604045c3cc3349 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Sat, 11 Mar 2023 16:33:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task/service/impl/TaskServiceImpl.java | 132 +++++++++--------- .../resources/config/application-prod.yml | 2 +- .../src/main/resources/config/application.yml | 2 +- .../src/views/acs/instruction/index.vue | 30 ++-- acs/nladmin-ui/src/views/acs/task/index.vue | 32 ++--- 5 files changed, 97 insertions(+), 101 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java index 2e1f988..5dda911 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java +++ b/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); + } + } } } diff --git a/acs/nladmin-system/src/main/resources/config/application-prod.yml b/acs/nladmin-system/src/main/resources/config/application-prod.yml index e22d641..3756294 100644 --- a/acs/nladmin-system/src/main/resources/config/application-prod.yml +++ b/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} # 初始连接数 diff --git a/acs/nladmin-system/src/main/resources/config/application.yml b/acs/nladmin-system/src/main/resources/config/application.yml index f943602..cfc52fe 100644 --- a/acs/nladmin-system/src/main/resources/config/application.yml +++ b/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: diff --git a/acs/nladmin-ui/src/views/acs/instruction/index.vue b/acs/nladmin-ui/src/views/acs/instruction/index.vue index 215bc6c..f9e9b6b 100644 --- a/acs/nladmin-ui/src/views/acs/instruction/index.vue +++ b/acs/nladmin-ui/src/views/acs/instruction/index.vue @@ -22,18 +22,18 @@ class="filter-item" @keyup.enter.native="crud.toQuery" /> - - - + + + + + + + + + + + + - + diff --git a/acs/nladmin-ui/src/views/acs/task/index.vue b/acs/nladmin-ui/src/views/acs/task/index.vue index 8302850..2a800fb 100644 --- a/acs/nladmin-ui/src/views/acs/task/index.vue +++ b/acs/nladmin-ui/src/views/acs/task/index.vue @@ -22,18 +22,18 @@ class="filter-item" @keyup.enter.native="crud.toQuery" /> - - - + + + + + + + + + + + + - + -