Browse Source

更新

master
gengby 2 years ago
parent
commit
2451151303
  1. 0
      hd/logPath_IS_UNDEFINED/2022-12-12.0.log
  2. 0
      hd/logPath_IS_UNDEFINED/ACS请求ERP/2022-12-12.0.log
  3. 0
      hd/logPath_IS_UNDEFINED/ACS请求WMS/2022-12-12.0.log
  4. 0
      hd/logPath_IS_UNDEFINED/AGV请求离开/2022-12-12.0.log
  5. 0
      hd/logPath_IS_UNDEFINED/NDC/2022-12-12.0.log
  6. 0
      hd/logPath_IS_UNDEFINED/WMS下发ACS/2022-12-12.0.log
  7. 0
      hd/logPath_IS_UNDEFINED/反馈AGV请求/2022-12-12.0.log
  8. 0
      hd/logPath_IS_UNDEFINED/扫码记录/2022-12-12.0.log
  9. 0
      hd/logPath_IS_UNDEFINED/查询AGV指令状态/2022-12-12.0.log
  10. 0
      hd/logPath_IS_UNDEFINED/查询仙知AGV指令状态/2022-12-12.0.log
  11. 0
      hd/logPath_IS_UNDEFINED/自动创建指令/2022-12-12.0.log
  12. 3
      hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java
  13. 12
      hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_conveyor_control/StandardCoveyorControlDeviceDriver.java
  14. 16
      hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AgvWaitUtil.java
  15. 7
      hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java
  16. 10
      hd/nladmin-system/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  17. 3
      hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCleanLog.java

0
hd/logPath_IS_UNDEFINED/2022-12-12.0.log

0
hd/logPath_IS_UNDEFINED/ACS请求ERP/2022-12-12.0.log

0
hd/logPath_IS_UNDEFINED/ACS请求WMS/2022-12-12.0.log

0
hd/logPath_IS_UNDEFINED/AGV请求离开/2022-12-12.0.log

0
hd/logPath_IS_UNDEFINED/NDC/2022-12-12.0.log

0
hd/logPath_IS_UNDEFINED/WMS下发ACS/2022-12-12.0.log

0
hd/logPath_IS_UNDEFINED/反馈AGV请求/2022-12-12.0.log

0
hd/logPath_IS_UNDEFINED/扫码记录/2022-12-12.0.log

0
hd/logPath_IS_UNDEFINED/查询AGV指令状态/2022-12-12.0.log

0
hd/logPath_IS_UNDEFINED/查询仙知AGV指令状态/2022-12-12.0.log

0
hd/logPath_IS_UNDEFINED/自动创建指令/2022-12-12.0.log

3
hd/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/AgvServiceImpl.java

@ -628,7 +628,6 @@ public class AgvServiceImpl implements AgvService {
} }
@Override @Override
public HttpResponse queryXZAgvInstStatus(String instCode) { public HttpResponse queryXZAgvInstStatus(String instCode) {
@ -1515,7 +1514,7 @@ public class AgvServiceImpl implements AgvService {
System.out.println("返回结果为:" + result); System.out.println("返回结果为:" + result);
log.info(agvurl); log.info(agvurl);
log.info("任务号:{},指令号{},状态{},下发agv订单序列反馈:{}", inst.getTask_code(), inst.getInstruction_code(), result.getStatus(), result.body()); log.info("任务号:{},指令号{},状态{},下发agv订单序列反馈:{}", inst.getTask_code(), inst.getInstruction_code(), result.getStatus(), result.body());
logServer.log(inst.getTask_code(),"sendOrderSequencesToXZ","info","",result.body(), String.valueOf(result.getStatus()),agvurl,inst.getVehicle_code()); logServer.log(inst.getTask_code(), "sendOrderSequencesToXZ", "info", "指令号:" + inst.getInstruction_code(), result.body(), String.valueOf(result.getStatus()), agvurl, inst.getVehicle_code());
return result; return result;
} else { } else {
return null; return null;

12
hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_conveyor_control/StandardCoveyorControlDeviceDriver.java

@ -20,6 +20,7 @@ import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl; import org.nl.acs.ext.wms.service.impl.AcsToWmsServiceImpl;
import org.nl.acs.instruction.service.InstructionService; import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction; import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.LogServer;
import org.nl.acs.opc.Device; import org.nl.acs.opc.Device;
import org.nl.acs.opc.DeviceAppService; import org.nl.acs.opc.DeviceAppService;
import org.nl.acs.opc.WcsConfig; import org.nl.acs.opc.WcsConfig;
@ -59,6 +60,8 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
@Autowired @Autowired
AcsConfigService acsConfigService = SpringContextHolder.getBean(AcsConfigService.class); AcsConfigService acsConfigService = SpringContextHolder.getBean(AcsConfigService.class);
@Autowired
LogServer logServer = SpringContextHolder.getBean(LogServer.class);
String container; String container;
String container_type_desc; String container_type_desc;
String last_container_type_desc; String last_container_type_desc;
@ -212,13 +215,13 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
String param = ""; String param = "";
if (type == 1){ if (type == 1){
param = "Application_GVL_AGV_To_AGV_number_Fr_Command"; param = "Application_GVL_AGV_To_AGV_number_Fr_Command";
param = param.replace("number", device_code).replace("\"", ""); param = param.replace("number", this.getDevice().getDevice_code()).replace("\"", "");
} else if (type == 2){ } else if (type == 2){
param = "Application_GVL_AGV_To_AGV_number_Fr_Target"; param = "Application_GVL_AGV_To_AGV_number_Fr_Target";
param = param.replace("number", device_code).replace("\"", ""); param = param.replace("number", this.getDevice().getDevice_code()).replace("\"", "");
} else if (type == 3){ } else if (type == 3){
param = "Application_GVL_AGV_To_AGV_number_Fr_TaskNo"; param = "Application_GVL_AGV_To_AGV_number_Fr_TaskNo";
param = param.replace("number", device_code).replace("\"", ""); param = param.replace("number", this.getDevice().getDevice_code()).replace("\"", "");
} }
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code() String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
+ "." + param; + "." + param;
@ -226,8 +229,9 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
Server server = ReadUtil.getServer(opcservcerid); Server server = ReadUtil.getServer(opcservcerid);
Map<String, Object> itemMap = new HashMap<String, Object>(); Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_param, value); itemMap.put(to_param, value);
ReadUtil.write(itemMap, server); ReadUtil.write(itemMap, server);
logServer.log("kong", "write", String.valueOf(type), param.toString(), String.valueOf(param), "200", "", "");
} }
protected void thingToNothing() { protected void thingToNothing() {

16
hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/AgvWaitUtil.java

@ -15,7 +15,6 @@ import org.nl.exception.BadRequestException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
@ -125,8 +124,7 @@ public class AgvWaitUtil {
feedMap.put("feedbackStatus", "takeFinish"); feedMap.put("feedbackStatus", "takeFinish");
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode")));
String responseMessage = (String.valueOf(feedback.get("responseMessage")));
String responseMessage = (String) feedback.get("responseMessage");
if (responseCode == 0) { if (responseCode == 0) {
map.put("status", 200); map.put("status", 200);
map.put("message", "请求成功"); map.put("message", "请求成功");
@ -154,8 +152,7 @@ public class AgvWaitUtil {
feedMap.put("feedbackStatus", "takeFinish"); feedMap.put("feedbackStatus", "takeFinish");
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode")));
String responseMessage = (String.valueOf(feedback.get("responseMessage")));
String responseMessage = (String) feedback.get("responseMessage");
if (responseCode == 0) { if (responseCode == 0) {
map.put("status", 200); map.put("status", 200);
map.put("message", "请求成功"); map.put("message", "请求成功");
@ -196,7 +193,7 @@ public class AgvWaitUtil {
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode")));
String responseMessage = (String) feedback.get("responseMessage"); String responseMessage = (String.valueOf(feedback.get("responseMessage")));
if (responseCode == 0) { if (responseCode == 0) {
feedback.put("feedbackStatus", "puting"); feedback.put("feedbackStatus", "puting");
acsToWmsZDService.taskFeedback(feedMap); acsToWmsZDService.taskFeedback(feedMap);
@ -230,7 +227,7 @@ public class AgvWaitUtil {
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode")));
String responseMessage = (String) feedback.get("responseMessage"); String responseMessage = (String.valueOf(feedback.get("responseMessage")));
if (responseCode == 0) { if (responseCode == 0) {
feedback.put("feedbackStatus", "puting"); feedback.put("feedbackStatus", "puting");
acsToWmsZDService.taskFeedback(feedMap); acsToWmsZDService.taskFeedback(feedMap);
@ -275,7 +272,7 @@ public class AgvWaitUtil {
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode")));
String responseMessage = (String) feedback.get("responseMessage"); String responseMessage = (String.valueOf(feedback.get("responseMessage")));
if (responseCode == 0) { if (responseCode == 0) {
map.put("status", 200); map.put("status", 200);
map.put("message", "请求成功"); map.put("message", "请求成功");
@ -303,8 +300,7 @@ public class AgvWaitUtil {
feedMap.put("feedbackStatus", "putFinish"); feedMap.put("feedbackStatus", "putFinish");
Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap); Map<String, Object> feedback = acsToWmsZDService.taskFeedback(feedMap);
int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode"))); int responseCode = Integer.parseInt(String.valueOf(feedback.get("responseCode")));
String responseMessage = (String.valueOf(feedback.get("responseMessage")));
String responseMessage = (String) feedback.get("responseMessage");
if (responseCode == 0) { if (responseCode == 0) {
map.put("status", 200); map.put("status", 200);
map.put("message", "请求成功"); map.put("message", "请求成功");

7
hd/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/AgvToAcsServiceImpl.java

@ -39,6 +39,7 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
logServer.log("", "waitpointRequest", "erro", param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", ""); logServer.log("", "waitpointRequest", "erro", param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", "");
throw new BadRequestException("请求失败,指令为空!"); throw new BadRequestException("请求失败,指令为空!");
} }
logServer.log(inst_code, "waitpointRequest", "info", param.toString(), String.valueOf(map) + "请求等待点!", "200", "api/agv/waitpointRequest", "");
String task_code = instructionDto.getTask_code(); String task_code = instructionDto.getTask_code();
Map<String, Object> feedMap = new HashMap(); Map<String, Object> feedMap = new HashMap();
feedMap.put("taskCode", task_code); feedMap.put("taskCode", task_code);
@ -51,13 +52,13 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
if (start_device_code.equals(deviceCodeNow)) { if (start_device_code.equals(deviceCodeNow)) {
return agvWaitUtil.waitInGet(deviceCodeNow, feedMap, param); return agvWaitUtil.waitInGet(deviceCodeNow, feedMap, param);
} else if (next_device_code.equals(deviceCodeNow)) { } else if (next_device_code.equals(deviceCodeNow)) {
return agvWaitUtil.waitOutGet(deviceCodeNow, feedMap, param); return agvWaitUtil.waitInPut(deviceCodeNow, feedMap, param);
} }
} }
if (address.contains("OUT")) { if (address.contains("OUT")) {
String deviceCodeNow = address.substring(0, address.length() - 3); String deviceCodeNow = address.substring(0, address.length() - 3);
if (start_device_code.equals(deviceCodeNow)) { if (start_device_code.equals(deviceCodeNow)) {
return agvWaitUtil.waitInPut(deviceCodeNow, feedMap, param); return agvWaitUtil.waitOutGet(deviceCodeNow, feedMap, param);
} else if (next_device_code.equals(deviceCodeNow)) { } else if (next_device_code.equals(deviceCodeNow)) {
return agvWaitUtil.waitOutPut(deviceCodeNow, feedMap, param); return agvWaitUtil.waitOutPut(deviceCodeNow, feedMap, param);
} }
@ -65,6 +66,6 @@ public class AgvToAcsServiceImpl implements AgvToAcsService {
map.put("status", 400); map.put("status", 400);
map.put("message", "请求失败,IN OUT 站点错误!"); map.put("message", "请求失败,IN OUT 站点错误!");
logServer.log(task_code, "waitpointRequest", "erro", param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code()); logServer.log(task_code, "waitpointRequest", "erro", param.toString(), String.valueOf(map), "400", "api/agv/waitpointRequest", instructionDto.getVehicle_code());
throw new BadRequestException("请求失败,终点位置无货!"); throw new BadRequestException("请求失败,IN OUT 站点错误!");
} }
} }

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

@ -909,11 +909,11 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
List<RouteLineDto> shortPathsList = routeLineService.getShortPathLines(entity.getStart_device_code(), entity.getNext_device_code(), entity.getRoute_plan_code()); List<RouteLineDto> shortPathsList = routeLineService.getShortPathLines(entity.getStart_device_code(), entity.getNext_device_code(), entity.getRoute_plan_code());
String type = shortPathsList.get(0).getType(); String type = shortPathsList.get(0).getType();
// != 0 为agv任务 // != 0 为agv任务
// if (!StrUtil.equals(type, "0")) { if (!StrUtil.equals(type, "0")) {
// if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.AGVTYPE).toString(), "3")) { if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.AGVTYPE).toString(), "3")) {
// agvService.markComplete(entity.getTask_code()); agvService.markComplete(entity.getTask_code());
// } }
// } }
} }
@Override @Override

3
hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCleanLog.java

@ -22,11 +22,10 @@ public class AutoCleanLog {
// 0 0/1 0,1 * * ? 每天0-1点执行间隔10分钟一次 // 0 0/1 0,1 * * ? 每天0-1点执行间隔10分钟一次
//sys_log //sys_log
//delete from sys_log where DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL 30 day)) limit 10; //delete from sys_log where DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL 30 day)) limit 10;
WQLObject logTab = WQLObject.getWQLObject("sys_log"); WQLObject logTab = WQLObject.getWQLObject("acs_log");
int days = Integer.parseInt(acsConfigService.findConfigFromCache().get(AcsConfig.AutoCleanDays)); int days = Integer.parseInt(acsConfigService.findConfigFromCache().get(AcsConfig.AutoCleanDays));
logTab.delete("DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL " + days + " day)) limit 50"); logTab.delete("DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL " + days + " day)) limit 50");
log.info("自动清理日志执行成功...!"); log.info("自动清理日志执行成功...!");
} }
} }
Loading…
Cancel
Save