From 4f8cbd783208925be8ccbfed198b86e20523ec0e Mon Sep 17 00:00:00 2001
From: chenyong <chenyong@hnkhzn.com>
Date: 星期一, 09 六月 2025 19:26:06 +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 | 40 ++--
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, 381 insertions(+), 82 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 ba4e5f8..b5783df 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -10,12 +10,12 @@
"MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue
//杩炴帴瀛楃涓�
//"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
- //"ConnectionString": "Data Source=192.168.5.251;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- "ConnectionString": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WMSDB;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ "ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
//"ConnectionString": "Data Source=.\\LIULEI;Initial Catalog=WIDESEA_WMSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
//"ConnectionString": "Data Source=192.168.20.251;Initial Catalog=WIDESEA_WMSDB;User ID=sa;Password=123456@gy;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- //"ConnectionStringWCS": "Data Source=192.168.5.251;Initial Catalog=WIDESEAWCS_TEST;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- "ConnectionStringWCS": "Data Source=127.0.0.1;Initial Catalog=WIDESEA_WCSDB;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ "ConnectionStringWCS": "Data Source=.;Initial Catalog=WIDESEA_WCSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ //"ConnectionStringWCS": "Data Source=.;Initial Catalog=WIDESEA_WCSDB_BBMain;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
//璺ㄥ煙
"Cors": {
"PolicyName": "CorsIpAccess", //绛栫暐鍚嶇О
@@ -24,30 +24,26 @@
// 娉ㄦ剰锛宧ttp://127.0.0.1:1818 鍜� http://localhost:1818 鏄笉涓�鏍风殑
"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",
-
+ "CacheSettings": {
+ "UseRedis": false,
+ "RedisSettings": {
+ "Address": "127.0.0.1:6379",
+ "Password": "123456",
+ "Db": 9,
+ "ClearRedis": true
+ }
+ },
// 鍏佽鍑哄簱鐨勭紪鐮�
"OutBoundMateriel": [
- {
- "MaterielCode": "CC03040001523",
- "ProductionLine": "ZJ-7",
- "ProcessCode": "CWSC3"
- }
+ //{
+ // "MaterielCode": "CC01050001348",
+ // "ProductionLine": "ZJ-8",
+ // "ProcessCode": "CH001"
+ //}
]
}
--
Gitblit v1.9.3