From 8f6a1e8a01a518a384d22f0f773459be744a2a4d Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期一, 09 六月 2025 19:31:20 +0800
Subject: [PATCH] 合并

---
 Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_CL.vue                     |   81 ++++++++++
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json                           |   44 ++---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs           |   48 ++---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs              |   17 ++
 Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_OutTime.vue                   |   95 +++++++++++
 Code Management/WMS/WIDESEA_WMSClient/src/router/viewGird.js                                       |   12 +
 Code Management/WMS/WIDESEA_WMSClient/src/api/permission.js                                        |    1 
 Code Management/WMS/WIDESEA_WMSClient/src/uitils/eventBus.js                                       |    2 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs             |    4 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/WebResponseContent.cs                |   12 +
 Code Management/WMS/WIDESEA_WMSClient/src/api/http.js                                              |   13 +
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs |    2 
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs          |   12 +
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs   |  113 +++++++++++--
 Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx        |   11 +
 15 files changed, 382 insertions(+), 85 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/api/http.js b/Code Management/WMS/WIDESEA_WMSClient/src/api/http.js
index 789bd9f..f4ca1d1 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/api/http.js
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/api/http.js
@@ -12,14 +12,14 @@
 let loadingStatus = false
 if (process.env.NODE_ENV == 'development') {
    axios.defaults.baseURL = 'http://localhost:5000/';
-  // axios.defaults.baseURL = 'http://192.168.20.251:5000/';
+  // axios.defaults.baseURL = 'http://192.168.65.253:5000/';
 }
 else if (process.env.NODE_ENV == 'debug') {
-  axios.defaults.baseURL = 'http://127.0.0.1:9991/';
+  axios.defaults.baseURL = 'http://192.168.65.253:5000/';
 }
 else if (process.env.NODE_ENV == 'production') {
   // axios.defaults.baseURL = 'http://127.0.0.1:5000/';
-  axios.defaults.baseURL = 'http://192.168.20.253:5000/';
+  axios.defaults.baseURL = 'http://192.168.65.253:5000/';
 }
 
 //axios.defaults.baseURL = 'http://api.volcore.xyz/';
@@ -119,7 +119,12 @@
 function getToken() {
   return store.getters.getToken()
 }
-
+export function  Getproductionvolume (data) {
+  return axios.post('/api/Task/GetTimeoutgetPageData', data)//杩斿洖鐨勬椂promies瀵硅薄锛屾墍浠ョ洿鎺eturn鍑哄幓灏卞ソ浜�
+}
+export function  GetproductionstatisticsgetPageData (data) {
+  return axios.post('/api/Task/GetproductionstatisticsgetPageData', data)//杩斿洖鐨勬椂promies瀵硅薄锛屾墍浠ョ洿鎺eturn鍑哄幓灏卞ソ浜�
+}
 /*
   url
   params璇锋眰鍚庡彴鐨勫弬鏁�,濡傦細{name:123,values:['a','b','c']}
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/api/permission.js b/Code Management/WMS/WIDESEA_WMSClient/src/api/permission.js
index a5014f4..66f3834 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/api/permission.js
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/api/permission.js
@@ -6,6 +6,7 @@
   getMenu() {
     return http.get('/api/getTreeMenu')
   },
+ 
   getButtons(path, extra, table, tableName) {
     //extra鑷畾棰濆鎸夐挳
     //table鑾峰彇鎸囧畾琛ㄧ殑鏉冮檺
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx b/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx
index 8570eb5..a390061 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx
@@ -48,13 +48,15 @@
               //绀轰緥锛氳皟鐢ㄥ悗鍙版帴鍙�
               if (res.status) {
                 this.$Message.success('鍒涘缓浠诲姟鎴愬姛')
+                console.log(res)
                 this.refresh() //鍒锋柊琛ㄦ牸
               } else {
                 this.$Message.error(res.message) //閿欒鎻愮ず
               }
             })
         }
-      }
+      } 
+     
 
       var btnSupplementationData = this.buttons.find(x => x.value == "SupplementationData");
             if (btnSupplementationData != null) {
@@ -154,7 +156,9 @@
     onInited() {
       //妗嗘灦鍒濆鍖栭厤缃悗
       //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
-      //this.detailOptions.columns.forEach(column=>{ });
+      this.detailOptions.columns.forEach(column=>{ 
+        console.log(column)
+      });
     },
     searchBefore(param) {
       //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
@@ -162,7 +166,7 @@
       return true
     },
     searchAfter(result) {
-      //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊�
+     console.log(result)
       return true
     },
     addBefore(formData) {
@@ -178,6 +182,7 @@
       // this.$refs.table.$refs.table.toggleRowSelection(row) //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
     },
     modelOpenAfter(row) {
+   
       //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
       //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add';
       //(2)缁欏脊鍑烘璁剧疆榛樿鍊�
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/router/viewGird.js b/Code Management/WMS/WIDESEA_WMSClient/src/router/viewGird.js
index db68844..2443376 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/router/viewGird.js
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/router/viewGird.js
@@ -54,6 +54,18 @@
     meta: {
       
     }
+  },{
+    path: '/Dt_OutTime',
+    name: 'Dt_OutTime',
+    component: () => import('@/views/widesea_wms/stock/Dt_OutTime.vue'),
+    meta: {
+    }
+  },{
+    path: '/Dt_CL',
+    name: 'Dt_CL',
+    component: () => import('@/views/widesea_wms/taskinfo/Dt_CL.vue'),
+    meta: {
+    }
   }
 ]
 
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/uitils/eventBus.js b/Code Management/WMS/WIDESEA_WMSClient/src/uitils/eventBus.js
index 3f6a58d..48ea5f1 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/uitils/eventBus.js
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/uitils/eventBus.js
@@ -2,4 +2,4 @@
 
 const eventBus = mitt();
 
-export default eventBus;
+export default eventBus;
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_OutTime.vue b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_OutTime.vue
new file mode 100644
index 0000000..4473a3f
--- /dev/null
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/Dt_OutTime.vue
@@ -0,0 +1,95 @@
+<!--
+*Author锛歫xx
+ *Contact锛�283591387@qq.com
+ *浠g爜鐢辨鏋剁敓鎴�,浠讳綍鏇存敼閮藉彲鑳藉鑷磋浠g爜鐢熸垚鍣ㄨ鐩�
+ *涓氬姟璇峰湪@/extension/widesea_wms/stock/Dt_BillGroupStock.js姝ゅ缂栧啓
+ -->
+
+ <template>
+    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
+        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" 
+        :table="table" :extend="extend">
+    </view-grid>
+</template>
+<script>
+import extend from "@/extension/widesea_wms/stock/Dt_BillGroupStock.jsx";
+import { ref, defineComponent } from "vue";
+export default defineComponent({
+    setup() {
+        const table = ref({
+            key: 'id',
+            footer: "Foots",
+            cnName: '瓒呮椂淇℃伅',
+            name: 'stock/Dt_BillGroupStock',
+            url: "/Task/GetTimeout",
+            sortName: "createDate"
+        });
+        const editFormFields = ref({
+            "palletCode": "",
+            "productionLine": "",
+            "outboundTime": "",
+            // "groupType": ""
+        });
+        const editFormOptions = ref([
+            [
+                { "title": "鎵樼洏鏉$爜", "field": "palletCode", type: "text" },
+                { "title": "鐢熶骇浜х嚎", "field": "productionLine", type: "text" },
+                { "title": "搴斿嚭搴撴椂闂�", "field": "outboundTime", type: "datetime" },
+                // { "title": "缁勭洏绫诲瀷", "field": "groupType", type: "select", dataKey: "GroupType", data: [] },
+            ]
+        ]);
+        const searchFormFields = ref({});
+        const searchFormOptions = ref([
+            [
+                { "title": "鎵樼洏鏉$爜", "field": "palletCode", type: "text" },
+                { "title": "鐢熶骇浜х嚎", "field": "productionLine", type: "select", dataKey: "ProductionLine", data: [] },
+                { "title": "搴撳尯", "field": "areaCode", type: "select", dataKey: "AreaType", data: [] },
+                { "title": "搴撳瓨绫诲瀷", "field": "isFull", type: "select", dataKey: "isFull", data: [] },
+            ], [
+                { "title": "搴撲綅鍙�", "field": "locationCode", type: "text" },
+                { "title": "宸烽亾", "field": "roadwayNo", type: "text" },
+                { "title": "璐т綅鐘舵��", "field": "locationStatus", type: "select", dataKey: "LocationState", data: [] },
+                { "title": "鍑哄簱鏃堕棿", "field": "outboundTime", type: "datetime"},
+            ]
+        ]);
+        const now = new Date();
+        // 鐩存帴鍑忓幓 3 灏忔椂锛堝彲鑳借法澶╋紝Date 瀵硅薄浼氳嚜鍔ㄥ鐞嗭級
+        now.setHours(now.getHours() - 3);
+        const columns = ref(
+            [{ field: 'id', title: '搴撳瓨ID', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
+            { field: 'locationCode', title: '搴撲綅', type: 'string', width: 100, align: 'left', },
+            { field: 'palletCode', title: '鎵樼洏鏉$爜', type: 'string', width: 110, align: 'left', },
+            { field: 'isFull', title: '搴撳瓨绫诲瀷', type: 'bool', width: 80, align: 'left', bind: { key: "isFull", data: [{ key: false, value: '绌虹洏' }, { key: true, value: '瀹炵洏' }] }, },
+            { field: 'linedProcessFeedbackTime', title: '宸ヨ壓寮�濮嬫椂闂�', type: 'string', width: 110, align: 'left', },
+            { field: 'specialParameterDuration', title: '宸ヨ壓鏃堕暱', type: 'string', width: 60, align: 'left', sort: true },
+            { field: 'outboundTime', title: '搴斿嚭搴撴椂闂�', type: 'string', width: 110, align: 'left', sort: true },
+            { field: 'productionLine', title: '鐢熶骇浜х嚎', type: 'string', width: 60, align: 'left', bind: { key: "ProductionLine", data: [] }  },
+            { field: 'areaCode', title: '搴撳尯', type: 'string', width: 60, align: 'left', bind: { key: "AreaType", data: [] } },
+            { field: 'remark', title: '鐢佃姱鏁伴噺', type: 'string', width: 60, align: 'left', },
+            { field: 'creater', title: '鍒涘缓浜�', type: 'string', sort: true, width: 110, align: 'left', hidden: true },
+            { field: 'createDate', title: '鍒涘缓鏃堕棿', type: 'datetime', sort: true, width: 150, align: 'left', },
+            { field: 'modifier', title: '鏈�鍚庝慨鏀逛汉', type: 'string', sort: true, width: 100, hidden: true, align: 'left' },
+                // { field: 'modifyDate', title: '鏈�鍚庝慨鏀规椂闂�', type: 'datetime', sort: true, width: 150, align: 'left', sort: true },
+            ]
+        );
+        
+        const detail = ref({
+            cnName: "#detailCnName",
+            table: "#detailTable",
+            columns: [],
+            sortName: "",
+            key: ""
+        });
+        return {
+            table,
+            extend,
+            editFormFields,
+            editFormOptions,
+            searchFormFields,
+            searchFormOptions,
+            columns,
+            detail,
+        };
+    },
+});
+</script>
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_CL.vue b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_CL.vue
new file mode 100644
index 0000000..804d4b7
--- /dev/null
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_CL.vue
@@ -0,0 +1,81 @@
+<!--
+*Author锛歫xx
+ *Contact锛�283591387@qq.com
+ *浠g爜鐢辨鏋剁敓鎴�,浠讳綍鏇存敼閮藉彲鑳藉鑷磋浠g爜鐢熸垚鍣ㄨ鐩�
+ *涓氬姟璇峰湪@/extension/widesea_wms/taskinfo/Dt_Task.js姝ゅ缂栧啓
+ -->
+<template>
+    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
+        :editFormOptions="editFormOptions" 
+        :table="table" :extend="extend" />
+</template>
+<script>
+import extend from "@/extension/widesea_wms/taskinfo/Dt_Task_Hty.jsx";
+import { ref, defineComponent } from "vue";
+export default defineComponent({
+    setup() {
+        const table = ref({
+            key: 'taskId',
+            footer: "Foots",
+            cnName: '浜ч噺缁熻',
+            name: 'taskinfo',
+            url: "/Task/Getproductionstatistics",
+            sortName: "TaskId"
+        });
+        const editFormFields = ref({
+            "taskNum": "",
+            "palletCode": ""
+        });
+        const editFormOptions = ref([
+          
+        ]);
+        const searchFormFields = ref({
+        });
+        const searchFormOptions = ref([
+            [
+               
+              
+                { "title": "浠诲姟绫诲瀷", "field": "taskType", "type": "select", dataKey: "TaskType", data: [] },
+                { "title": "浠诲姟鐘舵��", "field": "taskState", "type": "select", dataKey: "TaskStatus", data: [] },
+
+            ],
+            [
+                { "title": "璧峰浣嶇疆", "field": "sourceAddress", type: "text" },
+                { "title": "褰撳墠浣嶇疆", "field": "currentAddress", type: "text" },
+                { "title": "涓嬩竴浣嶇疆", "field": "nextAddress", type: "text" },
+                { "title": "鐩爣浣嶇疆", "field": "targetAddress", type: "text" },
+            ],
+            [
+                { "title": "宸烽亾", "field": "roadway", type: "text" },
+                { "title": "鐢熶骇浜х嚎", "field": "productionLine", type: "select", dataKey: "ProductionLine", data: [] },
+                { "title": "鍒涘缓浜�", "field": "creater", type: "text" },
+                { "title": "鍒涘缓鏃堕棿", "field": "createDate", type: "datetime" },
+            ],
+        ]);
+        const columns = ref([{ field: 'TaskId', title: '涓婚敭', type: 'string', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
+        { field: 'hour', title: '鏃ユ湡', type: 'int', width: 110, align: 'left', sort: true },
+        { field: 'count', title: '瀹炴鍑哄簱', type: 'string', width: 150, align: 'left' },
+        { field: 'pnboundNo', title: '鍗曟嵁鍙�', type: 'string', width: 110, align: 'left' ,hidden: true},
+        { field: 'groupID', title: '搴撳瓨ID', type: 'int', width: 110, hidden: true, align: 'left' },
+        { field: 'groupDetailId', title: '缁勭洏鏄庣粏ID', type: 'int', width: 110, hidden: true, align: 'left' },
+        { field: 'roadway', title: '搴�', type: 'string', width: 110, align: 'left' },]);
+        const detail = ref({
+            cnName: "#detailCnName",
+            table: "#detailTable",
+            columns: [],
+            sortName: "",
+            key: ""
+        });
+        return {
+            table,
+            extend,
+            editFormFields,
+            editFormOptions,
+            searchFormFields,
+            searchFormOptions,
+            columns,
+            detail,
+        };
+    },
+});
+</script>
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/WebResponseContent.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/WebResponseContent.cs
index 17bbbdb..712e872 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/WebResponseContent.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/WebResponseContent.cs
@@ -16,12 +16,14 @@
             Status = status;
         }
         public bool Status { get; set; }
+        public int total { get; set; }
 
         public int Code { get; set; }
 
         public string Message { get; set; }
 
         public object Data { get; set; }
+        public object rows { get; set; }
 
         public string DevMessage { get; set; }
 
@@ -43,7 +45,15 @@
             Data = data;
             return this;
         }
-
+        public WebResponseContent OK1(int total1, object data = null,string message = null)
+        {
+            Status = true;
+            total = total1;
+            rows = data;
+            Data = data;
+            Message = message;
+            return this;
+        }
         public WebResponseContent Error(string message = null)
         {
             Status = false;
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs
index 4bd22d5..c98ad7b 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Extensions/AutofacModuleRegister.cs
@@ -24,8 +24,8 @@
         {
             var cacheType = new List<Type>();
 
-            builder.RegisterType<LogAOP>();
-            cacheType.Add(typeof(LogAOP));
+            //builder.RegisterType<LogAOP>();
+            //cacheType.Add(typeof(LogAOP));
 
             builder.RegisterGeneric(typeof(RepositoryBase<>)).As(typeof(IRepository<>)).InstancePerDependency();//娉ㄥ唽浠撳偍
             builder.RegisterGeneric(typeof(ServiceBase<,>)).As(typeof(IService<>)).InstancePerDependency();//娉ㄥ唽鏈嶅姟
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs
index 171a3e0..b3e4e81 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskService/Task/IDt_TaskService.cs
@@ -259,4 +259,16 @@
     /// </summary>
     /// <returns></returns>
     WebResponseContent Getoutput();
+
+    /// <summary>
+    /// 鑾峰彇瓒呮椂搴撳瓨淇℃伅
+    /// </summary>
+    /// <returns></returns>
+    WebResponseContent GetTimeout();
+
+    /// <summary>
+    /// 鑾峰彇浜ч噺缁熻
+    /// </summary>
+    /// <returns></returns>
+    WebResponseContent Getproductionstatistics();
 }
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
index fb1d90b..81c370b 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
@@ -198,7 +198,7 @@
                         LocationType = locType,
                         Remark = "",
                         Depth = locType > 1 ? (((line - 1) % 4) + 1) == 2 || (((line - 1) % 4) + 1) == 3 ? 1 : 2 : 1,
-                        RoadwayNo = locType > 1 ? $"JZSC{((line - 1) / 4) + 1}" : $"JZSC{((line - 1) / 2) + 1}",
+                        RoadwayNo = locType > 1 ? $"CHSC{((line - 1) / 4) + 1}" : $"CHSC{((line - 1) / 2) + 1}",
                         LocationStatus = LocationEnum.Free.ObjToInt(),
                         AreaId = areaId,
                         Creater = "System",
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index 86d8a12..8cfd6d0 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -636,7 +636,6 @@
             case (int)TaskOutboundTypeEnum.OutTray:
             case (int)TaskOutboundTypeEnum.Outbound:
             case (int)TaskOutboundTypeEnum.OutNG:
-            case (int)TaskOutboundTypeEnum.OutQuality:
             
                 LogFactory.GetLog("浠诲姟瀹屾垚").InfoFormat(true, "鍑哄簱浠诲姟", "");
                 return await CompleteStackTaskAsync(task, stock);
@@ -905,8 +904,8 @@
 
     // 鑾峰彇缁勭洏淇℃伅
     private DtBoxingInfo CreateBoxingInfo(ResultTrayCellsStatus result, string palletCode)
-    {
-        var boxing=_boxingInfoRepository.QueryFirst(x=>x.PalletCode== palletCode);
+    {  
+         var boxing=_boxingInfoRepository.QueryFirst(x=>x.PalletCode == palletCode);
         if (boxing == null)
         {
             return new DtBoxingInfo
@@ -925,8 +924,7 @@
                 }).ToList()
             };
         }
-        else
-        {
+        else { 
             _boxingInfoRepository.DeleteData(boxing);
             return new DtBoxingInfo
             {
@@ -934,16 +932,17 @@
                 IsFull = true,
                 ProcessCode = result.ProcessCode,
                 ProductionLine = result.ProductionLine,
-                BoxingInfoDetails = result.SerialNos.Select(serialNoObj => new DtBoxingInfoDetail
+                BoxingInfoDetails = result.SerialNos.Select(seriaINoObj => new DtBoxingInfoDetail
                 {
-                    SerialNumber = serialNoObj.SerialNo,
-                    OrderNo = serialNoObj.PositionNo.ToString(),
-                    Status = serialNoObj.SerialNoStatus,
+                    SerialNumber = seriaINoObj.SerialNo,
+                    OrderNo = seriaINoObj.PositionNo.ToString(),
+                    Status = seriaINoObj.SerialNoStatus,
                     MaterielCode = result.BindCode,
                     Remark = result.TrayBarcodePropertys.ToJsonString(),
                 }).ToList()
             };
         }
+       
     }
 
     // 鑾峰彇宸ヨ壓鐢宠
@@ -981,7 +980,6 @@
             DtStockInfo stockInfo = tag == (int)TaskOutboundTypeEnum.Outbound
                 ? areaCode != "CWSC1" ? await QueryStockInfoForRealTrayAsync(areaCode, areaCodes, productionLine) : await QueryStockInfoForRealTrayCWAsync(areaCodes, productionLine)
                 : await QueryStockInfoForEmptyTrayAsync(areaCode, position);
-
             if (stockInfo == null)
             {
                 return content.Error("搴撳瓨淇℃伅涓嶅瓨鍦�");
@@ -1314,7 +1312,7 @@
                 }
                 else
                 {
-                    task = CreateTask(stockInfo, "1049-1", taskType);
+                    task = CreateTask(stockInfo, "1049-8", taskType);
                 }
                 
             }
@@ -1740,23 +1738,21 @@
         // 鍒涘缓鍘嗗彶浠诲姟瀹炰緥妯″瀷
         try
         {
-            foreach (object item in key)
+            Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(key[0]));
+            if (task == null)
             {
-                Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(key));
-                if (task == null)
-                {
-                    return content.Error("鏈壘鍒颁换鍔′俊鎭�!");
-                }
-                var taskHtyNG = CreateHistoricalTask(task, true);
-
-                // 鎵ц鏁版嵁搴撲簨鍔�
-
-                // 娣诲姞鍘嗗彶浠诲姟
-                var isTaskHtyAdd = _task_HtyRepository.AddData(taskHtyNG) > 0;
-
-                // 鍒犻櫎浠诲姟鏁版嵁
-                var isTaskDelete = BaseDal.Delete(task.TaskId);
+                return content.Error("鏈壘鍒颁换鍔′俊鎭�!");
             }
+            var taskHtyNG = CreateHistoricalTask(task, true);
+
+            // 鎵ц鏁版嵁搴撲簨鍔�
+
+            // 娣诲姞鍘嗗彶浠诲姟
+            var isTaskHtyAdd = _task_HtyRepository.AddData(taskHtyNG) > 0;
+
+            // 鍒犻櫎浠诲姟鏁版嵁
+            var isTaskDelete = BaseDal.Delete(task.TaskId);
+
             return content.OK("鍒犻櫎鎴愬姛!");
         }
         catch (Exception ex)
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
index 6919e58..a1744f2 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
@@ -4,6 +4,7 @@
 using WIDESEA_Core.Const;
 using WIDESEA_DTO.MOM;
 using WIDESEA_DTO.WMS;
+using WIDESEA_Model.Models.Basic;
 using WIDESEAWCS_Model.Models;
 using WIDESEAWCS_QuartzJob.Models;
 
@@ -1138,37 +1139,36 @@
 
     #region 鐏鍑哄簱
 
-    public WebResponseContent EmergencyTask(object obj)
+    public WebResponseContent EmergencyTask(Object obj)
     {
         WebResponseContent content = new WebResponseContent();
         var emergencyTask = new DTSEmergencyTask();
         try
         {
             emergencyTask = JsonConvert.DeserializeObject<DTSEmergencyTask>(obj.ToString());
-
             if (emergencyTask == null) throw new Exception("鐏鍙傛暟涓虹┖");
-
             string[] strings = emergencyTask.LocationCode.Split("-");
-
-            string[] Roadways = strings[0].Select(x => x.ToString()).ToArray();
-            string Roadway = string.Empty;
-            switch (Roadways[0])
-            {
-                case "J":
-                    Roadway = "JZSC" + Roadways[1];
-                        break;
-                case "G":
-                    Roadway = "GWSC" + Roadways[1];
-                    break;
-                case "C":
-                    Roadway = "CWSC" + Roadways[1];
-                    break;
-                default: throw new Exception("鏈瘑鍒簱浣嶇紪鐮�");
-            }
-
+            string Roadway = strings[0];
+            //switch (Roadways[0])
+            //{
+            //    case "J":
+            //        Roadway = "JZSC" + Roadways[1];
+            //        break;
+            //    case "G":
+            //        Roadway = "GWSC" + Roadways[1];
+            //        break;
+            //    case "C":
+            //        Roadway = "CWSC" + Roadways[1];
+            //        break;
+            //    default: throw new Exception("鏈瘑鍒簱浣嶇紪鐮�");
+            //}
+            int Row = Convert.ToInt16(strings[1]);
+            int Column= Convert.ToInt16(strings[2]);
+            int Layer= Convert.ToInt16(strings[3]);
+            if (!strings[0].Contains("SC")) throw new Exception("鏈煡搴撳尯");
             for (int i = 0; i < 2; i++)
             {
-                DtLocationInfo locationInfo = _locationRepository.QueryFirst(x => x.Row == Convert.ToInt16(strings[1]) && x.Column == Convert.ToInt16(strings[2]) && x.Layer == (i == 0 ? Convert.ToInt16(strings[3]) * 2 - 1 : Convert.ToInt16(strings[3]) * 2) && x.RoadwayNo == Roadway);
+                DtLocationInfo locationInfo = _locationRepository.QueryFirst(x => x.Row == Row && x.Column == Column && x.Layer == (i == 0 ? Layer - 1 : Layer) && x.RoadwayNo == Roadway);
                 if (locationInfo == null)
                 {
                     throw new Exception("鏈煡搴撲綅");
@@ -1516,4 +1516,73 @@
 
     }
     #endregion
-}
\ No newline at end of file
+    public WebResponseContent GetTimeout()
+    {
+        WebResponseContent content = new WebResponseContent();
+        try
+        {
+            var now = DateTime.Now;
+            // 浣跨敤Subtract鏂规硶
+            var threeHoursAgo = now.Subtract(TimeSpan.FromHours(3));
+           
+            List<DtStockInfo> dtStocks = _stockInfoRepository.Db.Queryable<DtStockInfo>()
+                               .Where(x => x.OutboundTime < threeHoursAgo).ToList();
+            return content.OK1(total1:dtStocks.Count, data: dtStocks);
+        }
+        catch (Exception ex)
+        {
+            return content.Error(ex.Message);
+        }
+
+    }
+    public WebResponseContent Getproductionstatistics()
+    {
+        WebResponseContent content = new WebResponseContent();
+        try
+        {
+            var now = DateTime.Now;
+            var thirtyDaysAgo = now.AddDays(-30);
+            var roadwayMappings = new Dictionary<string, string> {
+                    { "JZ", "闈欑疆搴�" },
+                    { "CH", "闄堝寲搴�" },
+                    { "FR", "鍒嗗搴�" },
+                    { "GW", "楂樻俯搴�" },
+                    { "CW", "甯告俯搴�" }
+                };
+
+            var roadwayKeys = roadwayMappings.Keys.ToArray();
+
+            var taskHty = _task_HtyRepository.Db.Queryable<Dt_Task_Hty>()
+                .Where(it =>
+                    it.CreateDate >= thirtyDaysAgo &&
+                    it.CreateDate <= now &&
+                    it.TaskType == 100 &&
+                    roadwayKeys.Any(rk => it.Roadway.Contains(rk)))
+                .ToList()
+                .Select(t => new {
+                    OriginalRoadway = t.Roadway,
+                    MatchedKey = roadwayKeys.FirstOrDefault(rk => t.Roadway.Contains(rk)),
+                    CreateDate = t.CreateDate
+                })
+                .Where(t => t.MatchedKey != null)
+                .GroupBy(t => new {
+                    RoadwayKey = t.MatchedKey,
+                    Date = t.CreateDate.Date,
+                    Hour = t.CreateDate.Hour
+                })
+                .OrderByDescending(group => group.Key.Date)
+                .ThenByDescending(group => group.Key.Hour)
+                .Select(group => new {
+                    Hour = $"{group.Key.Date:yyyy/M/d} {group.Key.Hour}:00",
+                    Count = group.Count(),
+                    Roadway = roadwayMappings[group.Key.RoadwayKey] // 鏄犲皠涓轰腑鏂囧悕绉�
+                })
+                .ToList();
+            return content.OK1(total1: taskHty.Count, data: taskHty);
+        }
+        catch (Exception ex)
+        {
+            return content.Error(ex.Message);
+        }
+    }
+    }
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs
index fd839d3..a7ae9dc 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskController.cs
@@ -244,4 +244,21 @@
     {
         return Service.Getoutput();
     }
+
+    [HttpPost, AllowAnonymous, Route("GetTimeoutgetPageData")]
+    public WebResponseContent GetTimeout()
+    {
+        return Service.GetTimeout();
+    }
+
+
+    /// <summary>
+    /// 浜ч噺缁熻
+    /// </summary>
+    /// <returns></returns>
+    [HttpPost,AllowAnonymous,Route("GetproductionstatisticsgetPageData")]
+    public WebResponseContent Getproductionstatistics()
+    {
+        return Service.Getproductionstatistics();
+    }
 }
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
index c20c470..cdd90ab 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -25,29 +25,23 @@
     "IPs": "http://127.0.0.1:8080,http://localhost:8080,http://127.0.0.1:8081,http://localhost:8081"
   },
 
-  //缂撳瓨璁剧疆
-  "CacheSettings": {
-    "UseRedis": false, //鍚敤redis
-    "RedisSettings": {
-      "Address": "127.0.0.1:6379", //鍦板潃
-      "Password": "123456", //Redis鏈嶅姟瀵嗙爜
-      "Db": 9, //榛樿搴�
-      "ClearRedis": true //鏄惁姣忔鍚姩閮芥竻闄edis缂撳瓨
-    }
-  },
-
-  "ApiName": "WIDESEA",
-  "ExpMinutes": 120,
-
-  // 闇�瑕佺Щ搴撶殑琛�
-  "TransfertRows": "1,4,5,8",
-
-  // 鍏佽鍑哄簱鐨勭紪鐮�
-  "OutBoundMateriel": [
-    {
-      "MaterielCode": "CC03040001523",
-      "ProductionLine": "ZJ-7",
-      "ProcessCode": "CWSC3"
-    }
-  ]
+    // 闇�瑕佺Щ搴撶殑琛�
+    "TransfertRows": "1,4,5,8",
+    "CacheSettings": {
+        "UseRedis": false,
+        "RedisSettings": {
+            "Address": "127.0.0.1:6379",
+            "Password": "123456",
+            "Db": 9,
+            "ClearRedis": true
+        }
+    },
+    // 鍏佽鍑哄簱鐨勭紪鐮�
+    "OutBoundMateriel": [
+        //{
+        //    "MaterielCode": "CC01050001348",
+        //    "ProductionLine": "ZJ-8",
+        //    "ProcessCode": "CH001"
+        //}
+    ]
 }

--
Gitblit v1.9.3