rev:优化申请套轴逻辑
This commit is contained in:
9
acs2/nladmin-system/nlsso-server/.gitignore
vendored
Normal file
9
acs2/nladmin-system/nlsso-server/.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
### IDEA ###
|
||||||
|
*/*.log
|
||||||
|
.idea/*
|
||||||
|
*.iml
|
||||||
|
*/target/*
|
||||||
|
*/*.iml
|
||||||
|
/.gradle/
|
||||||
|
/target/*
|
||||||
|
/logPath_IS_UNDEFINED/
|
||||||
@@ -168,7 +168,19 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
|
|
||||||
String message = null;
|
String message = null;
|
||||||
private Date instruction_require_time = new Date();
|
private Date instruction_require_time = new Date();
|
||||||
|
private Date bushingSucess_time = new Date();
|
||||||
|
private Date apply_casing_time = new Date();
|
||||||
|
private Date applyPullShaft_time = new Date();
|
||||||
|
private Date pullShaftSucess_time = new Date();
|
||||||
|
private Date applyTask_time = new Date();
|
||||||
|
private Date applyQzz_time = new Date();
|
||||||
private int instruction_require_time_out = 3000;
|
private int instruction_require_time_out = 3000;
|
||||||
|
private int apply_casing_time_out = 3000;
|
||||||
|
private int bushingSucess_time_out = 3000;
|
||||||
|
private int applyPullShaft_time_out = 3000;
|
||||||
|
private int pullShaftSucess_time_out = 3000;
|
||||||
|
private int applyTask_time_out = 3000;
|
||||||
|
private int applyQzz_time_out = 3000;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Device getDevice() {
|
public Device getDevice() {
|
||||||
@@ -325,10 +337,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
*/
|
*/
|
||||||
private synchronized void apply_casing(int mode) throws Exception {
|
private synchronized void apply_casing(int mode) throws Exception {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
|
if (date.getTime() - this.apply_casing_time.getTime() < (long) this.apply_casing_time_out) {
|
||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", apply_casing_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
this.apply_casing_time = date;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请套管");
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请套管");
|
||||||
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
||||||
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
||||||
@@ -452,10 +465,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
*/
|
*/
|
||||||
private synchronized void bushingSucess(int mode) throws Exception {
|
private synchronized void bushingSucess(int mode) throws Exception {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
|
if (date.getTime() - this.bushingSucess_time.getTime() < (long) this.bushingSucess_time_out) {
|
||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.bushingSucess_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
this.bushingSucess_time = date;
|
||||||
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
||||||
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
||||||
applyPlugPullSiteRequest.setDevice_code(device_code);
|
applyPlugPullSiteRequest.setDevice_code(device_code);
|
||||||
@@ -514,10 +528,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
*/
|
*/
|
||||||
private synchronized void pullShaftSucess(int mode) throws Exception {
|
private synchronized void pullShaftSucess(int mode) throws Exception {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
|
if (date.getTime() - this.pullShaftSucess_time.getTime() < (long) this.pullShaftSucess_time_out) {
|
||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.pullShaftSucess_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
this.pullShaftSucess_time = date;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "拔轴完成");
|
logServer.deviceExecuteLog(this.device_code, "", "", "拔轴完成");
|
||||||
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
||||||
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
||||||
@@ -572,10 +587,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
*/
|
*/
|
||||||
private synchronized void applyPullShaft(int mode) throws Exception {
|
private synchronized void applyPullShaft(int mode) throws Exception {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
|
if (date.getTime() - this.applyPullShaft_time.getTime() < (long) this.applyPullShaft_time_out) {
|
||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.applyPullShaft_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
this.applyPullShaft_time = date;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴");
|
logServer.deviceExecuteLog(this.device_code, "", "", "申请拔轴");
|
||||||
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
||||||
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
||||||
@@ -668,10 +684,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
*/
|
*/
|
||||||
private synchronized void applyTask(int mode) throws Exception {
|
private synchronized void applyTask(int mode) throws Exception {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
|
if (date.getTime() - this.applyTask_time.getTime() < (long) this.applyTask_time_out) {
|
||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.applyTask_time_out);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
this.applyTask_time = date;
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "缓存线已满,生成行架任务");
|
logServer.deviceExecuteLog(this.device_code, "", "", "缓存线已满,生成行架任务");
|
||||||
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
ApplyPlugPullSiteRequest applyPlugPullSiteRequest = new ApplyPlugPullSiteRequest();
|
||||||
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
ApplyPlugPullSitResponse applyPlugPullSitResponse;
|
||||||
@@ -726,10 +743,11 @@ public class PlugPullDeviceSiteDeviceDriver extends AbstractOpcDeviceDriver impl
|
|||||||
*/
|
*/
|
||||||
private boolean applyQzz(int mode) throws Exception {
|
private boolean applyQzz(int mode) throws Exception {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
|
if (date.getTime() - this.applyQzz_time.getTime() < (long) this.applyQzz_time_out) {
|
||||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
log.trace("触发时间因为小于{}毫秒,而被无视", this.applyQzz_time_out);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
this.applyQzz_time = date;
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("device_code", this.getDevice_code());
|
jo.put("device_code", this.getDevice_code());
|
||||||
jo.put("size", this.getSize());
|
jo.put("size", this.getSize());
|
||||||
|
|||||||
Reference in New Issue
Block a user