rev:更新
This commit is contained in:
@@ -48,6 +48,12 @@
|
||||
<artifactId>lucene-core</artifactId>
|
||||
<version>8.4.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.76</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-analyzers-common</artifactId>
|
||||
|
||||
@@ -81,6 +81,7 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
||||
int task = 0;
|
||||
//出入库模式
|
||||
int operation_type = 0;
|
||||
int last_operation_type = 0;
|
||||
int height = 0;
|
||||
int last_mode = 0;
|
||||
int last_error = 0;
|
||||
@@ -165,6 +166,10 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
||||
this.execute_log.setResource(this.device_code, this.device_code);
|
||||
this.execute_log.log("设备:" + device_code + ",last_mode -> mode:" + last_mode + "->" + mode);
|
||||
}
|
||||
if (operation_type != last_operation_type) {
|
||||
this.execute_log.setResource(this.device_code, this.device_code);
|
||||
this.execute_log.log("设备:" + device_code + ",last_operation_type -> operation_type:" + last_operation_type + "->" + last_operation_type);
|
||||
}
|
||||
if (move != last_move) {
|
||||
this.execute_log.setResource(this.device_code, this.device_code);
|
||||
this.execute_log.log("设备:" + device_code + ",last_move -> move:" + last_mode + "->" + move);
|
||||
@@ -316,6 +321,7 @@ public class StandardCoveyorControlDeviceDriver extends AbstractOpcDeviceDriver
|
||||
last_move = move;
|
||||
last_task = task;
|
||||
last_height = height;
|
||||
last_operation_type = operation_type;
|
||||
}
|
||||
|
||||
public boolean exe_error() {
|
||||
@@ -1246,6 +1252,11 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
||||
}
|
||||
|
||||
public void apply_OutEmpty() {
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_require_time.getTime() < 6000) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
String result = acsToWmsService.apply_OutEmpty(this.getDeviceCode());
|
||||
JSONObject jo = JSONObject.fromObject(result);
|
||||
if (ObjectUtil.isEmpty(jo)) {
|
||||
@@ -1258,6 +1269,7 @@ public synchronized boolean instruction_apply(String container_code) throws Exce
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized boolean apply_InEmpty() throws Exception {
|
||||
Date date = new Date();
|
||||
|
||||
@@ -256,7 +256,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
try {
|
||||
result2 = HttpRequest.post(url)
|
||||
.header("Authorization", "Bearer eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyNDY0ZDY4OTNjYTA0ZWVmOWI5MWYwYTExYWY1MzYzMyIsImF1dGgiOiJhZG1pbiIsInN1YiI6ImFkbWluIn0.0SW4TtIMZ79RhkWg4YOsm7_hfEWUaQLnuNsRxJI38GQbXxs8mMWBd972jNQIfTMS8DB3aVMH9QyNpSzuRdfD7A")
|
||||
.body(String.valueOf(jo))
|
||||
.body(jo.toString())
|
||||
.execute().body();
|
||||
System.out.println(result2);
|
||||
log.info("apply_OutEmpty----返回参数{}", result2);
|
||||
|
||||
@@ -949,7 +949,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
//如果此站点为1002,并且指令创建锁是打开的话,则不需要再次创建
|
||||
if (ObjectUtil.isNotEmpty(apply_task) && apply_task.equals("true")
|
||||
&& !scannerDeviceDriver.getCreateLock()) {
|
||||
obj.setRequest_again("1");
|
||||
// obj.setRequest_again("1");
|
||||
}
|
||||
}
|
||||
//如果为输送指令
|
||||
@@ -986,6 +986,12 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
// }
|
||||
|
||||
|
||||
entity.setInstruction_status("2");
|
||||
JSONObject json = JSONObject.fromObject(entity);
|
||||
wo.update(json);
|
||||
|
||||
removeByCodeFromCache(entity.getInstruction_code());
|
||||
|
||||
|
||||
// =0 则不用再次请求
|
||||
if (StrUtil.equals(obj.getRequest_again(), "0")) {
|
||||
@@ -998,9 +1004,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
finishAndCreateNextInst(entity);
|
||||
}
|
||||
}
|
||||
entity.setInstruction_status("2");
|
||||
JSONObject json = JSONObject.fromObject(entity);
|
||||
wo.update(json);
|
||||
|
||||
|
||||
//将指令条码写入终点设备中去
|
||||
if (ObjectUtil.isNotEmpty(vehicle_code)) {
|
||||
@@ -1022,7 +1026,6 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
lampThreecolorDeviceDriver.writing(0);
|
||||
}
|
||||
}
|
||||
removeByCodeFromCache(entity.getInstruction_code());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,7 +9,6 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import javafx.concurrent.Task;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONArray;
|
||||
@@ -591,7 +590,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
//@Transactional(rollbackFor = Exception.class)
|
||||
public void update(TaskDto dto) {
|
||||
TaskDto entity = this.findById(dto.getTask_id());
|
||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||
|
||||
@@ -764,7 +764,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
data = AgvService.sendAgvOneModeInst(phase, index, 0, 0);
|
||||
flag = true;
|
||||
} else {
|
||||
log.info("AGV请求取货设备{}无货,无法反馈", device_code);
|
||||
log.info("AGV请求取货设备{}无货,无法反馈", device_code, inst.getInstruction_code(), standardCoveyorControlDeviceDriver.getTask());
|
||||
}
|
||||
}
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
@@ -931,7 +931,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
||||
//空盘堆叠站点
|
||||
if (device.getDeviceDriver() instanceof StandardEmptyPalletSiteDeviceDriver) {
|
||||
standardEmptyPalletSiteDeviceDriver = (StandardEmptyPalletSiteDeviceDriver) device.getDeviceDriver();
|
||||
if (standardEmptyPalletSiteDeviceDriver.getNumber() < Integer.parseInt(emptyNum)) {
|
||||
if (standardEmptyPalletSiteDeviceDriver.getNumber() <= Integer.parseInt(emptyNum)) {
|
||||
inst.setExecute_status("5");
|
||||
instructionService.update(inst);
|
||||
data = AgvService.sendAgvOneModeInst(phase, index, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user