fix: 日志更新
This commit is contained in:
@@ -49,36 +49,38 @@ public class AgvWaitUtil {
|
||||
ManipulatorAgvStationDeviceDriver manipulatorAgvStationDeviceDriver;
|
||||
BoxSubvolumesConveyorDeviceDriver boxSubvolumesConveyorDeviceDriver;
|
||||
//agv诺宝对接位安全信号交互
|
||||
if(startDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver){
|
||||
if (startDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) startDevice.getDeviceDriver();
|
||||
manipulatorAgvStationDeviceDriver.writing(2);
|
||||
if(manipulatorAgvStationDeviceDriver.getAction() == 1){
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(inst.getCarno())
|
||||
.content("诺宝agv允许取货"+"点位"+startDeviceCode)
|
||||
.build();
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("status", 200);
|
||||
map.put("message", "允许取货!");
|
||||
log.info("允许仙工AGV取货,设备号 - {}", startDeviceCode);
|
||||
return map;
|
||||
}else {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(inst.getCarno())
|
||||
.content("agv诺宝对接位行架不允许取货:" + inst.getCarno()+ "点位号"+ manipulatorAgvStationDeviceDriver.getDevice_code())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
throw new BadRequestException("行架不允许取货");
|
||||
if (manipulatorAgvStationDeviceDriver.getTo_command() != 2) {
|
||||
manipulatorAgvStationDeviceDriver.writing(2);
|
||||
if (manipulatorAgvStationDeviceDriver.getAction() == 1) {
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(inst.getCarno())
|
||||
.content("诺宝agv允许取货" + "点位" + startDeviceCode)
|
||||
.build();
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("status", 200);
|
||||
map.put("message", "允许取货!");
|
||||
log.info("允许仙工AGV取货,设备号 - {}", startDeviceCode);
|
||||
return map;
|
||||
} else {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(inst.getCarno())
|
||||
.content("agv诺宝对接位行架不允许取货:" + inst.getCarno() + "点位号" + manipulatorAgvStationDeviceDriver.getDevice_code())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
throw new BadRequestException("行架不允许取货");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//agv叉车对接位安全信号交互
|
||||
if(startDevice.getDeviceDriver() instanceof BoxSubvolumesConveyorDeviceDriver){
|
||||
if (startDevice.getDeviceDriver() instanceof BoxSubvolumesConveyorDeviceDriver) {
|
||||
boxSubvolumesConveyorDeviceDriver = (BoxSubvolumesConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||
if(boxSubvolumesConveyorDeviceDriver.getMode() == 2){
|
||||
if (boxSubvolumesConveyorDeviceDriver.getMode() == 2) {
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(inst.getCarno())
|
||||
.content("叉车允许取货")
|
||||
@@ -90,10 +92,10 @@ public class AgvWaitUtil {
|
||||
map.put("message", "允许取货!");
|
||||
log.info("允许仙工AGV取货,设备号 - {}", startDeviceCode);
|
||||
return map;
|
||||
}else {
|
||||
} else {
|
||||
LuceneLogDto logDto1 = LuceneLogDto.builder()
|
||||
.device_code(inst.getCarno())
|
||||
.content("agv叉车对接位输送线不允许取货:" + inst.getCarno()+ "点位号"+ boxSubvolumesConveyorDeviceDriver.getDevice_code())
|
||||
.content("agv叉车对接位输送线不允许取货:" + inst.getCarno() + "点位号" + boxSubvolumesConveyorDeviceDriver.getDevice_code())
|
||||
.build();
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
@@ -115,19 +117,23 @@ public class AgvWaitUtil {
|
||||
//如果是叉车,取货完成给输送线完成信号
|
||||
Device startDevice = deviceAppService.findDeviceByCode(startDeviceCode);
|
||||
ManipulatorAgvStationDeviceDriver manipulatorAgvStationDeviceDriver;
|
||||
if (inst.getAgv_system_type().equals(AgvSystemTypeEnum.XG_System_Type.getIndex())){
|
||||
if(startDevice.getDeviceDriver() instanceof BoxSubvolumesConveyorDeviceDriver) {
|
||||
if (inst.getAgv_system_type().equals(AgvSystemTypeEnum.XG_System_Type.getIndex())) {
|
||||
if (startDevice.getDeviceDriver() instanceof BoxSubvolumesConveyorDeviceDriver) {
|
||||
BoxSubvolumesConveyorDeviceDriver boxSubvolumesConveyorDeviceDriver;
|
||||
boxSubvolumesConveyorDeviceDriver = (BoxSubvolumesConveyorDeviceDriver) startDevice.getDeviceDriver();
|
||||
boxSubvolumesConveyorDeviceDriver.writing(3);
|
||||
if (boxSubvolumesConveyorDeviceDriver.getTo_command() != 3) {
|
||||
boxSubvolumesConveyorDeviceDriver.writing(3);
|
||||
}
|
||||
}
|
||||
}
|
||||
//诺宝agv调lms更新点位
|
||||
if(inst.getAgv_system_type().equals(AgvSystemTypeEnum.One_NDC_System_Type.getIndex())){
|
||||
if (inst.getAgv_system_type().equals(AgvSystemTypeEnum.One_NDC_System_Type.getIndex())) {
|
||||
applyLmsGetOut(inst);
|
||||
if(startDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
if (startDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) startDevice.getDeviceDriver();
|
||||
manipulatorAgvStationDeviceDriver.writing(3);
|
||||
if (manipulatorAgvStationDeviceDriver.getTo_command() != 3) {
|
||||
manipulatorAgvStationDeviceDriver.writing(3);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -145,7 +151,7 @@ public class AgvWaitUtil {
|
||||
param.put("actionType", ActionTypeEnum.IN_FINISHING.getCode().toString());
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(inst.getCarno())
|
||||
.content("诺宝取货完成:" + inst.getTask_code() + "--" + ActionTypeEnum.IN_FINISHING.getCode().toString())
|
||||
.content("诺宝取货完成请求lms:" + inst.getTask_code() + "--" + ActionTypeEnum.IN_FINISHING.getCode().toString())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
@@ -154,7 +160,7 @@ public class AgvWaitUtil {
|
||||
if (jo.getInteger("status") == 200) {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(inst.getCarno())
|
||||
.content("追加动诺宝作块,参数,接口返回:" + jo)
|
||||
.content("诺宝取货完成请求lms,参数,接口返回:" + jo)
|
||||
.build();
|
||||
logDto2.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
@@ -177,23 +183,25 @@ public class AgvWaitUtil {
|
||||
log.info("仙工AGV请求放货,设备号 - {}", endDeviceCode);
|
||||
Device endDevice = deviceAppService.findDeviceByCode(endDeviceCode);
|
||||
ManipulatorAgvStationDeviceDriver manipulatorAgvStationDeviceDriver;
|
||||
if(endDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver){
|
||||
if (endDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) endDevice.getDeviceDriver();
|
||||
manipulatorAgvStationDeviceDriver.writing(4);
|
||||
if(manipulatorAgvStationDeviceDriver.getAction() != 1){
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(inst.getCarno())
|
||||
.content("agv诺宝对接位行架不允许放货:" + inst.getCarno()+ "点位号"+ manipulatorAgvStationDeviceDriver.getDevice_code())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
log.info("不允许仙工AGV取货,对接位有报警,设备号 - {}", endDevice);
|
||||
throw new BadRequestException("上位系统不允许取货");
|
||||
if (manipulatorAgvStationDeviceDriver.getTo_command() != 4) {
|
||||
manipulatorAgvStationDeviceDriver.writing(4);
|
||||
if (manipulatorAgvStationDeviceDriver.getAction() != 1) {
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(inst.getCarno())
|
||||
.content("agv诺宝对接位行架不允许放货:" + inst.getCarno() + "点位号" + manipulatorAgvStationDeviceDriver.getDevice_code())
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
log.info("不允许仙工AGV取货,对接位有报警,设备号 - {}", endDevice);
|
||||
throw new BadRequestException("上位系统不允许取货");
|
||||
}
|
||||
}
|
||||
}
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(inst.getCarno())
|
||||
.content("允许放货"+ "点位" + endDeviceCode)
|
||||
.content("允许放货" + "点位" + endDeviceCode)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
@@ -207,12 +215,14 @@ public class AgvWaitUtil {
|
||||
|
||||
//放货完成等待
|
||||
public JSONObject waitOutPut(String endDeviceCode, Instruction inst) {
|
||||
Device nextDevice = deviceAppService.findDeviceByCode(inst.getNext_device_code());
|
||||
Device nextDevice = deviceAppService.findDeviceByCode(endDeviceCode);
|
||||
ManipulatorAgvStationDeviceDriver manipulatorAgvStationDeviceDriver;
|
||||
if(inst.getAgv_system_type().equals(AgvSystemTypeEnum.One_NDC_System_Type.getIndex())){
|
||||
if(nextDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
if (inst.getAgv_system_type().equals(AgvSystemTypeEnum.One_NDC_System_Type.getIndex())) {
|
||||
if (nextDevice.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
|
||||
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) nextDevice.getDeviceDriver();
|
||||
manipulatorAgvStationDeviceDriver.writing(5);
|
||||
if (manipulatorAgvStationDeviceDriver.getTo_command() != 5) {
|
||||
manipulatorAgvStationDeviceDriver.writing(5);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
@Autowired
|
||||
private LuceneExecuteLogService luceneExecuteLogService;
|
||||
@Autowired
|
||||
private DeviceAppService deviceAppservice;
|
||||
private DeviceAppService deviceAppservice;
|
||||
|
||||
|
||||
@Autowired
|
||||
@@ -379,7 +379,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
jo1.put("blockId", IdUtil.simpleUUID());
|
||||
jo1.put("location", pointCode);
|
||||
jo1.put("operation", "JackLoad");
|
||||
inspectInStocckSet(ja, pointCode, jo1);
|
||||
inspectInStocckSet(pointCode, jo1);
|
||||
ja.add(jo1);
|
||||
JSONObject jo2 = new JSONObject();
|
||||
jo2.put("blockId", IdUtil.simpleUUID());
|
||||
jo2.put("location", pointCode + "OUTGET");
|
||||
@@ -400,22 +401,24 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
}
|
||||
}
|
||||
|
||||
private void inspectInStocckSet(JSONArray ja, String pointCode, JSONObject jo1) {
|
||||
private void inspectInStocckSet( String pointCode, JSONObject jo1) {
|
||||
Device device = deviceAppservice.findDeviceByCode(pointCode);
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
String inspectInStocck = (String)device.getExtraValue().get("inspect_in_stocck");
|
||||
if (StrUtil.isNotEmpty( inspectInStocck) && inspectInStocck.equals("true")){
|
||||
String inspectInStocck = (String) device.getExtraValue().get("inspect_in_stocck");
|
||||
if (StrUtil.isNotEmpty(inspectInStocck) && inspectInStocck.equals("true")) {
|
||||
jo1.put("operationArgs", new JSONObject() {{
|
||||
put("recognize",false);
|
||||
put("recognize", false);
|
||||
}});
|
||||
ja.add(jo1);
|
||||
}else {
|
||||
} else {
|
||||
jo1.put("operationArgs", new JSONObject() {{
|
||||
put("recognize", true);
|
||||
}});
|
||||
ja.add(jo1);
|
||||
}
|
||||
} else {
|
||||
jo1.put("operationArgs", new JSONObject() {{
|
||||
put("recognize", true);
|
||||
}});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -752,26 +755,25 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
}
|
||||
//一楼诺宝agv
|
||||
if (instructionDto.getAgv_system_type().equals(AgvSystemTypeEnum.One_NDC_System_Type.getIndex())) {
|
||||
if (address.contains("GET") || address.contains("WAIT")) {
|
||||
//如果是取货二次分配,取放货二次分配需要重新追加动作块
|
||||
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();
|
||||
String newPointCode = applyXGAgvTask(task_code, actionType, instructionDto);
|
||||
return agvWaitUtil.waitInGet(newPointCode, instructionDto);
|
||||
}
|
||||
return agvWaitUtil.waitInGet(deviceCodeNow, instructionDto);
|
||||
} else if (address.contains("PUT") || address.contains("WAIT")) {
|
||||
//如果是放货二次分配,取放货二次分配需要重新追加动作块
|
||||
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(task_code, actionType, instructionDto);
|
||||
deviceCodeNow = "ZXQ_05";
|
||||
sendAddSequencesToNBAgv(instructionDto.getInstruction_code(), deviceCodeNow, instructionDto);
|
||||
|
||||
return agvWaitUtil.waitInPut(deviceCodeNow, instructionDto);
|
||||
}
|
||||
if (address.contains("GET")) {
|
||||
return agvWaitUtil.waitInGet(deviceCodeNow, instructionDto);
|
||||
} else if (address.contains("PUT")) {
|
||||
return agvWaitUtil.waitInPut(deviceCodeNow, instructionDto);
|
||||
}
|
||||
//如果是取货二次分配,取放货二次分配需要重新追加动作块
|
||||
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();
|
||||
String newPointCode = applyXGAgvTask(task_code, actionType, instructionDto);
|
||||
return agvWaitUtil.waitInGet(newPointCode, instructionDto);
|
||||
}
|
||||
//如果是放货二次分配,取放货二次分配需要重新追加动作块
|
||||
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();
|
||||
String newPointCode = applyXGAgvTask(task_code, actionType, instructionDto);
|
||||
// sendAddSequencesToNBAgv(instructionDto.getInstruction_code(), deviceCodeNow, instructionDto);
|
||||
return agvWaitUtil.waitInPut(newPointCode, instructionDto);
|
||||
}
|
||||
}
|
||||
//一楼叉车
|
||||
if (instructionDto.getAgv_system_type().equals(AgvSystemTypeEnum.XG_System_Type.getIndex())) {
|
||||
@@ -783,13 +785,13 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
if (address.contains("WAIT")) {
|
||||
String newPointCode = applyCCAgvTask(task_code, instructionDto);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.content("叉车允许放货"+"新点位:"+newPointCode)
|
||||
.content("叉车允许放货" + "新点位:" + newPointCode)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("status", 200);
|
||||
map.put("message", "允许叉车放货!"+"点位"+newPointCode);
|
||||
map.put("message", "允许叉车放货!" + "点位" + newPointCode);
|
||||
log.info("允许仙工AGV放货,设备号 - {}", newPointCode);
|
||||
return map;
|
||||
}
|
||||
@@ -824,7 +826,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
param.put("task_code", task_code);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(instructionDto.getCarno())
|
||||
.content("追加动叉车作块,参数:" + task_code)
|
||||
.content("叉车二次分配请求lms,参数:" + task_code)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
@@ -833,7 +835,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
if (jo.getInteger("status") == 200) {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(instructionDto.getCarno())
|
||||
.content("追加动叉车作块,参数,接口返回:" + jo)
|
||||
.content("叉车二次分配请求lms,参数,接口返回:" + jo)
|
||||
.build();
|
||||
logDto2.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
@@ -844,11 +846,11 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
} else {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(instructionDto.getCarno())
|
||||
.content("追加动叉车作块失败,返回参数:" + jo.getString("body"))
|
||||
.content("叉车二次分配请求lms失败,返回参数:" + jo.getString("message"))
|
||||
.build();
|
||||
logDto2.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
throw new BadRequestException("追加动叉车作块返回失败");
|
||||
throw new BadRequestException("叉车二次分配请求lms返回失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -939,7 +941,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
param.put("actionType", actionType.toString());
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code(instructionDto.getCarno())
|
||||
.content("追加动诺宝作块,参数:" + task_code + "--" + actionType)
|
||||
.content("二次分配请求lms,参数:" + task_code + "--" + actionType)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
@@ -948,7 +950,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
if (jo.getInteger("status") == 200) {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(instructionDto.getCarno())
|
||||
.content("追加动诺宝作块,参数,接口返回:" + jo)
|
||||
.content("二次分配请求lms,参数,接口返回:" + jo)
|
||||
.build();
|
||||
logDto2.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
@@ -961,11 +963,11 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
} else {
|
||||
LuceneLogDto logDto2 = LuceneLogDto.builder()
|
||||
.device_code(instructionDto.getCarno())
|
||||
.content("追加动诺宝作块失败,返回参数:" + jo.getString("body"))
|
||||
.content("二次分配请求lms,返回参数:" + jo.getString("body"))
|
||||
.build();
|
||||
logDto2.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto2);
|
||||
throw new BadRequestException("追加动诺宝作块返回失败");
|
||||
throw new BadRequestException("二次分配请求lms返回失败");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -1069,7 +1071,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
.device_code("追加诺宝运单参数")
|
||||
.content("指令号:" + instructionCode + ",下发追加诺宝运单反馈参数:" + jo)
|
||||
.build();
|
||||
logDto.setLog_level(4);
|
||||
logDto1.setLog_level(4);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto1);
|
||||
log.info("指令号{},状态{},下发追加诺宝运单序列反馈:{}", instructionCode, result.getStatus(), result.body());
|
||||
|
||||
@@ -1078,9 +1080,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
|
||||
private Object createBlocksDataTowEnd(String instructionCode, String point, Instruction instructionDto) {
|
||||
JSONArray ja = new JSONArray();
|
||||
String nextDeviceCode = instructionDto.getNext_device_code();
|
||||
//终点2
|
||||
sendEndDeviceOrder3(ja, nextDeviceCode, instructionCode, instructionDto);
|
||||
sendEndDeviceOrder3(ja, point, instructionCode, instructionDto);
|
||||
return ja;
|
||||
|
||||
}
|
||||
@@ -1178,7 +1179,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
jo1.put("blockId", IdUtil.simpleUUID());
|
||||
jo1.put("location", startPoint);
|
||||
jo1.put("operation", "JackLoad");
|
||||
inspectInStocckSet(ja, startPoint, jo1);
|
||||
inspectInStocckSet(startPoint, jo1);
|
||||
ja.add(jo1);
|
||||
JSONObject jo2 = new JSONObject();
|
||||
jo2.put("blockId", IdUtil.simpleUUID());
|
||||
jo2.put("location", startPoint + "OUTGET");
|
||||
|
||||
@@ -123,9 +123,6 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
|
||||
if (mode != last_mode) {
|
||||
this.setRequireSucess(false);
|
||||
if (mode == 2) {
|
||||
this.writing(0);
|
||||
}
|
||||
}
|
||||
} catch (Exception var17) {
|
||||
return;
|
||||
@@ -265,14 +262,10 @@ public class ManipulatorAgvStationDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
} else if (this.getMode() == 3) {
|
||||
mode = LangProcess.msg("universal_operation");
|
||||
}
|
||||
if (this.getAction() == 1) {
|
||||
if (this.getAction() == 0) {
|
||||
action = LangProcess.msg("universal_actionMessage1");
|
||||
} else if (this.getAction() == 1) {
|
||||
action = LangProcess.msg("universal_delivery");
|
||||
} else if (this.getAction() == 2) {
|
||||
action = LangProcess.msg("universal_completed");
|
||||
} else if (this.getAction() == 3) {
|
||||
action = LangProcess.msg("universal_releasing");
|
||||
} else if (this.getAction() == 4) {
|
||||
action = LangProcess.msg("universal_releasing_completed");
|
||||
}
|
||||
jo.put("device_name", this.getDevice().getDevice_name());
|
||||
jo.put("mode", mode);
|
||||
|
||||
@@ -641,7 +641,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
public String secondaryAllocationPoint(JSONObject param) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("applyTaskToWms-----输入参数{}", param);
|
||||
log.info("secondaryAllocationPoint-----输入参数{}", param);
|
||||
String wmsurl = paramService.findByCode(AcsConfig.WMSURL).getValue();
|
||||
AddressDto addressDto = addressService.findByCode("secondaryAllocationPoint");
|
||||
String url = wmsurl + addressDto.getMethods_url();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>200MB</maxFileSize>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<included>
|
||||
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
|
||||
<property name="LOG_HOME" value="${logPath}"/>
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="XianGongAgvServiceImpl" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名-->
|
||||
<FileNamePattern>${LOG_HOME}/仙工agv请求/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
<!--单个日志最大容量 至少10MB才能看得出来-->
|
||||
<maxFileSize>50MB</maxFileSize>
|
||||
<!--所有日志最多占多大容量-->
|
||||
<totalSizeCap>2GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>${log.charset}</charset>
|
||||
</encoder>
|
||||
|
||||
</appender>
|
||||
|
||||
<!-- 打印sql -->
|
||||
<logger name="org.nl.acs.agv.server.impl.XianGongAgvServiceImpl" level="info" additivity="true">
|
||||
<appender-ref ref="XianGongAgvServiceImpl"/>
|
||||
</logger>
|
||||
</included>
|
||||
@@ -23,6 +23,7 @@ https://juejin.cn/post/6844903775631572999
|
||||
<include resource="log/TwoNDCSocketConnectionAutoRun.xml"/>
|
||||
<include resource="log/NDCAgvServiceImpl.xml"/>
|
||||
<include resource="log/XgAgvDeviceDriver.xml"/>
|
||||
<include resource="log/XianGongAgvServiceImpl.xml"/>
|
||||
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!--withJansi 参数改为true-->
|
||||
|
||||
Reference in New Issue
Block a user