rev:内包间取放货点位查询优化
This commit is contained in:
@@ -957,8 +957,18 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
//纸管任务
|
||||
String task_code2 = whereJson.getString("task_code2");
|
||||
JSONObject task_jo = WQLObject.getWQLObject("sch_base_task").query("task_code = '" + task_code1 + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(task_jo)){
|
||||
throw new BadRequestException("接口sendGetGoalStruct,任务号为空!");
|
||||
}
|
||||
JSONObject task_jo2 = WQLObject.getWQLObject("sch_base_task").query("task_code = '" + task_code2 + "'").uniqueResult(0);
|
||||
String product_area = task_jo.getString("product_area");
|
||||
String public_area = "";
|
||||
if (product_area.equals("A1") || product_area.equals("A2")){
|
||||
public_area = "A1";
|
||||
}
|
||||
if (product_area.equals("A3") || product_area.equals("A4")){
|
||||
public_area = "A3";
|
||||
}
|
||||
JSONObject cbz_jo = WQLObject.getWQLObject("st_ivt_shaftivt").query("product_area = '" + product_area + "' AND point_type = '0'").uniqueResult(0);
|
||||
String cbz_size = cbz_jo.getString("qzz_size");
|
||||
String cbz_generation = cbz_jo.getString("qzz_generation");
|
||||
@@ -1093,6 +1103,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
struct_jo = WQL.getWO("QAUTO_QUERY").addParam("flag", "6")
|
||||
.addParam("need_size", need_size)
|
||||
.addParam("need_generation", need_generation)
|
||||
.addParam("product_area",public_area)
|
||||
.process().uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(struct_jo)) {
|
||||
@@ -1116,6 +1127,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
struct_jo = WQL.getWO("QAUTO_QUERY").addParam("flag", "7")
|
||||
.addParam("need_size", have_size)
|
||||
.addParam("need_generation", have_generation)
|
||||
.addParam("product_area",public_area)
|
||||
.process().uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(struct_jo)) {
|
||||
|
||||
@@ -198,9 +198,13 @@
|
||||
AND
|
||||
ivt.have_qzz = '1'
|
||||
AND
|
||||
ivt.is_used = '1'
|
||||
AND
|
||||
ivt.qzz_size = 输入.need_size
|
||||
AND
|
||||
ivt.qzz_generation = 输入.need_generation
|
||||
AND
|
||||
ivt.product_area = 输入.product_area
|
||||
ORDER BY
|
||||
sort_seq
|
||||
ENDSELECT
|
||||
@@ -216,8 +220,10 @@
|
||||
WHERE
|
||||
ivt.point_type = '1'
|
||||
AND ivt.have_qzz = '0'
|
||||
AND ivt.is_used = '1'
|
||||
AND ivt.qzz_size = 输入.need_size
|
||||
AND ivt.qzz_generation = 输入.need_generation
|
||||
AND ivt.product_area = 输入.product_area
|
||||
AND NOT EXISTS
|
||||
( SELECT
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user