固化室按照最新逻辑调整
This commit is contained in:
@@ -48,7 +48,8 @@ import java.util.Map;
|
||||
public class GuhuashiSiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
|
||||
private AcsToWmsService acsToWmsService=SpringContextHolder.getBean("acsToWmsServiceImpl");;
|
||||
private AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
|
||||
;
|
||||
|
||||
String devicecode;
|
||||
|
||||
@@ -76,7 +77,7 @@ public class GuhuashiSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
int VW7040 = 0;
|
||||
int VW7042 = 0;
|
||||
int VW7044 = 0;
|
||||
int VW7046 = 0;
|
||||
int VD7046 = 0;
|
||||
int VW7056 = 0;
|
||||
int VW7058 = 0;
|
||||
int VW7076 = 0;
|
||||
@@ -106,7 +107,7 @@ public class GuhuashiSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
int last_VW7040 = 0;
|
||||
int last_VW7042 = 0;
|
||||
int last_VW7044 = 0;
|
||||
int last_VW7046 = 0;
|
||||
int last_VD7046 = 0;
|
||||
int last_VW7056 = 0;
|
||||
int last_VW7058 = 0;
|
||||
int last_VW7076 = 0;
|
||||
@@ -142,43 +143,49 @@ public class GuhuashiSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
VW7040 = this.itemProtocol.getVW7040();
|
||||
VW7042 = this.itemProtocol.getVW7042();
|
||||
VW7044 = this.itemProtocol.getVW7044();
|
||||
VW7046 = this.itemProtocol.getVW7046();
|
||||
VD7046 = this.itemProtocol.getVD7046();
|
||||
VW7056 = this.itemProtocol.getVW7056();
|
||||
VW7058 = this.itemProtocol.getVW7058();
|
||||
// VW7076 = this.itemProtocol.getVW7076();
|
||||
// VW70001 = this.itemProtocol.getVW70001();
|
||||
// VW70002 = this.itemProtocol.getVW70002();
|
||||
// VW70003 = this.itemProtocol.getVW70003();
|
||||
// VW70004 = this.itemProtocol.getVW70004();
|
||||
// VW70005 = this.itemProtocol.getVW70005();
|
||||
// VW70006 = this.itemProtocol.getVW70006();
|
||||
// VW70007 = this.itemProtocol.getVW70007();
|
||||
VW7076 = this.itemProtocol.getVW7076();
|
||||
VW70001 = this.itemProtocol.getVW70001();
|
||||
VW70002 = this.itemProtocol.getVW70002();
|
||||
VW70003 = this.itemProtocol.getVW70003();
|
||||
VW70004 = this.itemProtocol.getVW70004();
|
||||
VW70005 = this.itemProtocol.getVW70005();
|
||||
VW70006 = this.itemProtocol.getVW70006();
|
||||
VW70007 = this.itemProtocol.getVW70007();
|
||||
|
||||
if(VW7058!=last_VW7058){
|
||||
//固化室状态变更后通知lms更新固化室状态
|
||||
log.info("固化室{}设备状态VW7058发生变更{},开始通知lms",devicecode,VW7058);
|
||||
if (VW70001 != last_VW70001 && VW70001 == 1) {
|
||||
log.info("固化室{}反馈工艺运行中,开始通知lms", devicecode);
|
||||
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
|
||||
request.setDevice_code(this.devicecode);
|
||||
request.setType("1");
|
||||
switch(VW7058) {
|
||||
case 2:
|
||||
request.setState("4");
|
||||
acsToWmsService.notify(request);
|
||||
break;
|
||||
case 3:
|
||||
request.setState("3");
|
||||
acsToWmsService.notify(request);
|
||||
break;
|
||||
case 4:
|
||||
request.setState("5");
|
||||
acsToWmsService.notify(request);
|
||||
break;
|
||||
case 5:
|
||||
request.setType("3");
|
||||
request.setState("故障");
|
||||
acsToWmsService.notify(request);
|
||||
break;
|
||||
}
|
||||
request.setState("4");
|
||||
acsToWmsService.notify(request);
|
||||
}
|
||||
|
||||
if (VW70002 != last_VW70002 && VW70002 == 1) {
|
||||
log.info("固化室{}反馈工艺运行结束,开始通知lms", devicecode);
|
||||
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
|
||||
request.setDevice_code(this.devicecode);
|
||||
request.setType("1");
|
||||
request.setState("5");
|
||||
acsToWmsService.notify(request);
|
||||
}
|
||||
if (VD7046 != last_VD7046 && VD7046 == 0) {
|
||||
log.info("固化室{}反馈固化室恢复正常,开始通知lms", devicecode);
|
||||
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
|
||||
request.setDevice_code(this.devicecode);
|
||||
request.setType("3");
|
||||
request.setState(String.valueOf(VD7046));
|
||||
acsToWmsService.notify(request);
|
||||
}else if(VD7046 != last_VD7046) {
|
||||
log.info("固化室{}反馈固化室发生异常,开始通知lms", devicecode);
|
||||
FeedBackTaskStatusRequest request = new FeedBackTaskStatusRequest();
|
||||
request.setDevice_code(this.devicecode);
|
||||
request.setType("3");
|
||||
request.setState(String.valueOf(VD7046));
|
||||
acsToWmsService.notify(request);
|
||||
}
|
||||
|
||||
} catch (Exception var17) {
|
||||
@@ -202,17 +209,17 @@ public class GuhuashiSiteDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
last_VW7040 = VW7040;
|
||||
last_VW7042 = VW7042;
|
||||
last_VW7044 = VW7044;
|
||||
last_VW7046 = VW7046;
|
||||
last_VD7046 = VD7046;
|
||||
last_VW7056 = VW7056;
|
||||
last_VW7058 = VW7058;
|
||||
last_VW7076 = VW7076;
|
||||
// last_VW70001 = VW70001;
|
||||
// last_VW70002 = VW70002;
|
||||
// last_VW70003 = VW70003;
|
||||
// last_VW70004 = VW70004;
|
||||
// last_VW70005 = VW70005;
|
||||
// last_VW70006 = VW70006;
|
||||
// last_VW70007 = VW70007;
|
||||
last_VW70001 = VW70001;
|
||||
last_VW70002 = VW70002;
|
||||
last_VW70003 = VW70003;
|
||||
last_VW70004 = VW70004;
|
||||
last_VW70005 = VW70005;
|
||||
last_VW70006 = VW70006;
|
||||
last_VW70007 = VW70007;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public class ItemProtocol {
|
||||
public static String item_VW7040 = "VW7040";
|
||||
public static String item_VW7042 = "VW7042";
|
||||
public static String item_VW7044 = "VW7044";
|
||||
public static String item_VW7046 = "VW7046";
|
||||
public static String item_VD7046 = "VD7046";
|
||||
public static String item_VW7056 = "VW7056";
|
||||
public static String item_VW7058 = "VW7058";
|
||||
public static String item_VW7076 = "VW7076";
|
||||
@@ -133,8 +133,8 @@ public class ItemProtocol {
|
||||
return this.getOpcIntegerValue(item_VW7044);
|
||||
}
|
||||
|
||||
public int getVW7046() {
|
||||
return this.getOpcIntegerValue(item_VW7046);
|
||||
public int getVD7046() {
|
||||
return this.getOpcIntegerValue(item_VD7046);
|
||||
}
|
||||
|
||||
public int getVW7056() {
|
||||
@@ -224,17 +224,17 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_VW7040, "阶段累加分", "VW7040"));
|
||||
list.add(new ItemDto(item_VW7042, "实际运行程序套数", "VW7042"));
|
||||
list.add(new ItemDto(item_VW7044, "正在执行的阶段数", "VW7044"));
|
||||
// list.add(new ItemDto(item_VW7046, "报警内容", "VW7046"));
|
||||
list.add(new ItemDto(item_VD7046, "报警内容", "VD7046"));
|
||||
list.add(new ItemDto(item_VW7056, "工作模式", "VW7056"));
|
||||
list.add(new ItemDto(item_VW7058, "设备状态", "VW7058"));
|
||||
list.add(new ItemDto(item_VW7076, "心跳", "VW7076"));
|
||||
// list.add(new ItemDto(item_VW70001, "工艺运行中信号", "VW7004.0"));
|
||||
// list.add(new ItemDto(item_VW70002, "工艺运行结束信号", "VW7004.1"));
|
||||
// list.add(new ItemDto(item_VW70003, "固化室内允许进板或出板信号(室内温度低于允许进入温度)", "VW7004.2"));
|
||||
// list.add(new ItemDto(item_VW70004, "固化室前门已开信号", "VW7004.3"));
|
||||
// list.add(new ItemDto(item_VW70005, "固化室前门已关信号", "VW7004.4"));
|
||||
// list.add(new ItemDto(item_VW70006, "固化室后门已开信号", "VW7005.0"));
|
||||
// list.add(new ItemDto(item_VW70007, "固化室后门已关信号", "VW7005.1"));
|
||||
list.add(new ItemDto(item_VW70001, "工艺运行中信号", "VW7004.0"));
|
||||
list.add(new ItemDto(item_VW70002, "工艺运行结束信号", "VW7004.1"));
|
||||
list.add(new ItemDto(item_VW70003, "固化室内允许进板或出板信号(室内温度低于允许进入温度)", "VW7004.2"));
|
||||
list.add(new ItemDto(item_VW70004, "固化室前门已开信号", "VW7004.3"));
|
||||
list.add(new ItemDto(item_VW70005, "固化室前门已关信号", "VW7004.4"));
|
||||
list.add(new ItemDto(item_VW70006, "固化室后门已开信号", "VW7005.0"));
|
||||
list.add(new ItemDto(item_VW70007, "固化室后门已关信号", "VW7005.1"));
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@@ -633,11 +633,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
JSONObject result = new JSONObject();
|
||||
Integer type=param.getInteger("type");
|
||||
String device_code=param.getString("device_code");
|
||||
Device device;
|
||||
Device device = deviceAppService.findDeviceByCode(device_code);;
|
||||
switch(type){
|
||||
case 1:
|
||||
//LMS通知固化室极板已进满信号,开始固化
|
||||
device = deviceAppService.findDeviceByCode(device_code);
|
||||
if (device.getDeviceDriver() instanceof GuhuashiSiteDeviceDriver) {
|
||||
GuhuashiSiteDeviceDriver guhuashiSiteDeviceDriver = (GuhuashiSiteDeviceDriver) device.getDeviceDriver();
|
||||
guhuashiSiteDeviceDriver.writing("VW70043",1);
|
||||
@@ -645,12 +644,18 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
break;
|
||||
case 2:
|
||||
//LMS通知固化室在下班时未进满信号,开始固化
|
||||
device = deviceAppService.findDeviceByCode(device_code);
|
||||
if (device.getDeviceDriver() instanceof GuhuashiSiteDeviceDriver) {
|
||||
GuhuashiSiteDeviceDriver guhuashiSiteDeviceDriver = (GuhuashiSiteDeviceDriver) device.getDeviceDriver();
|
||||
guhuashiSiteDeviceDriver.writing("VW70045",1);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
//LMS通知固化室极板已出完
|
||||
if (device.getDeviceDriver() instanceof GuhuashiSiteDeviceDriver) {
|
||||
GuhuashiSiteDeviceDriver guhuashiSiteDeviceDriver = (GuhuashiSiteDeviceDriver) device.getDeviceDriver();
|
||||
guhuashiSiteDeviceDriver.writing("VW70053",1);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class SyncDeviceStatus {
|
||||
json.put("device_statue", guhuashiSiteDeviceDriver.getVW7058());
|
||||
json.put("front_door", guhuashiSiteDeviceDriver.getVW70004()==0?1:0);
|
||||
json.put("back_door", guhuashiSiteDeviceDriver.getVW7010());
|
||||
json.put("error", guhuashiSiteDeviceDriver.getVW7046());
|
||||
json.put("error", guhuashiSiteDeviceDriver.getVD7046());
|
||||
guhuashi.add(json);
|
||||
} else if (device.getDeviceDriver() instanceof SiteStatusDeviceDriver) {
|
||||
SiteStatusDeviceDriver siteStatusDeviceDriver=(SiteStatusDeviceDriver)device.getDeviceDriver();
|
||||
|
||||
Reference in New Issue
Block a user