|
@ -103,8 +103,8 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen |
|
|
int last_error_time = 0; |
|
|
int last_error_time = 0; |
|
|
int weight = 0; |
|
|
int weight = 0; |
|
|
int last_weight = 0; |
|
|
int last_weight = 0; |
|
|
int order_No = 0; |
|
|
String order_No = "0"; |
|
|
int last_order_No = 0; |
|
|
String last_order_No = "0"; |
|
|
int mix_num = 0; |
|
|
int mix_num = 0; |
|
|
int last_mix_num = 0; |
|
|
int last_mix_num = 0; |
|
|
String material; |
|
|
String material; |
|
@ -171,7 +171,7 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen |
|
|
logServer.deviceLog(this.device_code,"material" ,String.valueOf(material)); |
|
|
logServer.deviceLog(this.device_code,"material" ,String.valueOf(material)); |
|
|
logServer.deviceLogToacs(this.device_code,"","","信号material:" + last_material + "->" + material); |
|
|
logServer.deviceLogToacs(this.device_code,"","","信号material:" + last_material + "->" + material); |
|
|
} |
|
|
} |
|
|
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" ,String.valueOf(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); |
|
|
} |
|
|
} |
|
@ -213,24 +213,24 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen |
|
|
break; |
|
|
break; |
|
|
case 3: |
|
|
case 3: |
|
|
//排产单确认
|
|
|
//排产单确认
|
|
|
if (!requireSucess && order_No != 0) { |
|
|
if (!requireSucess && !StrUtil.equals(order_No,"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); |
|
|
json.put("material_code",material); |
|
|
json.put("material_code",material); |
|
|
json.put("weight",weight); |
|
|
json.put("qty",weight); |
|
|
json.put("type","1"); |
|
|
json.put("type","1"); |
|
|
enterProduction(json); |
|
|
enterProduction(json); |
|
|
} |
|
|
} |
|
|
break; |
|
|
break; |
|
|
case 4: |
|
|
case 4: |
|
|
//工单完成
|
|
|
//工单完成
|
|
|
if (!requireSucess && order_No != 0) { |
|
|
if (!requireSucess && !StrUtil.equals(order_No,"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); |
|
|
json.put("material_code",material); |
|
|
json.put("material_code",material); |
|
|
json.put("weight",weight); |
|
|
json.put("qty",weight); |
|
|
json.put("type","2"); |
|
|
json.put("type","2"); |
|
|
enterProduction(json); |
|
|
enterProduction(json); |
|
|
} |
|
|
} |
|
@ -284,8 +284,8 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen |
|
|
dto.setOrder_status("0"); |
|
|
dto.setOrder_status("0"); |
|
|
} |
|
|
} |
|
|
produceshiftorderService.update(dto); |
|
|
produceshiftorderService.update(dto); |
|
|
} |
|
|
|
|
|
requireSucess = true; |
|
|
requireSucess = true; |
|
|
|
|
|
} |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|