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. 127
      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

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

@ -362,7 +362,7 @@ public class AgvServiceImpl implements AgvService {
String agvurl = acsConfigService.findConfigFromCache().get(AcsConfig.AGVURL); String agvurl = acsConfigService.findConfigFromCache().get(AcsConfig.AGVURL);
String agvport = acsConfigService.findConfigFromCache().get(AcsConfig.AGVPORT); String agvport = acsConfigService.findConfigFromCache().get(AcsConfig.AGVPORT);
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
jo.put("id",code); jo.put("id", code);
agvurl = agvurl + ":" + agvport + "/markComplete"; agvurl = agvurl + ":" + agvport + "/markComplete";
log.info("关闭agv运单序列请求:{}", agvurl); log.info("关闭agv运单序列请求:{}", agvurl);
@ -555,26 +555,26 @@ public class AgvServiceImpl implements AgvService {
String state = arm_info.getString("task_status"); String state = arm_info.getString("task_status");
String state_name = null; String state_name = null;
if(StrUtil.equals(state,"0")){ if (StrUtil.equals(state, "0")) {
state_name = "NONE"; state_name = "NONE";
} else if(StrUtil.equals(state,"1")){ } else if (StrUtil.equals(state, "1")) {
state_name = "WAITING"; state_name = "WAITING";
} else if(StrUtil.equals(state,"2")) { } else if (StrUtil.equals(state, "2")) {
state_name = "RUNNING"; state_name = "RUNNING";
} else if(StrUtil.equals(state,"3")){ } else if (StrUtil.equals(state, "3")) {
state_name = "SUSPENDED"; state_name = "SUSPENDED";
} else if(StrUtil.equals(state,"4")){ } else if (StrUtil.equals(state, "4")) {
state_name = "COMPLETED"; state_name = "COMPLETED";
} else if(StrUtil.equals(state,"5")){ } else if (StrUtil.equals(state, "5")) {
state_name = "FAILED"; state_name = "FAILED";
} else if(StrUtil.equals(state,"6")){ } else if (StrUtil.equals(state, "6")) {
state_name = "CANCELED"; state_name = "CANCELED";
} }
String energyLevel = String.valueOf(rbk_report.getDouble("battery_level")); String energyLevel = String.valueOf(rbk_report.getDouble("battery_level"));
String transportOrder = current_order.getString("id"); String transportOrder = current_order.getString("id");
Instruction inst = instructionService.findByCodeFromCache(transportOrder); Instruction inst = instructionService.findByCodeFromCache(transportOrder);
if(!ObjectUtil.isEmpty(inst)){ if (!ObjectUtil.isEmpty(inst)) {
transportOrder = inst.getTask_code(); transportOrder = inst.getTask_code();
} else { } else {
transportOrder = ""; transportOrder = "";
@ -628,7 +628,6 @@ public class AgvServiceImpl implements AgvService {
} }
@Override @Override
public HttpResponse queryXZAgvInstStatus(String instCode) { public HttpResponse queryXZAgvInstStatus(String instCode) {
@ -719,8 +718,8 @@ public class AgvServiceImpl implements AgvService {
String agvurl = acsConfigService.findConfigFromCache().get(AcsConfig.AGVURL); String agvurl = acsConfigService.findConfigFromCache().get(AcsConfig.AGVURL);
String agvport = acsConfigService.findConfigFromCache().get(AcsConfig.AGVPORT); String agvport = acsConfigService.findConfigFromCache().get(AcsConfig.AGVPORT);
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
jo.put("id",instCode); jo.put("id", instCode);
jo.put("disableVehicle",false); jo.put("disableVehicle", false);
agvurl = agvurl + ":" + agvport + "/terminate"; agvurl = agvurl + ":" + agvport + "/terminate";
log.info("删除agv指令请求agvurl:{}", agvurl); log.info("删除agv指令请求agvurl:{}", agvurl);
HttpResponse result = HttpRequest.post(agvurl) HttpResponse result = HttpRequest.post(agvurl)
@ -1507,15 +1506,15 @@ public class AgvServiceImpl implements AgvService {
String agvport = acsConfigService.findConfigFromCache().get(AcsConfig.AGVPORT); String agvport = acsConfigService.findConfigFromCache().get(AcsConfig.AGVPORT);
agvurl = agvurl + ":" + agvport + "/setOrder"; agvurl = agvurl + ":" + agvport + "/setOrder";
System.out.println("请求地址为:"+agvurl); System.out.println("请求地址为:" + agvurl);
HttpResponse result = HttpRequest.post(agvurl) HttpResponse result = HttpRequest.post(agvurl)
.body(String.valueOf(jo))//表单内容 .body(String.valueOf(jo))//表单内容
.timeout(20000)//超时,毫秒 .timeout(20000)//超时,毫秒
.execute(); .execute();
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;
@ -1575,84 +1574,84 @@ public class AgvServiceImpl implements AgvService {
JSONArray ja = new JSONArray(); JSONArray ja = new JSONArray();
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
jo.put("blockId", IdUtil.simpleUUID()); jo.put("blockId", IdUtil.simpleUUID());
jo.put("location",inst.getStart_point_code() + "IN"); jo.put("location", inst.getStart_point_code() + "IN");
jo.put("operation","script"); jo.put("operation", "script");
jo.put("id",inst.getStart_point_code() + "IN"); jo.put("id", inst.getStart_point_code() + "IN");
jo.put("script_name","userpy/interact.py"); jo.put("script_name", "userpy/interact.py");
JSONObject script_args = new JSONObject(); JSONObject script_args = new JSONObject();
script_args.put("addr",addr); script_args.put("addr", addr);
JSONObject data = new JSONObject(); JSONObject data = new JSONObject();
JSONObject reach = new JSONObject(); JSONObject reach = new JSONObject();
reach.put("task_code",inst.getInstruction_code()); reach.put("task_code", inst.getInstruction_code());
reach.put("address",inst.getStart_point_code() + "IN"); reach.put("address", inst.getStart_point_code() + "IN");
data.put("reach",reach); data.put("reach", reach);
script_args.put("data",data); script_args.put("data", data);
script_args.put("protocol","HTTP"); script_args.put("protocol", "HTTP");
jo.put("script_args",script_args); jo.put("script_args", script_args);
ja.add(jo); ja.add(jo);
JSONObject jo1 = new JSONObject(); JSONObject jo1 = new JSONObject();
jo1.put("blockId", IdUtil.simpleUUID()); jo1.put("blockId", IdUtil.simpleUUID());
jo1.put("location",inst.getStart_point_code()); jo1.put("location", inst.getStart_point_code());
jo1.put("operation","JackLoad"); jo1.put("operation", "JackLoad");
ja.add(jo1); ja.add(jo1);
JSONObject jo2 = new JSONObject(); JSONObject jo2 = new JSONObject();
jo2.put("blockId", IdUtil.simpleUUID()); jo2.put("blockId", IdUtil.simpleUUID());
jo2.put("location",inst.getStart_point_code() + "OUT"); jo2.put("location", inst.getStart_point_code() + "OUT");
jo2.put("operation","script"); jo2.put("operation", "script");
jo2.put("id",inst.getStart_point_code() + "OUT"); jo2.put("id", inst.getStart_point_code() + "OUT");
jo2.put("script_name","userpy/interact.py"); jo2.put("script_name", "userpy/interact.py");
JSONObject script_args2 = new JSONObject(); JSONObject script_args2 = new JSONObject();
script_args2.put("addr",addr); script_args2.put("addr", addr);
JSONObject data2 = new JSONObject(); JSONObject data2 = new JSONObject();
JSONObject reach2 = new JSONObject(); JSONObject reach2 = new JSONObject();
reach2.put("task_code",inst.getInstruction_code()); reach2.put("task_code", inst.getInstruction_code());
reach2.put("address",inst.getStart_point_code() + "OUT"); reach2.put("address", inst.getStart_point_code() + "OUT");
data2.put("reach",reach2); data2.put("reach", reach2);
script_args2.put("data",data2); script_args2.put("data", data2);
script_args2.put("protocol","HTTP"); script_args2.put("protocol", "HTTP");
jo2.put("script_args",script_args2); jo2.put("script_args", script_args2);
ja.add(jo2); ja.add(jo2);
JSONObject jo3 = new JSONObject(); JSONObject jo3 = new JSONObject();
jo3.put("blockId", IdUtil.simpleUUID()); jo3.put("blockId", IdUtil.simpleUUID());
jo3.put("location",inst.getNext_point_code() + "IN"); jo3.put("location", inst.getNext_point_code() + "IN");
jo3.put("operation","script"); jo3.put("operation", "script");
jo3.put("id",inst.getNext_point_code() + "IN"); jo3.put("id", inst.getNext_point_code() + "IN");
jo3.put("script_name","userpy/interact.py"); jo3.put("script_name", "userpy/interact.py");
JSONObject script_args3 = new JSONObject(); JSONObject script_args3 = new JSONObject();
script_args3.put("addr",addr); script_args3.put("addr", addr);
JSONObject data3 = new JSONObject(); JSONObject data3 = new JSONObject();
JSONObject reach3 = new JSONObject(); JSONObject reach3 = new JSONObject();
reach3.put("task_code",inst.getInstruction_code()); reach3.put("task_code", inst.getInstruction_code());
reach3.put("address",inst.getNext_point_code() + "IN"); reach3.put("address", inst.getNext_point_code() + "IN");
data3.put("reach",reach3); data3.put("reach", reach3);
script_args3.put("data",data3); script_args3.put("data", data3);
script_args3.put("protocol","HTTP"); script_args3.put("protocol", "HTTP");
jo3.put("script_args",script_args3); jo3.put("script_args", script_args3);
ja.add(jo3); ja.add(jo3);
JSONObject jo4 = new JSONObject(); JSONObject jo4 = new JSONObject();
jo4.put("blockId",IdUtil.simpleUUID()); jo4.put("blockId", IdUtil.simpleUUID());
jo4.put("location",inst.getNext_point_code()); jo4.put("location", inst.getNext_point_code());
jo4.put("operation","JackUnload"); jo4.put("operation", "JackUnload");
ja.add(jo4); ja.add(jo4);
JSONObject jo5 = new JSONObject(); JSONObject jo5 = new JSONObject();
jo5.put("blockId", IdUtil.simpleUUID()); jo5.put("blockId", IdUtil.simpleUUID());
jo5.put("location",inst.getNext_point_code() + "OUT"); jo5.put("location", inst.getNext_point_code() + "OUT");
jo5.put("operation","script"); jo5.put("operation", "script");
jo5.put("id",inst.getNext_point_code() + "OUT"); jo5.put("id", inst.getNext_point_code() + "OUT");
jo5.put("script_name","userpy/interact.py"); jo5.put("script_name", "userpy/interact.py");
JSONObject script_args5 = new JSONObject(); JSONObject script_args5 = new JSONObject();
script_args5.put("addr",addr); script_args5.put("addr", addr);
JSONObject data5 = new JSONObject(); JSONObject data5 = new JSONObject();
JSONObject reach5 = new JSONObject(); JSONObject reach5 = new JSONObject();
reach5.put("task_code",inst.getInstruction_code()); reach5.put("task_code", inst.getInstruction_code());
reach5.put("address",inst.getNext_point_code() + "OUT"); reach5.put("address", inst.getNext_point_code() + "OUT");
data5.put("reach",reach5); data5.put("reach", reach5);
script_args5.put("data",data5); script_args5.put("data", data5);
script_args5.put("protocol","HTTP"); script_args5.put("protocol", "HTTP");
jo5.put("script_args",script_args5); jo5.put("script_args", script_args5);
ja.add(jo5); ja.add(jo5);
System.out.println(ja); System.out.println(ja);
return ja; return ja;

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