代码更新
This commit is contained in:
@@ -395,12 +395,21 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
if (ObjectUtil.isEmpty(joArr)) {
|
||||
//查询新的一排
|
||||
JSONObject point_jo = WQL.getWO("QST_ACSTOLMSTYPE4").addParam("flag", "3").process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(point_jo)) {
|
||||
JSONArray rowArr = WQL.getWO("QST_ACSTOLMSTYPE4").addParam("flag", "3").process().getResultJSONArray(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(rowArr)) {
|
||||
throw new BadRequestException("未查询到相同销售订单的放货区点位或空的一排!");
|
||||
} else {
|
||||
JSONObject jsonNewRow = WQLObject.getWQLObject("sch_base_point").query("row_num = '" + point_jo.getString("row_num") + "' AND point_type ='9' AND is_delete = '0' and lock_type = '1' order by out_order_seq ASC").uniqueResult(0);
|
||||
point_code = jsonNewRow.getString("point_code");
|
||||
for (int i = 0; i < rowArr.size(); i++) {
|
||||
JSONObject point_jo = rowArr.getJSONObject(i);
|
||||
|
||||
JSONArray pointArr = WQLObject.getWQLObject("sch_base_point").query("row_num = '" + point_jo.getString("row_num") + "' AND point_type ='9' AND is_delete = '0' and lock_type = '1' and IFNULL(vehicle_code,'') = '' order by out_order_seq ASC").getResultJSONArray(0);
|
||||
if (pointArr.size() == 3) {
|
||||
JSONObject jsonNewRow = WQLObject.getWQLObject("sch_base_point").query("row_num = '" + point_jo.getString("row_num") + "' AND point_type ='9' AND is_delete = '0' and lock_type = '1' order by out_order_seq ASC").uniqueResult(0);
|
||||
point_code = jsonNewRow.getString("point_code");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 校验此货位是否被堵住:1.如果被堵住则判断下一个是否被堵住 2.如果全部被堵住则新开一排
|
||||
@@ -426,12 +435,21 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
if (ObjectUtil.isEmpty(point_code)) {
|
||||
// 为空则新开一排
|
||||
JSONObject point_jo = WQL.getWO("QST_ACSTOLMSTYPE4").addParam("flag", "3").process().uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(point_jo)) {
|
||||
JSONArray rowArr = WQL.getWO("QST_ACSTOLMSTYPE4").addParam("flag", "3").process().getResultJSONArray(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(rowArr)) {
|
||||
throw new BadRequestException("未查询到相同销售订单的放货区点位或空的一排!");
|
||||
} else {
|
||||
JSONObject jsonNewRow = WQLObject.getWQLObject("sch_base_point").query("row_num = '" + point_jo.getString("row_num") + "' AND point_type ='9' AND is_delete = '0' and lock_type = '1' order by out_order_seq ASC").uniqueResult(0);
|
||||
point_code = jsonNewRow.getString("point_code");
|
||||
for (int i = 0; i < rowArr.size(); i++) {
|
||||
JSONObject point_jo = rowArr.getJSONObject(i);
|
||||
|
||||
JSONArray pointArr = WQLObject.getWQLObject("sch_base_point").query("row_num = '" + point_jo.getString("row_num") + "' AND point_type ='9' AND is_delete = '0' and lock_type = '1' and IFNULL(vehicle_code,'') = '' order by out_order_seq ASC").getResultJSONArray(0);
|
||||
if (pointArr.size() == 3) {
|
||||
JSONObject jsonNewRow = WQLObject.getWQLObject("sch_base_point").query("row_num = '" + point_jo.getString("row_num") + "' AND point_type ='9' AND is_delete = '0' and lock_type = '1' order by out_order_seq ASC").uniqueResult(0);
|
||||
point_code = jsonNewRow.getString("point_code");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user