修复直拆直码只生成空托任务
This commit is contained in:
@@ -707,8 +707,7 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
|||||||
case 6:
|
case 6:
|
||||||
//码垛完成
|
//码垛完成
|
||||||
if (!requireSucess) {
|
if (!requireSucess) {
|
||||||
applyEmpty();
|
if (applyEmpty()) {
|
||||||
if (resultSucess) {
|
|
||||||
palletizing();
|
palletizing();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1135,13 +1134,14 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
|||||||
json.put("material_code",material);
|
json.put("material_code",material);
|
||||||
|
|
||||||
HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json);
|
HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (result.getStatus() == 200) {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||||
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
|
if ("200".equals(jsonObject.getString("status"))) {
|
||||||
this.writing(this.mode);
|
this.writing(this.mode);
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
result.close();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1264,14 +1264,17 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
|||||||
json.put("device_code",demoList.get(put_station-1).replace("\"",""));
|
json.put("device_code",demoList.get(put_station-1).replace("\"",""));
|
||||||
json.put("type","4");
|
json.put("type","4");
|
||||||
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (result.getStatus() == 200) {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||||
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
|
if ("200".equals(jsonObject.getString("status"))) {
|
||||||
this.writing(8);
|
this.writing(8);
|
||||||
this.setResultSucess(true);
|
this.setResultSucess(true);
|
||||||
|
this.setRequireSucess(true);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
result.close();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
|||||||
private Date instruction_require_time = new Date();
|
private Date instruction_require_time = new Date();
|
||||||
private Date instruction_finished_time = new Date();
|
private Date instruction_finished_time = new Date();
|
||||||
|
|
||||||
private int instruction_require_time_out =3000;
|
private int instruction_require_time_out;
|
||||||
boolean requireSucess = false;
|
boolean requireSucess = false;
|
||||||
|
|
||||||
boolean resultSucess = false;
|
boolean resultSucess = false;
|
||||||
@@ -729,8 +729,7 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
|||||||
case 6:
|
case 6:
|
||||||
//码垛完成
|
//码垛完成
|
||||||
if (!requireSucess) {
|
if (!requireSucess) {
|
||||||
applyEmpty();
|
if (applyEmpty()) {
|
||||||
if (resultSucess) {
|
|
||||||
palletizing();
|
palletizing();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1369,13 +1368,14 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
|||||||
json.put("material_code",material);
|
json.put("material_code",material);
|
||||||
|
|
||||||
HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json);
|
HttpResponse result = acsToWmsService.applyTaskManipulatorToWms(json);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (result.getStatus() == 200) {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||||
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
|
if ("200".equals(jsonObject.getString("status"))) {
|
||||||
this.writing(this.mode);
|
this.writing(this.mode);
|
||||||
this.setRequireSucess(true);
|
this.setRequireSucess(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
result.close();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1498,14 +1498,17 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
|||||||
json.put("device_code",demoList.get(put_station-1).replace("\"",""));
|
json.put("device_code",demoList.get(put_station-1).replace("\"",""));
|
||||||
json.put("type","4");
|
json.put("type","4");
|
||||||
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
||||||
if (ObjectUtil.isNotEmpty(result)) {
|
if (result.getStatus() == 200) {
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||||
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
|
if ("200".equals(jsonObject.getString("status"))) {
|
||||||
this.writing(8);
|
this.writing(8);
|
||||||
this.setResultSucess(true);
|
this.setResultSucess(true);
|
||||||
|
this.setRequireSucess(true);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
result.close();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
String vehicle_code = "";
|
String vehicle_code = "";
|
||||||
JSONObject produceInfoByCode = new JSONObject();
|
JSONObject produceInfoByCode = new JSONObject();
|
||||||
String is_full = (String) jsonObject.get("is_full");
|
String is_full = (String) jsonObject.get("is_full");
|
||||||
if (ObjectUtil.isNotEmpty(jsonObject.get("vehicle_code")) && !StrUtil.equals(jsonObject.get("vehicle_code").toString(), "0000")) {
|
if (ObjectUtil.isNotEmpty(jsonObject.get("vehicle_code")) && !StrUtil.equals(jsonObject.get("vehicle_code").toString(), "0000") && !"0".equals(jsonObject.get("vehicle_code").toString())) {
|
||||||
vehicle_code = jsonObject.get("vehicle_code").toString();
|
vehicle_code = jsonObject.get("vehicle_code").toString();
|
||||||
}
|
}
|
||||||
String qty = String.valueOf(jsonObject.get("qty"));
|
String qty = String.valueOf(jsonObject.get("qty"));
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ public class SendMaterialTask extends AbstractAcsTask {
|
|||||||
next_point_code = inStructObj.getString("struct_code");
|
next_point_code = inStructObj.getString("struct_code");
|
||||||
//创建入库单据
|
//创建入库单据
|
||||||
//假如静置时间为0 或者为空,则取物料表上的静置时间
|
//假如静置时间为0 或者为空,则取物料表上的静置时间
|
||||||
if (StrUtil.isEmpty(stewing_time) || StrUtil.equals(stewing_time, "0")) {
|
if (StrUtil.isEmpty(stewing_time) || StrUtil.equals(stewing_time, "0") || "0.0".equals(stewing_time)) {
|
||||||
stewing_time = WQLObject.getWQLObject("md_me_material").query("material_id ='" + material_id + "'").
|
stewing_time = WQLObject.getWQLObject("md_me_material").query("material_id ='" + material_id + "'").
|
||||||
uniqueResult(0).getString("stewing_time");
|
uniqueResult(0).getString("stewing_time");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user