From 5f7e70b8132d018614e8f4989d0614bd50cb7ecb Mon Sep 17 00:00:00 2001
From: 懒羊羊 <15939171744@163.com>
Date: 星期三, 17 一月 2024 14:44:17 +0800
Subject: [PATCH] 工单优化

---
 jcdm-ui/src/views/main/om/productionOrde/index.vue                                                     |    8 ++++++--
 jcdm-ui/src/views/main/bs/orderScheduling/index.vue                                                    |    4 +++-
 jcdm-ui/src/views/main/om/productionOrde/planStatistics.vue                                            |    7 +------
 jcdm-ui/src/router/index.js                                                                            |   14 ++++++++++++++
 jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java |   12 ++++++++++--
 5 files changed, 34 insertions(+), 11 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
index b1f62a8..85934d5 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -185,7 +185,15 @@
     @GetMapping("/getProductionNotice")
     public AjaxResult getProductionNotice(OmProductionOrdeInfo omProductionOrdeInfo)
     {
-        ReceivingServices.insertWebserviceData(omProductionOrdeInfo.getProductionNotice());
-        return AjaxResult.success();
+        String productionNotice = omProductionOrdeInfo.getProductionNotice();
+        List<OmProductionOrdeInfo> omProductionOrdeInfos = omProductionOrdeInfoService.selectOmProductionOrdeInfoList(omProductionOrdeInfo);
+        if(omProductionOrdeInfos.size() == 0){
+            try {
+                ReceivingServices.insertWebserviceData(productionNotice);
+            } catch (Exception e) {
+                return error("鎺ユ敹澶辫触锛佽妫�鏌ラ�氱煡鍗曞彿");
+            }
+        }
+        return warn("璇ヨ鍗曞凡鎺ユ敹瀹屾瘯锛屼笉鑳介噸澶嶆帴鏀讹紒");
     }
 }
diff --git a/jcdm-ui/src/router/index.js b/jcdm-ui/src/router/index.js
index f1a20fa..dc78142 100644
--- a/jcdm-ui/src/router/index.js
+++ b/jcdm-ui/src/router/index.js
@@ -218,6 +218,20 @@
       }
     ]
   },
+  {
+    path: '/main/orderScheduling-data',
+    component: Layout,
+    hidden: true,
+    permissions: ['bs:workReport:list'],
+    children: [
+      {
+        path: 'index',
+        component: () => import('@/views/main/bs/orderScheduling/index'),
+        name: 'Data',
+        meta: { title: '鎶ュ伐璁板綍琛�', activeMenu: '/main/bs/orderScheduling' }
+      }
+    ]
+  },
 ]
 
 // 闃叉杩炵画鐐瑰嚮澶氭璺敱鎶ラ敊
diff --git a/jcdm-ui/src/views/main/bs/orderScheduling/index.vue b/jcdm-ui/src/views/main/bs/orderScheduling/index.vue
index 7475f07..c92d6e2 100644
--- a/jcdm-ui/src/views/main/bs/orderScheduling/index.vue
+++ b/jcdm-ui/src/views/main/bs/orderScheduling/index.vue
@@ -191,7 +191,7 @@
 
         <el-table border v-loading="loading" :data="orderSchedulingList" @selection-change="handleSelectionChange">
           <el-table-column type="selection" width="55" align="center" />
-          <el-table-column label="璁㈠崟缂栧彿" align="center" prop="orderNo" width="130">
+          <el-table-column label="鐢熶骇璁㈠崟" align="center" prop="orderNo" width="130">
 
           </el-table-column>
           <el-table-column label="鍙戝姩鏈哄彿" align="center" prop="engineNo" width="150">
@@ -462,6 +462,8 @@
     };
   },
   created() {
+    let workOrderNo = this.$route.query.workOrderNo;
+    this.queryParams.orderNo = workOrderNo
     this.getList();
   },
   methods: {
diff --git a/jcdm-ui/src/views/main/om/productionOrde/index.vue b/jcdm-ui/src/views/main/om/productionOrde/index.vue
index 8b56e84..e9abfb2 100644
--- a/jcdm-ui/src/views/main/om/productionOrde/index.vue
+++ b/jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -145,7 +145,7 @@
         </el-table-column>
         <el-table-column label="鐢熶骇璁㈠崟" width="160" align="center">
           <template slot-scope="scope">
-            <router-link :to="{path: '/main/workReport-data/index/', query: {workOrderNo: scope.row.workOrderNo} }" class="link-type">
+            <router-link :to="{path: '/main/orderScheduling-data/index/', query: {workOrderNo: scope.row.workOrderNo} }" class="link-type">
               <span>{{ scope.row.workOrderNo }}</span>
             </router-link>
           </template>
@@ -551,7 +551,11 @@
 
     getProductionNotice(){
       getProductionNotice(this.queryParams).then(response => {
-        this.$modal.msgSuccess("鎺ユ敹鎴愬姛");
+        console.log(response)
+        console.log(response.data)
+
+        console.log(response.data.msg)
+        this.$modal.msgSuccess(response.data.msg);
         this.queryParams = {}
         this.getList();
       });
diff --git a/jcdm-ui/src/views/main/om/productionOrde/planStatistics.vue b/jcdm-ui/src/views/main/om/productionOrde/planStatistics.vue
index 8971d25..d8e8f8f 100644
--- a/jcdm-ui/src/views/main/om/productionOrde/planStatistics.vue
+++ b/jcdm-ui/src/views/main/om/productionOrde/planStatistics.vue
@@ -61,12 +61,7 @@
         <el-table-column type="selection" width="55" align="center" />
         <el-table-column label="鐢熶骇閫氱煡鍗曞彿" width="160" align="center" prop="productionNotice">
         </el-table-column>
-        <el-table-column label="鐢熶骇璁㈠崟" width="160" align="center">
-          <template slot-scope="scope">
-            <router-link :to="{path: '/main/workReport-data/index/', query: {workOrderNo: scope.row.workOrderNo} }" class="link-type">
-              <span>{{ scope.row.workOrderNo }}</span>
-            </router-link>
-          </template>
+        <el-table-column label="鐢熶骇璁㈠崟" width="160" align="center" prop="workOrderNo">
         </el-table-column>
         <el-table-column label="鏈哄瀷" width="160" align="center" prop="typeZ">
         </el-table-column>

--
Gitblit v1.9.3