现场联调优化

This commit is contained in:
pangshenghao
2023-08-08 16:24:27 +08:00
parent dc88d53336
commit 4e2c8e50e0
9 changed files with 70 additions and 12 deletions

View File

@@ -219,7 +219,8 @@ public class HfKilnManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
}
//放货完成
if (mode == 3 && action == 4 && move == 0 && task > 0) {
// if (mode == 3 && action == 4 && move == 0 && task > 0) {
if (action == 4 && move == 0 && task > 0) {
Instruction inst2 = instructionService.findByCodeFromCache(String.valueOf(task));
if (inst2 != null) {
if (StrUtil.equals(inst2.getInstruction_status(), "1")) {
@@ -234,6 +235,31 @@ public class HfKilnManipulatorDeviceDriver extends AbstractOpcDeviceDriver imple
}
}
if(mode == 4){
this.writing("to_command", "2");
logServer.deviceInfo("反馈电气信号", this.getDevice_code(), "条码比对失败,开始进入盘点模式");
}
if(mode == 5 && locate>0 && barcode>0){
JSONObject json = new JSONObject();
Device device = appService.findDeviceByAddress(String.valueOf(this.locate));
//点位
json.put("device",device.getDevice_code());
//条码
json.put("barcode",this.barcode);
//2-更新托盘所在位置
json.put("state",3);
JSONObject resp = acsToWmsService.updateKiln(json);
if (StrUtil.equals(resp.getString("status"), "200")) {
this.writing("to_command", "3");
logServer.deviceInfo("反馈电气信号", this.getDevice_code(), "单个盘点结束!");
}else{
log.error("操作失败,{}",json);
this.writing("to_command", "99");
}
}
} catch (Exception e) {

View File

@@ -128,7 +128,7 @@ file:
avatarMaxSize: 5
logging:
file:
path: C:\log\acs
path: D:\ACS_LOG
config: classpath:logback-spring.xml
# Sa-Token配置

View File

@@ -2,7 +2,7 @@ spring:
freemarker:
check-template-location: false
profiles:
active: dev
active: prod
jackson:
time-zone: GMT+8
data: