From 5a6e2d9c4cbfe3f5c1505b36d494ff992ac9a4a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E6=B1=9F=E7=8E=AE?=
 <zhangjiangwei2000@outlook.com>
Date: Mon, 26 Jun 2023 17:24:16 +0800
Subject: [PATCH] =?UTF-8?q?add=20=E5=B7=A5=E5=8D=95=E6=9F=A5=E8=AF=A2?=
 =?UTF-8?q?=E6=9D=A1=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../nl/wms/pdm/service/impl/WorkorderServiceImpl.java    | 8 ++++++++
 lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue   | 9 +++++++++
 2 files changed, 17 insertions(+)

diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java
index 85a2bdb..804909f 100644
--- a/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java
+++ b/lms/nladmin-system/src/main/java/org/nl/wms/pdm/service/impl/WorkorderServiceImpl.java
@@ -61,6 +61,7 @@ public class WorkorderServiceImpl implements WorkordeService {
         String begin_time = MapUtil.getStr(whereJson, "begin_time");
         String end_time = MapUtil.getStr(whereJson, "end_time");
         String order_status = MapUtil.getStr(whereJson, "order_status");
+        String device = MapUtil.getStr(whereJson, "device");
         JSONObject map = new JSONObject();
         map.put("flag", "1");
         if (StrUtil.isNotBlank(begin_time)) {
@@ -85,6 +86,9 @@ public class WorkorderServiceImpl implements WorkordeService {
         if (StrUtil.isNotEmpty(material)) {
             map.put("material", "%" + material + "%");
         }
+        if (StrUtil.isNotBlank(device)) {
+            map.put("device", device);
+        }
         JSONObject jsonObject = WQL.getWO("MPS_PRODUCEDURE001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ShiftOrder.order_status ASC, ShiftOrder.create_time DESC");
         return jsonObject;
     }
@@ -509,6 +513,7 @@ public class WorkorderServiceImpl implements WorkordeService {
         String begin_time = MapUtil.getStr(params, "begin_time");
         String end_time = MapUtil.getStr(params, "end_time");
         String order_status = MapUtil.getStr(params, "order_status");
+        String device = MapUtil.getStr(params, "device");
         JSONObject map = new JSONObject();
         map.put("flag", "7");
         if (StrUtil.isNotBlank(begin_time)) {
@@ -533,6 +538,9 @@ public class WorkorderServiceImpl implements WorkordeService {
         if (StrUtil.isNotEmpty(material)) {
             map.put("material", "%" + material + "%");
         }
+        if (StrUtil.isNotBlank(device)) {
+            map.put("device", device);
+        }
         JSONArray workorders = WQL.getWO("MPS_PRODUCEDURE001").addParamMap(map).process().getResultJSONArray(0);
         List<Map<String, Object>> list = workorders.stream().map(o -> {
             JSONObject workorder = (JSONObject) o;
diff --git a/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue b/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue
index 8e6610a..837eddf 100644
--- a/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue
+++ b/lms/nladmin-ui/src/views/wms/pdm/workerorder/index.vue
@@ -20,6 +20,15 @@
               @keyup.enter.native="crud.toQuery"
             />
           </el-form-item>
+          <el-form-item label="设备">
+            <el-input
+              v-model="query.device"
+              clearable
+              placeholder="设备"
+              style="width: 200px;"
+              @keyup.enter.native="crud.toQuery"
+            />
+          </el-form-item>
           <el-form-item label="物料编码">
             <el-input
               v-model="query.material"