更新下发仙工数据
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.acs.agv.server.impl;
|
package org.nl.acs.agv.server.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
@@ -1625,7 +1626,7 @@ public class AgvServiceImpl implements AgvService {
|
|||||||
public JSONArray createBlocksData(Instruction inst) {
|
public JSONArray createBlocksData(Instruction inst) {
|
||||||
JSONArray ja = new JSONArray();
|
JSONArray ja = new JSONArray();
|
||||||
JSONObject jo = new JSONObject();
|
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("location",inst.getStart_point_code());
|
||||||
jo.put("operation","JackLoad");
|
jo.put("operation","JackLoad");
|
||||||
ja.add(jo);
|
ja.add(jo);
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ public class QueryXZAgvTaskStatus {
|
|||||||
String device_code = blocksjo.getString("location");
|
String device_code = blocksjo.getString("location");
|
||||||
String state = blocksjo.getString("state");
|
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();
|
JSONObject feedjo = new JSONObject();
|
||||||
feedjo.put("status","1");
|
feedjo.put("status","1");
|
||||||
feedjo.put("device_code",device_code);
|
feedjo.put("device_code",device_code);
|
||||||
@@ -68,7 +68,7 @@ public class QueryXZAgvTaskStatus {
|
|||||||
instructionService.update(inst);
|
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();
|
JSONObject feedjo = new JSONObject();
|
||||||
feedjo.put("status","2");
|
feedjo.put("status","2");
|
||||||
feedjo.put("device_code",device_code);
|
feedjo.put("device_code",device_code);
|
||||||
|
|||||||
Reference in New Issue
Block a user