fix :lms联调
This commit is contained in:
@@ -42,6 +42,8 @@ import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -76,6 +78,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
@Autowired
|
||||
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
|
||||
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||
|
||||
ISysParamService paramService = SpringContextHolder.getBean(ISysParamService.class);
|
||||
|
||||
@@ -329,9 +332,21 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
param.put("device_code", device_code);
|
||||
param.put("material_barcode", material_barcode);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "二楼到一楼输送线申请行架任务,参数:" + param);
|
||||
HttpResponse response = acsToWmsService.shipDeviceUpdate(param);
|
||||
if (response == null || response.getStatus() == 200) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "二楼到一楼输送线申请行架任务,接口返回:" + response.body());
|
||||
String response = acsToWmsService.applyTowToOne(param);
|
||||
JSONObject jo = JSON.parseObject(response);
|
||||
if (response == null || jo.getInteger("status") == 200) {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("二楼到一楼输送线申请行架任务,参数,接口返回:" + jo)
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
this.requireSucess = true;
|
||||
}else {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("二楼到一楼输送线申请行架任务,返回参数:" + jo.getString("body"))
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -363,9 +378,12 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
apply.put("vehicle_code", hand_barcode);
|
||||
|
||||
String str = acsToWmsService.applyTaskToWms(apply);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请AGV任务,请求参数:" + apply + ",响应参数," + str);
|
||||
|
||||
JSONObject jo = JSON.parseObject(str);
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请AGV任务,参数,接口返回:" + jo)
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
if (ObjectUtil.isEmpty(jo)) {
|
||||
message = "申请补码AGV搬运任务接口不通";
|
||||
} else {
|
||||
@@ -382,7 +400,11 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请补码AGV任务,返回参数:" + jo);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请AGV任务,返回参数:" + jo.getString("body"))
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
requireSucess = true;
|
||||
} else {
|
||||
message = "申请补码AGV搬运任务失败," + jo.get("message").toString();
|
||||
@@ -407,7 +429,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
apply.put("type", AcsToLmsApplyTaskTypeEnum.AGV.getType());
|
||||
apply.put("vehicle_code", instruction.getVehicle_code());
|
||||
|
||||
String str = acsToWmsService.applyTaskToWms(apply);
|
||||
String str = acsToWmsService.applySendOutTwo(apply);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请AGV任务,请求参数:" + apply + ",响应参数");
|
||||
|
||||
JSONObject jo = JSON.parseObject(str);
|
||||
|
||||
@@ -40,8 +40,11 @@ import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||
import org.nl.config.thread.ThreadPoolExecutorUtil;
|
||||
import org.openscada.opc.lib.da.Server;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
@@ -76,6 +79,10 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
||||
NDCAgvService agvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
|
||||
DeviceErrorLogService deviceErrorLogService = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
LuceneExecuteLogService luceneExecuteLogService;
|
||||
|
||||
//当前指令
|
||||
Instruction inst = null;
|
||||
|
||||
@@ -265,18 +272,16 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
||||
if (task > 0) {
|
||||
Instruction instruction = instructionService.findByCodeFromCache(String.valueOf(task));
|
||||
if (ObjectUtil.isEmpty(instruction)) {
|
||||
message = "申请捆扎电气设备任务号:" + task + "未找到对应指令";
|
||||
message = LangProcess.msg("one_message8") + ": " + task + LangProcess.msg("one_message9");
|
||||
return;
|
||||
}
|
||||
vehicle_code = instruction.getVehicle_code();
|
||||
} else {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "申请捆扎电气设备任务号:" + task + "异常");
|
||||
message = "申请捆扎电气设备任务号:" + task + "异常";
|
||||
message = LangProcess.msg("one_message8") + ": " + task + LangProcess.msg("one_message10");
|
||||
return;
|
||||
}
|
||||
if (StrUtil.isEmpty(vehicle_code)) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "申请捆扎电气设备任务号:" + task + "未找到载具号");
|
||||
message = "申请捆扎电气设备任务号:" + task + "未找到载具号";
|
||||
message = LangProcess.msg("one_message8") + ": " + task + LangProcess.msg("one_message11");
|
||||
return;
|
||||
}
|
||||
ApplyLabelingAndBindingRequest applyLabelingAndBindingRequest =
|
||||
@@ -291,15 +296,28 @@ public class FinishedProductOutBindLableDeviceDriver extends AbstractOpcDeviceDr
|
||||
applyLabelingAndBindingRequest.setDevice_code(start_point_code);
|
||||
applyLabelingAndBindingRequest.setType(AcsToLmsApplyTaskTypeEnum.LABEL_BIND.getType());
|
||||
applyLabelingAndBindingRequest.setVehicle_code(vehicle_code);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请贴标捆扎信息,参数:" + applyLabelingAndBindingRequest)
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
ApplyLabelingAndBindingResponse applyLabelingAndBindingResponse = acsToWmsService.applyLabelingAndBindingRequest(applyLabelingAndBindingRequest);
|
||||
if (applyLabelingAndBindingResponse.getstatus() == 200) {
|
||||
if (ObjectUtil.isNotEmpty(applyLabelingAndBindingResponse.getData())) {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请贴标捆扎信息,接口返回:" + applyLabelingAndBindingResponse.getData())
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
Map datas = applyLabelingAndBindingResponse.getData();
|
||||
packagePLCData(datas);
|
||||
message = "申请捆扎成功";
|
||||
requireSucess = true;
|
||||
} else {
|
||||
message = "未返回尺寸信息";
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请捆扎失败,接口返回:" + applyLabelingAndBindingResponse.getData())
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -70,10 +70,10 @@ public class ItemProtocol {
|
||||
*/
|
||||
public static String item_to_task = "to_task";
|
||||
|
||||
/**
|
||||
* 下发是否捆轧
|
||||
*/
|
||||
public static String item_to_is_binding = "to_is_binding";
|
||||
/**
|
||||
* 下发是否捆轧
|
||||
*/
|
||||
public static String item_to_is_binding = "to_is_binding";
|
||||
|
||||
/**
|
||||
* 下发是否贴标
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.acs.device_driver.one_conveyor.fold_disc_site;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -33,6 +34,8 @@ import org.nl.acs.route.service.impl.RouteLineServiceImpl;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -62,6 +65,8 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
DeviceErrorLogService errorLogServer = SpringContextHolder.getBean(DeviceErrorLogServiceImpl.class);
|
||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsService.class);
|
||||
|
||||
@Autowired
|
||||
LuceneExecuteLogService luceneExecuteLogService = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||
//工作模式
|
||||
int mode = 0;
|
||||
int last_mode = 0;
|
||||
@@ -173,6 +178,7 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
qty = this.itemProtocol.getQty();
|
||||
to_container_type = this.itemProtocol.getTo_container_type();
|
||||
container_type = this.itemProtocol.getContainer_type();
|
||||
barcode = this.itemProtocol.getBarcode();
|
||||
carrier_direction = this.itemProtocol.getCarrier_direction();
|
||||
if (mode != last_mode) {
|
||||
JSONObject param = new JSONObject();
|
||||
@@ -213,13 +219,13 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
List toInstructions;
|
||||
|
||||
//申请空托盘入库
|
||||
if (mode == 9 && move == 1 ){
|
||||
if (mode == 9 && move == 1 && !requireSucess){
|
||||
applyEmptyTask(StorageTypeEnum.DISKS_IN.getType());
|
||||
}
|
||||
|
||||
|
||||
//申请空托盘出库
|
||||
if (mode == 8 && move == 1 ){
|
||||
if (mode == 8 && move == 1 && !requireSucess){
|
||||
applyEmptyTask(StorageTypeEnum.DISKS_OUT.getType());
|
||||
}
|
||||
|
||||
@@ -243,13 +249,13 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
remark = remark + LangProcess.msg("universal_remark3");
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "当前上报任务号(task)应该为0,";
|
||||
remark = remark + LangProcess.msg("universal_remark4");
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "请右击该图标,将请求任务复位标记(requireSucess)改为否。";
|
||||
remark = remark + LangProcess.msg("universal_remark5");
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
//}
|
||||
@@ -284,10 +290,26 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
param.put("vehicle_code", barcode);
|
||||
param.put("container_type", container_type);
|
||||
param.put("type", type);
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "木箱入库申请入库任务,参数:" + param);
|
||||
HttpResponse response = acsToWmsService.shipDeviceUpdate(param);
|
||||
if (response == null || response.getStatus() == 200) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "木箱入库申请入库任务,接口返回:" + response.body());
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请空托盘出入库,参数:" + param)
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
String response = acsToWmsService.applyTwo(param);
|
||||
JSONObject jo = JSON.parseObject(response);
|
||||
if (response == null || jo.getInteger("status") == 200) {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请空托盘出入库,参数,接口返回:" + jo)
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
this.requireSucess = true;
|
||||
}else {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请空托盘出入库,返回参数:" + jo.getString("body"))
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -142,7 +142,7 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_task, "任务号", "DB1.D6"));
|
||||
list.add(new ItemDto(item_container_type, "托盘类型", "DB1.B7"));
|
||||
list.add(new ItemDto(item_qty, "数量", "DB1.B8"));
|
||||
list.add(new ItemDto(item_barcode, "托盘条码", "DB1.B11"));
|
||||
list.add(new ItemDto(item_barcode, "托盘条码", "DB601.STRING1.50"));
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.*;
|
||||
@@ -71,7 +73,8 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
|
||||
DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class);
|
||||
|
||||
|
||||
@Autowired
|
||||
LuceneExecuteLogService luceneExecuteLogService;
|
||||
//工作模式
|
||||
int mode = 0;
|
||||
int last_mode = 0;
|
||||
@@ -263,13 +266,15 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
remark = remark + LangProcess.msg("universal_remark3");
|
||||
}
|
||||
if (task != 0) {
|
||||
remark = remark + "当前上报任务号(task)应该为0,";
|
||||
remark = remark + LangProcess.msg("universal_remark4");
|
||||
|
||||
if (ObjectUtil.isNotEmpty(this.inst)) {
|
||||
this.inst = null;
|
||||
}
|
||||
}
|
||||
if (requireSucess) {
|
||||
remark = remark + "请右击该图标,将请求任务复位标记(requireSucess)改为否。";
|
||||
remark = remark + LangProcess.msg("universal_remark5");
|
||||
|
||||
}
|
||||
this.setNotCreateTaskMessage(remark);
|
||||
//}
|
||||
@@ -307,10 +312,18 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
param.put("vehicle_code", barcode);
|
||||
param.put("material_barcode", material_barcode);
|
||||
param.put("type", StorageTypeEnum.ERROR.getType());
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "木箱入库申请异常位任务,参数:" + param);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("木箱入库申请异常位任务,参数:" + param)
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
HttpResponse response = acsToWmsService.shipDeviceUpdate(param);
|
||||
if (response == null || response.getStatus() == 200) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "木箱入库申请异常位任务,接口返回:" + response.body());
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("木箱入库申请异常位任务,接口返回:" + response.body())
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -27,4 +27,9 @@ public class InteractionJsonDTO {
|
||||
*/
|
||||
private String isLastOne;
|
||||
|
||||
/**
|
||||
*是否捆轧
|
||||
*/
|
||||
private String isBinding;
|
||||
|
||||
}
|
||||
|
||||
@@ -82,6 +82,12 @@ public class ItemProtocol {
|
||||
public static String item_to_template = "to_template";
|
||||
|
||||
|
||||
/**
|
||||
* 下发是否捆轧
|
||||
*/
|
||||
public static String item_to_is_binding = "to_is_binding";
|
||||
|
||||
|
||||
|
||||
|
||||
private TrappedManipulatorManipulatorDeviceDriver driver;
|
||||
@@ -174,6 +180,8 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_to_weight, "木箱宽度", "DB601.W12"));
|
||||
list.add(new ItemDto(item_to_height, "木箱高度", "DB601.W14"));
|
||||
list.add(new ItemDto(item_to_template, "堆叠模板", "DB601.W16"));
|
||||
list.add(new ItemDto(item_to_is_binding, "下发是否捆轧", "DB601.D10"));
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,8 +333,9 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
||||
Map<String, Object> map7 = new HashMap<>();
|
||||
Map<String, Object> map8 = new HashMap<>();
|
||||
Map<String, Object> map9 = new HashMap<>();
|
||||
Map<String, Object> map10 = new HashMap<>();
|
||||
try {
|
||||
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instruction.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8, map9);
|
||||
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instruction.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8, map9,map10);
|
||||
} catch (Exception e) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
||||
+ instruction.getInstruction_code() + ",指令起点:" + instruction.getStart_device_code()
|
||||
@@ -390,8 +391,9 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
||||
Map<String, Object> map7 = new HashMap<>();
|
||||
Map<String, Object> map8 = new HashMap<>();
|
||||
Map<String, Object> map9 = new HashMap<>();
|
||||
Map<String, Object> map10 = new HashMap<>();
|
||||
try {
|
||||
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8, map9);
|
||||
pushPLC(map1, map2, next_addr, map3, start_addr, map4, instdto.getInstruction_code(), interactionJsonDTO, map5, map6, map7, map8, map9,map10);
|
||||
} catch (Exception e) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
||||
+ instdto.getInstruction_code() + ",指令起点:" + instdto.getStart_device_code()
|
||||
@@ -410,7 +412,7 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
||||
|
||||
|
||||
|
||||
private void pushPLC(Map<String, Object> map1, Map<String, Object> map2, String next_addr, Map<String, Object> map3, String start_addr, Map<String, Object> map4, String task, InteractionJsonDTO interactionJsonDTO, Map<String, Object> map5, Map<String, Object> map6, Map<String, Object> map7, Map<String, Object> map8, Map<String, Object> map9) {
|
||||
private void pushPLC(Map<String, Object> map1, Map<String, Object> map2, String next_addr, Map<String, Object> map3, String start_addr, Map<String, Object> map4, String task, InteractionJsonDTO interactionJsonDTO, Map<String, Object> map5, Map<String, Object> map6, Map<String, Object> map7, Map<String, Object> map8, Map<String, Object> map9,Map<String, Object> map10) {
|
||||
|
||||
List list = new ArrayList();
|
||||
map1.put("code", "to_command");
|
||||
@@ -451,6 +453,11 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
|
||||
map9.put("value", interactionJsonDTO.getIsLastOne());
|
||||
list.add(map9);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(interactionJsonDTO.getIsBinding())) {
|
||||
map10.put("code", "to_is_binding");
|
||||
map10.put("value", interactionJsonDTO.getIsBinding());
|
||||
list.add(map10);
|
||||
}
|
||||
}
|
||||
|
||||
this.writing(list);
|
||||
|
||||
@@ -338,7 +338,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
|
||||
|
||||
if (mode != 3 || requireSucess) {
|
||||
message = LangProcess.msg("one_message7");
|
||||
// message = LangProcess.msg("one_message7");
|
||||
|
||||
} else if (error != 0) {
|
||||
message = LangProcess.msg("universal_message3");
|
||||
|
||||
@@ -82,6 +82,32 @@ public interface AcsToWmsService {
|
||||
*/
|
||||
HttpResponse shipDeviceUpdate(JSONObject param);
|
||||
|
||||
|
||||
/**
|
||||
* 二期入库申请任务
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
String applyTwo(JSONObject param);
|
||||
|
||||
/**
|
||||
* 二期发货申请任务
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
String applySendOutTwo(JSONObject param);
|
||||
|
||||
|
||||
/**
|
||||
* 二期发货申请捆扎、贴标
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
String deviceApplyTwo(JSONObject param);
|
||||
|
||||
|
||||
String applyTowToOne(JSONObject param);
|
||||
|
||||
/**
|
||||
* 反馈AGV取放货状态
|
||||
*
|
||||
@@ -147,4 +173,5 @@ public interface AcsToWmsService {
|
||||
|
||||
void sendDeviceStatus(JSONObject param);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -153,6 +153,166 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String applyTwo(JSONObject param) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("applyTaskToWms-----输入参数{}", param);
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("applyTwo");
|
||||
String url = wmsurl + addressDto.getMethods_url();
|
||||
HttpResponse result2 = null;
|
||||
try {
|
||||
result2 = HttpRequest.post(url)
|
||||
.header("Authorization", token)
|
||||
.body(String.valueOf(param))
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("applyTaskToWms-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
log.info("applyTaskToWms-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
String type = "";
|
||||
if (result2.getStatus() == 200) {
|
||||
type = "info";
|
||||
} else {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applyTaskToWms-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto("applyTaskToWms", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "二期入库申请任务");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String applySendOutTwo(JSONObject param) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("applyTaskToWms-----输入参数{}", param);
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("applySendOutTwo");
|
||||
String url = wmsurl + addressDto.getMethods_url();
|
||||
HttpResponse result2 = null;
|
||||
try {
|
||||
result2 = HttpRequest.post(url)
|
||||
.header("Authorization", token)
|
||||
.body(String.valueOf(param))
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("applyTaskToWms-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
log.info("applyTaskToWms-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
String type = "";
|
||||
if (result2.getStatus() == 200) {
|
||||
type = "info";
|
||||
} else {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applyTaskToWms-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto("applyTaskToWms", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请任务");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String deviceApplyTwo(JSONObject param) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("applyTaskToWms-----输入参数{}", param);
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("applyTwo");
|
||||
String url = wmsurl + addressDto.getMethods_url();
|
||||
HttpResponse result2 = null;
|
||||
try {
|
||||
result2 = HttpRequest.post(url)
|
||||
.header("Authorization", token)
|
||||
.body(String.valueOf(param))
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("applyTaskToWms-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
log.info("applyTaskToWms-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
String type = "";
|
||||
if (result2.getStatus() == 200) {
|
||||
type = "info";
|
||||
} else {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applyTaskToWms-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto("applyTaskToWms", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请捆扎、贴标");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String applyTowToOne(JSONObject param) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("applyTaskToWms-----输入参数{}", param);
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("applyTwo");
|
||||
String url = wmsurl + addressDto.getMethods_url();
|
||||
HttpResponse result2 = null;
|
||||
try {
|
||||
result2 = HttpRequest.post(url)
|
||||
.header("Authorization", token)
|
||||
.body(String.valueOf(param))
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("applyTaskToWms-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
log.info("applyTaskToWms-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
String type = "";
|
||||
if (result2.getStatus() == 200) {
|
||||
type = "info";
|
||||
} else {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applyTaskToWms-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto("applyTaskToWms", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请捆扎、贴标");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResponse feedAgvTaskStatus(JSONArray from) {
|
||||
return null;
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.nl.acs.device_driver.two_conveyor.waste_foil_weighing_station.WasteFo
|
||||
import org.nl.acs.ext.wms.data.*;
|
||||
|
||||
import org.nl.acs.ext.wms.liKuData.Resp;
|
||||
import org.nl.acs.ext.wms.service.AcsToLiKuService;
|
||||
import org.nl.acs.ext.wms.service.WmsToAcsService;
|
||||
|
||||
import org.nl.acs.instruction.domain.Instruction;
|
||||
@@ -67,6 +68,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
@Autowired
|
||||
private LuceneExecuteLogService luceneExecuteLogService;
|
||||
|
||||
@Autowired
|
||||
private AcsToLiKuService acsToLiKuService;
|
||||
|
||||
@Autowired
|
||||
private TaskService taskserver;
|
||||
|
||||
@@ -180,7 +184,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
if (!ObjectUtil.isEmpty(start_device_json)) {
|
||||
start_point_code = (String) start_device_json.get("parent_storage_code") == null ? start_device_code : (String) start_device_json.get("storage_code");
|
||||
}
|
||||
JSONObject next_device_json =(JSONObject) JSONObject.toJSON(next_storageCell);
|
||||
JSONObject next_device_json = (JSONObject) JSONObject.toJSON(next_storageCell);
|
||||
if (!ObjectUtil.isEmpty(next_device_json)) {
|
||||
next_point_code = (String) next_device_json.get("parent_storage_code") == null ? next_point_code : (String) next_device_json.get("storage_code");
|
||||
}
|
||||
@@ -341,45 +345,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
|
||||
TaskDto task_dto = jo.toJavaObject(TaskDto.class);
|
||||
try {
|
||||
// task_type=7 则是立库任务需要下刻下发
|
||||
if (StrUtil.equals(task_dto.getTask_type(), "7")) {
|
||||
//创建临时指令 不创建、不生成
|
||||
//等立库反馈成功才能创建任务和指令
|
||||
Instruction inst = null;
|
||||
try {
|
||||
// inst = taskserver.createTemporaryInst(task_dto);
|
||||
} catch (Exception e) {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("task_code", task_code);
|
||||
json.put("ext_task_id", ext_task_id);
|
||||
json.put("message", "起始点:"+ task_dto.getStart_point_code() + ",终点:"+
|
||||
task_dto.getNext_point_code()+",条码:" + task_dto.getVehicle_code() +
|
||||
"," + e.getMessage());
|
||||
errArr.add(json);
|
||||
continue;
|
||||
}
|
||||
// Resp resp = acsToLiKuService.sendInst(task_dto.getStorage_task_type(), inst);
|
||||
|
||||
// if (StrUtil.equals(resp.result, "true")) {
|
||||
// //创建任务和指令
|
||||
// taskserver.create(task_dto);
|
||||
// inst.setSend_status("1");
|
||||
//// taskserver.extCreateInst(inst);
|
||||
//
|
||||
// } else {
|
||||
// JSONObject json = new JSONObject();
|
||||
// json.put("task_code", task_code);
|
||||
// json.put("ext_task_id", ext_task_id);
|
||||
//// json.put("message", resp.getComment());
|
||||
//// json.put("code", resp.code);
|
||||
// json.put("data", data);
|
||||
// errArr.add(json);
|
||||
// continue;
|
||||
// }
|
||||
taskserver.create(task_dto);
|
||||
|
||||
} else {
|
||||
taskserver.create(task_dto);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
JSONObject json = new JSONObject();
|
||||
@@ -534,7 +502,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
jo.put("action", Math.min(3, blankManipulatorDeviceDriver.getAction()));
|
||||
jo.put("task", Math.min(3, blankManipulatorDeviceDriver.getTask()));
|
||||
jo.put("error", blankManipulatorDeviceDriver.getError());
|
||||
} else if (device.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver){
|
||||
} else if (device.getDeviceDriver() instanceof OvenGantryManipulatorDeviceDriver) {
|
||||
ovenGantryManipulatorDeviceDriver = (OvenGantryManipulatorDeviceDriver) device.getDeviceDriver();
|
||||
jo.put("device_code", ovenGantryManipulatorDeviceDriver.getDevice().getDevice_code());
|
||||
jo.put("device_name", ovenGantryManipulatorDeviceDriver.getDevice().getDevice_name());
|
||||
@@ -576,40 +544,40 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
} else if (device.getDeviceDriver() instanceof PaperTubeConveyor2DeviceDriver) {
|
||||
paperTubeConveyor2DeviceDriver = (PaperTubeConveyor2DeviceDriver) device.getDeviceDriver();
|
||||
jo.put("device_code", parent_device_code);
|
||||
jo.put("heartbeat",paperTubeConveyor2DeviceDriver.getHeartbeat());
|
||||
jo.put("mode",paperTubeConveyor2DeviceDriver.getMode());
|
||||
jo.put("move",paperTubeConveyor2DeviceDriver.getMove());
|
||||
jo.put("carrier_direction",paperTubeConveyor2DeviceDriver.getCarrier_direction());
|
||||
jo.put("error",paperTubeConveyor2DeviceDriver.getError());
|
||||
jo.put("task",paperTubeConveyor2DeviceDriver.getTask());
|
||||
jo.put("out_seq_arr",paperTubeConveyor2DeviceDriver.getItem_out_seq_arr());
|
||||
jo.put("out_qty_arr",paperTubeConveyor2DeviceDriver.getItem_out_qty_arr());
|
||||
jo.put("material1",paperTubeConveyor2DeviceDriver.getItem_material1());
|
||||
jo.put("qty1",paperTubeConveyor2DeviceDriver.getItem_qty1());
|
||||
jo.put("material2",paperTubeConveyor2DeviceDriver.getItem_material2());
|
||||
jo.put("qty2",paperTubeConveyor2DeviceDriver.getItem_qty2());
|
||||
jo.put("material3",paperTubeConveyor2DeviceDriver.getItem_material3());
|
||||
jo.put("qty3",paperTubeConveyor2DeviceDriver.getItem_qty3());
|
||||
jo.put("material4",paperTubeConveyor2DeviceDriver.getItem_material4());
|
||||
jo.put("qty4",paperTubeConveyor2DeviceDriver.getItem_qty4());
|
||||
jo.put("material5",paperTubeConveyor2DeviceDriver.getItem_material5());
|
||||
jo.put("qty5",paperTubeConveyor2DeviceDriver.getItem_qty5());
|
||||
jo.put("material6",paperTubeConveyor2DeviceDriver.getItem_material6());
|
||||
jo.put("qty6",paperTubeConveyor2DeviceDriver.getItem_qty6());
|
||||
jo.put("material7",paperTubeConveyor2DeviceDriver.getItem_material7());
|
||||
jo.put("qty7",paperTubeConveyor2DeviceDriver.getItem_qty7());
|
||||
jo.put("material8",paperTubeConveyor2DeviceDriver.getItem_material8());
|
||||
jo.put("qty8",paperTubeConveyor2DeviceDriver.getItem_qty8());
|
||||
jo.put("material9",paperTubeConveyor2DeviceDriver.getItem_material9());
|
||||
jo.put("qty9",paperTubeConveyor2DeviceDriver.getItem_qty9());
|
||||
jo.put("material10",paperTubeConveyor2DeviceDriver.getItem_material10());
|
||||
jo.put("qty10",paperTubeConveyor2DeviceDriver.getItem_qty10());
|
||||
jo.put("material11",paperTubeConveyor2DeviceDriver.getItem_material11());
|
||||
jo.put("qty11",paperTubeConveyor2DeviceDriver.getItem_qty11());
|
||||
jo.put("material12",paperTubeConveyor2DeviceDriver.getItem_material12());
|
||||
jo.put("qty12",paperTubeConveyor2DeviceDriver.getItem_qty12());
|
||||
jo.put("heartbeat", paperTubeConveyor2DeviceDriver.getHeartbeat());
|
||||
jo.put("mode", paperTubeConveyor2DeviceDriver.getMode());
|
||||
jo.put("move", paperTubeConveyor2DeviceDriver.getMove());
|
||||
jo.put("carrier_direction", paperTubeConveyor2DeviceDriver.getCarrier_direction());
|
||||
jo.put("error", paperTubeConveyor2DeviceDriver.getError());
|
||||
jo.put("task", paperTubeConveyor2DeviceDriver.getTask());
|
||||
jo.put("out_seq_arr", paperTubeConveyor2DeviceDriver.getItem_out_seq_arr());
|
||||
jo.put("out_qty_arr", paperTubeConveyor2DeviceDriver.getItem_out_qty_arr());
|
||||
jo.put("material1", paperTubeConveyor2DeviceDriver.getItem_material1());
|
||||
jo.put("qty1", paperTubeConveyor2DeviceDriver.getItem_qty1());
|
||||
jo.put("material2", paperTubeConveyor2DeviceDriver.getItem_material2());
|
||||
jo.put("qty2", paperTubeConveyor2DeviceDriver.getItem_qty2());
|
||||
jo.put("material3", paperTubeConveyor2DeviceDriver.getItem_material3());
|
||||
jo.put("qty3", paperTubeConveyor2DeviceDriver.getItem_qty3());
|
||||
jo.put("material4", paperTubeConveyor2DeviceDriver.getItem_material4());
|
||||
jo.put("qty4", paperTubeConveyor2DeviceDriver.getItem_qty4());
|
||||
jo.put("material5", paperTubeConveyor2DeviceDriver.getItem_material5());
|
||||
jo.put("qty5", paperTubeConveyor2DeviceDriver.getItem_qty5());
|
||||
jo.put("material6", paperTubeConveyor2DeviceDriver.getItem_material6());
|
||||
jo.put("qty6", paperTubeConveyor2DeviceDriver.getItem_qty6());
|
||||
jo.put("material7", paperTubeConveyor2DeviceDriver.getItem_material7());
|
||||
jo.put("qty7", paperTubeConveyor2DeviceDriver.getItem_qty7());
|
||||
jo.put("material8", paperTubeConveyor2DeviceDriver.getItem_material8());
|
||||
jo.put("qty8", paperTubeConveyor2DeviceDriver.getItem_qty8());
|
||||
jo.put("material9", paperTubeConveyor2DeviceDriver.getItem_material9());
|
||||
jo.put("qty9", paperTubeConveyor2DeviceDriver.getItem_qty9());
|
||||
jo.put("material10", paperTubeConveyor2DeviceDriver.getItem_material10());
|
||||
jo.put("qty10", paperTubeConveyor2DeviceDriver.getItem_qty10());
|
||||
jo.put("material11", paperTubeConveyor2DeviceDriver.getItem_material11());
|
||||
jo.put("qty11", paperTubeConveyor2DeviceDriver.getItem_qty11());
|
||||
jo.put("material12", paperTubeConveyor2DeviceDriver.getItem_material12());
|
||||
jo.put("qty12", paperTubeConveyor2DeviceDriver.getItem_qty12());
|
||||
|
||||
}else if (device.getDeviceDriver() instanceof WasteFoilWeighingStationDriver) {
|
||||
} else if (device.getDeviceDriver() instanceof WasteFoilWeighingStationDriver) {
|
||||
wasteFoilWeighingStationDriver = (WasteFoilWeighingStationDriver) device.getDeviceDriver();
|
||||
jo.put("device_code", parent_device_code);
|
||||
jo.put("move", wasteFoilWeighingStationDriver.getMove());
|
||||
@@ -618,8 +586,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
jo.put("weight", wasteFoilWeighingStationDriver.getWeight());
|
||||
jo.put("old_weight", wasteFoilWeighingStationDriver.getOld_weight());
|
||||
jo.put("error", wasteFoilWeighingStationDriver.getError());
|
||||
}
|
||||
else if (device.getDeviceDriver() instanceof SubvolumeWeighingStationDriver) {
|
||||
} else if (device.getDeviceDriver() instanceof SubvolumeWeighingStationDriver) {
|
||||
subvolumeWeighingStationDriver = (SubvolumeWeighingStationDriver) device.getDeviceDriver();
|
||||
jo.put("device_code", parent_device_code);
|
||||
jo.put("move", subvolumeWeighingStationDriver.getMove());
|
||||
@@ -627,8 +594,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
jo.put("action", subvolumeWeighingStationDriver.getAction());
|
||||
jo.put("weight", subvolumeWeighingStationDriver.getWeight());
|
||||
jo.put("error", subvolumeWeighingStationDriver.getError());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
jo.put("device_code", parent_device_code);
|
||||
}
|
||||
backja.add(jo);
|
||||
|
||||
@@ -1340,7 +1340,8 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
|
||||
if (StrUtil.contains(next_point_code, commonFinalParam.getBARRE()) && StrUtil.count(next_point_code, commonFinalParam.getBARRE()) == 2) {
|
||||
String[] next_point = next_point_code.split(commonFinalParam.getBARRE());
|
||||
inst.setTo_x(next_point[0]);
|
||||
Device nextDevice = deviceAppService.findDeviceByCode(next_point[0]);
|
||||
inst.setTo_x(nextDevice.getExtraValue().get("x").toString());
|
||||
inst.setNext_device_code(next_point[0]);
|
||||
inst.setTo_y(next_point[1]);
|
||||
inst.setTo_z(next_point[2]);
|
||||
@@ -1354,7 +1355,8 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
.name();
|
||||
if (StrUtil.equals("storage", next_device)) {
|
||||
String[] next_point = start_point_code.split("-");
|
||||
inst.setTo_x(next_point[0]);
|
||||
Device nextDevice = deviceAppService.findDeviceByCode(next_point[0]);
|
||||
inst.setTo_x(nextDevice.getExtraValue().get("x").toString());
|
||||
inst.setNext_device_code(next_point[0]);
|
||||
inst.setTo_y(next_point[1]);
|
||||
inst.setTo_z(next_point[2]);
|
||||
|
||||
@@ -336,7 +336,7 @@ public class RouteLineServiceImpl extends CommonServiceImpl<RouteLineMapper, Rou
|
||||
// wo.insert(json);
|
||||
routeLineMapper.insert(entity);
|
||||
} else {
|
||||
throw new BadRequestException("已存在该路由路线!");
|
||||
throw new BadRequestException(LangProcess.msg("error_creat_route"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1155,7 +1155,8 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
if (StrUtil.contains(next_point_code, commonFinalParam.getBARRE()) && StrUtil.count(next_point_code, commonFinalParam.getBARRE()) == 2) {
|
||||
String[] next_point = next_point_code.split(commonFinalParam.getBARRE());
|
||||
task.setNext_device_code(next_point[0]);
|
||||
task.setTo_x(next_point[0]);
|
||||
Device nextDevice = deviceAppService.findDeviceByCode(next_point[0]);
|
||||
task.setTo_x(nextDevice.getExtraValue().get("x").toString());
|
||||
if (Integer.parseInt(next_point[1]) < 10 && next_point[1].length() == 1) {
|
||||
to_y = "0" + next_point[1];
|
||||
task.setTo_y(to_y);
|
||||
|
||||
Reference in New Issue
Block a user