fix: 养生AB区冲突解决

This commit is contained in:
2023-06-04 11:39:02 +08:00
parent de1f553f6e
commit 85e5b7d785
2 changed files with 12 additions and 7 deletions

View File

@@ -171,8 +171,8 @@ public class DpxwSendEmpVehicleTask extends AbstractAcsTask {
JSONObject taskObj = taskArry.getJSONObject(i);
String task_id = taskObj.getString("task_id");
// 更新点位
// JSONArray jsonArray = WQL.getWO("QSCH_yqxSendMaterial_01").addParam("flag", "2").process().getResultJSONArray(0);
// PointUpdateUtil.updatePoint(jsonArray);
JSONArray jsonArray = WQL.getWO("QSCH_yqxSendMaterial_01").addParam("flag", "2").process().getResultJSONArray(0);
PointUpdateUtil.updatePoint(jsonArray);
// 判断楼上是否有送下来得任务 ???
// 1、找到货梯货位
JSONObject param = new JSONObject();

View File

@@ -366,12 +366,15 @@ public class HtSendEmpVehicleTask extends AbstractAcsTask {
"and can_vehicle_type = '" + vehicle_type + "' " +
"and lock_type = '1' and is_used = '1' and is_delete = '0' and point_status = '2' " +
"and col_num <> '1'",
"in_order_seq asc").uniqueResult(0);
"block_num,row_num,col_num").uniqueResult(0);
if (ObjectUtil.isNotEmpty(inOrderSeqAsc)) {
Integer block_num = inOrderSeqAsc.getInteger("block_num");
Integer col_num = inOrderSeqAsc.getInteger("col_num"); // 列
Integer row_num = inOrderSeqAsc.getInteger("row_num"); // 排
JSONObject firstRow = pointTab.query("block_num = '" + block_num + "' and row_num = '" + row_num + "'and col_num = '" + (col_num - 1) +"' and lock_type = '1' and point_status = '1' and is_used = '1' and is_delete = '0'").uniqueResult(0);
JSONObject firstRow = pointTab.query("block_num = '" + block_num + "' and row_num = '" +
row_num + "'and col_num = '" + (col_num - 1) +
"' and lock_type = '1' and point_status = '1' and is_used = '1' and is_delete = '0' and region_code = 'YSAQKTPQ01'")
.uniqueResult(0);
if (ObjectUtil.isNotEmpty(firstRow)) end_code = firstRow.getString("point_code");
} else {
// 2、没有就直接找个位置
@@ -394,18 +397,20 @@ public class HtSendEmpVehicleTask extends AbstractAcsTask {
"and can_vehicle_type = '" + vehicle_type + "' " +
"and lock_type = '1' and is_used = '1' and is_delete = '0' and point_status = '2' " +
"and col_num <> '1'",
"in_order_seq asc").uniqueResult(0);
"block_num,row_num,col_num").uniqueResult(0);
if (ObjectUtil.isNotEmpty(inOrderSeqAsc)) {
Integer block_num = inOrderSeqAsc.getInteger("block_num");
Integer col_num = inOrderSeqAsc.getInteger("col_num"); // 列
Integer row_num = inOrderSeqAsc.getInteger("row_num"); // 排
JSONObject firstRow = pointTab.query("block_num = '" + block_num + "' and row_num = '" + row_num + "'and col_num = '" + (col_num - 1) +"' and lock_type = '1' and point_status = '1' and is_used = '1' and is_delete = '0'").uniqueResult(0);
JSONObject firstRow = pointTab.query("block_num = '" + block_num + "' and row_num = '"
+ row_num + "'and col_num = '" + (col_num - 1)
+ "' and lock_type = '1' and point_status = '1' and is_used = '1' and is_delete = '0' and region_code = 'YSAQKTPQ01'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(firstRow)) end_code = firstRow.getString("point_code");
} else {
// 2、没有就直接找个位置
JSONObject inOrderSeqDesc = pointTab.query("region_id = '" + RegionTypeEnum.YSAQKTPQ01.getId() + "' " +
"and can_vehicle_type = '" + vehicle_type + "' " +
"and lock_type = '1' and is_used = '1' and is_delete = '0' and point_status = '1'", "in_order_seq asc").uniqueResult(0);
"and lock_type = '1' and is_used = '1' and is_delete = '0' and point_status = '1'", "in_order_seq desc").uniqueResult(0);
if (ObjectUtil.isNotEmpty(inOrderSeqDesc)) end_code = inOrderSeqDesc.getString("point_code");
}
}