diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index def786f..9eb6590 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -214,6 +214,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic jo.put("taskCode", task.getTask_code()); jo.put("carId", carno); jo.put("taskType ", task.getTask_type()); + jo.put("feedbackStatus","applyTake"); log.info("请求参数:{}", jo); HttpResponse result = acsToWmsZDService.taskFeedback(jo); JSONObject response = JSONObject.parseObject(result.body()); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/AcsToWmsZDController.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/AcsToWmsZDController.java index 34aae60..269a398 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/AcsToWmsZDController.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/AcsToWmsZDController.java @@ -21,7 +21,7 @@ import java.util.Map; @RestController @RequiredArgsConstructor @Api(tags = "wms接口") -@RequestMapping("/wcs/restful/api/v3/system_car") +@RequestMapping("/wcs19033/restful/api/v3/system_car") @Slf4j @Lazy @SaIgnore diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/WmsZDToAcsController.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/WmsZDToAcsController.java index a0f7eaf..69d339a 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/WmsZDToAcsController.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/WmsZDToAcsController.java @@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequiredArgsConstructor @Api(tags = "wms接口") -@RequestMapping("/restful/api/v3") +@RequestMapping("/restful/API/V3") @Slf4j @Service @Lazy diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java index 56c2e02..c798875 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToWmsZDServiceImpl.java @@ -58,7 +58,6 @@ public class AcsToWmsZDServiceImpl implements AcsToWmsZDService { @Override public HttpResponse taskFeedback(JSONObject whereJson) { String wmsUrl = paramService.findByCode(AcsConfig.WMSURL).getValue(); - AddressDto addressDto = addressService.findByCode("feedAgvTaskStatus"); String methods_url = addressDto.getMethods_url(); String url = wmsUrl + methods_url; diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsZDToAcsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsZDToAcsServiceImpl.java index 3296358..138684a 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsZDToAcsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsZDToAcsServiceImpl.java @@ -88,13 +88,13 @@ public class WmsZDToAcsServiceImpl implements WmsZDToAcsService { next_device_code = next_point_code; } - //查询wcs传过来的起点终点路由 - List list = routeLineService.getShortPathLines(start_device_code, next_device_code, "normal"); - if (ObjectUtil.isEmpty(list)) { - map.put("responseCode", 1); - map.put("responseMessage", "路由不通!"); - return map; - } +// //查询wcs传过来的起点终点路由 +// List list = routeLineService.getShortPathLines(start_device_code, next_device_code, "normal"); +// if (ObjectUtil.isEmpty(list)) { +// map.put("responseCode", 1); +// map.put("responseMessage", "路由不通!"); +// return map; +// } //查询任务编码是否重复 TaskDto taskDto = taskService.findByCodeFromCache(taskCode); if (taskDto != null) { diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index 99f0afd..f7f9e46 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -289,7 +289,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu @Override public void create(Instruction dto) { - dto = foramte(dto); +// dto = foramte(dto); String task_code = dto.getTask_code(); TaskDto task = taskService.findByCodeFromCache(task_code); @@ -352,34 +352,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); Device startdevice = appService.findDeviceByCode(dto.getStart_device_code()); - HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver; - StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver; - - try { - String start_device_code = dto.getStart_device_code(); - String next_device_code = dto.getNext_device_code(); - String route_plan_code = task.getRoute_plan_code(); - List shortPathsList = - routeLineService.getShortPathLines(start_device_code, next_device_code, route_plan_code); - RouteLineDto route = null; - for (int i = 0; i < shortPathsList.size(); i++) { - RouteLineDto routeLineDto = shortPathsList.get(i); - String route_device = routeLineDto.getDevice_code(); - String route_next_device = routeLineDto.getNext_device_code(); - if (route_device.equals(dto.getStart_device_code()) - && route_next_device.equals(dto.getNext_device_code())) { - route = routeLineDto; - break; - } - } - if (ObjectUtil.isEmpty(route)) { - throw new BadRequestException("未查询到相关路由!"); - } - - if (StrUtil.equals(shortPathsList.get(0).getType(), "1")) { - try { - if (StrUtil.equals(shortPathsList.get(0).getType(), "1")) { if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue().toString(),String.valueOf(AgvSystemEnum.Maigic.getIndex()))) { HttpResponse result = magicAgvService.sendAgvInstToMagic(dto); if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) { @@ -413,18 +386,13 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu ZheDaAgvService zheDaAgvService = SpringContextHolder.getBean(ZheDaAgvService.class); zheDaAgvService.sendAgvInstToAgv(dto); } - } + } catch (Exception e) { dto.setSend_status("2"); e.printStackTrace(); } - } - } catch (Exception e) { - dto.setSend_status("2"); - e.printStackTrace(); - log.error(""); - } + WQLObject wo = WQLObject.getWQLObject("acs_instruction"); JSONObject json = (JSONObject) JSONObject.toJSON(dto); wo.insert(json); @@ -585,6 +553,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu dto.setCreate_by(currentUsername); dto.setUpdate_by(currentUsername); + dto.setUpdate_time(now); dto.setCreate_time(now); 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 e100117..6863553 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 @@ -430,7 +430,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { @Override @Transactional(rollbackFor = Exception.class) public void create(TaskDto dto) throws Exception { - dto = foramte(dto); +// dto = foramte(dto); if (!StrUtil.isEmpty(dto.getVehicle_code())) { TaskDto vehicle_dto = this.findByContainer(dto.getVehicle_code()); if (vehicle_dto != null) { @@ -470,72 +470,72 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { // 判断起点终点设备类型 String startDeviceType = deviceAppService.findDeviceTypeByCode(dto.getStart_device_code()); String nextDeviceType = deviceAppService.findDeviceTypeByCode(dto.getNext_device_code()); - if (routelineserver - .getShortPathLines(dto.getStart_device_code(), dto.getNext_device_code(), plan_code) - .size() - == 0) { - throw new Exception(dto.getStart_point_code() + "->" + dto.getNext_point_code() + "路由不通!"); - } +// if (routelineserver +// .getShortPathLines(dto.getStart_device_code(), dto.getNext_device_code(), plan_code) +// .size() +// == 0) { +// throw new Exception(dto.getStart_point_code() + "->" + dto.getNext_point_code() + "路由不通!"); +// } String createTaskCheck = paramService.findByCode(AcsConfig.CREATETASKCHECK).getValue(); DeviceService deviceService = SpringContextHolder.getBean(DeviceServiceImpl.class); DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); Device nextdevice = appService.findDeviceByCode(next_device_code); Device startdevice = appService.findDeviceByCode(start_device_code); - dto.setMaterial(startdevice.getMaterial_type()); - if (StrUtil.equals(createTaskCheck, "1")) { - // 判断起点为输送设备 - if (StrUtil.equals(DeviceType.conveyor.toString(), startDeviceType)) { - } - - if (StrUtil.equals(DeviceType.conveyor.toString(), nextDeviceType)) { - } - } else { - // 判断起点为输送设备 - if (StrUtil.equals(DeviceType.conveyor.toString(), startDeviceType)) { - } - - if (StrUtil.equals(DeviceType.conveyor.toString(), nextDeviceType)) { - // if (nextdevice.getDeviceDriver() instanceof - // StandardOrdinarySiteDeviceDriver) { - // standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) - // nextdevice.getDeviceDriver(); - // if (nextdevice.getHas_goods() != 0) { - // throw new Exception("任务终点需满足无货!"); - // } - // } - - JSONObject jo = new JSONObject(); - JSONObject jo2 = new JSONObject(); - if (!StrUtil.isEmpty(dto.getMaterial())) { - if (!StrUtil.equals(dto.getMaterial(), "1")) { - jo.put("hasGoodStatus", "2"); - jo.put("material_type", dto.getMaterial()); - } else { - jo.put("hasGoodStatus", "1"); - jo.put("material_type", "1"); - } - - } else { - jo.put("hasGoodStatus", "1"); - jo.put("material_type", "1"); - } - jo.put("device_code", dto.getStart_device_code()); - jo.put("quantity", dto.getQuantity()); - jo.put("remark", dto.getRemark()); - jo.put("batch", startdevice.getBatch()); - jo.put("islock", "true"); - deviceService.changeDeviceStatus(jo); - Device deviceByCode = deviceAppService.findDeviceByCode(dto.getNext_device_code()); - jo2.put("device_code", dto.getNext_device_code()); - jo2.put("hasGoodStatus", deviceByCode.getHas_goods()); - jo2.put("quantity", deviceByCode.getQuantity()); - jo2.put("remark", deviceByCode.getRemark()); - jo2.put("material_type", deviceByCode.getMaterial_type()); - jo2.put("batch", deviceByCode.getBatch()); - jo2.put("islock", "true"); - deviceService.changeDeviceStatus(jo2); - } - } +// dto.setMaterial(startdevice.getMaterial_type()); +// if (StrUtil.equals(createTaskCheck, "1")) { +// // 判断起点为输送设备 +// if (StrUtil.equals(DeviceType.conveyor.toString(), startDeviceType)) { +// } +// +// if (StrUtil.equals(DeviceType.conveyor.toString(), nextDeviceType)) { +// } +// } else { +// // 判断起点为输送设备 +// if (StrUtil.equals(DeviceType.conveyor.toString(), startDeviceType)) { +// } +// +// if (StrUtil.equals(DeviceType.conveyor.toString(), nextDeviceType)) { +// // if (nextdevice.getDeviceDriver() instanceof +// // StandardOrdinarySiteDeviceDriver) { +// // standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) +// // nextdevice.getDeviceDriver(); +// // if (nextdevice.getHas_goods() != 0) { +// // throw new Exception("任务终点需满足无货!"); +// // } +// // } +// +// JSONObject jo = new JSONObject(); +// JSONObject jo2 = new JSONObject(); +// if (!StrUtil.isEmpty(dto.getMaterial())) { +// if (!StrUtil.equals(dto.getMaterial(), "1")) { +// jo.put("hasGoodStatus", "2"); +// jo.put("material_type", dto.getMaterial()); +// } else { +// jo.put("hasGoodStatus", "1"); +// jo.put("material_type", "1"); +// } +// +// } else { +// jo.put("hasGoodStatus", "1"); +// jo.put("material_type", "1"); +// } +// jo.put("device_code", dto.getStart_device_code()); +// jo.put("quantity", dto.getQuantity()); +// jo.put("remark", dto.getRemark()); +// jo.put("batch", startdevice.getBatch()); +// jo.put("islock", "true"); +// deviceService.changeDeviceStatus(jo); +// Device deviceByCode = deviceAppService.findDeviceByCode(dto.getNext_device_code()); +// jo2.put("device_code", dto.getNext_device_code()); +// jo2.put("hasGoodStatus", deviceByCode.getHas_goods()); +// jo2.put("quantity", deviceByCode.getQuantity()); +// jo2.put("remark", deviceByCode.getRemark()); +// jo2.put("material_type", deviceByCode.getMaterial_type()); +// jo2.put("batch", deviceByCode.getBatch()); +// jo2.put("islock", "true"); +// deviceService.changeDeviceStatus(jo2); +// } +// } WQLObject wo = WQLObject.getWQLObject("acs_task"); JSONObject json = (JSONObject) JSONObject.toJSON(dto); diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java b/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java index e575119..9e3aaf7 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCreateInst.java @@ -75,37 +75,37 @@ public class AutoCreateInst { continue; } - //校验路由关系 - List shortPathsList = routeLineService.getShortPathLines(start_device_code, next_device_code, route_plan_code); - if (ObjectUtils.isEmpty(shortPathsList)) { - acsTask.setRemark("路由不通无法生成指令"); - taskserver.updateByCodeFromCache(acsTask); - continue; - } - - if (!StrUtil.equals(shortPathsList.get(0).getType(), "1")) { - continue; - } - - RouteLineDto routeLineDto = shortPathsList.get(0); - String path = routeLineDto.getPath(); - String type = routeLineDto.getType(); - String[] str = path.split("->"); - List pathlist = Arrays.asList(str); - int index = 0; - for (int m = 0; m < pathlist.size(); m++) { - if (pathlist.get(m).equals(start_device_code)) { - index = m + 1; - break; - } - } - next_device_code = pathlist.get(index); - - if (StrUtil.equals(appService.findDeviceTypeByCode(next_device_code), "storage")) { - next_point_code = next_device_code + "-" + acsTask.getTo_y() + "-" + acsTask.getTo_z(); - } else { - next_point_code = next_device_code; - } +// //校验路由关系 +// List shortPathsList = routeLineService.getShortPathLines(start_device_code, next_device_code, route_plan_code); +// if (ObjectUtils.isEmpty(shortPathsList)) { +// acsTask.setRemark("路由不通无法生成指令"); +// taskserver.updateByCodeFromCache(acsTask); +// continue; +// } + +// if (!StrUtil.equals(shortPathsList.get(0).getType(), "1")) { +// continue; +// } + +// RouteLineDto routeLineDto = shortPathsList.get(0); +// String path = routeLineDto.getPath(); +// String type = routeLineDto.getType(); +// String[] str = path.split("->"); +// List pathlist = Arrays.asList(str); +// int index = 0; +// for (int m = 0; m < pathlist.size(); m++) { +// if (pathlist.get(m).equals(start_device_code)) { +// index = m + 1; +// break; +// } +// } +// next_device_code = pathlist.get(index); + +// if (StrUtil.equals(appService.findDeviceTypeByCode(next_device_code), "storage")) { +// next_point_code = next_device_code + "-" + acsTask.getTo_y() + "-" + acsTask.getTo_z(); +// } else { +// next_point_code = next_device_code; +// } Instruction instdto = new Instruction(); 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 3509d1b..4625ad7 100644 --- a/acs/nladmin-system/src/main/resources/config/application-prod.yml +++ b/acs/nladmin-system/src/main/resources/config/application-prod.yml @@ -6,7 +6,7 @@ spring: druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.2.206}:${DB_PORT:3306}/${DB_NAME:gaosheng_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true + url: jdbc:log4jdbc:mysql://${DB_HOST:10.4.46.150}:${DB_PORT:3306}/${DB_NAME:gaosheng_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true username: ${DB_USER:root} password: ${DB_PWD:123456} # 初始连接数 diff --git a/acs/nladmin-ui/.env.production b/acs/nladmin-ui/.env.production index 7597f2f..63486fd 100644 --- a/acs/nladmin-ui/.env.production +++ b/acs/nladmin-ui/.env.production @@ -2,6 +2,6 @@ ENV = 'production' # 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置 # 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http -VUE_APP_BASE_API = 'http:// 192.168.69.32:8011' +VUE_APP_BASE_API = 'http:// 10.4.46.150:8011' # 如果接口是 http 形式, wss 需要改为 ws -VUE_APP_WS_API = 'ws:// 192.168.69.32:8011' +VUE_APP_WS_API = 'ws:// 10.4.46.150:8011' diff --git a/acs/nladmin-ui/dist (2).zip b/acs/nladmin-ui/dist (2).zip deleted file mode 100644 index 8290813..0000000 Binary files a/acs/nladmin-ui/dist (2).zip and /dev/null differ diff --git a/acs/nladmin-ui/dist.zip b/acs/nladmin-ui/dist.zip index 5564024..bd29c9d 100644 Binary files a/acs/nladmin-ui/dist.zip and b/acs/nladmin-ui/dist.zip differ diff --git a/acs/nladmin-ui/public/config.js b/acs/nladmin-ui/public/config.js index 94f2a1a..b230a3c 100644 --- a/acs/nladmin-ui/public/config.js +++ b/acs/nladmin-ui/public/config.js @@ -3,7 +3,7 @@ window.g = { VUE_APP_BASE_API: 'http://127.0.0.1:8010' }, prod: { - VUE_APP_BASE_API: 'http://192.168.69.32:8011' + VUE_APP_BASE_API: 'http://10.4.46.150:8011' }