This commit is contained in:
loujf
2022-10-12 12:13:08 +08:00
parent 4ca3835f74
commit c41887c1fa
3 changed files with 34 additions and 14 deletions

View File

@@ -721,10 +721,10 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
case 7:
//码垛强制完成 半托缓存
if (!requireSucess) {
applyEmpty();
if (resultSucess) {
// applyEmpty();
// if (resultSucess) {
mandatoryPalletizing("0");
}
// }
}
break;
case 8:
@@ -747,10 +747,10 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
case 11:
//强制去包装
if (!requireSucess) {
applyEmpty();
if (resultSucess) {
// applyEmpty();
// if (resultSucess) {
mandatoryPalletizing("1");
}
// }
}
break;
}

View File

@@ -68,6 +68,8 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
private int instruction_require_time_out;
boolean requireSucess = false;
boolean resultSucess = false;
private int instruction_finished_time_out;
int branchProtocol = 0;
@@ -727,19 +729,23 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
//码垛完成
if (!requireSucess) {
applyEmpty();
palletizing();
if (resultSucess) {
palletizing();
}
}
break;
case 7:
//码垛强制完成 半托缓存
if (!requireSucess) {
applyEmpty();
mandatoryPalletizing("0");
// applyEmpty();
// if (resultSucess) {
mandatoryPalletizing("0");
// }
}
break;
case 8:
//申请空盘
if (!requireSucess) {
if (!resultSucess) {
applyEmpty();
}
break;
@@ -764,8 +770,10 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
case 11:
//强制去包装
if (!requireSucess) {
applyEmpty();
mandatoryPalletizing("1");
// applyEmpty();
// if (resultSucess) {
mandatoryPalletizing("1");
// }
}
break;
case 12:
@@ -1485,7 +1493,7 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
JSONObject jsonObject = JSONObject.parseObject(result.body());
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
this.writing(this.mode);
this.setRequireSucess(true);
this.setResultSucess(true);
}
}
return true;

View File

@@ -50,6 +50,15 @@ public class MaterialServiceImpl implements MaterialService {
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), sql + " and is_delete='0'", "update_time desc");
final JSONObject json = rb.pageResult();
log.info("json:{}", json);
JSONArray content = json.getJSONArray("content");
//将静置时间从分钟改为小时
for (int i = 0; i < content.size(); i++) {
JSONObject jo = (JSONObject) content.get(i);
Integer stewing_time = jo.getInteger("stewing_time");
if (stewing_time != 0) {
jo.put("stewing_time",stewing_time/60);
}
}
return json;
}
@@ -87,7 +96,8 @@ public class MaterialServiceImpl implements MaterialService {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
String now = DateUtil.now();
//将静置时间从小时改为分钟
dto.setStewing_time(String.valueOf(Integer.valueOf(dto.getStewing_time())*60));
dto.setMaterial_id(IdUtil.getSnowflake(1, 1).nextId());
dto.setCreate_id(currentUserId);
dto.setCreate_name(nickName);
@@ -119,6 +129,8 @@ public class MaterialServiceImpl implements MaterialService {
dto.setUpdate_optname(nickName);
Long material_uuid = dto.getMaterial_id();
String material_code = dto.getMaterial_code();
//将静置时间从小时改为分钟
dto.setStewing_time(String.valueOf(Integer.valueOf(dto.getStewing_time())*60));
WQLObject wo = WQLObject.getWQLObject("md_me_material");
JSONObject materialObj = wo.query("material_code='" + material_code + "' and material_id <>'" + material_uuid + "' and is_delete='0'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(materialObj)) {