rev: 发货区堆叠修改

This commit is contained in:
2023-05-23 09:27:21 +08:00
parent 7efb8b684a
commit 41f9225354
2 changed files with 21 additions and 4 deletions

View File

@@ -470,11 +470,18 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
if (ObjectUtil.isEmpty(rowArr)) {
throw new BadRequestException("未查询到相同销售订单的放货区点位或空的一排!");
} else {
JSONArray resultJSONArray = point_table.query("point_type = '9' and layer_num = '2' and is_used = '1'").getResultJSONArray(0);
int flag = 8;
if (ObjectUtil.isEmpty(resultJSONArray)) {
flag = 4;
}
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() == 8) {
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,'') = '' and is_used = '1' order by out_order_seq ASC").getResultJSONArray(0);
if (pointArr.size() == flag) {
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,layer_num").uniqueResult(0);
point_code = jsonNewRow.getString("point_code");
break;
@@ -510,11 +517,18 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
if (ObjectUtil.isEmpty(rowArr)) {
throw new BadRequestException("未查询到相同销售订单的放货区点位或空的一排!");
} else {
JSONArray resultJSONArray = point_table.query("point_type = '9' and layer_num = '2' and is_used = '1'").getResultJSONArray(0);
int flag = 8;
if (ObjectUtil.isEmpty(resultJSONArray)) {
flag = 4;
}
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() == 8) {
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,'') = '' and is_used = '1' order by out_order_seq ASC").getResultJSONArray(0);
if (pointArr.size() == flag) {
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,layer_num").uniqueResult(0);
point_code = jsonNewRow.getString("point_code");
break;

View File

@@ -54,6 +54,7 @@
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.package_box_sn = po.vehicle_code
WHERE
po.point_type = '9'
and po.is_used = '1'
OPTION 输入.sale_order_name <> ""
sub.sale_order_name = 输入.sale_order_name
@@ -95,6 +96,8 @@
po.point_type = '9'
AND
po.lock_type = '1'
AND
po.is_used = '1'
OPTION 输入.row_num <> ""
po.row_num = 输入.row_num
ENDOPTION