更新
This commit is contained in:
@@ -721,10 +721,10 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
|||||||
case 7:
|
case 7:
|
||||||
//码垛强制完成 半托缓存
|
//码垛强制完成 半托缓存
|
||||||
if (!requireSucess) {
|
if (!requireSucess) {
|
||||||
applyEmpty();
|
// applyEmpty();
|
||||||
if (resultSucess) {
|
// if (resultSucess) {
|
||||||
mandatoryPalletizing("0");
|
mandatoryPalletizing("0");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
@@ -747,10 +747,10 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
|||||||
case 11:
|
case 11:
|
||||||
//强制去包装
|
//强制去包装
|
||||||
if (!requireSucess) {
|
if (!requireSucess) {
|
||||||
applyEmpty();
|
// applyEmpty();
|
||||||
if (resultSucess) {
|
// if (resultSucess) {
|
||||||
mandatoryPalletizing("1");
|
mandatoryPalletizing("1");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
|||||||
private int instruction_require_time_out;
|
private int instruction_require_time_out;
|
||||||
boolean requireSucess = false;
|
boolean requireSucess = false;
|
||||||
|
|
||||||
|
boolean resultSucess = false;
|
||||||
|
|
||||||
private int instruction_finished_time_out;
|
private int instruction_finished_time_out;
|
||||||
|
|
||||||
int branchProtocol = 0;
|
int branchProtocol = 0;
|
||||||
@@ -727,19 +729,23 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
|||||||
//码垛完成
|
//码垛完成
|
||||||
if (!requireSucess) {
|
if (!requireSucess) {
|
||||||
applyEmpty();
|
applyEmpty();
|
||||||
palletizing();
|
if (resultSucess) {
|
||||||
|
palletizing();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
//码垛强制完成 半托缓存
|
//码垛强制完成 半托缓存
|
||||||
if (!requireSucess) {
|
if (!requireSucess) {
|
||||||
applyEmpty();
|
// applyEmpty();
|
||||||
mandatoryPalletizing("0");
|
// if (resultSucess) {
|
||||||
|
mandatoryPalletizing("0");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
//申请空盘
|
//申请空盘
|
||||||
if (!requireSucess) {
|
if (!resultSucess) {
|
||||||
applyEmpty();
|
applyEmpty();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -764,8 +770,10 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
|||||||
case 11:
|
case 11:
|
||||||
//强制去包装
|
//强制去包装
|
||||||
if (!requireSucess) {
|
if (!requireSucess) {
|
||||||
applyEmpty();
|
// applyEmpty();
|
||||||
mandatoryPalletizing("1");
|
// if (resultSucess) {
|
||||||
|
mandatoryPalletizing("1");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
@@ -1485,7 +1493,7 @@ public class RljnPackagePalletSplitManipulatorDeviceDriver extends AbstractOpcDe
|
|||||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||||
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
|
if (result.getStatus() == 200 && StrUtil.equals(jsonObject.getString("status"),"200")) {
|
||||||
this.writing(this.mode);
|
this.writing(this.mode);
|
||||||
this.setRequireSucess(true);
|
this.setResultSucess(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -50,6 +50,15 @@ public class MaterialServiceImpl implements MaterialService {
|
|||||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), sql + " and is_delete='0'", "update_time desc");
|
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), sql + " and is_delete='0'", "update_time desc");
|
||||||
final JSONObject json = rb.pageResult();
|
final JSONObject json = rb.pageResult();
|
||||||
log.info("json:{}", json);
|
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;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,7 +96,8 @@ public class MaterialServiceImpl implements MaterialService {
|
|||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getNickName();
|
String nickName = SecurityUtils.getNickName();
|
||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
|
//将静置时间从小时改为分钟
|
||||||
|
dto.setStewing_time(String.valueOf(Integer.valueOf(dto.getStewing_time())*60));
|
||||||
dto.setMaterial_id(IdUtil.getSnowflake(1, 1).nextId());
|
dto.setMaterial_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||||
dto.setCreate_id(currentUserId);
|
dto.setCreate_id(currentUserId);
|
||||||
dto.setCreate_name(nickName);
|
dto.setCreate_name(nickName);
|
||||||
@@ -119,6 +129,8 @@ public class MaterialServiceImpl implements MaterialService {
|
|||||||
dto.setUpdate_optname(nickName);
|
dto.setUpdate_optname(nickName);
|
||||||
Long material_uuid = dto.getMaterial_id();
|
Long material_uuid = dto.getMaterial_id();
|
||||||
String material_code = dto.getMaterial_code();
|
String material_code = dto.getMaterial_code();
|
||||||
|
//将静置时间从小时改为分钟
|
||||||
|
dto.setStewing_time(String.valueOf(Integer.valueOf(dto.getStewing_time())*60));
|
||||||
WQLObject wo = WQLObject.getWQLObject("md_me_material");
|
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);
|
JSONObject materialObj = wo.query("material_code='" + material_code + "' and material_id <>'" + material_uuid + "' and is_delete='0'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(materialObj)) {
|
if (ObjectUtil.isNotEmpty(materialObj)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user