更新下发仙工数据

This commit is contained in:
USER-20220102CG\noblelift
2022-08-20 14:31:51 +08:00
parent 75408cdfec
commit dc8896d3ad
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
package org.nl.acs.agv.server.impl;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
@@ -1625,7 +1626,7 @@ public class AgvServiceImpl implements AgvService {
public JSONArray createBlocksData(Instruction inst) {
JSONArray ja = new JSONArray();
JSONObject jo = new JSONObject();
jo.put("blockId",String.valueOf(ja.size()+1));
jo.put("blockId", IdUtil.simpleUUID());
jo.put("location",inst.getStart_point_code());
jo.put("operation","JackLoad");
ja.add(jo);

View File

@@ -56,7 +56,7 @@ public class QueryXZAgvTaskStatus {
String device_code = blocksjo.getString("location");
String state = blocksjo.getString("state");
//取货
if(StrUtil.equals(blockId,"1") && StrUtil.equals(state,"FINISHED") && StrUtil.equals(inst.getFinish_type(),"0")){
if(StrUtil.equals(String.valueOf(j+1),"1") && StrUtil.equals(state,"FINISHED") && StrUtil.equals(inst.getFinish_type(),"0")){
JSONObject feedjo = new JSONObject();
feedjo.put("status","1");
feedjo.put("device_code",device_code);
@@ -68,7 +68,7 @@ public class QueryXZAgvTaskStatus {
instructionService.update(inst);
}
//放货
if(StrUtil.equals(blockId,"2") && StrUtil.equals(state,"FINISHED") && StrUtil.equals(inst.getFinish_type(),"1")){
if(StrUtil.equals(String.valueOf(j+1),"2") && StrUtil.equals(state,"FINISHED") && StrUtil.equals(inst.getFinish_type(),"1")){
JSONObject feedjo = new JSONObject();
feedjo.put("status","2");
feedjo.put("device_code",device_code);