From 38fcac9e4a61a89d461c9ebccebf11d02084db15 Mon Sep 17 00:00:00 2001
From: zhouz <>
Date: Mon, 22 Apr 2024 19:02:40 +0800
Subject: [PATCH] =?UTF-8?q?dev:=E5=85=B0=E5=B7=9E=E4=BA=8C=E6=9C=9F?=
=?UTF-8?q?=E7=94=9F=E7=AE=94=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../org/nl/b_lms/sch/tasks/ProcessTask.java | 2 +-
.../mes/service/impl/MesToLmsServiceImpl.java | 4 +-
.../mps/service/impl/BakingServiceImpl.java | 78 ++++++++------
.../mps/service/impl/RawFoilServiceImpl.java | 4 +-
.../wms/pda/mps/wql/PDA_OVENINANDOUT_01.wql | 102 +++++++++++++++++-
.../wms/pdm/ivt/hotpointivt/pointIvt.vue | 5 -
6 files changed, 150 insertions(+), 45 deletions(-)
diff --git a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/ProcessTask.java b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/ProcessTask.java
index 6b0261936..2568aa620 100644
--- a/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/ProcessTask.java
+++ b/lms/nladmin-system/src/main/java/org/nl/b_lms/sch/tasks/ProcessTask.java
@@ -222,7 +222,7 @@ public class ProcessTask extends AbstractAcsTask {
json.put("create_id", currentUserId);
json.put("create_name", currentUsername);
json.put("create_time", DateUtil.now());
- json.put("acs_task_type", "1");
+ json.put("acs_task_type", "2");
tab.insert(json);
this.immediateNotifyAcs(json.getString("task_id"));
diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java
index 06600840d..82235652c 100644
--- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java
+++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/mes/service/impl/MesToLmsServiceImpl.java
@@ -1516,8 +1516,8 @@ public class MesToLmsServiceImpl implements MesToLmsService {
} else {
//取满取空放满放空
form.put("point_code1", jsonCoolIvt.getString("full_point_code"));
- form.put("point_code2", device_jo.getString("up_point_code")+"_K");
- form.put("point_code3", device_jo.getString("up_point_code")+"_M");
+ form.put("point_code2", device_jo.getString("up_point_code")+"_M");
+ form.put("point_code3", device_jo.getString("up_point_code")+"_K");
//判断对应空轴点位是否为空,为空用当前点位,不为空查询其他点位
if (jsonCoolIvt.getString("empty_point_status").equals("01")) {
form.put("point_code4", jsonCoolIvt.getString("empty_point_code"));
diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java
index 52f315a7b..5ea8ff4da 100644
--- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java
+++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/BakingServiceImpl.java
@@ -123,24 +123,7 @@ public class BakingServiceImpl implements BakingService {
* 暂存区入烘箱
*/
// 1.查询烘箱对应的空位
- JSONObject jsonMap = new JSONObject();
- jsonMap.put("flag", "1");
- jsonMap.put("product_area", jsonPointZc.getString("product_area"));
- //获取温度幅度
- jsonMap.put("point_location", jsonPointZc.getString("point_location"));
- JSONArray hot_rows = WQL.getWO("PDA_BAKING_01").addParamMap(jsonMap).process().getResultJSONArray(0);
- JSONObject jsonHotIvt = new JSONObject();
- for (int i = 0; i < hot_rows.size(); i++) {
- JSONObject hot_row = hot_rows.getJSONObject(i);
- String point_code = hot_row.getString("point_code");
- String point_temperature = (String) redisUtils.hget(point_code, "temperature");
- if (!ObjectUtil.isEmpty(point_temperature)) {
- if (point_temperature.equals(temperature)) {
- jsonHotIvt = hot_row;
- break;
- }
- }
- }
+ JSONObject jsonHotIvt = getJsonObject(jsonPointZc.getString("product_area"), jsonPointZc, temperature);
if (ObjectUtil.isEmpty(jsonHotIvt)) {
throw new BadRequestException("烘烤区没有合适温度的空位!");
@@ -213,6 +196,9 @@ public class BakingServiceImpl implements BakingService {
}
JSONObject map = new JSONObject();
map.put("flag", "1");
+ if (product_area.equals("B2")){
+ map.put("flag","3");
+ }
map.put("reging_id", reging_id);
map.put("point_location", point_location);
//只找入箱点位
@@ -231,24 +217,24 @@ public class BakingServiceImpl implements BakingService {
if (ObjectUtil.isEmpty(pointArr)) throw new BadRequestException("没有空暂存位");
}*/
- JSONObject jsonMap = new JSONObject();
- jsonMap.put("flag", "1");
- jsonMap.put("product_area", product_area);
- jsonMap.put("point_location", map.getString("point_location"));
- JSONArray hot_rows = WQL.getWO("PDA_BAKING_01").addParamMap(jsonMap).process().getResultJSONArray(0);
- JSONObject jsonHotIvt = new JSONObject();
- for (int i = 0; i < hot_rows.size(); i++) {
- JSONObject hot_row = hot_rows.getJSONObject(i);
- String point_code = hot_row.getString("point_code");
- String point_temperature = (String) redisUtils.hget(point_code, "temperature");
- if (!ObjectUtil.isEmpty(point_temperature)) {
- if (point_temperature.equals(temperature)) {
- jsonHotIvt = hot_row;
- break;
+ JSONObject jsonHotIvt = getJsonObject(product_area, point_code2_jo, temperature);
+ if (ObjectUtil.isEmpty(jsonHotIvt)) {
+ if (product_area.equals("B2")){
+ String cant_location1 = point_code2_jo.getString("point_location");
+ String cant_location = "('"+point_code2_jo.getString("point_location")+"')";
+ map.put("cant_location",cant_location);
+ point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
+ jsonHotIvt = getJsonObject(product_area, point_code2_jo, temperature);
+ if (ObjectUtil.isEmpty(jsonHotIvt)){
+ cant_location = "('"+cant_location1+"','"+point_code2_jo.getString("point_location")+"')";
+ map.put("cant_location",cant_location);
+ point_code2_jo = WQL.getWO("PDA_OVENINANDOUT_01").addParamMap(map).process().uniqueResult(0);
+ jsonHotIvt = getJsonObject(product_area, point_code2_jo, temperature);
+ if (ObjectUtil.isEmpty(jsonHotIvt)){
+ throw new BadRequestException("烘烤区没有合适温度的空位!");
+ }
}
}
- }
- if (ObjectUtil.isEmpty(jsonHotIvt)) {
throw new BadRequestException("烘烤区没有合适温度的空位!");
}
@@ -354,6 +340,9 @@ public class BakingServiceImpl implements BakingService {
case "A4":
reging_id = RegionTypeEnum.D_HKZC.getId();
break;
+ case "B2":
+ reging_id = RegionTypeEnum.B2_HKZC.getId();
+ break;
default:
break;
}
@@ -431,6 +420,27 @@ public class BakingServiceImpl implements BakingService {
return result;
}
+ private JSONObject getJsonObject(String product_area, JSONObject point_code2_jo, String temperature) {
+ JSONObject jsonMap = new JSONObject();
+ jsonMap.put("flag", "1");
+ jsonMap.put("product_area", product_area);
+ jsonMap.put("point_location", point_code2_jo.getString("point_location"));
+ JSONArray hot_rows = WQL.getWO("PDA_BAKING_01").addParamMap(jsonMap).process().getResultJSONArray(0);
+ JSONObject jsonHotIvt = new JSONObject();
+ for (int i = 0; i < hot_rows.size(); i++) {
+ JSONObject hot_row = hot_rows.getJSONObject(i);
+ String point_code = hot_row.getString("point_code");
+ String point_temperature = (String) redisUtils.hget(point_code, "temperature");
+ if (!ObjectUtil.isEmpty(point_temperature)) {
+ if (point_temperature.equals(temperature)) {
+ jsonHotIvt = hot_row;
+ break;
+ }
+ }
+ }
+ return jsonHotIvt;
+ }
+
@Override
@Transactional(rollbackFor = Exception.class)
public JSONObject inCoolIvt(JSONObject whereJson) {
diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java
index eb0b6fbad..17008a9f3 100644
--- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java
+++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/service/impl/RawFoilServiceImpl.java
@@ -234,9 +234,9 @@ public class RawFoilServiceImpl implements RawFoilService {
json.put("create_time", DateUtil.now());
rawTab.insert(json);
- JSONObject jsonSb = sbTab.query("point_code = '" + whereJson.getString("device_code") + "'").uniqueResult(0);
+ JSONObject jsonSb = sbTab.query("point_code = '" + whereJson.getString("point_code") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonSb)) {
- throw new BadRequestException("点位:" + whereJson.getString("device_code") + "生箔设备不存在");
+ throw new BadRequestException("点位:" + whereJson.getString("point_code") + "生箔设备不存在");
}
if (StrUtil.equals("0", jsonSb.getString("is_used"))) {
diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/wql/PDA_OVENINANDOUT_01.wql b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/wql/PDA_OVENINANDOUT_01.wql
index 3e5abc0e1..81019bfc8 100644
--- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/wql/PDA_OVENINANDOUT_01.wql
+++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/mps/wql/PDA_OVENINANDOUT_01.wql
@@ -18,6 +18,7 @@
输入.point_location TYPEAS s_string
输入.product_area TYPEAS s_string
输入.point_type TYPEAS s_string
+ 输入.cant_location TYPEAS f_string
[临时表]
@@ -175,4 +176,103 @@
ORDER BY sort_seq desc
ENDSELECT
ENDQUERY
- ENDIF
\ No newline at end of file
+ ENDIF
+
+ IF 输入.flag = "3"
+ QUERY
+ SELECT
+ a.*,
+ b.num
+ FROM
+ sch_base_point a
+ INNER JOIN (
+ SELECT
+ COUNT( c.task_id ) AS num,
+ c.point_code
+ FROM
+ (
+ SELECT
+ task.task_id,
+ point_code
+ FROM
+ SCH_BASE_Point po
+ LEFT JOIN sch_base_task task ON task.point_code1 = po.point_code
+ AND task.task_status < '07'
+ AND task.is_delete = '0'
+ WHERE
+ po.is_delete = '0'
+ AND po.is_used = '1'
+ OPTION 输入.reging_id <> ""
+ po.region_id = 输入.reging_id
+ ENDOPTION
+
+ OPTION 输入.cant_location <> ""
+ po.point_location not in 输入.cant_location
+ ENDOPTION
+
+ OPTION 输入.point_type <> ""
+ po.point_type = 输入.point_type
+ ENDOPTION
+ OPTION 输入.point_type = "5"
+ IFNULL(po.material_code,'') = ''
+ ENDOPTION
+ UNION
+ SELECT
+ task.task_id,
+ point_code
+ FROM
+ SCH_BASE_Point po
+ LEFT JOIN sch_base_task task ON task.point_code2 = po.point_code
+ AND task.task_status < '07'
+ AND task.is_delete = '0'
+ WHERE
+ po.is_delete = '0'
+ AND po.is_used = '1'
+ OPTION 输入.reging_id <> ""
+ po.region_id = 输入.reging_id
+ ENDOPTION
+
+ OPTION 输入.cant_location <> ""
+ po.point_location not in 输入.cant_location
+ ENDOPTION
+
+ OPTION 输入.point_type <> ""
+ po.point_type = 输入.point_type
+ ENDOPTION
+ OPTION 输入.point_type = "5"
+ IFNULL(po.material_code,'') = ''
+ ENDOPTION
+ UNION
+ SELECT
+ task.task_id,
+ point_code
+ FROM
+ SCH_BASE_Point po
+ LEFT JOIN sch_base_task task ON task.point_code3 = po.point_code
+ AND task.task_status < '07'
+ AND task.is_delete = '0'
+ WHERE
+ po.is_delete = '0'
+ AND po.is_used = '1'
+ OPTION 输入.reging_id <> ""
+ po.region_id = 输入.reging_id
+ ENDOPTION
+
+ OPTION 输入.cant_location <> ""
+ po.point_location not in 输入.cant_location
+ ENDOPTION
+
+ OPTION 输入.point_type <> ""
+ po.point_type = 输入.point_type
+ ENDOPTION
+ OPTION 输入.point_type = "5"
+ IFNULL(po.material_code,'') = ''
+ ENDOPTION
+ ) c
+ GROUP BY
+ c.point_code
+ ) b ON b.point_code = a.point_code
+ ORDER BY num,a.point_code
+ ENDSELECT
+ ENDQUERY
+ ENDIF
\ No newline at end of file
diff --git a/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/pointIvt.vue b/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/pointIvt.vue
index 2c662d320..df131dec7 100644
--- a/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/pointIvt.vue
+++ b/lms/nladmin-ui/src/views/wms/pdm/ivt/hotpointivt/pointIvt.vue
@@ -185,11 +185,6 @@
-
-
- {{ dict.label.point_location[scope.row.point_location] }}
-
-
{{ dict.label.is_used[scope.row.is_used] }}