更新
This commit is contained in:
@@ -13,6 +13,7 @@ import org.nl.acs.agv.server.dto.AgvDto;
|
|||||||
import org.nl.acs.config.AcsConfig;
|
import org.nl.acs.config.AcsConfig;
|
||||||
import org.nl.acs.config.server.AcsConfigService;
|
import org.nl.acs.config.server.AcsConfigService;
|
||||||
import org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine.LnshLaminatingMachineDeviceDriver;
|
import org.nl.acs.device_driver.lnsh.lnsh_Laminating_machine.LnshLaminatingMachineDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.lnsh.lnsh_palletizing_manipulator_site.LnshPalletizingManipulatorSiteDeviceDriver;
|
||||||
import org.nl.acs.device_driver.lnsh.lnsh_station.LnshStationDeviceDriver;
|
import org.nl.acs.device_driver.lnsh.lnsh_station.LnshStationDeviceDriver;
|
||||||
import org.nl.acs.device_driver.special_ordinary_site.SpecialOrdinarySiteDeviceDriver;
|
import org.nl.acs.device_driver.special_ordinary_site.SpecialOrdinarySiteDeviceDriver;
|
||||||
import org.nl.acs.device_driver.standard_autodoor.StandardAutodoorDeviceDriver;
|
import org.nl.acs.device_driver.standard_autodoor.StandardAutodoorDeviceDriver;
|
||||||
@@ -421,6 +422,7 @@ public class MagicAgvServiceImpl implements MagicAgvService {
|
|||||||
SpecialOrdinarySiteDeviceDriver specialOrdinarySiteDeviceDriver;
|
SpecialOrdinarySiteDeviceDriver specialOrdinarySiteDeviceDriver;
|
||||||
LnshStationDeviceDriver lnshStationDeviceDriver;
|
LnshStationDeviceDriver lnshStationDeviceDriver;
|
||||||
LnshLaminatingMachineDeviceDriver lnshLaminatingMachineDeviceDriver;
|
LnshLaminatingMachineDeviceDriver lnshLaminatingMachineDeviceDriver;
|
||||||
|
LnshPalletizingManipulatorSiteDeviceDriver lnshPalletizingManipulatorSiteDeviceDriver;
|
||||||
|
|
||||||
//请求进入
|
//请求进入
|
||||||
if ("onEntry".equals(type)) {
|
if ("onEntry".equals(type)) {
|
||||||
@@ -511,6 +513,25 @@ public class MagicAgvServiceImpl implements MagicAgvService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//嘉耐码垛机械手工位
|
||||||
|
if (addressdevice.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
|
||||||
|
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) addressdevice.getDeviceDriver();
|
||||||
|
//请求取货
|
||||||
|
if ("Load".equals(action)) {
|
||||||
|
if (lnshPalletizingManipulatorSiteDeviceDriver.getMode() == 2 && lnshPalletizingManipulatorSiteDeviceDriver.getMove() > 0) {
|
||||||
|
inst.setExecute_status("1");
|
||||||
|
lnshPalletizingManipulatorSiteDeviceDriver.setFlag(1);
|
||||||
|
is_feedback = true;
|
||||||
|
}
|
||||||
|
//请求放货
|
||||||
|
} else if ("Unload".equals(action)) {
|
||||||
|
if (lnshPalletizingManipulatorSiteDeviceDriver.getMode() == 2 && lnshPalletizingManipulatorSiteDeviceDriver.getMove() == 0) {
|
||||||
|
inst.setExecute_status("3");
|
||||||
|
lnshPalletizingManipulatorSiteDeviceDriver.setFlag(3);
|
||||||
|
is_feedback = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (addressdevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
if (addressdevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver();
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver();
|
||||||
//请求取货
|
//请求取货
|
||||||
@@ -561,7 +582,7 @@ public class MagicAgvServiceImpl implements MagicAgvService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//晟华工位模板
|
//嘉耐工位模板
|
||||||
if (addressdevice.getDeviceDriver() instanceof LnshStationDeviceDriver) {
|
if (addressdevice.getDeviceDriver() instanceof LnshStationDeviceDriver) {
|
||||||
lnshStationDeviceDriver = (LnshStationDeviceDriver) addressdevice.getDeviceDriver();
|
lnshStationDeviceDriver = (LnshStationDeviceDriver) addressdevice.getDeviceDriver();
|
||||||
//取货完成
|
//取货完成
|
||||||
@@ -582,6 +603,27 @@ public class MagicAgvServiceImpl implements MagicAgvService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//嘉耐码垛机械手工位
|
||||||
|
if (addressdevice.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
|
||||||
|
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) addressdevice.getDeviceDriver();
|
||||||
|
//取货完成
|
||||||
|
if ("Load".equals(action)) {
|
||||||
|
if (lnshPalletizingManipulatorSiteDeviceDriver.getMode() == 2 && lnshPalletizingManipulatorSiteDeviceDriver.getMove() == 0) {
|
||||||
|
inst.setExecute_device_code(processingVehicle);
|
||||||
|
inst.setExecute_status("2");
|
||||||
|
lnshPalletizingManipulatorSiteDeviceDriver.setFlag(2);
|
||||||
|
is_feedback = true;
|
||||||
|
}
|
||||||
|
//放货完成
|
||||||
|
} else if ("Unload".equals(action)) {
|
||||||
|
if (lnshPalletizingManipulatorSiteDeviceDriver.getMode() == 2 && lnshPalletizingManipulatorSiteDeviceDriver.getMove() > 0) {
|
||||||
|
inst.setExecute_device_code(address);
|
||||||
|
inst.setExecute_status("4");
|
||||||
|
lnshPalletizingManipulatorSiteDeviceDriver.setFlag(4);
|
||||||
|
is_feedback = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (addressdevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
if (addressdevice.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver();
|
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) addressdevice.getDeviceDriver();
|
||||||
//取货完成
|
//取货完成
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||||
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.get("status").toString(),"200")) {
|
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.get("status").toString(),"200")) {
|
||||||
this.writing(1);
|
this.writing(mode);
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -334,13 +334,21 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (flag) {
|
switch (flag) {
|
||||||
|
//请求取货
|
||||||
|
case 1:
|
||||||
|
writing(12);
|
||||||
|
return;
|
||||||
//取货完成
|
//取货完成
|
||||||
case 2:
|
case 2:
|
||||||
writing(2);
|
writing(10);
|
||||||
|
return;
|
||||||
|
//请求放货
|
||||||
|
case 3:
|
||||||
|
writing(13);
|
||||||
return;
|
return;
|
||||||
//放货完成
|
//放货完成
|
||||||
case 4:
|
case 4:
|
||||||
writing(3);
|
writing(11);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,10 +257,18 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (flag) {
|
switch (flag) {
|
||||||
|
//请求取货
|
||||||
|
case 1:
|
||||||
|
writing(5);
|
||||||
|
return;
|
||||||
//取货完成
|
//取货完成
|
||||||
case 2:
|
case 2:
|
||||||
writing(2);
|
writing(2);
|
||||||
return;
|
return;
|
||||||
|
//请求放货
|
||||||
|
case 3:
|
||||||
|
writing(6);
|
||||||
|
return;
|
||||||
//放货完成
|
//放货完成
|
||||||
case 4:
|
case 4:
|
||||||
writing(3);
|
writing(3);
|
||||||
@@ -356,7 +364,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("device_code",this.device_code);
|
json.put("device_code",this.device_code);
|
||||||
json.put("vehicle_code",barcode);
|
json.put("vehicle_code",barcode);
|
||||||
json.put("task_code",inst.getTask_code());
|
// json.put("task_code",inst.getTask_code());
|
||||||
|
|
||||||
HttpResponse result = acsToWmsService.applyIntoKiln(json);
|
HttpResponse result = acsToWmsService.applyIntoKiln(json);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (ObjectUtil.isNotEmpty(result)) {
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
dto.setOrder_code(producetask_code);
|
dto.setOrder_code(producetask_code);
|
||||||
dto.setProduct_code(product_code);
|
dto.setProduct_code(product_code);
|
||||||
dto.setDevice_code(device_code);
|
dto.setDevice_code(device_code);
|
||||||
dto.setOrder_status("1");
|
dto.setOrder_status("0");
|
||||||
dto.setMaterial_code(material_code);
|
dto.setMaterial_code(material_code);
|
||||||
dto.setMaterial_name(material_name);
|
dto.setMaterial_name(material_name);
|
||||||
dto.setCust_code(cust_code);
|
dto.setCust_code(cust_code);
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class ProduceshiftorderDto implements Serializable {
|
|||||||
/** 设备编码 */
|
/** 设备编码 */
|
||||||
private String device_code;
|
private String device_code;
|
||||||
|
|
||||||
/** 工单状态 */
|
/** 工单状态 0-就绪、1-执行中 2-自动完成 3-手动完成*/
|
||||||
private String order_status;
|
private String order_status;
|
||||||
|
|
||||||
/** 下料数量 */
|
/** 下料数量 */
|
||||||
|
|||||||
Reference in New Issue
Block a user