纽迪希亚2更新
This commit is contained in:
@@ -647,6 +647,7 @@ public class AgvServiceImpl implements AgvService {
|
||||
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
SpecialOrdinarySiteDeviceDriver specialOrdinarySiteDeviceDriver;
|
||||
NdxySpecialTwoDeviceDriver ndxySpecialTwoDeviceDriver;
|
||||
//请求进入
|
||||
if ("onEntry".equals(type)) {
|
||||
|
||||
@@ -723,6 +724,7 @@ public class AgvServiceImpl implements AgvService {
|
||||
if (standardInspectSiteDeviceDriver.getMode() == 2 && standardInspectSiteDeviceDriver.getMove() == 0) {
|
||||
inst.setExecute_device_code(processingVehicle);
|
||||
inst.setExecute_status("2");
|
||||
standardInspectSiteDeviceDriver.setFlag(2);
|
||||
is_feedback = true;
|
||||
}
|
||||
//放货完成
|
||||
@@ -730,6 +732,28 @@ public class AgvServiceImpl implements AgvService {
|
||||
if (standardInspectSiteDeviceDriver.getMode() == 2 && standardInspectSiteDeviceDriver.getMove() > 0) {
|
||||
inst.setExecute_device_code(address);
|
||||
inst.setExecute_status("4");
|
||||
standardInspectSiteDeviceDriver.setFlag(4);
|
||||
is_feedback = true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (addressdevice.getDeviceDriver() instanceof NdxySpecialTwoDeviceDriver) {
|
||||
ndxySpecialTwoDeviceDriver = (NdxySpecialTwoDeviceDriver) addressdevice.getDeviceDriver();
|
||||
//取货完成
|
||||
if ("Load".equals(action)) {
|
||||
if (ndxySpecialTwoDeviceDriver.getMode() == 2 && ndxySpecialTwoDeviceDriver.getMove() == 0) {
|
||||
inst.setExecute_device_code(processingVehicle);
|
||||
inst.setExecute_status("2");
|
||||
ndxySpecialTwoDeviceDriver.setFlag(2);
|
||||
is_feedback = true;
|
||||
}
|
||||
//放货完成
|
||||
} else if ("Unload".equals(action)) {
|
||||
if (ndxySpecialTwoDeviceDriver.getMode() == 2 && ndxySpecialTwoDeviceDriver.getMove() > 0) {
|
||||
inst.setExecute_device_code(address);
|
||||
inst.setExecute_status("4");
|
||||
ndxySpecialTwoDeviceDriver.setFlag(4);
|
||||
is_feedback = true;
|
||||
}
|
||||
}
|
||||
@@ -1070,6 +1094,7 @@ public class AgvServiceImpl implements AgvService {
|
||||
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
StandardStorageDeviceDriver standardStorageDeviceDriver;
|
||||
NdxySpecialTwoDeviceDriver ndxySpecialTwoDeviceDriver;
|
||||
//mes = AgvClientXZ.mes(zlbh, device, type);
|
||||
//暂定 0就绪 1请求取货 2取货完成 3请求放货 4放货完成 5取货完成离开 6放货完成离开 7请求进入区域 8请求离开区域
|
||||
if ((addressdevice.getDeviceDriver() instanceof StandardStorageDeviceDriver)) {
|
||||
|
||||
@@ -19,12 +19,14 @@ import org.nl.acs.device_driver.DeviceDriverDefination;
|
||||
import org.nl.acs.device_driver.ScannerDeviceDriver;
|
||||
import org.nl.acs.device_driver.defination.OpcDeviceDriverDefination;
|
||||
import org.nl.acs.device_driver.electric_fence.ElectricFenceDeviceDriver;
|
||||
import org.nl.acs.device_driver.ndxy_special_two.NdxySpecialTwoDeviceDriver;
|
||||
import org.nl.acs.device_driver.special_ordinary_site.SpecialOrdinarySiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_conveyor_control_with_scanner.StandardCoveyorControlWithScannerDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_emptypallet_site.StandardEmptyPalletSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_scanner.StandardScannerDeviceDriver;
|
||||
import org.nl.acs.device_driver.ykbk_special.YkbkSpecialDeviceDriver;
|
||||
import org.nl.acs.opc.Device;
|
||||
import org.nl.acs.opc.DeviceAppService;
|
||||
import org.nl.acs.opc.DeviceAppServiceImpl;
|
||||
@@ -852,6 +854,7 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
//无光电特殊站点
|
||||
SpecialOrdinarySiteDeviceDriver specialOrdinarySiteDeviceDriver;
|
||||
StandardEmptyPalletSiteDeviceDriver standardEmptyPalletSiteDeviceDriver;
|
||||
NdxySpecialTwoDeviceDriver ndxySpecialTwoDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
if (!StrUtil.isEmpty(hasGoodStatus)) {
|
||||
@@ -879,6 +882,13 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
standardOrdinarySiteDeviceDriver.setRemark("");
|
||||
device.setRemark("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(islock)) {
|
||||
standardOrdinarySiteDeviceDriver.setIslock(Boolean.valueOf(islock));
|
||||
device.setIslock(islock);
|
||||
} else {
|
||||
standardOrdinarySiteDeviceDriver.setIslock(false);
|
||||
device.setIslock("");
|
||||
}
|
||||
WQLObject runpointwo = WQLObject.getWQLObject("acs_device_runpoint");
|
||||
JSONObject json = runpointwo.query("device_code ='" + device_code + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(json)) {
|
||||
@@ -922,6 +932,14 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
} else if (device.getDeviceDriver() instanceof StandardEmptyPalletSiteDeviceDriver) {
|
||||
standardEmptyPalletSiteDeviceDriver = (StandardEmptyPalletSiteDeviceDriver) device.getDeviceDriver();
|
||||
standardEmptyPalletSiteDeviceDriver.setContainer(vehicle_code);
|
||||
} else if (device.getDeviceDriver() instanceof NdxySpecialTwoDeviceDriver) {
|
||||
ndxySpecialTwoDeviceDriver = (NdxySpecialTwoDeviceDriver) device.getDeviceDriver();
|
||||
ndxySpecialTwoDeviceDriver.setMaterial(material_type);
|
||||
ndxySpecialTwoDeviceDriver.setQty(quantity);
|
||||
ndxySpecialTwoDeviceDriver.setRemark(remark);
|
||||
device.setMaterial_type(material_type);
|
||||
device.setQuantity(quantity);
|
||||
device.setRemark(remark);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public class ItemProtocol {
|
||||
public static String item_heartbeat = "heartbeat";
|
||||
public static String item_mode = "mode";
|
||||
public static String item_move = "move";
|
||||
public static String item_ioaction = "ioaction";
|
||||
public static String item_action = "action";
|
||||
public static String item_error = "error";
|
||||
public static String item_task = "task";
|
||||
public static String item_to_command = "to_command";
|
||||
@@ -40,8 +40,8 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_move);
|
||||
}
|
||||
|
||||
public int getIoaction() {
|
||||
return this.getOpcIntegerValue(item_ioaction);
|
||||
public int getAction() {
|
||||
return this.getOpcIntegerValue(item_action);
|
||||
}
|
||||
|
||||
public int getError() {
|
||||
@@ -89,6 +89,7 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_heartbeat, "心跳", "DB600.B0"));
|
||||
list.add(new ItemDto(item_mode, "工作状态", "DB600.B1", Boolean.valueOf(true)));
|
||||
list.add(new ItemDto(item_move, "光电开关信号", "DB600.B2"));
|
||||
list.add(new ItemDto(item_action, "取放信号", "DB600.B3"));
|
||||
list.add(new ItemDto(item_error, "报警信号", "DB600.B6"));
|
||||
list.add(new ItemDto(item_task, "任务号", "DB600.D8"));
|
||||
return list;
|
||||
|
||||
@@ -60,6 +60,7 @@ public class NdxySpecialTwoDefination implements OpcDeviceDriverDefination {
|
||||
list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB600.B0"));
|
||||
list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB600.B1", true));
|
||||
list.add(new ItemDto(ItemProtocol.item_move, "光电开关信号", "DB600.B2"));
|
||||
list.add(new ItemDto(ItemProtocol.item_action, "取放信号", "DB600.B3"));
|
||||
list.add(new ItemDto(ItemProtocol.item_error, "报警信号", "DB600.B6"));
|
||||
list.add(new ItemDto(ItemProtocol.item_task, "任务号", "DB600.D7"));
|
||||
return list;
|
||||
|
||||
@@ -66,10 +66,12 @@ public class NdxySpecialTwoDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
int error = 0;
|
||||
int move = 0;
|
||||
int task = 0;
|
||||
int action = 0;
|
||||
int last_mode = 0;
|
||||
int last_error = 0;
|
||||
int last_move = 0;
|
||||
int last_task = 0;
|
||||
int last_action = 0;
|
||||
Boolean isonline = true;
|
||||
int hasGoods = 0;
|
||||
String message = null;
|
||||
@@ -136,6 +138,7 @@ public class NdxySpecialTwoDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
mode = this.itemProtocol.getMode();
|
||||
error = this.itemProtocol.getError();
|
||||
move = this.itemProtocol.getMove();
|
||||
action = this.itemProtocol.getAction();
|
||||
task = this.itemProtocol.getTask();
|
||||
hasGoods = this.itemProtocol.getMove();
|
||||
|
||||
@@ -154,6 +157,10 @@ public class NdxySpecialTwoDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
this.execute_log.setResource(this.devicecode, this.device.getDevice_name());
|
||||
this.execute_log.log("设备:" + device_code + ",last_error -> error:" + last_error + "->" + error);
|
||||
}
|
||||
if (action != last_action) {
|
||||
this.execute_log.setResource(this.devicecode, this.device.getDevice_name());
|
||||
this.execute_log.log("设备:" + device_code + ",last_action -> action:" + last_action + "->" + action);
|
||||
}
|
||||
|
||||
if (this.getApply_handling()) {
|
||||
String link_device_code = this.getDevice().getExtraValue().get("link_device_code").toString();
|
||||
@@ -231,12 +238,12 @@ public class NdxySpecialTwoDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
|
||||
switch (flag) {
|
||||
//取货完成
|
||||
case 1:
|
||||
case 2:
|
||||
writing(2);
|
||||
return;
|
||||
//放货完成
|
||||
case 2:
|
||||
writing(3);
|
||||
case 4:
|
||||
writing(4);
|
||||
return;
|
||||
|
||||
}
|
||||
@@ -244,6 +251,7 @@ public class NdxySpecialTwoDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
last_error = error;
|
||||
last_move = move;
|
||||
last_task = task;
|
||||
last_action = action;
|
||||
}
|
||||
|
||||
|
||||
@@ -300,7 +308,8 @@ public class NdxySpecialTwoDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
if (standardOrdinarySiteDeviceDriver.getHasGoods() == 0
|
||||
&& ObjectUtil.isEmpty(taskserver.findByNextCode(next_device_code))
|
||||
&& ObjectUtil.isEmpty(taskserver.findByStartCode(this.device_code))) {
|
||||
&& ObjectUtil.isEmpty(taskserver.findByStartCode(this.device_code))
|
||||
&& this.action == 1) {
|
||||
break;
|
||||
} else {
|
||||
next_device_code = "";
|
||||
@@ -325,6 +334,8 @@ public class NdxySpecialTwoDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
WQLObject wo = WQLObject.getWQLObject("acs_task");
|
||||
JSONObject json = JSONObject.fromObject(dto);
|
||||
wo.insert(json);
|
||||
Device device = appService.findDeviceByCode(next_device_code);
|
||||
device.setIslock("true");
|
||||
this.setRequireSucess(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -416,7 +416,19 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
JSONObject jo = new JSONObject();
|
||||
JSONObject jo2 = new JSONObject();
|
||||
|
||||
jo.put("hasGoodStatus", "3");
|
||||
if (!StrUtil.isEmpty(dto.getMaterial())) {
|
||||
if (!StrUtil.equals(dto.getMaterial(), "1")) {
|
||||
jo.put("hasGoodStatus", "2");
|
||||
jo.put("material_type", dto.getMaterial());
|
||||
} else {
|
||||
jo.put("hasGoodStatus", "1");
|
||||
jo.put("material_type", "1");
|
||||
}
|
||||
|
||||
} else {
|
||||
jo.put("hasGoodStatus", "1");
|
||||
jo.put("material_type", "1");
|
||||
}
|
||||
jo.put("material_type", dto.getMaterial());
|
||||
jo.put("device_code", dto.getStart_device_code());
|
||||
jo.put("quantity", dto.getQuantity());
|
||||
@@ -426,7 +438,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
deviceService.changeDeviceStatus(jo);
|
||||
Device deviceByCode = deviceAppService.findDeviceByCode(dto.getNext_device_code());
|
||||
jo2.put("device_code", dto.getNext_device_code());
|
||||
jo2.put("hasGoodStatus", "3");
|
||||
jo2.put("hasGoodStatus", deviceByCode.getHas_goods());
|
||||
jo2.put("quantity", deviceByCode.getQuantity());
|
||||
jo2.put("remark", deviceByCode.getRemark());
|
||||
jo2.put("material_type", deviceByCode.getMaterial_type());
|
||||
|
||||
@@ -57,7 +57,7 @@ public interface NdxyHandService {
|
||||
Map<String, Object> queryInst(Map<String, String> jsonObject);
|
||||
|
||||
/**
|
||||
* 查询任务
|
||||
* 创建特殊任务
|
||||
*
|
||||
* @param jsonObject 条件
|
||||
* @return Map<String, Object>
|
||||
@@ -111,5 +111,11 @@ public interface NdxyHandService {
|
||||
*/
|
||||
Map<String, Object> queryMaterial();
|
||||
|
||||
/**
|
||||
* 创建普通任务
|
||||
*
|
||||
* @param whereJson 条件
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> createTask2(Map<String, String> whereJson);
|
||||
}
|
||||
|
||||
@@ -149,9 +149,6 @@ public class NdxyTwoHandServiceImpl implements NdxyTwoHandService {
|
||||
} else if (standardOrdinarySiteDeviceDriver.getHasGoods() == 2) {
|
||||
status = "2";
|
||||
move = "有托盘有货";
|
||||
} else if (standardOrdinarySiteDeviceDriver.getHasGoods() == 3) {
|
||||
status = "3";
|
||||
move = "有任务";
|
||||
}
|
||||
}
|
||||
material = device.getMaterial_type();
|
||||
@@ -220,9 +217,6 @@ public class NdxyTwoHandServiceImpl implements NdxyTwoHandService {
|
||||
} else if (standardOrdinarySiteDeviceDriver.getHasGoods() == 2) {
|
||||
status = "2";
|
||||
move = "有托盘有货";
|
||||
} else if (standardOrdinarySiteDeviceDriver.getHasGoods() == 3) {
|
||||
status = "3";
|
||||
move = "有任务";
|
||||
}
|
||||
}
|
||||
material = device.getMaterial_type();
|
||||
@@ -291,9 +285,6 @@ public class NdxyTwoHandServiceImpl implements NdxyTwoHandService {
|
||||
} else if (standardOrdinarySiteDeviceDriver.getHasGoods() == 2) {
|
||||
status = "2";
|
||||
move = "有托盘有货";
|
||||
} else if (standardOrdinarySiteDeviceDriver.getHasGoods() == 3) {
|
||||
status = "3";
|
||||
move = "有任务";
|
||||
}
|
||||
}
|
||||
material = device.getMaterial_type();
|
||||
@@ -363,9 +354,6 @@ public class NdxyTwoHandServiceImpl implements NdxyTwoHandService {
|
||||
} else if (standardOrdinarySiteDeviceDriver.getHasGoods() == 2) {
|
||||
status = "2";
|
||||
move = "有托盘有货";
|
||||
} else if (standardOrdinarySiteDeviceDriver.getHasGoods() == 3) {
|
||||
status = "3";
|
||||
move = "有任务";
|
||||
}
|
||||
}
|
||||
material = device.getMaterial_type();
|
||||
@@ -790,7 +778,7 @@ public class NdxyTwoHandServiceImpl implements NdxyTwoHandService {
|
||||
String next_device_code = instdto.getNext_device_code();
|
||||
Device device = deviceAppService.findDeviceByCode(next_device_code);
|
||||
if (ObjectUtil.isNotEmpty(taskService.findByNextCode(next_device_code))) {
|
||||
device.setHas_goods(3);
|
||||
device.setIslock("true");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
jo.put("code", "2");
|
||||
@@ -890,10 +878,6 @@ public class NdxyTwoHandServiceImpl implements NdxyTwoHandService {
|
||||
//强制完成
|
||||
if (type.equals("2")) {
|
||||
//手工完成
|
||||
Device deviceByCode = deviceAppService.findDeviceByCode(start_point_code);
|
||||
Device next_device = deviceAppService.findDeviceByCode(next_point_code);
|
||||
next_device.setHas_goods(0);
|
||||
deviceByCode.setHas_goods(2);
|
||||
TaskService taskService = SpringContextHolder.getBean(TaskServiceImpl.class);
|
||||
TaskDto acsTask = (TaskDto) JSONObject.toBean(taskjo, TaskDto.class);
|
||||
InstructionService instructionservice = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
@@ -905,8 +889,12 @@ public class NdxyTwoHandServiceImpl implements NdxyTwoHandService {
|
||||
return jo;
|
||||
}
|
||||
taskService.finish(acsTask.getTask_id());
|
||||
Device startDevice = deviceAppService.findDeviceByCode(start_point_code);
|
||||
Device nextDevice = deviceAppService.findDeviceByCode(next_point_code);
|
||||
nextDevice.setIslock("false");
|
||||
startDevice.setIslock("false");
|
||||
if (ObjectUtil.isNotEmpty(taskService.findByNextCode(next_point_code))) {
|
||||
next_device.setHas_goods(3);
|
||||
nextDevice.setIslock("true");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -204,14 +204,7 @@ export function selectAGVList() {
|
||||
})
|
||||
}
|
||||
|
||||
export function agvTaskType(data) {
|
||||
return request({
|
||||
url: 'api/device/agvTaskType',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, selectDeviceList, selectDeviceListByRegion, callAgv, responseAgv, selectDeviceDevicerInfo, autoCreateTask,
|
||||
changeDeviceStatus, cleanTask, queryStorageExtra, selectConDeviceList, saveBarcode, selectDeviceListOne, selectDeviceListTwo, selectDeviceListThree,
|
||||
addMaterial, cleanMaterial, changeFenceStatus,reload, cleans1, cleans2, enterSite1, enterSite2, cleans3, selectAGVList, agvTaskType}
|
||||
addMaterial, cleanMaterial, changeFenceStatus,reload, cleans1, cleans2, enterSite1, enterSite2, cleans3, selectAGVList}
|
||||
|
||||
@@ -190,16 +190,15 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设备状态" label-width="80px">
|
||||
<el-radio-group v-model="form.agvTaskType">
|
||||
<el-radio-button :label="0">全部执行</el-radio-button>
|
||||
<el-radio-button :label="1">入库</el-radio-button>
|
||||
<el-radio-button :label="11">出库</el-radio-button>
|
||||
<el-radio-group v-model="form.suspended">
|
||||
<el-radio-button :label="0">暂停</el-radio-button>
|
||||
<el-radio-button :label="1">恢复</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible3 = false">取 消</el-button>
|
||||
<el-button type="primary" @click="agvTaskType">确 定</el-button>
|
||||
<el-button type="primary" @click="statusSave">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -270,7 +269,7 @@ export default {
|
||||
if (clickObj.data.device_type === 'autodoor') {
|
||||
this.dialogFormVisible2 = true
|
||||
}
|
||||
if (clickObj.data.device_type === 'agv') {
|
||||
if (clickObj.data.device_type === 'safetydoor') {
|
||||
this.dialogFormVisible3 = true
|
||||
}
|
||||
if (clickObj.data.driver_code === 'standard_emptypallet_site') {
|
||||
@@ -422,16 +421,6 @@ export default {
|
||||
},
|
||||
statusSave() {
|
||||
deviceCrud.changeFenceStatus(this.form).then(res => {
|
||||
this.notify('操作成功', 'success')
|
||||
this.dialogFormVisible2 = false
|
||||
this.initArr2()
|
||||
}).catch(err => {
|
||||
this.dialogFormVisible2 = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
agvTaskType() {
|
||||
deviceCrud.agvTaskType(this.form).then(res => {
|
||||
this.notify('操作成功', 'success')
|
||||
this.dialogFormVisible3 = false
|
||||
this.initArr2()
|
||||
|
||||
Reference in New Issue
Block a user