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