fix: 仙宫更新
This commit is contained in:
@@ -16,6 +16,7 @@ import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.instruction.domain.Instruction;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.acs.task.enums.AgvSystemTypeEnum;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
@@ -74,6 +75,13 @@ public class AgvWaitUtil {
|
||||
log.info("仙工AGV取货完成后请求离开,设备号 - {}", startDeviceCode);
|
||||
inst.setExecute_status("2");
|
||||
instructionService.update(inst);
|
||||
//如果是叉车,取货完成给输送线完成信号
|
||||
Device startDevice = deviceAppService.findDeviceByCode(startDeviceCode);
|
||||
if (inst.getAgv_system_type().equals(AgvSystemTypeEnum.XG_System_Type.getIndex())){
|
||||
BoxSubvolumesConveyorDeviceDriver boxSubvolumesConveyorDeviceDriver;
|
||||
boxSubvolumesConveyorDeviceDriver = (BoxSubvolumesConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||
boxSubvolumesConveyorDeviceDriver.writing(3);
|
||||
}
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("status", 200);
|
||||
map.put("message", "允许离开!");
|
||||
|
||||
@@ -696,7 +696,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
throw new BadRequestException("请求失败,地址为空!");
|
||||
}
|
||||
if (address.contains("IN")) {
|
||||
String instructionCode = instructionDto.getInstruction_code();
|
||||
String task_code = instructionDto.getTask_code();
|
||||
String deviceCodeNow = address.substring(0, address.length() - 5);
|
||||
if (ObjectUtil.isEmpty(deviceAppService.findDeviceByCode(deviceCodeNow))) {
|
||||
throw new BadRequestException("设备号 " + deviceCodeNow + " 不存在!");
|
||||
@@ -706,10 +706,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
//如果是取货二次分配,取放货二次分配需要重新追加动作块
|
||||
if (AgvActionTypeEnum.IN_STOCK.getCode().equals(instructionDto.getAgv_action_type()) || AgvActionTypeEnum.IN_OUT_STOCK.getCode().equals(instructionDto.getAgv_action_type())) {
|
||||
Integer actionType = ActionTypeEnum.IN_STOCK.getCode();
|
||||
deviceCodeNow = applyXGAgvTask(instructionCode, actionType, instructionDto);
|
||||
deviceCodeNow = applyXGAgvTask(task_code, actionType, instructionDto);
|
||||
}
|
||||
} else if (instructionDto.getAgv_system_type().equals(AgvSystemTypeEnum.XG_System_Type.getIndex())) {
|
||||
|
||||
}
|
||||
return agvWaitUtil.waitInGet(deviceCodeNow, instructionDto);
|
||||
} else if (address.contains("PUT")) {
|
||||
@@ -717,11 +715,11 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
//如果是放货二次分配,取放货二次分配需要重新追加动作块
|
||||
if (AgvActionTypeEnum.OUT_STOCK.getCode().equals(instructionDto.getAgv_action_type()) || AgvActionTypeEnum.IN_OUT_STOCK.getCode().equals(instructionDto.getAgv_action_type())) {
|
||||
Integer actionType = ActionTypeEnum.OUT_STOCK.getCode();
|
||||
deviceCodeNow = applyXGAgvTask(instructionCode, actionType, instructionDto);
|
||||
deviceCodeNow = applyXGAgvTask(task_code, actionType, instructionDto);
|
||||
}
|
||||
} else if (instructionDto.getAgv_system_type().equals(AgvSystemTypeEnum.XG_System_Type.getIndex())) {
|
||||
Integer actionType = ActionTypeEnum.OUT_STOCK.getCode();
|
||||
deviceCodeNow = applyCCAgvTask(instructionCode, actionType, instructionDto);
|
||||
|
||||
deviceCodeNow = applyCCAgvTask(task_code, instructionDto);
|
||||
}
|
||||
return agvWaitUtil.waitInPut(deviceCodeNow, instructionDto);
|
||||
}
|
||||
@@ -742,18 +740,17 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
throw new BadRequestException("请求失败,IN OUT 站点错误!");
|
||||
}
|
||||
|
||||
private String applyCCAgvTask(String instructionCode, Integer actionType, Instruction instructionDto) {
|
||||
private String applyCCAgvTask(String task_code, Instruction instructionDto) {
|
||||
try {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("taskCode", instructionCode);
|
||||
param.put("actionType", actionType.toString());
|
||||
param.put("task_code", task_code);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code("追加动叉车作块:")
|
||||
.content("追加动叉车作块,参数:" + instructionCode + "--" + actionType)
|
||||
.content("追加动叉车作块,参数:" + task_code )
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
String response = acsToWmsService.secondaryAllocationPoint(param);
|
||||
String response = acsToWmsService.applySendOutTwo(param);
|
||||
JSONObject jo = JSON.parseObject(response);
|
||||
if (jo.getInteger("status") == 200) {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
@@ -763,7 +760,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
logDto2.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
//请求成功调用叉车追加动作块
|
||||
sendAddSequencesToCCAgv(instructionCode, jo.getString("data"), instructionDto);
|
||||
sendAddSequencesToCCAgv(task_code, jo.getString("data"), instructionDto);
|
||||
return jo.getString("data");
|
||||
|
||||
} else {
|
||||
@@ -856,14 +853,14 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
}
|
||||
}
|
||||
|
||||
private String applyXGAgvTask(String instructionCode, Integer actionType, Instruction instructionDto) {
|
||||
private String applyXGAgvTask(String task_code, Integer actionType, Instruction instructionDto) {
|
||||
try {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("taskCode", instructionCode);
|
||||
param.put("taskCode", task_code);
|
||||
param.put("actionType", actionType.toString());
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code("追加动诺宝作块:")
|
||||
.content("追加动诺宝作块,参数:" + instructionCode + "--" + actionType)
|
||||
.content("追加动诺宝作块,参数:" + task_code + "--" + actionType)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
@@ -878,7 +875,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
if (!ActionTypeEnum.IN_FINISHING.getCode().equals(actionType)) {
|
||||
//请求成功调用诺宝追加动作块
|
||||
sendAddSequencesToNBAgv(instructionCode, jo.getString("data"), instructionDto);
|
||||
sendAddSequencesToNBAgv(task_code, jo.getString("data"), instructionDto);
|
||||
}
|
||||
return jo.getString("data");
|
||||
|
||||
@@ -1346,16 +1343,16 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
|
||||
JSONObject jo9 = new JSONObject();
|
||||
jo9.put("blockId", IdUtil.simpleUUID());
|
||||
jo9.put("location", pointCode + "INPUT");
|
||||
jo9.put("location", inst.getNext_device_code() + "INPUT");
|
||||
jo9.put("operation", "script");
|
||||
jo9.put("id", pointCode + "INPUT");
|
||||
jo9.put("id", inst.getNext_device_code() + "INPUT");
|
||||
jo9.put("script_name", "userpy/interact.py");
|
||||
JSONObject script_args5 = new JSONObject();
|
||||
script_args5.put("addr", addr);
|
||||
JSONObject data3 = new JSONObject();
|
||||
JSONObject reach3 = new JSONObject();
|
||||
reach3.put("task_code", inst.getInstruction_code());
|
||||
reach3.put("address", pointCode + "INPUT");
|
||||
reach3.put("address", inst.getNext_device_code() + "INPUT");
|
||||
data3.put("reach", reach3);
|
||||
script_args5.put("data", data3);
|
||||
script_args5.put("protocol", "HTTP");
|
||||
|
||||
@@ -327,8 +327,12 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
JSONObject apply = new JSONObject();
|
||||
apply.put("device_code", device_code);
|
||||
apply.put("vehicle_code", hand_barcode);
|
||||
|
||||
String str = acsToWmsService.applyTaskToWms(apply);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请AGV任务,请求参数:" + apply)
|
||||
.build();
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
String str = acsToWmsService.applySendOutTwo(apply);
|
||||
JSONObject jo = JSON.parseObject(str);
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
@@ -344,12 +348,12 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
map.put("value", 19);
|
||||
list1.add(map);
|
||||
this.writing(list1);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("申请AGV任务,返回参数:" + jo.getString("body"))
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
requireSucess = true;
|
||||
}
|
||||
return;
|
||||
@@ -401,10 +405,12 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
}
|
||||
|
||||
public void writing(int command) {
|
||||
String to_command = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
+ "." + org.nl.acs.device_driver.two_conveyor.hongxiang_conveyor.ItemProtocol.item_to_command;
|
||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||
itemMap.put(to_command, command);
|
||||
this.control(itemMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getDeviceStatusName() {
|
||||
JSONObject jo = new JSONObject();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.acs.device_driver.one_conveyor.fold_disc_site;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
@@ -204,7 +205,6 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
|
||||
} catch (Exception var17) {
|
||||
var17.printStackTrace();
|
||||
feedMessage = var17.getMessage();
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "读取信号值时出现异常:" + var17.getMessage() + ",this.itemProtocol is null:" + ObjectUtil.isEmpty(this.itemProtocol));
|
||||
|
||||
}
|
||||
@@ -385,6 +385,8 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
String route_plan_code = taskdto.getRoute_plan_code();
|
||||
String next_device_code = "";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 开始平均分配
|
||||
*/
|
||||
@@ -414,6 +416,13 @@ public class FoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
if (ObjectUtils.isEmpty(shortPathsList)) {
|
||||
throw new RuntimeException("路由不通!");
|
||||
}
|
||||
//判断有没有DDJ对接位出入库的指令
|
||||
List<Instruction> byCodeAndExcute = instructionService.findByCodeAndExcute(next_device_code);
|
||||
if (CollUtil.isNotEmpty(byCodeAndExcute)){
|
||||
this.message="有DDJ对接位出入库的指令";
|
||||
requireSucess = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Device startdevice = deviceAppservice.findDeviceByCode(start_device_code);
|
||||
Device nextdevice = deviceAppservice.findDeviceByCode(next_device_code);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.acs.device_driver.one_conveyor.scanner_weight_conveyor;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
@@ -25,6 +26,7 @@ import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.device_driver.led.led_screen.LedScreenDeviceDriver;
|
||||
import org.nl.acs.device_driver.one_manipulator.box_package_manipulator.InteractionJsonDTO;
|
||||
import org.nl.acs.device_driver.stacker.standard_stacker.StandardStackerDeviceDriver;
|
||||
import org.nl.acs.enums.StorageTypeEnum;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.history.ErrorUtil;
|
||||
@@ -780,6 +782,13 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
||||
String next_device_code = pathlist.get(start + 1);
|
||||
|
||||
//判断有无出入库任务是相同路线
|
||||
//判断有没有DDJ对接位出入库的指令
|
||||
List<Instruction> byCodeAndExcute = instructionService.findByCodeAndExcute(next_device_code);
|
||||
if (CollUtil.isNotEmpty(byCodeAndExcute)){
|
||||
this.message="有DDJ对接位出入库的指令";
|
||||
requireSucess = false;
|
||||
return true;
|
||||
}
|
||||
TaskDto dto = taskserver.findByCodeAndExcute(taskdto.getNext_device_code(), taskdto.getStart_device_code());
|
||||
if (ObjectUtil.isNotEmpty(dto)) {
|
||||
requireSucess = false;
|
||||
|
||||
@@ -292,6 +292,9 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
* 入库异常错误限制
|
||||
*/
|
||||
Integer count = 0;
|
||||
Boolean isonline = true;
|
||||
|
||||
Boolean iserror = false;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -363,11 +366,18 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
count = 0;
|
||||
}
|
||||
|
||||
|
||||
if (mode == 0) {
|
||||
this.setIsonline(false);
|
||||
message = "universal_off";
|
||||
} else if (error != 0) {
|
||||
this.setIserror(true);
|
||||
message = "universal_message3";
|
||||
}
|
||||
if (mode != 3 || requireSucess) {
|
||||
message = "one_message7";
|
||||
} else {
|
||||
if (error != 0) {
|
||||
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_update_time.getTime() < (long) this.instruction_update_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_update_time_out);
|
||||
@@ -385,10 +395,22 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("取货中")
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
message = "universal_delivery";
|
||||
if (updateCommand("1")) break;
|
||||
break;
|
||||
case 2:
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("取货完成")
|
||||
.build();
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
message = "universal_completed";
|
||||
if (updateCommand("2")) break;
|
||||
Instruction instruction2 = checkInst();
|
||||
@@ -432,6 +454,12 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
requireSucess = false;
|
||||
break;
|
||||
case 3:
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("放货")
|
||||
.build();
|
||||
logDto2.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
message = "universal_releasing";
|
||||
if (updateCommand("3")) break;
|
||||
break;
|
||||
@@ -459,6 +487,12 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
requireSucess = false;
|
||||
break;
|
||||
case 5:
|
||||
LuceneLogDto logDto3 = LuceneLogDto.builder()
|
||||
.device_code(device_code)
|
||||
.content("放货完成")
|
||||
.build();
|
||||
logDto3.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto3);
|
||||
message = "universal_releasing_completed";
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
List list5 = new ArrayList();
|
||||
@@ -834,7 +868,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
return true;
|
||||
}
|
||||
}else {
|
||||
message = "不是取货中或者取货完成报警";
|
||||
message = "one_message19";
|
||||
}
|
||||
}
|
||||
//放货中报警
|
||||
@@ -846,7 +880,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
return true;
|
||||
}
|
||||
}else {
|
||||
message = "不是放货中报警";
|
||||
message = "one_message20";
|
||||
}
|
||||
}
|
||||
//出库报警
|
||||
@@ -860,7 +894,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
return true;
|
||||
}
|
||||
}else {
|
||||
message = "不是取货中或者取货完成报警";
|
||||
message = "one_message19";
|
||||
}
|
||||
//放货中报警
|
||||
if ("3".equals(instructionErro.getExecute_code()) && forkCargo == 2) {
|
||||
@@ -873,7 +907,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
return true;
|
||||
}
|
||||
}else {
|
||||
message = "不是放货中报警";
|
||||
message = "one_message20";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1187,6 +1221,8 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme
|
||||
jo.put("stopReceiveTask", this.stopReceiveTask);
|
||||
jo.put("requireSucess", requireSucess);
|
||||
jo.put("driver_type", "standard_stacker");
|
||||
jo.put("isOnline", this.getIsonline());
|
||||
jo.put("isError", this.getIserror());
|
||||
jo.put("notCreateInstMessage", notCreateInstMessage);
|
||||
return jo;
|
||||
}
|
||||
|
||||
@@ -205,4 +205,9 @@ public class CreateTaskRequest extends BaseRequest {
|
||||
* 是否拔轴 0/1
|
||||
*/
|
||||
private String is_pulling;
|
||||
|
||||
/**
|
||||
* agv二次分配类型(1、普通任务 2、取货二次分配 3、防货二次分配 4、取放货二次分配)
|
||||
*/
|
||||
private Integer agv_action_type;
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
public String applySendOutTwo(JSONObject param) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("applyTaskToWms-----输入参数{}", param);
|
||||
log.info("applySendOutTwo-----输入参数{}", param);
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("applySendOutTwo");
|
||||
String url = wmsurl + addressDto.getMethods_url();
|
||||
@@ -210,11 +210,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("applyTaskToWms-----输出参数{}", msg);
|
||||
log.info("applySendOutTwo-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
log.info("applyTaskToWms-----输出参数{}", "返回结果为空");
|
||||
log.info("applySendOutTwo-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
String type = "";
|
||||
@@ -223,8 +223,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
} else {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applyTaskToWms-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyTaskToWms", String.valueOf(result2.getStatus()),
|
||||
log.info("applySendOutTwo-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applySendOutTwo", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请任务");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
@@ -238,7 +238,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
public String deviceApplyTwo(JSONObject param) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("applyTaskToWms-----输入参数{}", param);
|
||||
log.info("deviceApplyTwo-----输入参数{}", param);
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("deviceApplyTwo");
|
||||
String url = wmsurl + addressDto.getMethods_url();
|
||||
@@ -250,11 +250,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("applyTaskToWms-----输出参数{}", msg);
|
||||
log.info("deviceApplyTwo-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
log.info("applyTaskToWms-----输出参数{}", "返回结果为空");
|
||||
log.info("deviceApplyTwo-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
String type = "";
|
||||
@@ -263,8 +263,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
} else {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applyTaskToWms-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyTaskToWms", String.valueOf(result2.getStatus()),
|
||||
log.info("deviceApplyTwo-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"deviceApplyTwo", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请捆扎、贴标");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
@@ -278,7 +278,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
public String applyTowToOne(JSONObject param) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("applyTaskToWms-----输入参数{}", param);
|
||||
log.info("sendProductToFirstFloor-----输入参数{}", param);
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("sendProductToFirstFloor");
|
||||
String url = wmsurl + addressDto.getMethods_url();
|
||||
@@ -290,11 +290,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("applyTaskToWms-----输出参数{}", msg);
|
||||
log.info("sendProductToFirstFloor-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
log.info("applyTaskToWms-----输出参数{}", "返回结果为空");
|
||||
log.info("sendProductToFirstFloor-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
String type = "";
|
||||
@@ -303,8 +303,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
} else {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applyTaskToWms-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyTaskToWms", String.valueOf(result2.getStatus()),
|
||||
log.info("sendProductToFirstFloor-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"sendProductToFirstFloor", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请捆扎、贴标");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
@@ -613,11 +613,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("applyTaskToWms-----输出参数{}", msg);
|
||||
log.info("getBoxInfo-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
log.info("applyTaskToWms-----输出参数{}", "返回结果为空");
|
||||
log.info("getBoxInfo-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
String type = "";
|
||||
@@ -626,8 +626,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
} else {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applyTaskToWms-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyTaskToWms", String.valueOf(result2.getStatus()),
|
||||
log.info("getBoxInfo-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"getBoxInfo", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请捆扎、贴标");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
@@ -653,11 +653,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("applyTaskToWms-----输出参数{}", msg);
|
||||
log.info("secondaryAllocationPoint-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if(ObjectUtil.isEmpty(result2)){
|
||||
log.info("applyTaskToWms-----输出参数{}", "返回结果为空");
|
||||
log.info("secondaryAllocationPoint-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
String type = "";
|
||||
@@ -666,8 +666,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
} else {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applyTaskToWms-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyTaskToWms", String.valueOf(result2.getStatus()),
|
||||
log.info("secondaryAllocationPoint-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"secondaryAllocationPoint", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "二期发货申请捆扎、贴标");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
@@ -766,7 +766,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
public String applyUpdatePointCode(JSONObject param) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("applyTaskToWms-----输入参数{}", param);
|
||||
log.info("deviceApplyExceptional-----输入参数{}", param);
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("deviceApplyExceptional");
|
||||
String url = wmsurl + addressDto.getMethods_url();
|
||||
@@ -778,11 +778,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
String msg = e.getMessage();
|
||||
log.info("applyTaskToWms-----输出参数{}", msg);
|
||||
log.info("deviceApplyExceptional-----输出参数{}", msg);
|
||||
//网络不通
|
||||
}
|
||||
if (ObjectUtil.isEmpty(result2)) {
|
||||
log.info("applyTaskToWms-----输出参数{}", "返回结果为空");
|
||||
log.info("deviceApplyExceptional-----输出参数{}", "返回结果为空");
|
||||
return null;
|
||||
}
|
||||
String type = "";
|
||||
@@ -791,8 +791,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
} else {
|
||||
type = "error";
|
||||
}
|
||||
log.info("applyTaskToWms-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"applyTaskToWms", String.valueOf(result2.getStatus()),
|
||||
log.info("deviceApplyExceptional-----输出参数{}", result2.body());
|
||||
LuceneLogDto luceneLogDto = new LuceneLogDto(4,"deviceApplyExceptional", String.valueOf(result2.getStatus()),
|
||||
JSON.toJSONString(param), String.valueOf(result2.body()), "申请更新点位");
|
||||
luceneLogService.interfaceExecuteLog(luceneLogDto);
|
||||
return result2.body();
|
||||
|
||||
@@ -124,6 +124,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
String route_plan_code = request.getRoute_plan_code();
|
||||
String task_type = request.getTask_type();
|
||||
String truss_type = request.getTruss_type();
|
||||
Integer agv_action_type = request.getAgv_action_type();
|
||||
String empty_site = request.getEmpty_site();
|
||||
String is_bushing = request.getIs_bushing();
|
||||
String is_pulling = request.getIs_pulling();
|
||||
@@ -333,6 +334,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
jo.put("start_device_code2", start_device_code2);
|
||||
jo.put("next_device_code2", next_device_code2);
|
||||
jo.put("put_device_code", put_device_code);
|
||||
jo.put("agv_action_type", agv_action_type);
|
||||
jo.put("priority", priority);
|
||||
jo.put("vehicle_code", vehicle_code);
|
||||
jo.put("vehicle_type", vehicle_type);
|
||||
|
||||
@@ -411,22 +411,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
if (StrUtil.isEmpty(dto.getLink_num())) {
|
||||
dto.setIs_send(task.getLink_num());
|
||||
}
|
||||
// if (task.getTask_type().equals(CommonFinalParam.ONE) || task.getTask_type().equals("2")) {
|
||||
dto.setInstruction_type(task.getTask_type());
|
||||
// } else if (false) {
|
||||
//
|
||||
// } else {
|
||||
// dto.setInstruction_type("3");
|
||||
// }
|
||||
|
||||
// 查询是否存在相同指令号
|
||||
// if (!StrUtil.isEmpty(dto.getVehicle_code() )) {
|
||||
// Instruction inst_dto = findByContainer(dto.getVehicle_code());
|
||||
// if (inst_dto != null) {
|
||||
// log.error("存在相同载具号任务,载具号"+dto.getVehicle_code());
|
||||
// throw new BadRequestException("存在相同载具号任务!");
|
||||
// }
|
||||
// }
|
||||
// 起点设备与终点设备相同则为初始指令
|
||||
if (StrUtil.equals(task.getStart_device_code(), dto.getStart_device_code())) {
|
||||
if (!StrUtil.equals(dto.getCompound_inst(), "0")
|
||||
@@ -504,16 +489,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
//判断是否是仙工AGV
|
||||
if (shortPathsList.size() > 0 && StrUtil.equals(shortPathsList.get(0).getType(), CommonFinalParam.ONE)) {
|
||||
Device deviceByCode = deviceAppService.findDeviceByCode(dto.getStart_device_code());
|
||||
// if (StrUtil.equals(task.getRequest_again_success(), "1")) {
|
||||
// //追加订单
|
||||
// HttpResponse result = xiangGongAgvService.addOrderSequences(dto);
|
||||
// if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) {
|
||||
// dto.setSend_status("2");
|
||||
// } else {
|
||||
// dto.setSend_status("1");
|
||||
// }
|
||||
//
|
||||
// } else
|
||||
|
||||
if (dto.getAgv_system_type().equals(AgvSystemTypeEnum.XG_System_Type.getIndex())) {
|
||||
String interactionJson = task.getInteraction_json();
|
||||
if (StrUtil.isEmpty(interactionJson)){
|
||||
|
||||
@@ -568,6 +568,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
dto.setStart_device_code2(dto.getStart_point_code2());
|
||||
dto.setNext_device_code2(dto.getNext_point_code2());
|
||||
|
||||
|
||||
if (StrUtil.isEmpty(dto.getPriority())) {
|
||||
dto.setPriority(CommonFinalParam.ONE);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ one_message15=\u7533\u8BF7AGV\u642C\u8FD0\u4EFB\u52A1\u63A5\u53E3\u4E0D\u901A
|
||||
one_message16=\u7533\u8BF7AGV\u642C\u8FD0\u4EFB\u52A1\u6210\u529F
|
||||
one_message17=\u7533\u8BF7AGV\u642C\u8FD0\u4EFB\u52A1\u5931\u8D25
|
||||
one_message18=\u672A\u627E\u5230\u66F4\u65B0\u7684\u70B9\u4F4D
|
||||
one_message19=\u4E0A\u4E00\u6761\u52A8\u4F5C\u4E0D\u662F\u53D6\u8D27\u4E2D\u6216\u8005\u53D6\u8D27\u5B8C\u6210\u62A5\u8B66
|
||||
one_message20=\u4E0A\u4E00\u6761\u52A8\u4F5C\u4E0D\u662F\u653E\u8D27\u4E2D\u62A5\u8B66
|
||||
one_mode1=\u7533\u8BF7\u5165\u5E93\u4EFB\u52A1
|
||||
one_mode2=\u7533\u8BF7\u7A7A\u6258\u76D8\u5165\u5E93
|
||||
one_mode3=\u7533\u8BF7AGV\u4EFB\u52A1
|
||||
|
||||
@@ -15,7 +15,8 @@ one_message15=The interface for applying for a complement to the AGV carrying ta
|
||||
one_message16=Succeeded in applying for the AGV transfer task. Procedure
|
||||
one_message17=Failed to apply for the AGV transfer task. Procedure
|
||||
one_message18=No updated point found
|
||||
|
||||
one_message19=The previous action is not in the process of picking up or picking up the finished alarm
|
||||
one_message20=The last action was not an alarm during delivery
|
||||
one_mode1=Request a warehouse entry task
|
||||
one_mode2=Request empty pallets for storage
|
||||
one_mode3=Request AGV
|
||||
|
||||
@@ -15,7 +15,8 @@ one_message15=Permintaan kode tambahan AGV memindahkan antarmuka misi tidak ters
|
||||
one_message16=Minta ijin ke operasi AGV
|
||||
one_message17=Aplikasi bantuan AGV pemindahan gagal
|
||||
one_message18=Titik pembaruan tidak ditemukan
|
||||
|
||||
one_message19=Langkah terakhir bukan untuk mengambil barang atau menggunakannya untuk menyelesaikan alarm
|
||||
one_message20=Gerakan terakhir adalah tidak menempatkan alarm di kargo
|
||||
one_mode1=Berlaku untuk tugas pustaka
|
||||
one_mode2=Pendaftaran nampan kosong
|
||||
one_mode3=Permintaan AGV
|
||||
|
||||
@@ -15,7 +15,8 @@ one_message15=\u7533\u8BF7\u8865\u7801AGV\u642C\u8FD0\u4EFB\u52A1\u63A5\u53E3\u4
|
||||
one_message16=\u7533\u8BF7\u8865\u7801AGV\u642C\u8FD0\u4EFB\u52A1\u6210\u529F
|
||||
one_message17=\u7533\u8BF7\u8865\u7801AGV\u642C\u8FD0\u4EFB\u52A1\u5931\u8D25
|
||||
one_message18=\u672A\u627E\u5230\u66F4\u65B0\u7684\u70B9\u4F4D
|
||||
|
||||
one_message19=\u4E0A\u4E00\u6761\u52A8\u4F5C\u4E0D\u662F\u53D6\u8D27\u4E2D\u6216\u8005\u53D6\u8D27\u5B8C\u6210\u62A5\u8B66
|
||||
one_message20=\u4E0A\u4E00\u6761\u52A8\u4F5C\u4E0D\u662F\u653E\u8D27\u4E2D\u62A5\u8B66
|
||||
one_mode1=\u7533\u8BF7\u5165\u5E93\u4EFB\u52A1
|
||||
one_mode2=\u7533\u8BF7\u7A7A\u6258\u76D8\u5165\u5E93
|
||||
one_mode3=\u7533\u8BF7AGV\u4EFB\u52A1
|
||||
|
||||
Reference in New Issue
Block a user