|
@ -110,8 +110,8 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De |
|
|
int last_qualified = 0; |
|
|
int last_qualified = 0; |
|
|
int unqualified = 0; |
|
|
int unqualified = 0; |
|
|
int last_unqualified = 0; |
|
|
int last_unqualified = 0; |
|
|
int order_No = 0; |
|
|
String order_No = "0"; |
|
|
int last_order_No = 0; |
|
|
String last_order_No = "0"; |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public Device getDevice() { |
|
|
public Device getDevice() { |
|
@ -187,8 +187,8 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De |
|
|
logServer.deviceLog(this.device_code,"unqualified" ,String.valueOf(unqualified)); |
|
|
logServer.deviceLog(this.device_code,"unqualified" ,String.valueOf(unqualified)); |
|
|
logServer.deviceLogToacs(this.device_code,"","","信号unqualified:" + last_unqualified + "->" + unqualified); |
|
|
logServer.deviceLogToacs(this.device_code,"","","信号unqualified:" + last_unqualified + "->" + unqualified); |
|
|
} |
|
|
} |
|
|
if (order_No != last_order_No) { |
|
|
if (!StrUtil.equals(order_No,last_order_No)) { |
|
|
logServer.deviceLog(this.device_code,"order_No" ,String.valueOf(order_No)); |
|
|
logServer.deviceLog(this.device_code,"order_No" ,order_No); |
|
|
logServer.deviceLogToacs(this.device_code,"","","信号order_No:" + last_order_No + "->" + order_No); |
|
|
logServer.deviceLogToacs(this.device_code,"","","信号order_No:" + last_order_No + "->" + order_No); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -225,7 +225,7 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De |
|
|
break; |
|
|
break; |
|
|
case 3: |
|
|
case 3: |
|
|
//排产单确认
|
|
|
//排产单确认
|
|
|
if (!requireSucess && order_No != 0) { |
|
|
if (!requireSucess && !order_No.equals("0")) { |
|
|
JSONObject json = new JSONObject(); |
|
|
JSONObject json = new JSONObject(); |
|
|
json.put("producetask_code",order_No); |
|
|
json.put("producetask_code",order_No); |
|
|
json.put("device_code",this.device_code); |
|
|
json.put("device_code",this.device_code); |
|
@ -238,7 +238,7 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De |
|
|
break; |
|
|
break; |
|
|
case 4: |
|
|
case 4: |
|
|
//工单完成反馈
|
|
|
//工单完成反馈
|
|
|
if (!requireSucess && order_No != 0) { |
|
|
if (!requireSucess && !order_No.equals("0")) { |
|
|
JSONObject json = new JSONObject(); |
|
|
JSONObject json = new JSONObject(); |
|
|
json.put("producetask_code",order_No); |
|
|
json.put("producetask_code",order_No); |
|
|
json.put("device_code",this.device_code); |
|
|
json.put("device_code",this.device_code); |
|
@ -304,7 +304,7 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De |
|
|
HttpResponse result = acsToWmsService.enterOrder(json); |
|
|
HttpResponse result = acsToWmsService.enterOrder(json); |
|
|
if (result.getStatus() == 200) { |
|
|
if (result.getStatus() == 200) { |
|
|
this.writing(this.mode); |
|
|
this.writing(this.mode); |
|
|
ProduceshiftorderDto dto = produceshiftorderService.findByCode(String.valueOf(order_No)); |
|
|
ProduceshiftorderDto dto = produceshiftorderService.findByCode(order_No); |
|
|
if (this.mode == 4) { |
|
|
if (this.mode == 4) { |
|
|
dto.setOrder_status("2"); |
|
|
dto.setOrder_status("2"); |
|
|
} else if (this.mode == 3){ |
|
|
} else if (this.mode == 3){ |
|
|