更新
This commit is contained in:
@@ -22,6 +22,7 @@ import org.nl.acs.device_driver.basedriver.agv.utils.OneAgvPhase;
|
|||||||
import org.nl.acs.device_driver.basedriver.agv.utils.TwoAgvPhase;
|
import org.nl.acs.device_driver.basedriver.agv.utils.TwoAgvPhase;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_cleaning_machine_storage_station.HailiangCleaningMachineStorageStationDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_cleaning_machine_storage_station.HailiangCleaningMachineStorageStationDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_engraving_cache.HailiangEngravingCacheDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_engraving_cache.HailiangEngravingCacheDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_engraving_machine.HailiangEngravingMachineDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_packer_station.HailiangPackerStationDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_packer_station.HailiangPackerStationDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_special_device.HailiangSpecialDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_special_device.HailiangSpecialDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_special_empty_station.HailiangSpecialEmptyStationDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_special_empty_station.HailiangSpecialEmptyStationDeviceDriver;
|
||||||
@@ -41,6 +42,7 @@ import org.nl.acs.opc.DeviceAppService;
|
|||||||
import org.nl.acs.opc.DeviceAppServiceImpl;
|
import org.nl.acs.opc.DeviceAppServiceImpl;
|
||||||
import org.nl.acs.stage.service.StageActorService;
|
import org.nl.acs.stage.service.StageActorService;
|
||||||
import org.nl.acs.stage.service.dto.StageActorDto;
|
import org.nl.acs.stage.service.dto.StageActorDto;
|
||||||
|
import org.nl.acs.stage.service.utils.StageActorUtil;
|
||||||
import org.nl.exception.BadRequestException;
|
import org.nl.exception.BadRequestException;
|
||||||
import org.nl.utils.FileUtil;
|
import org.nl.utils.FileUtil;
|
||||||
import org.nl.utils.RedisUtils;
|
import org.nl.utils.RedisUtils;
|
||||||
@@ -324,17 +326,13 @@ public class StageActorServiceImpl implements StageActorService {
|
|||||||
AgvNdcOneDeviceDriver agvNdcOneDeviceDriver;
|
AgvNdcOneDeviceDriver agvNdcOneDeviceDriver;
|
||||||
//双工agv
|
//双工agv
|
||||||
AgvNdcTwoDeviceDriver agvNdcTwoDeviceDriver;
|
AgvNdcTwoDeviceDriver agvNdcTwoDeviceDriver;
|
||||||
|
//刻字机
|
||||||
|
HailiangEngravingMachineDeviceDriver hailiangEngravingMachineDeviceDriver;
|
||||||
if (device.getDeviceDriver() instanceof HailiangSpecialDeviceDriver) {
|
if (device.getDeviceDriver() instanceof HailiangSpecialDeviceDriver) {
|
||||||
hailiangSpecialDeviceDriver = (HailiangSpecialDeviceDriver) device.getDeviceDriver();
|
hailiangSpecialDeviceDriver = (HailiangSpecialDeviceDriver) device.getDeviceDriver();
|
||||||
if (hailiangSpecialDeviceDriver.getMode() == 0) {
|
|
||||||
mode = "未联机";
|
|
||||||
jo.put("isOnline", false);
|
|
||||||
} else if (hailiangSpecialDeviceDriver.getMode() == 1) {
|
|
||||||
mode = "联机";
|
|
||||||
jo.put("isOnline", true);
|
|
||||||
}
|
|
||||||
obj.put("device_name", hailiangSpecialDeviceDriver.getDevice().getDevice_name());
|
obj.put("device_name", hailiangSpecialDeviceDriver.getDevice().getDevice_name());
|
||||||
jo.put("mode", mode);
|
jo.put("mode", StageActorUtil.getMode(hailiangSpecialDeviceDriver.getMode()));
|
||||||
|
jo.put("isOnline", StageActorUtil.getMode(hailiangSpecialDeviceDriver.getMode()));
|
||||||
jo.put("isError", hailiangSpecialDeviceDriver.getIserror());
|
jo.put("isError", hailiangSpecialDeviceDriver.getIserror());
|
||||||
jo.put("error", hailiangSpecialDeviceDriver.getError());
|
jo.put("error", hailiangSpecialDeviceDriver.getError());
|
||||||
jo.put("empty_is_lack", hailiangSpecialDeviceDriver.getEmpty_is_lack());
|
jo.put("empty_is_lack", hailiangSpecialDeviceDriver.getEmpty_is_lack());
|
||||||
@@ -354,13 +352,8 @@ public class StageActorServiceImpl implements StageActorService {
|
|||||||
|
|
||||||
} else if (device.getDeviceDriver() instanceof HailiangSpecialPourStationDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof HailiangSpecialPourStationDeviceDriver) {
|
||||||
hailiangSpecialPourStationDeviceDriver = (HailiangSpecialPourStationDeviceDriver) device.getDeviceDriver();
|
hailiangSpecialPourStationDeviceDriver = (HailiangSpecialPourStationDeviceDriver) device.getDeviceDriver();
|
||||||
if (hailiangSpecialPourStationDeviceDriver.getMode() == 0) {
|
jo.put("mode", StageActorUtil.getMode(hailiangSpecialPourStationDeviceDriver.getMode()));
|
||||||
mode = "未联机";
|
jo.put("isOnline", StageActorUtil.getMode(hailiangSpecialPourStationDeviceDriver.getMode()));
|
||||||
jo.put("isOnline", false);
|
|
||||||
} else if (hailiangSpecialPourStationDeviceDriver.getMode() == 1) {
|
|
||||||
mode = "联机";
|
|
||||||
jo.put("isOnline", true);
|
|
||||||
}
|
|
||||||
jo.put("isError", hailiangSpecialPourStationDeviceDriver.getIserror());
|
jo.put("isError", hailiangSpecialPourStationDeviceDriver.getIserror());
|
||||||
obj.put("device_name", hailiangSpecialPourStationDeviceDriver.getDevice().getDevice_name());
|
obj.put("device_name", hailiangSpecialPourStationDeviceDriver.getDevice().getDevice_name());
|
||||||
jo.put("full_number", hailiangSpecialPourStationDeviceDriver.getFull_number());
|
jo.put("full_number", hailiangSpecialPourStationDeviceDriver.getFull_number());
|
||||||
@@ -369,78 +362,34 @@ public class StageActorServiceImpl implements StageActorService {
|
|||||||
|
|
||||||
} else if (device.getDeviceDriver() instanceof HailiangSpecialPickStationDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof HailiangSpecialPickStationDeviceDriver) {
|
||||||
hailiangSpecialPickStationDeviceDriver = (HailiangSpecialPickStationDeviceDriver) device.getDeviceDriver();
|
hailiangSpecialPickStationDeviceDriver = (HailiangSpecialPickStationDeviceDriver) device.getDeviceDriver();
|
||||||
if (hailiangSpecialPickStationDeviceDriver.getMode() == 0) {
|
jo.put("mode", StageActorUtil.getMode(hailiangSpecialPickStationDeviceDriver.getMode()));
|
||||||
mode = "未联机";
|
jo.put("isOnline", StageActorUtil.getMode(hailiangSpecialPickStationDeviceDriver.getMode()));
|
||||||
jo.put("isOnline", false);
|
|
||||||
} else if (hailiangSpecialPickStationDeviceDriver.getMode() == 1) {
|
|
||||||
mode = "联机";
|
|
||||||
jo.put("isOnline", true);
|
|
||||||
}
|
|
||||||
jo.put("mode", mode);
|
|
||||||
jo.put("isError", hailiangSpecialPickStationDeviceDriver.getIserror());
|
jo.put("isError", hailiangSpecialPickStationDeviceDriver.getIserror());
|
||||||
obj.put("device_name", hailiangSpecialPickStationDeviceDriver.getDevice().getDevice_name());
|
obj.put("device_name", hailiangSpecialPickStationDeviceDriver.getDevice().getDevice_name());
|
||||||
jo.put("full_number", hailiangSpecialPickStationDeviceDriver.getFull_number());
|
jo.put("full_number", hailiangSpecialPickStationDeviceDriver.getFull_number());
|
||||||
|
|
||||||
} else if (device.getDeviceDriver() instanceof HailiangSpecialEmptyStationDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof HailiangSpecialEmptyStationDeviceDriver) {
|
||||||
hailiangSpecialEmptyStationDeviceDriver = (HailiangSpecialEmptyStationDeviceDriver) device.getDeviceDriver();
|
hailiangSpecialEmptyStationDeviceDriver = (HailiangSpecialEmptyStationDeviceDriver) device.getDeviceDriver();
|
||||||
if (hailiangSpecialEmptyStationDeviceDriver.getMode() == 0) {
|
jo.put("mode", StageActorUtil.getMode(hailiangSpecialEmptyStationDeviceDriver.getMode()));
|
||||||
mode = "未联机";
|
jo.put("isOnline", StageActorUtil.getMode(hailiangSpecialEmptyStationDeviceDriver.getMode()));
|
||||||
jo.put("isOnline", false);
|
|
||||||
} else if (hailiangSpecialEmptyStationDeviceDriver.getMode() == 1) {
|
|
||||||
mode = "联机";
|
|
||||||
jo.put("isOnline", true);
|
|
||||||
}
|
|
||||||
//缺料请求
|
|
||||||
if (hailiangSpecialEmptyStationDeviceDriver.getMove() == 1) {
|
|
||||||
move = "无货";
|
|
||||||
jo.put("hasGoods", 0);
|
|
||||||
//有料
|
|
||||||
} else if (hailiangSpecialEmptyStationDeviceDriver.getMove() == 0) {
|
|
||||||
move = "有货";
|
|
||||||
jo.put("hasGoods", 1);
|
|
||||||
}
|
|
||||||
obj.put("device_name", hailiangSpecialEmptyStationDeviceDriver.getDevice().getDevice_name());
|
obj.put("device_name", hailiangSpecialEmptyStationDeviceDriver.getDevice().getDevice_name());
|
||||||
jo.put("mode", mode);
|
jo.put("move", StageActorUtil.getMove(hailiangSpecialEmptyStationDeviceDriver.getMove()));
|
||||||
jo.put("move", move);
|
jo.put("hasGoods", StageActorUtil.getHasGoods(hailiangSpecialEmptyStationDeviceDriver.getMove(),0));
|
||||||
jo.put("isError", hailiangSpecialEmptyStationDeviceDriver.getIserror());
|
jo.put("isError", hailiangSpecialEmptyStationDeviceDriver.getIserror());
|
||||||
|
|
||||||
|
|
||||||
} else if (device.getDeviceDriver() instanceof HailiangSpecialFullStationDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof HailiangSpecialFullStationDeviceDriver) {
|
||||||
hailiangSpecialFullStationDeviceDriver = (HailiangSpecialFullStationDeviceDriver) device.getDeviceDriver();
|
hailiangSpecialFullStationDeviceDriver = (HailiangSpecialFullStationDeviceDriver) device.getDeviceDriver();
|
||||||
if (hailiangSpecialFullStationDeviceDriver.getMode() == 0) {
|
jo.put("move", StageActorUtil.getMove(hailiangSpecialFullStationDeviceDriver.getMove()));
|
||||||
mode = "未联机";
|
jo.put("mode", StageActorUtil.getMode(hailiangSpecialFullStationDeviceDriver.getMode()));
|
||||||
jo.put("isOnline", false);
|
jo.put("isOnline", StageActorUtil.getMode(hailiangSpecialFullStationDeviceDriver.getMode()));
|
||||||
} else if (hailiangSpecialFullStationDeviceDriver.getMode() == 1) {
|
|
||||||
mode = "联机";
|
|
||||||
jo.put("isOnline", true);
|
|
||||||
}
|
|
||||||
jo.put("mode", mode);
|
|
||||||
jo.put("move", move);
|
|
||||||
jo.put("isError", hailiangSpecialFullStationDeviceDriver.getIserror());
|
jo.put("isError", hailiangSpecialFullStationDeviceDriver.getIserror());
|
||||||
jo.put("hasGoods", hailiangSpecialFullStationDeviceDriver.getHasGoods());
|
jo.put("hasGoods", StageActorUtil.getHasGoods(hailiangSpecialFullStationDeviceDriver.getMove()));
|
||||||
obj.put("device_name", hailiangSpecialFullStationDeviceDriver.getDevice().getDevice_name());
|
obj.put("device_name", hailiangSpecialFullStationDeviceDriver.getDevice().getDevice_name());
|
||||||
|
|
||||||
} else if (device.getDeviceDriver() instanceof HailiangEngravingCacheDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof HailiangEngravingCacheDeviceDriver) {
|
||||||
hailiangEngravingCacheDeviceDriver = (HailiangEngravingCacheDeviceDriver) device.getDeviceDriver();
|
hailiangEngravingCacheDeviceDriver = (HailiangEngravingCacheDeviceDriver) device.getDeviceDriver();
|
||||||
if (hailiangEngravingCacheDeviceDriver.getMove() == 0) {
|
jo.put("hasGoods", StageActorUtil.getHasGoods(hailiangEngravingCacheDeviceDriver.getMove()));
|
||||||
move = "无货";
|
jo.put("move", StageActorUtil.getCacheMove(hailiangEngravingCacheDeviceDriver.getMove()));
|
||||||
jo.put("hasGoods",0);
|
jo.put("mode", StageActorUtil.getMode(hailiangEngravingCacheDeviceDriver.getMode()));
|
||||||
} else if (hailiangEngravingCacheDeviceDriver.getMove() == 1) {
|
jo.put("isOnline", StageActorUtil.getMode(hailiangEngravingCacheDeviceDriver.getMode()));
|
||||||
move = "空料斗";
|
|
||||||
jo.put("hasGoods", 1);
|
|
||||||
} else if (hailiangEngravingCacheDeviceDriver.getMove() == 2) {
|
|
||||||
move = "满料斗";
|
|
||||||
jo.put("hasGoods", 2);
|
|
||||||
}
|
|
||||||
if (hailiangEngravingCacheDeviceDriver.getMode() == 0) {
|
|
||||||
mode = "未联机";
|
|
||||||
jo.put("isOnline", false);
|
|
||||||
} else if (hailiangEngravingCacheDeviceDriver.getMode() == 1) {
|
|
||||||
mode = "联机";
|
|
||||||
jo.put("isOnline", true);
|
|
||||||
}
|
|
||||||
jo.put("mode",mode);
|
|
||||||
jo.put("move", move);
|
|
||||||
jo.put("is_click", true);
|
jo.put("is_click", true);
|
||||||
jo.put("device_type",device.getDevice_type());
|
jo.put("device_type",device.getDevice_type());
|
||||||
jo.put("driver_type",device.getDeviceDriverDefination().getDriverCode());
|
jo.put("driver_type",device.getDeviceDriverDefination().getDriverCode());
|
||||||
@@ -449,51 +398,18 @@ public class StageActorServiceImpl implements StageActorService {
|
|||||||
|
|
||||||
}else if (device.getDeviceDriver() instanceof HailiangPackerStationDeviceDriver) {
|
}else if (device.getDeviceDriver() instanceof HailiangPackerStationDeviceDriver) {
|
||||||
hailiangPackerStationDeviceDriver = (HailiangPackerStationDeviceDriver) device.getDeviceDriver();
|
hailiangPackerStationDeviceDriver = (HailiangPackerStationDeviceDriver) device.getDeviceDriver();
|
||||||
if (hailiangPackerStationDeviceDriver.getMode() == 0) {
|
jo.put("mode", StageActorUtil.getMode(hailiangPackerStationDeviceDriver.getMode()));
|
||||||
mode = "未联机";
|
jo.put("isOnline", StageActorUtil.getMode(hailiangPackerStationDeviceDriver.getMode()));
|
||||||
jo.put("isOnline", false);
|
jo.put("hasGoods", StageActorUtil.getHasGoods(hailiangPackerStationDeviceDriver.getMove()));
|
||||||
} else if (hailiangPackerStationDeviceDriver.getMode() == 1) {
|
jo.put("move", StageActorUtil.getCacheMove(hailiangPackerStationDeviceDriver.getMove()));
|
||||||
mode = "联机";
|
|
||||||
jo.put("isOnline", true);
|
|
||||||
}
|
|
||||||
if (hailiangPackerStationDeviceDriver.getMove() == 0) {
|
|
||||||
move = "无货";
|
|
||||||
jo.put("hasGoods",0);
|
|
||||||
} else if (hailiangPackerStationDeviceDriver.getMove() == 1) {
|
|
||||||
move = "有货";
|
|
||||||
jo.put("hasGoods", 1);
|
|
||||||
}
|
|
||||||
jo.put("mode",mode);
|
|
||||||
jo.put("move", move);
|
|
||||||
String lack_req = "";
|
|
||||||
if (hailiangPackerStationDeviceDriver.getLack_req() == 0) {
|
|
||||||
lack_req = "否";
|
|
||||||
} else {
|
|
||||||
lack_req = "是";
|
|
||||||
}
|
|
||||||
String empty_req = "";
|
|
||||||
if (hailiangPackerStationDeviceDriver.getReq_task_empty() == 0) {
|
|
||||||
empty_req = "否";
|
|
||||||
} else {
|
|
||||||
empty_req = "是";
|
|
||||||
}
|
|
||||||
jo.put("material_type",device.getMaterial_type());
|
jo.put("material_type",device.getMaterial_type());
|
||||||
jo.put("lack_req", lack_req);
|
jo.put("lack_req", StageActorUtil.getIsOrNo(hailiangPackerStationDeviceDriver.getLack_req()));
|
||||||
jo.put("empty_req", empty_req);
|
jo.put("empty_req", StageActorUtil.getIsOrNo(hailiangPackerStationDeviceDriver.getReq_task_empty()));
|
||||||
jo.put("is_click", true);
|
jo.put("is_click", true);
|
||||||
jo.put("device_type",device.getDevice_type());
|
jo.put("device_type",device.getDevice_type());
|
||||||
Boolean requireSucess = hailiangPackerStationDeviceDriver.getRequireSucess();
|
Boolean requireSucess = hailiangPackerStationDeviceDriver.getRequireSucess();
|
||||||
String require = "";
|
jo.put("requestSucess",StageActorUtil.getRequestSucess(requireSucess));
|
||||||
String requestSuccess = "";
|
jo.put("requireSucess",StageActorUtil.getRequireSucess(requireSucess));
|
||||||
if (requireSucess == false){
|
|
||||||
require = "0";
|
|
||||||
requestSuccess = "否";
|
|
||||||
} else {
|
|
||||||
require = "1";
|
|
||||||
requestSuccess = "是";
|
|
||||||
}
|
|
||||||
jo.put("requestSucess",requestSuccess);
|
|
||||||
jo.put("requireSucess",require);
|
|
||||||
jo.put("driver_type",device.getDeviceDriverDefination().getDriverCode());
|
jo.put("driver_type",device.getDeviceDriverDefination().getDriverCode());
|
||||||
obj.put("device_name", hailiangPackerStationDeviceDriver.getDevice().getDevice_name());
|
obj.put("device_name", hailiangPackerStationDeviceDriver.getDevice().getDevice_name());
|
||||||
|
|
||||||
@@ -501,50 +417,36 @@ public class StageActorServiceImpl implements StageActorService {
|
|||||||
agvNdcOneDeviceDriver = (AgvNdcOneDeviceDriver) device.getDeviceDriver();
|
agvNdcOneDeviceDriver = (AgvNdcOneDeviceDriver) device.getDeviceDriver();
|
||||||
IAgv oneAgv = SpringContextHolder.getBean(OneAgvPhase.class);
|
IAgv oneAgv = SpringContextHolder.getBean(OneAgvPhase.class);
|
||||||
obj.put("device_name", agvNdcOneDeviceDriver.getDevice().getDevice_name());
|
obj.put("device_name", agvNdcOneDeviceDriver.getDevice().getDevice_name());
|
||||||
int agvaddr_copy = agvNdcOneDeviceDriver.getAgvaddr_copy();
|
jo.put("address",StageActorUtil.getAddress(storageCellService.findByAddress(agvNdcOneDeviceDriver.getAgvaddr_copy() + "")));
|
||||||
StorageCellDto storageCellDto = storageCellService.findByAddress(agvaddr_copy + "");
|
jo.put("phaseName", oneAgv.getPhaseName(agvNdcOneDeviceDriver.getPhase()));
|
||||||
if (ObjectUtil.isNotEmpty(storageCellDto)){
|
|
||||||
jo.put("address",storageCellDto.getAddress());
|
|
||||||
} else {
|
|
||||||
jo.put("address","");
|
|
||||||
}
|
|
||||||
int phase = agvNdcOneDeviceDriver.getPhase();
|
|
||||||
String phaseName = oneAgv.getPhaseName(phase);
|
|
||||||
jo.put("phaseName",phaseName);
|
|
||||||
} else if (device.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof AgvNdcTwoDeviceDriver) {
|
||||||
agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) device.getDeviceDriver();
|
agvNdcTwoDeviceDriver = (AgvNdcTwoDeviceDriver) device.getDeviceDriver();
|
||||||
IAgv twoAgv = SpringContextHolder.getBean(TwoAgvPhase.class);
|
IAgv twoAgv = SpringContextHolder.getBean(TwoAgvPhase.class);
|
||||||
obj.put("device_name", agvNdcTwoDeviceDriver.getDevice().getDevice_name());
|
obj.put("device_name", agvNdcTwoDeviceDriver.getDevice().getDevice_name());
|
||||||
int agvaddr_copy = agvNdcTwoDeviceDriver.getAgvaddr_copy();
|
jo.put("address",StageActorUtil.getAddress(storageCellService.findByAddress(agvNdcTwoDeviceDriver.getAgvaddr_copy() + "")));
|
||||||
StorageCellDto storageCellDto = storageCellService.findByAddress(agvaddr_copy + "");
|
jo.put("phaseName",twoAgv.getPhaseName(agvNdcTwoDeviceDriver.getPhase()));
|
||||||
if (ObjectUtil.isNotEmpty(storageCellDto)){
|
|
||||||
jo.put("address",storageCellDto.getAddress());
|
|
||||||
} else {
|
|
||||||
jo.put("address","");
|
|
||||||
}
|
|
||||||
int phase = agvNdcTwoDeviceDriver.getPhase();
|
|
||||||
String phaseName = twoAgv.getPhaseName(phase);
|
|
||||||
jo.put("phaseName",phaseName);
|
|
||||||
|
|
||||||
} else if (device.getDeviceDriver() instanceof HailiangCleaningMachineStorageStationDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof HailiangCleaningMachineStorageStationDeviceDriver) {
|
||||||
hailiangCleaningMachineStorageStationDeviceDriver = (HailiangCleaningMachineStorageStationDeviceDriver) device.getDeviceDriver();
|
hailiangCleaningMachineStorageStationDeviceDriver = (HailiangCleaningMachineStorageStationDeviceDriver) device.getDeviceDriver();
|
||||||
// if (hailiangCleaningMachineStorageStationDeviceDriver.getMode() == 0) {
|
jo.put("mode", StageActorUtil.getMode(hailiangCleaningMachineStorageStationDeviceDriver.getMode()));
|
||||||
// mode = "未联机";
|
jo.put("isOnline", StageActorUtil.getMode(hailiangCleaningMachineStorageStationDeviceDriver.getMode()));
|
||||||
// jo.put("isOnline", false);
|
|
||||||
// } else if (hailiangCleaningMachineStorageStationDeviceDriver.getMode() == 1) {
|
|
||||||
// mode = "联机";
|
|
||||||
// jo.put("isOnline", true);
|
|
||||||
// }
|
|
||||||
mode = "联机";
|
|
||||||
jo.put("isOnline", true);
|
|
||||||
jo.put("mode", mode);
|
|
||||||
jo.put("move", move);
|
|
||||||
jo.put("isError", hailiangCleaningMachineStorageStationDeviceDriver.getIserror());
|
jo.put("isError", hailiangCleaningMachineStorageStationDeviceDriver.getIserror());
|
||||||
obj.put("device_name", hailiangCleaningMachineStorageStationDeviceDriver.getDevice().getDevice_name());
|
obj.put("device_name", hailiangCleaningMachineStorageStationDeviceDriver.getDevice().getDevice_name());
|
||||||
jo.put("error", hailiangCleaningMachineStorageStationDeviceDriver.getError());
|
jo.put("error", hailiangCleaningMachineStorageStationDeviceDriver.getError());
|
||||||
jo.put("weight", hailiangCleaningMachineStorageStationDeviceDriver.getSilo_weight());
|
jo.put("weight", hailiangCleaningMachineStorageStationDeviceDriver.getSilo_weight());
|
||||||
jo.put("qty", hailiangCleaningMachineStorageStationDeviceDriver.getFull_number());
|
jo.put("qty", hailiangCleaningMachineStorageStationDeviceDriver.getFull_number());
|
||||||
jo.put("material", hailiangCleaningMachineStorageStationDeviceDriver.getMaterial());
|
jo.put("material", hailiangCleaningMachineStorageStationDeviceDriver.getMaterial());
|
||||||
|
} else if (device.getDeviceDriver() instanceof HailiangEngravingMachineDeviceDriver) {
|
||||||
|
hailiangEngravingMachineDeviceDriver = (HailiangEngravingMachineDeviceDriver) device.getDeviceDriver();
|
||||||
|
jo.put("isOnline", StageActorUtil.getMove(hailiangEngravingMachineDeviceDriver.getMove()));
|
||||||
|
jo.put("hasGoods",StageActorUtil.getHasGoods(hailiangEngravingMachineDeviceDriver.getMove()));
|
||||||
|
jo.put("empty_req",StageActorUtil.getIsOrNo(hailiangEngravingMachineDeviceDriver.getEmpty_req()));
|
||||||
|
jo.put("mode", StageActorUtil.getMode(hailiangEngravingMachineDeviceDriver.getMode()));
|
||||||
|
jo.put("full_req", StageActorUtil.getIsOrNo(hailiangEngravingMachineDeviceDriver.getFull_req()));
|
||||||
|
jo.put("move", StageActorUtil.getMove(hailiangEngravingMachineDeviceDriver.getMove()));
|
||||||
|
obj.put("device_name", hailiangEngravingMachineDeviceDriver.getDevice().getDevice_name());
|
||||||
|
jo.put("error", hailiangEngravingMachineDeviceDriver.getError());
|
||||||
|
jo.put("material_type", device.getMaterial_type());
|
||||||
} else if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
} else if (device.getDeviceDriver() instanceof StandardAutodoorDeviceDriver) {
|
||||||
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
standardAutodoorDeviceDriver = (StandardAutodoorDeviceDriver) device.getDeviceDriver();
|
||||||
if (standardAutodoorDeviceDriver.getMode() == 0) {
|
if (standardAutodoorDeviceDriver.getMode() == 0) {
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package org.nl.acs.stage.service.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import org.nl.acs.device.service.dto.StorageCellDto;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class StageActorUtil {
|
||||||
|
|
||||||
|
public static String getMode(int mode){
|
||||||
|
if (mode == 1){
|
||||||
|
return "联机";
|
||||||
|
}
|
||||||
|
return "未联机";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getMove(int move){
|
||||||
|
if (move == 0){
|
||||||
|
return "无货";
|
||||||
|
}
|
||||||
|
return "有货";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getCacheMove(int move){
|
||||||
|
if (move == 0){
|
||||||
|
return "无货";
|
||||||
|
} else if (move == 1) {
|
||||||
|
return "空料斗";
|
||||||
|
}
|
||||||
|
return "满料斗";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Boolean getIsOnline(int mode){
|
||||||
|
if (mode == 0){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getHasGoods(int move){
|
||||||
|
if (move == 0){
|
||||||
|
return 0;
|
||||||
|
} else if (move == 2){
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getHasGoods(int move, int empty){
|
||||||
|
if (move == 0){
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getAddress(StorageCellDto storageCellDto){
|
||||||
|
if (ObjectUtil.isNotEmpty(storageCellDto)){
|
||||||
|
return storageCellDto.getStorage_code();
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getRequireSucess(Boolean requireSucess){
|
||||||
|
if (requireSucess == false){
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
|
return "1";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getRequestSucess(Boolean requireSucess){
|
||||||
|
if (requireSucess == false){
|
||||||
|
return "否";
|
||||||
|
}
|
||||||
|
return "是";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getIsOrNo(int i){
|
||||||
|
if (i == 0){
|
||||||
|
return "否";
|
||||||
|
}
|
||||||
|
return "是";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
:disabled="item.device_code == ''"
|
:disabled="item.device_code == ''"
|
||||||
:popper-class="isErrorColor(item)"
|
:popper-class="isErrorColor(item)"
|
||||||
>
|
>
|
||||||
<div v-if="item.device_code !== ''">
|
<div style="height: 390px;overflow-y: auto" v-if="item.device_code !== ''">
|
||||||
<div style="padding: 3px;">
|
<div style="padding: 3px;">
|
||||||
设备信息
|
设备信息
|
||||||
</div>
|
</div>
|
||||||
@@ -448,7 +448,7 @@ export default {
|
|||||||
const obj = { name: '缺料请求', value: data[val] }
|
const obj = { name: '缺料请求', value: data[val] }
|
||||||
arr.push(obj)
|
arr.push(obj)
|
||||||
} else if (val === 'empty_req') {
|
} else if (val === 'empty_req') {
|
||||||
const obj = { name: '请求取走空料斗', value: data[val] }
|
const obj = { name: '空箱请求', value: data[val] }
|
||||||
arr.push(obj)
|
arr.push(obj)
|
||||||
} else if (val === 'address') {
|
} else if (val === 'address') {
|
||||||
const obj = { name: 'agv位置', value: data[val] }
|
const obj = { name: 'agv位置', value: data[val] }
|
||||||
@@ -456,6 +456,9 @@ export default {
|
|||||||
} else if (val === 'phaseName') {
|
} else if (val === 'phaseName') {
|
||||||
const obj = { name: 'phase', value: data[val] }
|
const obj = { name: 'phase', value: data[val] }
|
||||||
arr.push(obj)
|
arr.push(obj)
|
||||||
|
} else if (val === 'full_req') {
|
||||||
|
const obj = { name: '满箱请求', value: data[val] }
|
||||||
|
arr.push(obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return arr
|
return arr
|
||||||
|
|||||||
Reference in New Issue
Block a user