Browse Source

fix 仙工API

v1.1_20240705
张江玮 1 year ago
parent
commit
5486095106
  1. 8
      acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java
  2. 5
      acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java
  3. 16
      acs/nladmin-system/src/main/resources/rebel.xml

8
acs/nladmin-system/src/main/java/org/nl/acs/agv/server/impl/XianGongAgvServiceImpl.java

@ -207,9 +207,13 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
String agvurl = paramService.findByCode(AcsConfig.AGVURL).getValue(); String agvurl = paramService.findByCode(AcsConfig.AGVURL).getValue();
String agvport = paramService.findByCode(AcsConfig.AGVPORT).getValue(); String agvport = paramService.findByCode(AcsConfig.AGVPORT).getValue();
agvurl = agvurl + ":" + agvport + "/api/route/transportOrders/" + instCode + "/withdrawal"; JSONObject param = new JSONObject();
param.put("id", instCode);
param.put("disableVehicle", false);
agvurl = agvurl + ":" + agvport + "/terminate";
log.info("删除agv指令请求agvurl:{}", agvurl); log.info("删除agv指令请求agvurl:{}", agvurl);
HttpResponse result = HttpRequest.post(agvurl) HttpResponse result = HttpRequest.post(agvurl)
.body(param.toJSONString())
.timeout(20000)//超时,毫秒 .timeout(20000)//超时,毫秒
.execute(); .execute();
log.info("删除agv指令请求反馈:{}", result); log.info("删除agv指令请求反馈:{}", result);
@ -222,7 +226,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
@LokiLog(type = LokiLogType.AGV) @LokiLog(type = LokiLogType.AGV)
@Override @Override
public HttpResponse sendOrderSequencesToXZ(Instruction inst) throws Exception { public HttpResponse sendOrderSequencesToXZ(Instruction inst) throws Exception {
com.alibaba.fastjson.JSONObject jo = new com.alibaba.fastjson.JSONObject(); JSONObject jo = new JSONObject();
jo.put("id", inst.getInstruction_code()); jo.put("id", inst.getInstruction_code());
jo.put("complete", true); jo.put("complete", true);
jo.put("blocks", createBlocksData(inst)); jo.put("blocks", createBlocksData(inst));

5
acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java

@ -70,8 +70,11 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
} }
public void autoRun() throws IOException { public void autoRun() throws IOException {
if (!"2".equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue())) {
return;
}
System.out.println("1楼NDCAgv链接开始"); System.out.println("1楼NDCAgv链接开始");
ParamService ParamService = SpringContextHolder.getBean(ParamServiceImpl.class);
InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class); InstructionService instructionService = SpringContextHolder.getBean(InstructionServiceImpl.class);
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class); AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
NDCAgvService NDCAgvService = SpringContextHolder.getBean(NDCAgvService.class); NDCAgvService NDCAgvService = SpringContextHolder.getBean(NDCAgvService.class);

16
acs/nladmin-system/src/main/resources/rebel.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
-->
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
<id>nladmin-system</id>
<classpath>
<dir name="D:/project/nuoLiSiQi_one/acs/nladmin-system/target/classes">
</dir>
</classpath>
</application>
Loading…
Cancel
Save