From 2a2045e8ee93e1883895aa34a8cef009d3b621f6 Mon Sep 17 00:00:00 2001 From: zhangzq Date: Mon, 23 Feb 2026 22:51:40 +0800 Subject: [PATCH] =?UTF-8?q?opt=EF=BC=9Akit=E5=A5=97=E4=BB=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auto/initial/WebAutoInitialExecuter.java | 6 + .../service/impl/StorageCellServiceImpl.java | 27 ++- .../StandardOrdinarySiteDeviceDriver.java | 18 +- .../driver/ExecutableDeviceDriver.java | 8 - .../org/nl/acs/ext/wms/enums/MsgTypeEnum.java | 29 ++-- .../wms/log/OtherToInterfaceLogAspect.java | 2 +- .../acs/ext/wms/rest/KitToAcsController.java | 22 ++- .../wms/service/impl/AcsToNDCServiceImpl.java | 20 ++- .../wms/service/impl/NDCToAcsServiceImpl.java | 30 +++- .../service/dto/InstructionDto.java | 4 + .../service/impl/InstructionServiceImpl.java | 7 +- .../org/nl/acs/opc/DeviceAppServiceImpl.java | 7 +- .../org/nl/acs/opc/DeviceExecuteAutoRun.java | 4 +- .../impl/LuceneExecuteLogServiceImpl.java | 4 + .../nl/modules/quartz/utils/ExecutionJob.java | 16 +- .../resources/config/application-prod.yml | 2 +- .../resources/config/application-test.yml | 163 ------------------ .../resources/log/AcsToHJXServiceImpl.xml | 33 ---- .../src/main/resources/log/AcsToLk.xml | 33 ---- .../resources/log/AcsToMesServiceImpl.xml | 33 ---- .../resources/log/AcsToNDCServiceImpl.xml | 33 ---- .../src/main/resources/log/AcsToWms.xml | 32 ---- .../resources/log/AcsToWmsZDServiceImpl.xml | 33 ---- .../src/main/resources/log/AcsToZDWms.xml | 33 ---- .../resources/log/AgvNdcOneDeviceDriver.xml | 33 ---- .../src/main/resources/log/AutoCreateInst.xml | 32 ---- .../src/main/resources/log/LkToAcs.xml | 33 ---- .../src/main/resources/log/Lucene.xml | 34 ---- .../resources/log/MesToAcsServiceImpl.xml | 33 ---- .../resources/log/NDCToAcsServiceImpl.xml | 33 ---- .../log/OneNDCSocketConnectionAutoRun.xml | 33 ---- .../src/main/resources/log/OpcUtil.xml | 33 ---- .../src/main/resources/log/WmsToAcs.xml | 33 ---- .../resources/log/WmsZDToAcsServiceImpl.xml | 33 ---- .../src/main/resources/log/ZDToAcsWms.xml | 33 ---- .../src/main/resources/log/ZheDaAgv.xml | 33 ---- .../src/main/resources/logback-spring.xml | 13 +- acs/nladmin-ui/.env.development | 4 +- acs/nladmin-ui/package.json | 1 + acs/nladmin-ui/public/config.js | 4 +- .../src/views/monitor/logQuery/index.vue | 4 +- 41 files changed, 151 insertions(+), 870 deletions(-) delete mode 100644 acs/nladmin-system/src/main/resources/config/application-test.yml delete mode 100644 acs/nladmin-system/src/main/resources/log/AcsToHJXServiceImpl.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/AcsToLk.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/AcsToMesServiceImpl.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/AcsToNDCServiceImpl.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/AcsToWms.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/AcsToWmsZDServiceImpl.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/AcsToZDWms.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/AutoCreateInst.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/LkToAcs.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/Lucene.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/MesToAcsServiceImpl.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/NDCToAcsServiceImpl.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/OneNDCSocketConnectionAutoRun.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/OpcUtil.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/WmsToAcs.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/WmsZDToAcsServiceImpl.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/ZDToAcsWms.xml delete mode 100644 acs/nladmin-system/src/main/resources/log/ZheDaAgv.xml diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/auto/initial/WebAutoInitialExecuter.java b/acs/nladmin-system/src/main/java/org/nl/acs/auto/initial/WebAutoInitialExecuter.java index dd7414b..94c068e 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/auto/initial/WebAutoInitialExecuter.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/auto/initial/WebAutoInitialExecuter.java @@ -1,9 +1,15 @@ package org.nl.acs.auto.initial; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import org.nl.acs.device.service.dto.StorageCellDto; +import org.nl.acs.device.service.impl.StorageCellServiceImpl; +import org.nl.modules.wql.core.bean.WQLObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; +import javax.annotation.PostConstruct; import java.util.ArrayList; import java.util.Iterator; import java.util.List; diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/StorageCellServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/StorageCellServiceImpl.java index 7d0e775..496863b 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/StorageCellServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device/service/impl/StorageCellServiceImpl.java @@ -14,6 +14,7 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.nl.acs.auto.initial.ApplicationAutoInitial; import org.nl.acs.device.service.StorageCellService; import org.nl.acs.device.service.dto.DeviceDto; import org.nl.acs.device.service.dto.StorageCellDto; @@ -28,14 +29,12 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; +import javax.annotation.PostConstruct; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; +import java.util.*; /** * @author wangs @@ -45,7 +44,9 @@ import java.util.Map; @Service @RequiredArgsConstructor @Slf4j -public class StorageCellServiceImpl implements StorageCellService { +public class StorageCellServiceImpl implements StorageCellService , ApplicationAutoInitial { + + public static Map Storage_Cache_Map = new HashMap<>(); @Override public Map queryAll(Map whereJson, Pageable page) { @@ -125,6 +126,7 @@ public class StorageCellServiceImpl implements StorageCellService { JSONObject json = (JSONObject) JSONObject.toJSON(dto); wo.insert(json); + initCache(); } @Override @@ -142,6 +144,7 @@ public class StorageCellServiceImpl implements StorageCellService { JSONObject json = (JSONObject) JSONObject.toJSON(dto); wo.update(json); + initCache(); } @Override @@ -261,4 +264,18 @@ public class StorageCellServiceImpl implements StorageCellService { } } + @Override + public void autoInitial() throws Exception { + initCache(); + } + public void initCache(){ + WQLObject wo = WQLObject.getWQLObject("acs_storage_cell"); + JSONArray array = wo.query().getResultJSONArray(0); + for (int i = 0; i < array.size(); i++) { + JSONObject json = array.getJSONObject(i); + StorageCellDto obj = json.toJavaObject(StorageCellDto.class); + Storage_Cache_Map.put(obj.getStorage_code(),obj); + } + System.out.println("storage缓存数量"+Storage_Cache_Map.size()); + } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_ordinary_site/StandardOrdinarySiteDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_ordinary_site/StandardOrdinarySiteDeviceDriver.java index 0c2ecae..db2de50 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_ordinary_site/StandardOrdinarySiteDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_ordinary_site/StandardOrdinarySiteDeviceDriver.java @@ -11,6 +11,9 @@ import org.apache.commons.lang3.ObjectUtils; import org.nl.acs.agv.server.AgvService; import org.nl.acs.agv.server.NDCAgvService; import org.nl.acs.device.service.DeviceService; +import org.nl.acs.device.service.StorageCellService; +import org.nl.acs.device.service.dto.StorageCellDto; +import org.nl.acs.device.service.impl.StorageCellServiceImpl; import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.RouteableDeviceDriver; import org.nl.acs.device_driver.driver.AbstractDeviceDriver; @@ -143,10 +146,17 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple this.devicecode = this.getDevice().getDevice_code(); if (this.reqTakeRequireSuccess && ObjectUtil.isNotEmpty(this.reqTakeInstCode)) { Instruction instruction = instructionService.findByCodeFromCache(this.reqTakeInstCode); - //取货申请 + //取货申请F if (ObjectUtil.isNotEmpty(instruction) && StrUtil.equals(instruction.getStart_point_code(), this.devicecode)) { if (agvphase == 1) { device = deviceAppService.findDeviceByCode(this.devicecode); + StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getStart_point_code()); + if (dto == null) { + log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在"); + return; + } + instruction.setOffSet(dto.getAddress()); + instruction.setOffSetName(instruction.getStart_point_code()); HttpResponse result = acsToNDCService.genAgvSchedulingTask(instruction, 10); if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) { return; @@ -163,6 +173,12 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple if ((StrUtil.startWith(task.getTask_code(), "-"))) { log.info("定点任务下发agv允许取货信号"); + StorageCellDto dto = StorageCellServiceImpl.Storage_Cache_Map.get(instruction.getStart_point_code()); + if (dto == null) { + log.error(instruction.getStart_point_code()+"Storage_Cache_Map数据不存在"); + return; + } instruction.setOffSet(dto.getAddress()); + instruction.setOffSetName(instruction.getNext_point_code()); HttpResponse result = acsToNDCService.genAgvSchedulingTask(instruction, 10); if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) { return; diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/ExecutableDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/ExecutableDeviceDriver.java index 326d189..9bcfb97 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/ExecutableDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/driver/ExecutableDeviceDriver.java @@ -5,15 +5,7 @@ import org.nl.acs.device_driver.DeviceDriver; public interface ExecutableDeviceDriver extends DeviceDriver { default void executeAuto() { -// try { -// this.execute(); -// } catch (Throwable var6) { -// String message = "线程调用异常:" + var6.getMessage(); -// Log.error(message); -// } finally { -// } this.execute(); - } void execute(); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/enums/MsgTypeEnum.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/enums/MsgTypeEnum.java index 5f038e4..a24f417 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/enums/MsgTypeEnum.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/enums/MsgTypeEnum.java @@ -1,26 +1,27 @@ package org.nl.acs.ext.wms.enums; public enum MsgTypeEnum { - CREATE_TASK_REQ("3", "创建任务"), - CANCEL_TASK_REQ("9", "取消任务"), - TASK_PICKUP_REQ("10", "取请求应答"), - TASK_RELEASE_REQ("11", "放请求应答"), - TASK_STATE_RPT("7", "任务状态上报"), - AGV_POWER_RPT("101", "AGV电量上报"), - AGV_ID_RPT("103", "任务分配车辆上报"), - TASK_INDEX_RPT("8", "车辆任务生成上报"), - AGV_ERROR_RPT("102", "AGV故障上报"), - AGV_STATE_RPT("100", "AGV状态上报"); + CREATE_TASK_REQ(3, "创建任务"), + CANCEL_TASK_REQ(9, "取消任务"), + TASK_PICKUP_REQ(10, "取请求应答"), + TASK_RELEASE_REQ(11, "放请求应答"), + TASK_STATE_RPT(7, "任务状态上报"), + TASK_RUN_RPT(5, "空"), + AGV_POWER_RPT(101, "AGV电量上报"), + AGV_ID_RPT(103, "任务分配车辆上报"), + TASK_INDEX_RPT(8, "车辆任务生成上报"), + AGV_ERROR_RPT(102, "AGV故障上报"), + AGV_STATE_RPT(100, "AGV状态上报"); - private final String value; + private final Integer value; private final String description; - MsgTypeEnum(String value, String description) { + MsgTypeEnum(Integer value, String description) { this.value = value; this.description = description; } - public String getValue() { + public Integer getValue() { return value; } @@ -31,7 +32,7 @@ public enum MsgTypeEnum { /** * 根据值获取对应的枚举 */ - public static MsgTypeEnum fromValue(String value) { + public static MsgTypeEnum fromValue(Integer value) { for (MsgTypeEnum type : values()) { if (type.getValue() == value) { return type; diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/log/OtherToInterfaceLogAspect.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/log/OtherToInterfaceLogAspect.java index 50cf194..1fa49de 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/log/OtherToInterfaceLogAspect.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/log/OtherToInterfaceLogAspect.java @@ -81,7 +81,7 @@ public class OtherToInterfaceLogAspect { .method(methodName) .response_param(e.getMessage()) .executeTime(System.currentTimeMillis() - startTime) - .content("响应请求") + .content("执行异常") .build(); logService.interfaceExecuteLog(logDto); throw new BadRequestException(e.getMessage()); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/KitToAcsController.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/KitToAcsController.java index 4fe30d7..f957d69 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/KitToAcsController.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/rest/KitToAcsController.java @@ -7,12 +7,14 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.acs.ext.wms.log.OthersToInterfaceLog; import org.nl.acs.ext.wms.service.NDCToAcsService; +import org.nl.modules.common.exception.BadRequestException; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; +import java.util.Set; @RestController @RequiredArgsConstructor @@ -27,7 +29,15 @@ public class KitToAcsController { @SaIgnore @PostMapping("/agvCallback") @OthersToInterfaceLog("kit->ACS") - public ResponseEntity agvCallback(@RequestBody JSONObject requestParam) throws Exception{ - return new ResponseEntity<>(ndcToAcsService.agvCallback(requestParam), HttpStatus.OK); + public ResponseEntity agvCallback(@RequestParam Map kitToAcsParam) throws Exception{ + JSONObject param = null; + if (kitToAcsParam == null || CollectionUtils.isEmpty(kitToAcsParam)){ + throw new BadRequestException("请求参数不能为空"); + } + for (String o : kitToAcsParam.keySet()) { + param = JSONObject.parseObject(o); + } + System.out.println("---kit上报请求---"+param.toString()); + return new ResponseEntity<>(ndcToAcsService.agvCallback(param), HttpStatus.OK); } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToNDCServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToNDCServiceImpl.java index 79e169d..60f91c7 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToNDCServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AcsToNDCServiceImpl.java @@ -49,14 +49,14 @@ public class AcsToNDCServiceImpl implements AcsToNDCService { JSONObject ja = new JSONObject(); //type 3:下发任务 if (type==3) { - ja.put("taskId", instruction.getInstruction_code()); + ja.put("taskId", Integer.valueOf(instruction.getInstruction_code())); DeviceService deviceService = SpringContextHolder.getBean(DeviceServiceImpl.class); int startAddress = deviceService.queryAddressBydeviceCode(instruction.getStart_point_code()); int nextAddress = deviceService.queryAddressBydeviceCode(instruction.getNext_point_code()); ja.put("pickId", startAddress); ja.put("pickName", instruction.getStart_point_code()); ja.put("releaseId", nextAddress); - ja.put("releaseIdName", instruction.getNext_point_code()); + ja.put("releaseName", instruction.getNext_point_code()); ja.put("taskType", 5); ja.put("vehicleId", 0); ja.put("priority", 0); @@ -64,17 +64,21 @@ public class AcsToNDCServiceImpl implements AcsToNDCService { } //type 9:取消任务 else if (type==9){ - ja.put("taskId", instruction.getInstruction_code()); + ja.put("taskId", Integer.valueOf(instruction.getInstruction_code())); jo.put("params", ja); } //type 10:取放货请求应答 else if (type==10){ - ja.put("taskId", instruction.getInstruction_code()); - ja.put("taskPhase", instruction.getExecute_status()); + ja.put("taskId", Integer.valueOf(instruction.getInstruction_code())); + ja.put("taskPhase", Integer.valueOf(instruction.getExecute_status())); + ja.put("height", 0); + ja.put("offset", instruction.getOffSet()); + ja.put("location_name", instruction.getOffSetName()); jo.put("params", ja); } String wmsurl = paramService.findByCode(AcsConfig.WCSURL).getValue(); -// AddressDto addressDto = addressService.findByCode("applyTaskToWcs"); +// AddressDto addressDto = addressService.findByCode(" +// applyTaskToWcs"); String url = wmsurl; LuceneLogDto logDto = LuceneLogDto.builder() @@ -86,13 +90,17 @@ public class AcsToNDCServiceImpl implements AcsToNDCService { .content("开始请求") .build(); luceneExecuteLogService.interfaceExecuteLog(logDto); + System.out.println("-------任务下发----"+JSON.toJSONString(jo)); long start = System.currentTimeMillis(); + log.info("任务号:{},指令号{},状态{},下发agv订单序列下发:{}", instruction.getTask_code(), instruction.getInstruction_code()); HttpResponse result = HttpRequest.post(url) //表单内容 .body(String.valueOf(jo)) //超时,毫秒 .timeout(20000) .execute(); + System.out.println("-------任务结果----"+result.body()); + LuceneLogDto logResult = LuceneLogDto.builder() .logType("接口日志") diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/NDCToAcsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/NDCToAcsServiceImpl.java index 9e68611..d93a7ad 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/NDCToAcsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/NDCToAcsServiceImpl.java @@ -42,9 +42,8 @@ public class NDCToAcsServiceImpl implements NDCToAcsService { @Override public JSONObject agvCallback(JSONObject requestParam) throws Exception{ JSONObject resp = new JSONObject(); - String type = requestParam.getString("type"); + Integer type = requestParam.getInteger("type"); JSONObject params = requestParam.getJSONObject("params"); - //任务状态上报 if (MsgTypeEnum.TASK_STATE_RPT.getValue().equals(type)) { String taskId = params.getString("taskId"); @@ -54,7 +53,9 @@ public class NDCToAcsServiceImpl implements NDCToAcsService { StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver; StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; //请求进入/请求离开 - if (StrUtil.isNotEmpty(taskPhase)&&(TaskPhaseEnum.ENTER_REQUEST_OR_ALLOWED.getValue().equals(taskPhase)||TaskPhaseEnum.LEAVE_NOTICE_OR_ALLOWED.getValue().equals(taskPhase))){ + if (StrUtil.isNotEmpty(taskPhase) + &&(TaskPhaseEnum.ENTER_REQUEST_OR_ALLOWED.getValue().equals(taskPhase) + ||TaskPhaseEnum.LEAVE_NOTICE_OR_ALLOWED.getValue().equals(taskPhase))){ StorageCellDto storageCellDto = storageCellService.findByAddress(taskPoint); if (ObjectUtil.isEmpty(storageCellDto)) { resp.put("code", "400"); @@ -101,7 +102,13 @@ public class NDCToAcsServiceImpl implements NDCToAcsService { resp.put("message", "反馈请求离开成功"); return resp; } - } else if (StrUtil.isNotEmpty(taskPhase)&&(TaskPhaseEnum.PICKUP_REQUEST_OR_RESPONSE.getValue().equals(taskPhase)||TaskPhaseEnum.PICKUP_COMPLETE.getValue().equals(taskPhase)||TaskPhaseEnum.RELEASE_REQUEST_OR_RESPONSE.getValue().equals(taskPhase)||TaskPhaseEnum.RELEASE_COMPLETE.getValue().equals(taskPhase)||TaskStateEnum.NOT_STARTED.getValue().equals(taskPhase)||TaskStateEnum.EXECUTING.getValue().equals(taskPhase)||TaskStateEnum.COMPLETED.getValue().equals(taskPhase))){ + } + else if (StrUtil.isNotEmpty(taskPhase)&&(TaskPhaseEnum.PICKUP_REQUEST_OR_RESPONSE.getValue().equals(taskPhase) + ||TaskPhaseEnum.PICKUP_COMPLETE.getValue().equals(taskPhase) + ||TaskPhaseEnum.RELEASE_REQUEST_OR_RESPONSE.getValue().equals(taskPhase) + ||TaskPhaseEnum.RELEASE_COMPLETE.getValue().equals(taskPhase) + ||TaskStateEnum.NOT_STARTED.getValue().equals(taskPhase) + ||TaskStateEnum.EXECUTING.getValue().equals(taskPhase)||TaskStateEnum.COMPLETED.getValue().equals(taskPhase))){ Instruction instruction = instructionService.findByCodeFromCache(taskId); if (ObjectUtil.isEmpty(instruction)) { resp.put("code", "400"); @@ -250,6 +257,12 @@ public class NDCToAcsServiceImpl implements NDCToAcsService { resp.put("message", "更新车号成功"); return resp; } + else if (MsgTypeEnum.TASK_RUN_RPT.getValue().equals(type)){ + System.out.println("------"); + resp.put("code", "200"); + resp.put("message", "更新车号成功"); + return resp; + } //车辆任务生成上报 else if (MsgTypeEnum.TASK_INDEX_RPT.getValue().equals(type)){ String taskId = params.getString("taskId"); @@ -266,13 +279,15 @@ public class NDCToAcsServiceImpl implements NDCToAcsService { resp.put("code", "200"); resp.put("message", "更新指令执行中成功"); return resp; - }else if (MsgTypeEnum.AGV_POWER_RPT.getValue().equals(type)){ + } + else if (MsgTypeEnum.AGV_POWER_RPT.getValue().equals(type)){ int agvId = params.getIntValue("agvId"); int stateValue = params.getIntValue("stateValue"); resp.put("code", "200"); resp.put("message", "更新指令执行中成功"); return resp; - }else if (MsgTypeEnum.AGV_STATE_RPT.getValue().equals(type)){ + } + else if (MsgTypeEnum.AGV_STATE_RPT.getValue().equals(type)){ int agvId = params.getIntValue("agvId"); int stateValue = params.getIntValue("stateValue"); int xLocation = params.getIntValue("xLocation"); @@ -282,7 +297,8 @@ public class NDCToAcsServiceImpl implements NDCToAcsService { resp.put("code", "200"); resp.put("message", "更新指令执行中成功"); return resp; - }else if (MsgTypeEnum.AGV_ERROR_RPT.getValue().equals(type)){ + } + else if (MsgTypeEnum.AGV_ERROR_RPT.getValue().equals(type)){ int agvId = params.getIntValue("agvId"); int errorCode = params.getIntValue("errState"); resp.put("code", "200"); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/dto/InstructionDto.java b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/dto/InstructionDto.java index 214cd9b..fad64ff 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/dto/InstructionDto.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/dto/InstructionDto.java @@ -97,6 +97,7 @@ public class InstructionDto implements Serializable { * 起始点位编码 */ private String start_point_code; + private Integer start_add; /** * 起始设备编码 @@ -107,6 +108,9 @@ public class InstructionDto implements Serializable { * 目标点位编码 */ private String next_point_code; + private Integer next_add; + private Integer offSet; + private String offSetName; /** * 目标设备编码 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 89ea980..3148c6a 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 @@ -865,11 +865,8 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu } else if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "2")) { // NDC agv指令不当场取消指令,需要等agv上报 - if (!StrUtil.isEmpty(entity.getAgv_jobno())) { - acsToNDCService.genAgvSchedulingTask(entity, 9); - } else { - flag = true; - } + acsToNDCService.genAgvSchedulingTask(entity, 9); + flag = true; } else if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "3") && !StrUtil.equals(entity.getSend_status(), "2")) { XianGongAgvService xianGongAgvService = SpringContextHolder.getBean(XianGongAgvService.class); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceAppServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceAppServiceImpl.java index 7f1d710..c0057cc 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceAppServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceAppServiceImpl.java @@ -3,16 +3,22 @@ package org.nl.acs.opc; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import org.nl.acs.auto.initial.ApplicationAutoInitial; import org.nl.acs.device.service.DeviceDriverDefinationAppService; +import org.nl.acs.device.service.dto.StorageCellDto; +import org.nl.acs.device.service.impl.StorageCellServiceImpl; import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.DeviceDriverDefination; import org.nl.acs.device_driver.LinewayDeviceDriver; import org.nl.acs.device_driver.driver.OpcDeviceDriver; +import org.nl.modules.wql.core.bean.WQLObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import javax.annotation.PostConstruct; import java.util.*; @Slf4j @@ -311,7 +317,6 @@ public class DeviceAppServiceImpl implements DeviceAppService, ApplicationAutoIn log.info("加载所有设备"); this.reload(); } - public synchronized void reload() { List deviceManageDtos = this.deviceManageService.queryAllWithExtra(); this.devices = new ArrayList(); diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceExecuteAutoRun.java b/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceExecuteAutoRun.java index f9a1a41..4c0f5d0 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceExecuteAutoRun.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/opc/DeviceExecuteAutoRun.java @@ -76,8 +76,8 @@ public class DeviceExecuteAutoRun extends AbstractAutoRunnable { public void autoRun() throws Exception { for (int i = 0; !OpcStartTag.is_run; ++i) { log.info("设备执行线程等待opc同步线程..."); - Thread.sleep(1000L); - if (i > 60) { + Thread.sleep(500L); + if (i > 10) { log.info("设备执行线程放弃等待opc同步线程..."); break; } diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/lucene/service/impl/LuceneExecuteLogServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/modules/lucene/service/impl/LuceneExecuteLogServiceImpl.java index 1f87fcd..3f152b4 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/lucene/service/impl/LuceneExecuteLogServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/lucene/service/impl/LuceneExecuteLogServiceImpl.java @@ -65,6 +65,10 @@ public class LuceneExecuteLogServiceImpl implements LuceneExecuteLogService { if (ObjectUtil.isNotEmpty(luceneLogDto.getMethod())) { document.add(new StringField("method", luceneLogDto.getMethod(), Field.Store.YES)); } + + if (ObjectUtil.isNotEmpty(luceneLogDto.getRequest_url())) { + document.add(new StringField("url", luceneLogDto.getRequest_url(), Field.Store.YES)); + } if (ObjectUtil.isNotEmpty(luceneLogDto.getStatus_code())) { document.add(new StringField("status_code", luceneLogDto.getStatus_code(), Field.Store.YES)); } diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/quartz/utils/ExecutionJob.java b/acs/nladmin-system/src/main/java/org/nl/modules/quartz/utils/ExecutionJob.java index 2843083..7153dfb 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/quartz/utils/ExecutionJob.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/quartz/utils/ExecutionJob.java @@ -68,9 +68,9 @@ public class ExecutionJob extends QuartzJobBean { long startTime = System.currentTimeMillis(); logDto.setCronExpression(quartzJob.getCronExpression()); try { - // 执行任务 - System.out.println("--------------------------------------------------------------"); - System.out.println("任务开始执行,任务名称:" + quartzJob.getJobName()); +// // 执行任务 +// System.out.println("--------------------------------------------------------------"); +// System.out.println("任务开始执行,任务名称:" + quartzJob.getJobName()); QuartzRunnable task = new QuartzRunnable(quartzJob.getBeanName(), quartzJob.getMethodName(), quartzJob.getParams()); Future future = EXECUTOR.submit(task); @@ -82,9 +82,9 @@ public class ExecutionJob extends QuartzJobBean { } // 任务状态 logDto.setIsSuccess(true); - System.out.println("任务执行完毕,任务名称:" + quartzJob.getJobName() + ", 执行时间:" + times + "毫秒"); - System.out.println("--------------------------------------------------------------"); - // 判断是否存在子任务 +// System.out.println("任务执行完毕,任务名称:" + quartzJob.getJobName() + ", 执行时间:" + times + "毫秒"); +// System.out.println("--------------------------------------------------------------"); +// // 判断是否存在子任务 if (StrUtil.isNotEmpty(quartzJob.getSubTask())) { String[] tasks = quartzJob.getSubTask().split("[,,]"); // 执行子任务 @@ -94,8 +94,8 @@ public class ExecutionJob extends QuartzJobBean { if (StrUtil.isNotEmpty(uuid)) { redisUtils.set(uuid, false); } - System.out.println("任务执行失败,任务名称:" + quartzJob.getJobName()); - System.out.println("--------------------------------------------------------------"); +// System.out.println("任务执行失败,任务名称:" + quartzJob.getJobName()); +// System.out.println("--------------------------------------------------------------"); long times = System.currentTimeMillis() - startTime; logDto.setTime(times); // 任务状态 0:成功 1:失败 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 23c9589..f85281d 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:172.30.15.231}:${DB_PORT:3306}/${DB_NAME:nl5_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true + url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:hl5q}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true username: ${DB_USER:root} password: ${DB_PWD:123456} # 初始连接数 diff --git a/acs/nladmin-system/src/main/resources/config/application-test.yml b/acs/nladmin-system/src/main/resources/config/application-test.yml deleted file mode 100644 index 4a18ca4..0000000 --- a/acs/nladmin-system/src/main/resources/config/application-test.yml +++ /dev/null @@ -1,163 +0,0 @@ -server: - port: 8011 -#配置数据源 -spring: - datasource: - 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 - username: ${DB_USER:root} - password: ${DB_PWD:123456} - # 初始连接数 - initial-size: 5 - # 最小连接数 - min-idle: 15 - # 最大连接数 - max-active: 60 - # 获取连接超时时间 - max-wait: 5000 - # 连接有效性检测时间 - time-between-eviction-runs-millis: 60000 - # 连接在池中最小生存的时间 - min-evictable-idle-time-millis: 300000 - # 连接在池中最大生存的时间 - max-evictable-idle-time-millis: 900000 - # 指明连接是否被空闲连接回收器(如果有)进行检验.如果检测失败,则连接将被从池中去除 - test-while-idle: true - # 指明是否在从池中取出连接前进行检验,如果检验失败, 则从池中去除连接并尝试取出另一个 - test-on-borrow: true - # 是否在归还到池中前进行检验 - test-on-return: false - # 检测连接是否有效 - validation-query: select 1 - # 配置监控统计 - webStatFilter: - enabled: true - stat-view-servlet: - enabled: true - # 控制台管理用户名和密码 - url-pattern: /druid/* - reset-enable: false - login-username: admin - login-password: 123456 - filter: - stat: - enabled: true - # 记录慢SQL - log-slow-sql: true - slow-sql-millis: 1000 - merge-sql: true - wall: - config: - multi-statement-allow: true - redis: - #数据库索引 - database: ${REDIS_DB:9} - host: ${REDIS_HOST:127.0.0.1} - port: ${REDIS_PORT:6379} - password: ${REDIS_PWD:} - #连接超时时间 - timeout: 5000 -# 登录相关配置 -login: - # 登录缓存 - cache-enable: true - # 是否限制单用户登录 - single-login: false - # 验证码 - login-code: - # 验证码类型配置 查看 LoginProperties 类 - code-type: arithmetic - # 登录图形验证码有效时间/分钟 - expiration: 2 - # 验证码高度 - width: 111 - # 验证码宽度 - heigth: 36 - # 内容长度 - length: 2 - # 字体名称,为空则使用默认字体,如遇到线上乱码,设置其他字体即可 - font-name: - # 字体大小 - font-size: 25 - -#jwt -jwt: - header: Authorization - # 令牌前缀 - token-start-with: Bearer - # 必须使用最少88位的Base64对该令牌进行编码 - base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI= - # 令牌过期时间 此处单位/毫秒 ,默认2小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html - token-validity-in-seconds: 7200000 - # 在线用户key - online-key: online-token- - # 验证码 - code-key: code-key- - # token 续期检查时间范围(默认30分钟,单位默认毫秒),在token即将过期的一段时间内用户操作了,则给用户的token续期 - detect: 1800000 - # 续期时间范围,默认 1小时,这里单位毫秒 - renew: 3600000 - -# IP 本地解析 -ip: - local-parsing: true - -#是否允许生成代码,生产环境设置为false -generator: - enabled: false - -#如果生产环境要开启swagger,需要配置请求地址 -#springfox: -# documentation: -# swagger: -# v2: -# host: # 接口域名或外网ip - -#是否开启 swagger-ui -swagger: - enabled: false - -# 文件存储路径 -file: - mac: - path: ~/file/ - avatar: ~/avatar/ - linux: - path: /home/eladmin/file/ - avatar: /home/eladmin/avatar/ - windows: - path: C:\eladmin\file\ - avatar: C:\eladmin\avatar\ - # 文件大小 /M - maxSize: 100 - avatarMaxSize: 5 -logging: - file: - path: /app/jar/logs - config: classpath:logback-spring.xml - -# Sa-Token配置 -sa-token: - # token 名称 (同时也是cookie名称) - token-name: Authorization - # token 有效期,单位s 默认30天, -1代表永不过期 - timeout: 2592000 - # token 临时有效期 (指定时间内无操作就视为token过期) 单位: 秒 - activity-timeout: -1 - # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录) - is-concurrent: true - # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token) - is-share: false - # token风格 - token-style: random-128 - # 是否输出操作日志 - is-log: false - jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq - # token 前缀 - token-prefix: Bearer - -loki: - url: http://localhost:3100/loki/api/v1 - systemName: acs diff --git a/acs/nladmin-system/src/main/resources/log/AcsToHJXServiceImpl.xml b/acs/nladmin-system/src/main/resources/log/AcsToHJXServiceImpl.xml deleted file mode 100644 index bb4ded3..0000000 --- a/acs/nladmin-system/src/main/resources/log/AcsToHJXServiceImpl.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/ACS请求焊接线/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/AcsToLk.xml b/acs/nladmin-system/src/main/resources/log/AcsToLk.xml deleted file mode 100644 index c8c2d04..0000000 --- a/acs/nladmin-system/src/main/resources/log/AcsToLk.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/ACS请求立库/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/AcsToMesServiceImpl.xml b/acs/nladmin-system/src/main/resources/log/AcsToMesServiceImpl.xml deleted file mode 100644 index b8e0a78..0000000 --- a/acs/nladmin-system/src/main/resources/log/AcsToMesServiceImpl.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/ACS请求MES/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/AcsToNDCServiceImpl.xml b/acs/nladmin-system/src/main/resources/log/AcsToNDCServiceImpl.xml deleted file mode 100644 index 17f2c49..0000000 --- a/acs/nladmin-system/src/main/resources/log/AcsToNDCServiceImpl.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/ACS请求NDC/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/AcsToWms.xml b/acs/nladmin-system/src/main/resources/log/AcsToWms.xml deleted file mode 100644 index fb101c1..0000000 --- a/acs/nladmin-system/src/main/resources/log/AcsToWms.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - ${LOG_HOME}/ACS请求WMS/%d{yyyy-MM-dd}.%i.log - - 15 - - 50MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/AcsToWmsZDServiceImpl.xml b/acs/nladmin-system/src/main/resources/log/AcsToWmsZDServiceImpl.xml deleted file mode 100644 index 9ec7746..0000000 --- a/acs/nladmin-system/src/main/resources/log/AcsToWmsZDServiceImpl.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/ACS请求ZDWMS/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/AcsToZDWms.xml b/acs/nladmin-system/src/main/resources/log/AcsToZDWms.xml deleted file mode 100644 index f572344..0000000 --- a/acs/nladmin-system/src/main/resources/log/AcsToZDWms.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/ACS反馈ZD/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml b/acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml deleted file mode 100644 index 2392a7d..0000000 --- a/acs/nladmin-system/src/main/resources/log/AgvNdcOneDeviceDriver.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/NDC与ACS交互/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/AutoCreateInst.xml b/acs/nladmin-system/src/main/resources/log/AutoCreateInst.xml deleted file mode 100644 index cf6996b..0000000 --- a/acs/nladmin-system/src/main/resources/log/AutoCreateInst.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - ${LOG_HOME}/自动创建指令/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/LkToAcs.xml b/acs/nladmin-system/src/main/resources/log/LkToAcs.xml deleted file mode 100644 index 2df63ce..0000000 --- a/acs/nladmin-system/src/main/resources/log/LkToAcs.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/立库请求ACS/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/Lucene.xml b/acs/nladmin-system/src/main/resources/log/Lucene.xml deleted file mode 100644 index b53961d..0000000 --- a/acs/nladmin-system/src/main/resources/log/Lucene.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - ${LOG_HOME}/lucene/${DEVICECODE}/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/MesToAcsServiceImpl.xml b/acs/nladmin-system/src/main/resources/log/MesToAcsServiceImpl.xml deleted file mode 100644 index 26c96cf..0000000 --- a/acs/nladmin-system/src/main/resources/log/MesToAcsServiceImpl.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/MES请求ACS/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/NDCToAcsServiceImpl.xml b/acs/nladmin-system/src/main/resources/log/NDCToAcsServiceImpl.xml deleted file mode 100644 index 978f886..0000000 --- a/acs/nladmin-system/src/main/resources/log/NDCToAcsServiceImpl.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/NDC反馈ACS/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/OneNDCSocketConnectionAutoRun.xml b/acs/nladmin-system/src/main/resources/log/OneNDCSocketConnectionAutoRun.xml deleted file mode 100644 index 7387ef7..0000000 --- a/acs/nladmin-system/src/main/resources/log/OneNDCSocketConnectionAutoRun.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/一楼NDC系统/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/OpcUtil.xml b/acs/nladmin-system/src/main/resources/log/OpcUtil.xml deleted file mode 100644 index 2db9428..0000000 --- a/acs/nladmin-system/src/main/resources/log/OpcUtil.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/下发KEP信号/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/WmsToAcs.xml b/acs/nladmin-system/src/main/resources/log/WmsToAcs.xml deleted file mode 100644 index 9c26bda..0000000 --- a/acs/nladmin-system/src/main/resources/log/WmsToAcs.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/WMS下发ACS/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/WmsZDToAcsServiceImpl.xml b/acs/nladmin-system/src/main/resources/log/WmsZDToAcsServiceImpl.xml deleted file mode 100644 index 6aa7614..0000000 --- a/acs/nladmin-system/src/main/resources/log/WmsZDToAcsServiceImpl.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/ZDWMS请求ACS/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/ZDToAcsWms.xml b/acs/nladmin-system/src/main/resources/log/ZDToAcsWms.xml deleted file mode 100644 index fd1a736..0000000 --- a/acs/nladmin-system/src/main/resources/log/ZDToAcsWms.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/ZD反馈ACS/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/log/ZheDaAgv.xml b/acs/nladmin-system/src/main/resources/log/ZheDaAgv.xml deleted file mode 100644 index 0f68c1f..0000000 --- a/acs/nladmin-system/src/main/resources/log/ZheDaAgv.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - ${LOG_HOME}/下发AGV日志/%d{yyyy-MM-dd}.%i.log - - 15 - - 200MB - - 2GB - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n - ${log.charset} - - - - - - - - - - - diff --git a/acs/nladmin-system/src/main/resources/logback-spring.xml b/acs/nladmin-system/src/main/resources/logback-spring.xml index 29a0f6b..5de518f 100644 --- a/acs/nladmin-system/src/main/resources/logback-spring.xml +++ b/acs/nladmin-system/src/main/resources/logback-spring.xml @@ -20,17 +20,7 @@ https://juejin.cn/post/6844903775631572999 - - - - - - - - - - - + @@ -112,6 +102,7 @@ https://juejin.cn/post/6844903775631572999 + diff --git a/acs/nladmin-ui/.env.development b/acs/nladmin-ui/.env.development index 809e77f..e37a9a4 100644 --- a/acs/nladmin-ui/.env.development +++ b/acs/nladmin-ui/.env.development @@ -1,8 +1,8 @@ ENV = 'development' # 接口地址 -VUE_APP_BASE_API = 'http://localhost:8010' -VUE_APP_WS_API = 'ws://localhost:8010' +VUE_APP_BASE_API = 'http://localhost:8011' +VUE_APP_WS_API = 'ws://localhost:8011' # 是否启用 babel-plugin-dynamic-import-node插件 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/acs/nladmin-ui/package.json b/acs/nladmin-ui/package.json index 81ea67b..7e0f500 100644 --- a/acs/nladmin-ui/package.json +++ b/acs/nladmin-ui/package.json @@ -6,6 +6,7 @@ "license": "Apache-2.0", "scripts": { "dev": "vue-cli-service serve", + "dev_mac": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", diff --git a/acs/nladmin-ui/public/config.js b/acs/nladmin-ui/public/config.js index b230a3c..cd226c1 100644 --- a/acs/nladmin-ui/public/config.js +++ b/acs/nladmin-ui/public/config.js @@ -1,10 +1,10 @@ window.g = { dev: { - VUE_APP_BASE_API: 'http://127.0.0.1:8010' + VUE_APP_BASE_API: 'http://127.0.0.1:8011' }, prod: { VUE_APP_BASE_API: 'http://10.4.46.150:8011' } -} \ No newline at end of file +} diff --git a/acs/nladmin-ui/src/views/monitor/logQuery/index.vue b/acs/nladmin-ui/src/views/monitor/logQuery/index.vue index 7188811..ddd8c03 100644 --- a/acs/nladmin-ui/src/views/monitor/logQuery/index.vue +++ b/acs/nladmin-ui/src/views/monitor/logQuery/index.vue @@ -85,12 +85,14 @@ export default { }, methods: { truncateOrFullText(text) { - if (text.length > 1000) { + debugger + if (text != null && text.length > 1000) { return text.slice(0, 1000) + '...' } return text }, handleClick(content) { + debugger if (content.length > 1000) { this.$alert(content, '完整内容', { confirmButtonText: '关闭',