rev:更新

This commit is contained in:
2024-01-26 15:42:39 +08:00
parent ce5dcdf1f4
commit 300278e1c8
5 changed files with 77 additions and 48 deletions

View File

@@ -3,7 +3,6 @@ package org.nl.acs.device_driver.basedriver.hailiang_old.hailiang_hr_ssx;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;
import lombok.RequiredArgsConstructor;
@@ -28,6 +27,7 @@ import org.nl.acs.history.ErrorUtil;
import org.nl.acs.history.service.DeviceErrorLogService;
import org.nl.acs.history.service.dto.DeviceErrorLogDto;
import org.nl.acs.history.service.impl.DeviceErrorLogServiceImpl;
import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.log.service.DeviceExecuteLogService;
import org.nl.acs.monitor.DeviceStageMonitor;
@@ -39,7 +39,6 @@ import org.nl.acs.task.service.dto.TaskDto;
import org.nl.modules.wql.util.SpringContextHolder;
import org.springframework.beans.factory.annotation.Autowired;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -60,6 +59,8 @@ public class HailiangHrSsxDeviceDriver extends AbstractOpcDeviceDriver implement
TaskService taskServer = SpringContextHolder.getBean("taskServiceImpl");
@Autowired
AcsToWmsService acsToWmsService = SpringContextHolder.getBean(AcsToWmsServiceImpl.class);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class);
int heartbeat = 0;
int mode = 0;
@@ -151,7 +152,7 @@ public class HailiangHrSsxDeviceDriver extends AbstractOpcDeviceDriver implement
if (StrUtil.equals("true", applyEmpty)) {
//申请空框任务
if (mode == 3 && move == 0 && !requireSucess) {
this.applyEmptyTask();
//this.applyEmptyTask();
}
}
@@ -203,8 +204,8 @@ public class HailiangHrSsxDeviceDriver extends AbstractOpcDeviceDriver implement
< this.instruction_require_time_out) {
return;
}
TaskDto vehicle_dto = taskServer.findByContainer(barcode);
if (vehicle_dto != null) {
Instruction instruction = instructionService.findByContainer(barcode, "1");
if (instruction != null) {
containerArrivedRequestTime = new Date();
ContainerArrivedRequest containerArrivedRequest = new ContainerArrivedRequest();
NodeStates nodeStates = new NodeStates();

View File

@@ -208,7 +208,7 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
Device device = deviceAppService.findDeviceByCode(slotCode);
if (device != null && device.getDeviceDriver() instanceof HailiangHrSsxDeviceDriver) {
HailiangHrSsxDeviceDriver hailiangHrSsxDeviceDriver = (HailiangHrSsxDeviceDriver) device.getDeviceDriver();
hailiangHrSsxDeviceDriver.writing("to_command", "4");
//hailiangHrSsxDeviceDriver.writing("to_command", "4");
if (hailiangHrSsxDeviceDriver.getAction() == 2) {
unloadContainerReqResponse.setAllow(true);
} else {
@@ -240,7 +240,7 @@ public class LiKuToAcsServiceImpl implements LiKuToAcsService {
Device device = deviceAppService.findDeviceByCode(slotCode);
if (device != null && device.getDeviceDriver() instanceof HailiangHrSsxDeviceDriver) {
HailiangHrSsxDeviceDriver hailiangHrSsxDeviceDriver = (HailiangHrSsxDeviceDriver) device.getDeviceDriver();
hailiangHrSsxDeviceDriver.writing("to_command", "5");
hailiangHrSsxDeviceDriver.writing("to_command", "4");
}
JSONObject json = (JSONObject) JSONObject.toJSON(unloadContainerFinishResponse);
result.put("code", "0");

View File

@@ -48,6 +48,7 @@ import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -173,7 +174,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
// continue;
// }
//刻字上料任务特殊处理
if (StrUtil.equals(start_point_code,"A1_KZ_SL")) {
if (StrUtil.equals(start_point_code, "A1_KZ_SL")) {
Device device = deviceAppService.findDeviceByCode(start_point_code);
HailiangEngravingInDeviceDriver hailiangEngravingInDeviceDriver;
if (device.getDeviceDriver() instanceof HailiangEngravingInDeviceDriver) {
@@ -181,13 +182,13 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
if (hailiangEngravingInDeviceDriver.getGd_move() == 0) {
JSONObject json = new JSONObject();
json.put("task_id", task_id);
json.put("message", "->"+hailiangEngravingInDeviceDriver.getGd_move()+"上面无料框!请核实后再点击按钮!");
json.put("message", "->" + hailiangEngravingInDeviceDriver.getGd_move() + "上面无料框!请核实后再点击按钮!");
errArr.add(json);
continue;
}
}
}
if (StrUtil.equals(next_point_code,"A1_KZ_SL")) {
if (StrUtil.equals(next_point_code, "A1_KZ_SL")) {
Device device = deviceAppService.findDeviceByCode(next_point_code);
HailiangEngravingInDeviceDriver hailiangEngravingInDeviceDriver;
if (device.getDeviceDriver() instanceof HailiangEngravingInDeviceDriver) {
@@ -199,7 +200,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
errArr.add(json);
continue;
}
if (StrUtil.equals(start_point_code,"A1_BCPRKW_SD")){
if (StrUtil.equals(start_point_code, "A1_BCPRKW_SD")) {
if (hailiangEngravingInDeviceDriver.getMode() == 1) {
JSONObject json = new JSONObject();
json.put("task_id", task_id);
@@ -207,7 +208,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
errArr.add(json);
continue;
}
}else {
} else {
if (hailiangEngravingInDeviceDriver.getMode() == 0) {
JSONObject json = new JSONObject();
json.put("task_id", task_id);
@@ -269,6 +270,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
try {
taskService.create(task_dto);
} catch (Exception e) {
log.error("创建任务出现异常:{}", Arrays.toString(e.getStackTrace()));
e.printStackTrace();
JSONObject json = new JSONObject();
json.put("task_id", task_id);
@@ -286,6 +288,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
resultJson.put("data", new JSONObject());
log.info("createFromWms--------------:输出参数:" + resultJson.toString());
} catch (Exception e) {
log.error("创建任务出现异常:{}", Arrays.toString(e.getStackTrace()));
resultJson.put("status", 400);
resultJson.put("errArr", new JSONArray());
resultJson.put("message", e.getMessage());
@@ -429,7 +432,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
}
ProduceshiftorderDto byCode = produceshiftorderService.findByCode(workorder_code);
if (ObjectUtil.isNotEmpty(byCode)) {
if (!byCode.getOrder_status().equals(WorkerOrderEnum.FORCEFINISH.getCode())&&!byCode.getOrder_status().equals(WorkerOrderEnum.COMPLETE.getCode())){
if (!byCode.getOrder_status().equals(WorkerOrderEnum.FORCEFINISH.getCode()) && !byCode.getOrder_status().equals(WorkerOrderEnum.COMPLETE.getCode())) {
JSONObject json = new JSONObject();
json.put("workorder_id", workorder_id);
json.put("message", "下发执行工单不是完成状态");
@@ -509,7 +512,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
resultJson.put("status", 400);
}
resultJson.put("errArr", errArr);
resultJson.put("message", errArr.size() > 0 ? "工单下发失败:"+errArr.getJSONObject(0).getString("message") : "下发成功!");
resultJson.put("message", errArr.size() > 0 ? "工单下发失败:" + errArr.getJSONObject(0).getString("message") : "下发成功!");
resultJson.put("data", new JSONObject());
} catch (Exception e) {
resultJson.put("status", 400);
@@ -1176,6 +1179,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
// return resultJson;
return null;
}
@Override
public Map<String, Object> putOver(JSONObject param) {
log.info("接收WMS余料上完,下发参数:{}", JSON.toJSONString(param));
@@ -1199,8 +1203,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
HailiangEngravingInDeviceDriver hailiangEngravingInDeviceDriver;
if (device.getDeviceDriver() instanceof HailiangEngravingInDeviceDriver) {
hailiangEngravingInDeviceDriver = (HailiangEngravingInDeviceDriver) device.getDeviceDriver();
hailiangEngravingInDeviceDriver.writing("to_engraving_sn",next_point_code);
hailiangEngravingInDeviceDriver.writing("to_in_weight",weight);
hailiangEngravingInDeviceDriver.writing("to_engraving_sn", next_point_code);
hailiangEngravingInDeviceDriver.writing("to_in_weight", weight);
}
JSONObject resultJson = new JSONObject();
resultJson.put("status", 200);
@@ -1217,7 +1221,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
if (StrUtil.isEmpty(device_code)) {
throw new BadRequestException("设备号不能为空!");
}
if (StrUtil.isEmpty(qtySum+"")) {
if (StrUtil.isEmpty(qtySum + "")) {
throw new BadRequestException("下发数量不能为空!");
}
Device device = deviceAppService.findDeviceByCode(device_code);
@@ -1229,16 +1233,16 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
if (device.getDeviceDriver() instanceof HailiangSpecialPourStationDeviceDriver) {
hailiangSpecialPourStationDeviceDriver = (HailiangSpecialPourStationDeviceDriver) device.getDeviceDriver();
qtySum += hailiangSpecialPourStationDeviceDriver.getStorage_stock_num();
hailiangSpecialPourStationDeviceDriver.writing("to_pour_num",String.valueOf(qtySum));
hailiangSpecialPourStationDeviceDriver.writing("to_pour_num", String.valueOf(qtySum));
}
//清洗机储料仓
HailiangCleaningMachineStorageStationDeviceDriver hailiangCleaningMachineStorageStationDeviceDriver;
if (device.getDeviceDriver() instanceof HailiangCleaningMachineStorageStationDeviceDriver) {
hailiangCleaningMachineStorageStationDeviceDriver = (HailiangCleaningMachineStorageStationDeviceDriver) device.getDeviceDriver();
qtySum += hailiangCleaningMachineStorageStationDeviceDriver.getFull_number();
hailiangCleaningMachineStorageStationDeviceDriver.writing("to_dumping_num",String.valueOf(qtySum));
hailiangCleaningMachineStorageStationDeviceDriver.writing("to_dumping_num", String.valueOf(qtySum));
//下发储料仓开始称重
hailiangCleaningMachineStorageStationDeviceDriver.writing("to_open_weight","1");
hailiangCleaningMachineStorageStationDeviceDriver.writing("to_open_weight", "1");
//要睡一秒吗
}
//刻字机上料位(电气是重量)
@@ -1246,7 +1250,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
if (device.getDeviceDriver() instanceof HailiangEngravingInDeviceDriver) {
hailiangEngravingInDeviceDriver = (HailiangEngravingInDeviceDriver) device.getDeviceDriver();
qtySum += hailiangEngravingInDeviceDriver.getEngraving_storage_now_weight();
hailiangEngravingInDeviceDriver.writing("to_in_weight",String.valueOf(qtySum));
hailiangEngravingInDeviceDriver.writing("to_in_weight", String.valueOf(qtySum));
}
//刻字机倒料位
@@ -1254,7 +1258,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
if (device.getDeviceDriver() instanceof HailiangEngravingMachineDeviceDriver) {
hailiangEngravingMachineDeviceDriver = (HailiangEngravingMachineDeviceDriver) device.getDeviceDriver();
qtySum += hailiangEngravingMachineDeviceDriver.getLettering_silo_number();
hailiangEngravingMachineDeviceDriver.writing("to_to_dumping_num",String.valueOf(qtySum));
hailiangEngravingMachineDeviceDriver.writing("to_to_dumping_num", String.valueOf(qtySum));
}
JSONObject resultJson = new JSONObject();
@@ -1296,7 +1300,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
if (StrUtil.isEmpty(device_code)) {
throw new BadRequestException("设备号不能为空!");
}
if (StrUtil.isEmpty(qtySum+"")) {
if (StrUtil.isEmpty(qtySum + "")) {
throw new BadRequestException("下发数量不能为空!");
}
Device device = deviceAppService.findDeviceByCode(device_code);
@@ -1309,9 +1313,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
if (device.getDeviceDriver() instanceof HailiangCleaningMachineStorageStationDeviceDriver) {
hailiangCleaningMachineStorageStationDeviceDriver = (HailiangCleaningMachineStorageStationDeviceDriver) device.getDeviceDriver();
qtySum += hailiangCleaningMachineStorageStationDeviceDriver.getFull_number();
hailiangCleaningMachineStorageStationDeviceDriver.writing("to_dumping_num",String.valueOf(qtySum));
hailiangCleaningMachineStorageStationDeviceDriver.writing("to_dumping_num", String.valueOf(qtySum));
//下发储料仓开始称重
hailiangCleaningMachineStorageStationDeviceDriver.writing("to_open_weight","1");
hailiangCleaningMachineStorageStationDeviceDriver.writing("to_open_weight", "1");
//下发称重后,读取重量要睡一秒吗
try {
Thread.sleep(1000);
@@ -1324,7 +1328,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
JSONObject resultJson = new JSONObject();
resultJson.put("status", 200);
resultJson.put("message", "操作成功");
resultJson.put("weight",weight);
resultJson.put("weight", weight);
log.info("接收WMS人工倒料成功,响应参数:{}", JSON.toJSONString(resultJson));
return resultJson;
}
@@ -1448,7 +1452,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
json.put("task_code", task_code);
json.put("message", "->请切换自动模式!");
errArr.add(json);
}else if (hailiangEngravingInDeviceDriver.getMode() == 1){
} else if (hailiangEngravingInDeviceDriver.getMode() == 1) {
produceshiftorderService.create(dto);
}
}
@@ -1472,7 +1476,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
return resultJson;
}
// @Override
// @Override
// public Map<String, Object> cleaningIn(JSONObject param) {
// log.info("接收WMS清洗上料,下发参数:{}", JSON.toJSONString(param));
// String device_code = param.getString("device_code");
@@ -1606,7 +1610,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
HailiangCleaningPutLineDeviceDriver hailiangCleaningPutLineDeviceDriver;
if (device.getDeviceDriver() instanceof HailiangCleaningPutLineDeviceDriver) {
hailiangCleaningPutLineDeviceDriver = (HailiangCleaningPutLineDeviceDriver) device.getDeviceDriver();
hailiangCleaningPutLineDeviceDriver.writing("","");
hailiangCleaningPutLineDeviceDriver.writing("", "");
}
resultJson.put("status", 200);
resultJson.put("message", "操作成功");

View File

@@ -17,6 +17,7 @@ import java.util.Map;
**/
public interface InstructionService {
Instruction findByTaskcodeAndStatus(String code);
/**
* 查询数据分页
*
@@ -353,4 +354,12 @@ public interface InstructionService {
Instruction findInstByDeviceCode(String device_code);
/**
* 根据载具号查询下发海柔成功的指令
*
* @param vehicleCode
* @param sendStatus
* @return
*/
Instruction findByContainer(String vehicleCode, String sendStatus);
}

View File

@@ -86,7 +86,8 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
private TaskService taskService;
@Autowired
AcsToLiKuService acsToLiKuService;
// private LuceneExecuteLogService lucene = SpringContextHolder.getBean(LuceneExecuteLogService.class);
// private LuceneExecuteLogService lucene = SpringContextHolder.getBean(LuceneExecuteLogService.class);
@Override
public void autoInitial() {
this.reload();
@@ -97,6 +98,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
List<Instruction> list = this.queryAll("instruction_status < 2 and is_delete = 0");
this.instructions = list == null ? new CopyOnWriteArrayList<>() : new CopyOnWriteArrayList<>(list);
}
@Override
public Instruction findByTaskcodeAndStatus(String code) {
Iterator var3 = instructions.iterator();
@@ -109,6 +111,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
}
return null;
}
@Override
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
String code = (String) whereJson.get("code");
@@ -356,15 +359,15 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
* 7 不去称重平台称重PS20 agvtype:2
* 8 RT20 agvtype:3
*/
if(StrUtil.equals(task.getTask_type(),StatusEnum.HAIROU_LIKU_REQ.getCode())){
if (StrUtil.equals(task.getTask_type(), StatusEnum.HAIROU_LIKU_REQ.getCode())) {
CreateRequest createRequest = new CreateRequest();
List<AGVTask> list = new ArrayList();
AcsToLiKuService acsToLiKuService = SpringContextHolder.getBean(AcsToLiKuService.class);
Resp resp = new Resp();
if(StrUtil.equals(StatusEnum.HAIROU_IN_REQ.getCode(),task.getStorage_task_type()) || StrUtil.equals(StatusEnum.HAIROU_EMPTY_IN_REQ.getCode(),task.getStorage_task_type())){
if (StrUtil.equals(StatusEnum.HAIROU_IN_REQ.getCode(), task.getStorage_task_type()) || StrUtil.equals(StatusEnum.HAIROU_EMPTY_IN_REQ.getCode(), task.getStorage_task_type())) {
createRequest.setTaskType("tote_inbound");
//list Describe 入库
InTaskDescribe inTaskDescribe=new InTaskDescribe();
InTaskDescribe inTaskDescribe = new InTaskDescribe();
inTaskDescribe.setContainerCode(dto.getVehicle_code());
inTaskDescribe.setFromLocationCode(dto.getStart_point_code());
inTaskDescribe.setLocationCode(dto.getNext_point_code());
@@ -377,8 +380,8 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
list.add(agvTask1);
createRequest.setTasks(list);
resp=acsToLiKuService.create(createRequest);
} else if(StrUtil.equals(StatusEnum.HAIROU_OUT_REQ.getCode(),task.getStorage_task_type()) || StrUtil.equals(StatusEnum.HAIROU_EMPTY_OUT_REQ.getCode(),task.getStorage_task_type())){
resp = acsToLiKuService.create(createRequest);
} else if (StrUtil.equals(StatusEnum.HAIROU_OUT_REQ.getCode(), task.getStorage_task_type()) || StrUtil.equals(StatusEnum.HAIROU_EMPTY_OUT_REQ.getCode(), task.getStorage_task_type())) {
createRequest.setTaskType("tote_outbound");
//list Describe 出库
OutTaskDescribe outTaskDescribe = new OutTaskDescribe();
@@ -392,8 +395,8 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
agvTask.setTaskPriority(dto.getPriority());
list.add(agvTask);
createRequest.setTasks(list);
resp=acsToLiKuService.create(createRequest);
}else if(StrUtil.equals(StatusEnum.HAIROU_RELOCATION.getCode(),task.getStorage_task_type())){
resp = acsToLiKuService.create(createRequest);
} else if (StrUtil.equals(StatusEnum.HAIROU_RELOCATION.getCode(), task.getStorage_task_type())) {
createRequest.setTaskType("tote_relocation");
//list Describe 移库
RelocationTaskDescribe relocationTaskDescribe = new RelocationTaskDescribe();
@@ -408,12 +411,12 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
list.add(agvTask2);
createRequest.setTasks(list);
resp=acsToLiKuService.create(createRequest);
resp = acsToLiKuService.create(createRequest);
}else if(StrUtil.equals(StatusEnum.HAIROU_CARRY.getCode(),task.getStorage_task_type())){
} else if (StrUtil.equals(StatusEnum.HAIROU_CARRY.getCode(), task.getStorage_task_type())) {
createRequest.setTaskType("tote_carry");
//list Describe 搬运
CarryTaskDescribe carryTaskDescribe=new CarryTaskDescribe();
CarryTaskDescribe carryTaskDescribe = new CarryTaskDescribe();
carryTaskDescribe.setContainerCode(dto.getVehicle_code());
carryTaskDescribe.setFromLocationCode(dto.getStart_point_code());
carryTaskDescribe.setToLocationCode(dto.getNext_point_code());
@@ -426,11 +429,11 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
list.add(agvTask4);
createRequest.setTasks(list);
resp=acsToLiKuService.create(createRequest);
}else if(StrUtil.equals(StatusEnum.HAIROU_CHECK.getCode(),task.getStorage_task_type())){
resp = acsToLiKuService.create(createRequest);
} else if (StrUtil.equals(StatusEnum.HAIROU_CHECK.getCode(), task.getStorage_task_type())) {
createRequest.setTaskType("tote_check");
//list Describe 盘库
CheckTaskDescribe checkTaskDescribe=new CheckTaskDescribe();
CheckTaskDescribe checkTaskDescribe = new CheckTaskDescribe();
checkTaskDescribe.setContainerCode(dto.getVehicle_code());
checkTaskDescribe.setLocationCode(dto.getNext_point_code());
checkTaskDescribe.setCheckType("scan");
@@ -441,10 +444,10 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
list.add(agvTask3);
createRequest.setTasks(list);
resp=acsToLiKuService.create(createRequest);
resp = acsToLiKuService.create(createRequest);
}
createRequest.setGroupPriority(Integer.parseInt(dto.getPriority()));
if(ObjectUtil.isNotEmpty(resp) && StrUtil.equals(resp.getCode(),"0")){
if (ObjectUtil.isNotEmpty(resp) && StrUtil.equals(resp.getCode(), "0")) {
dto.setSend_status("1");
} else {
dto.setSend_status("2");
@@ -880,7 +883,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
jo.put("islock", "0");
deviceService.changeDeviceStatus(jo);
// lucene.deviceExecuteLog(new LuceneLogDto(id,"指令更新状态为:"+entity.getInstruction_status()));
log.info("{}指令更新状态为:{}",id,entity.getInstruction_status());
log.info("{}指令更新状态为:{}", id, entity.getInstruction_status());
this.update(entity);
JSONObject taskjson = taskwo.query("task_id ='" + insttaskid + "'").uniqueResult(0);
TaskDto obj = taskjson.toJavaObject(TaskDto.class);
@@ -1052,9 +1055,9 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
} else if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "2")) {
// NDC agv指令不当场取消指令,需要等agv上报
if (!StrUtil.isEmpty(entity.getAgv_jobno())) {
if (StrUtil.equals(entity.getInstruction_type(),AgvTypeEnum.PS_TYPE_1.getTaskType()) || StrUtil.equals(entity.getInstruction_type(),AgvTypeEnum.PS_TYPE_2.getTaskType()) || StrUtil.equals(entity.getInstruction_type(),AgvTypeEnum.RT_TYPE_1.getTaskType())){
if (StrUtil.equals(entity.getInstruction_type(), AgvTypeEnum.PS_TYPE_1.getTaskType()) || StrUtil.equals(entity.getInstruction_type(), AgvTypeEnum.PS_TYPE_2.getTaskType()) || StrUtil.equals(entity.getInstruction_type(), AgvTypeEnum.RT_TYPE_1.getTaskType())) {
ndcAgvService.deleteAgvOneInstToNDC(entity);
}else {
} else {
ndcAgvService.deleteAgvInstToNDC(entity);
}
flag = true;
@@ -1614,4 +1617,16 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
.findFirst()
.orElse(null);
}
@Override
public Instruction findByContainer(String vehicleCode,String sendStatus) {
return Optional
.ofNullable(this.instructions)
.orElse(new CopyOnWriteArrayList<>())
.stream()
.filter(inst -> inst.getVehicle_code().equals(vehicleCode))
.filter(inst -> inst.getSend_status().equals(sendStatus))
.findFirst()
.orElse(null);
}
}