From a9b86405ec73459aab599119c6a593f1f3e0c767 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <1247017146@qq.com>
Date: 星期一, 28 四月 2025 10:24:36 +0800
Subject: [PATCH] 优化
---
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task.vue | 3 +
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task_Hty.vue | 6 +-
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs | 2
Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx | 14 +++++++
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs | 2
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs | 2
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 7 ++-
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 28 ++++++++-----
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs | 4 +-
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs | 2
Code Management/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js | 3 -
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs | 2
12 files changed, 49 insertions(+), 26 deletions(-)
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
index 6195eb6..54cb06c 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
@@ -291,7 +291,7 @@
// 澶勭悊 stationType 涓� 7 鐨勬儏鍐�
private async Task<WebResponseContent> HandleStationType7(string palletCode, Dt_StationManager stationManager)
{
- var station = await _stationManagerRepository.QueryFirstAsync(x => x.stationType == 6 && x.productLine == stationManager.productLine && x.stationArea == stationManager.stationArea);
+ var station = await _stationManagerRepository.QueryFirstAsync(x => x.stationType == 6 && x.productLine == stationManager.productLine && x.stationArea == stationManager.stationArea && x.Roadway == stationManager.Roadway);
var runTask = await BaseDal.QueryFirstAsync(x => x.CurrentAddress == station.stationChildCode && x.TaskState == (int)TaskInStatusEnum.Line_InFinish && x.TaskType == (int)TaskInboundTypeEnum.InTray);
if (runTask != null)
@@ -328,7 +328,7 @@
// 澶勭悊 stationType 涓� 6 鐨勬儏鍐�
private async Task<WebResponseContent> HandleStationType6(string palletCode, Dt_StationManager stationManager)
{
- var emptyStation = await _stationManagerRepository.QueryFirstAsync(x => x.stationType == 7 && x.productLine == stationManager.productLine && x.stationArea == stationManager.stationArea);
+ var emptyStation = await _stationManagerRepository.QueryFirstAsync(x => x.stationType == 7 && x.productLine == stationManager.productLine && x.stationArea == stationManager.stationArea && x.Roadway==stationManager.Roadway);
var runTask = await BaseDal.QueryFirstAsync(x => x.NextAddress == emptyStation.stationChildCode && x.TaskState == (int)TaskInStatusEnum.Line_InFinish && x.TaskType == (int)TaskInboundTypeEnum.InTray);
if (runTask != null)
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
index 6c2258f..7930101 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -709,18 +709,24 @@
var wmsIpAddress = wmsBase + completeTask;
var result = HttpHelper.GetAsync(wmsIpAddress, keys).Result;
- content = JsonConvert.DeserializeObject<WebResponseContent>(result);
- if (!content.Data.IsNullOrEmpty())
- {
- if (content.Data.ToString() == "NG")
- {
- task.Remark = "NG";
- //BaseDal.UpdateData(task);
- //_taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"鍫嗗灈鏈哄嚭搴撳畬鎴愶紝MOM杩斿洖NG");
- }
- }
- task.ExceptionMessage += " " + content.Message;
+ QuartzLogger.WriteLogToFile($"Info_浠诲姟瀹屾垚", $"浠诲姟瀹屾垚,浠诲姟鍙�:銆恵taskNum}銆戣繑鍥炲弬鏁般�恵JsonConvert.SerializeObject(result)}銆憑Environment.NewLine}{Environment.NewLine}");
+ if(result != null)
+ {
+
+ content = JsonConvert.DeserializeObject<WebResponseContent>(result);
+ if (!content.Data.IsNullOrEmpty())
+ {
+ if (content.Data.ToString() == "NG")
+ {
+ task.Remark = "NG";
+ //BaseDal.UpdateData(task);
+ //_taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"鍫嗗灈鏈哄嚭搴撳畬鎴愶紝MOM杩斿洖NG");
+ }
+ }
+ task.ExceptionMessage += " " + content.Message;
+
+ }
#endregion WMS鍚屾浠诲姟瀹屾垚
if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && task.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting)
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
index 40d2264..b91ac8d 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/CommonConveyorLine_GWJob.cs
@@ -213,7 +213,7 @@
else
{
var GWTask = _taskRepository.QueryData(x => x.Roadway.Contains("GWSC2") && x.SourceAddress == "1039" && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskInStatusEnum.Line_InFinish)).ToList();
- if (GWTask.Count >= 2 && childDeviceCode == "1039")
+ if (GWTask.Count >= 2 && childDeviceCode == "1039"&& task.Roadway.Contains("GWSC2"))
{
ConsoleHelper.WriteErrorLine($"鎵樼洏鍙凤細銆恵command.ConveyorLineBarcode}銆戦珮娓╀簩宸插瓨鍦ㄣ�恵GWTask.Count}銆戜釜浠诲姟澶т簬2涓换鍔′笉鍙笅鍙�");
return;
diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
index 4db8ead..7c3fa3d 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
@@ -334,7 +334,7 @@
//conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, task.NextAddress, childDeviceCode);
//conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, command.ConveyorLineBarcode, childDeviceCode);
var GWTask = _taskRepository.QueryData(x => x.Roadway.Contains("GWSC2") && x.SourceAddress == "1039" && (x.TaskState == (int)TaskInStatusEnum.Line_InExecuting || x.TaskState == (int)TaskInStatusEnum.Line_InFinish)).ToList();
- if (GWTask.Count >= 2 && childDeviceCode == "1039")
+ if (GWTask.Count >= 2 && childDeviceCode == "1039"&&task.Roadway.Contains("GWSC2"))
{
ConsoleHelper.WriteErrorLine($"鎵樼洏鍙凤細銆恵command.ConveyorLineBarcode}銆戦珮娓╀簩宸插瓨鍦ㄣ�恵GWTask.Count}銆戜釜浠诲姟澶т簬2涓换鍔′笉鍙笅鍙�");
return;
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js b/Code Management/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js
index 8a02afb..131833b 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js
@@ -17,8 +17,7 @@
methods: {
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
onInit() {
- // this.$Notice.success({ title: this.detailOptions.cnName + ',鏌ヨ缁撴灉', desc: '杩斿洖鐨勫璞★細' + JSON.stringify(data) });
-
+ // this.$Notice.success({ title: this.detailOptions.cnName + ',鏌ヨ缁撴灉', desc: '杩斿洖鐨勫璞★細' + JSON.stringify(data) });
var previousButton = this.buttons.find((x) => x.value == "Previous");
if (previousButton) previousButton.hidden = true;
var nextButton = this.buttons.find((x) => x.value == "Next");
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx b/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx
index 2f9e4b4..372279c 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/taskinfo/Dt_Task.jsx
@@ -23,6 +23,20 @@
methods: {
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
onInit() {
+
+ this.columns.forEach(x => {
+ if (x.field == "errorMessage") {
+ x.cellStyle = (row, rowIndex, columnIndex) => {
+ if (row.errorMessage == null||row.errorMessage=="") {
+ return { background: "White", color: "Black" }
+ }
+ else{
+ return { background: "#FF4500", color: "Black" }
+ }
+ }
+ }
+ })
+
//妗嗘灦鍒濆鍖栭厤缃墠锛�
let TaskHandCompleteBtn=this.buttons.find(x=>x.value=='TaskHandComplete');
if(TaskHandCompleteBtn){
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task.vue b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task.vue
index c7af286..923d039 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task.vue
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task.vue
@@ -68,7 +68,7 @@
{ field: 'targetAddress', title: '鐩爣浣嶇疆', type: 'string', width: 110, align: 'left' },
{ field: 'grade', title: '浼樺厛绾�', type: 'int', width: 60, align: 'left' },
{ field: 'productionLine', title: '浜х嚎', type: 'string', width: 70, align: 'left', bind: { key: "ProductionLine", data: [] } },
- { field: 'processCode', title: '宸ュ簭', type: 'string', width: 90, align: 'left' },
+ { field: 'errorMessage', title: '寮傚父淇℃伅', type: 'string', width: 110, align: 'left',sort: true },
{ field: 'dispatchertime', title: '浠诲姟涓嬪彂鏃堕棿', type: 'datetime', width: 150, align: 'left', sort: true },
{ field: 'remark', title: '澶囨敞', type: 'string', width: 110, align: 'left',hidden: true, },
{ field: 'createDate', title: '鍒涘缓鏃堕棿', type: 'datetime', sort: true, width: 150, align: 'left', sort: true },
@@ -78,6 +78,7 @@
{ field: 'locationCode', title: '璐т綅鍙�', type: 'string', width: 110, hidden: true, align: 'left' },
{ field: 'materialNo', title: '鐗╂枡缂栧彿', type: 'string', width: 110, hidden: true, align: 'left' },
{ field: 'targetAddress', title: '鐩爣鍦板潃', type: 'string', width: 110, hidden: true, align: 'left' },
+ { field: 'processCode', title: '宸ュ簭', type: 'string', width: 90, align: 'left' },
{ field: 'createID', title: '鍒涘缓ID', type: 'int', sort: true, width: 100, hidden: true, align: 'left' },
{ field: 'modifyID', title: '淇敼浜篒D', type: 'int', sort: true, width: 100, hidden: true, align: 'left' },]);
const detail = ref({
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task_Hty.vue b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task_Hty.vue
index 3b78f15..20b0598 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task_Hty.vue
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/taskinfo/Dt_Task_Hty.vue
@@ -78,8 +78,8 @@
{ field: 'nextAddress', title: '涓嬩竴浣嶇疆', type: 'string', width: 110, align: 'left' },
{ field: 'targetAddress', title: '鐩爣浣嶇疆', type: 'string', width: 110, align: 'left' },
{ field: 'grade', title: '浼樺厛绾�', type: 'int', width: 60, align: 'left' },
- { field: 'productionLine', title: '浜х嚎', type: 'string', width: 70, align: 'left', bind: { key: "ProductionLine", data: [] } },
- { field: 'processCode', title: '宸ュ簭', type: 'string', width: 90, align: 'left' },
+ { field: 'productionLine', title: '浜х嚎', type: 'string', width: 70, align: 'left', bind: { key: "ProductionLine", data: [] } },
+ { field: 'errorMessage', title: '寮傚父淇℃伅', type: 'string', width: 110, align: 'left' },
{ field: 'dispatchertime', title: '浠诲姟涓嬪彂鏃堕棿', type: 'datetime', width: 150, align: 'left', sort: true },
{ field: 'operateType', title: '鎿嶄綔绫诲瀷', type: 'string', width: 110, align: 'left', bind: { key: "operateType", data: [] }},
{ field: 'remark', title: '澶囨敞', type: 'string', width: 110, align: 'left',hidden: true, },
@@ -89,7 +89,7 @@
{ field: 'modifier', title: '淇敼浜�', type: 'string', sort: true, width: 100, align: 'left' },
{ field: 'locationCode', title: '璐т綅鍙�', type: 'string', width: 110, hidden: true, align: 'left' },
{ field: 'materialNo', title: '鐗╂枡缂栧彿', type: 'string', width: 110, hidden: true, align: 'left' },
- { field: 'targetAddress', title: '鐩爣鍦板潃', type: 'string', width: 110, hidden: true, align: 'left' },
+ { field: 'processCode', title: '宸ュ簭', type: 'string', width: 90, align: 'left' },
{ field: 'createID', title: '鍒涘缓ID', type: 'int', sort: true, width: 100, hidden: true, align: 'left' },
{ field: 'modifyID', title: '淇敼浜篒D', type: 'int', sort: true, width: 100, hidden: true, align: 'left' },]);
const detail = ref({
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
index 9eb993d..ae805f2 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MCS/Partial/NotifyFinishTest.cs
@@ -37,7 +37,7 @@
LogFactory.GetLog("鍒嗗娴嬭瘯瀹屾垚閫氱煡").Info(true, $"\r\r--------------------------------------");
LogFactory.GetLog("鍒嗗娴嬭瘯瀹屾垚閫氱煡").Info(true, result.ToJsonString());
- var location = _locationRepository.QueryFirst(x => x.AreaId == result.LocationArea && x.LocationCode == result.LocationID);
+ var location = _locationRepository.QueryFirst(x => x.AreaId == result.LocationArea && x.LocationCode == result.LocationID && x.EnalbeStatus == 1);
if (location == null) throw new Exception("鏈煡搴撲綅");
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs
index 7c0c7c2..a1786ad 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/MOM/AgingInOrOutInput/AgingInOrOutInputService.cs
@@ -45,7 +45,7 @@
}
var wmsIpAddress = wmsBase + ipAddress;
- var result = HttpsClient.PostAsync(wmsIpAddress, inputJson).Result;
+ var result =await HttpsClient.PostAsync(wmsIpAddress, inputJson);
content.OK(data: result);
var respone = JsonConvert.DeserializeObject<ResponeAgingInputDto>(result.ToString());
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 274b956..3c811fb 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
@@ -248,7 +248,7 @@
var isStockUpdated = await _locationRepository.UpdateDataAsync(info);
if (!isStockUpdated)
{
- throw new Exception("搴撳瓨淇℃伅鏇存柊澶辫触");
+ throw new Exception("搴撲綅淇℃伅鏇存柊澶辫触");
}
}
@@ -358,7 +358,7 @@
WebResponseContent content = new WebResponseContent();
try
{
- if (task.TaskType == (int)TaskInboundTypeEnum.InNG || task.TaskType == (int)TaskInboundTypeEnum.InQuality)
+ if (task.TaskType == (int)TaskInboundTypeEnum.InNG)
{
task.TaskState = (int)TaskInStatusEnum.SC_InFinish;
// 鍒涘缓鍘嗗彶浠诲姟瀹炰緥妯″瀷
@@ -425,6 +425,9 @@
Console.WriteLine(err.Message.ToString());
LogFactory.GetLog("浠诲姟瀹屾垚").Error(true, err);
content.Error(err.Message);
+ task.ErrorMessage= err.Message;
+ task.TaskState=(int)TaskInStatusEnum.SC_InExecuting;
+ await BaseDal.Update(task);
}
return content;
}
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
index 91b0125..2e8dd63 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
@@ -80,7 +80,7 @@
// TODO 鍒ゆ柇鍦ㄩ�旀暟閲�
var needBarcode = await SqlSugarHelper.DbWCS.Queryable<dt_needBarcode>().FirstAsync(x => x.productLine == STATION.productLine && x.fromArea == "CW");
- var needCount = needBarcode.inLineNum = BaseDal.QueryData(x => x.TargetAddress == STATION.stationChildCode).Count();
+ var needCount = BaseDal.QueryData(x => x.TargetAddress == needBarcode.toArea).Count();
//var count = BaseDal.QueryData(x => x.TargetAddress == stationManagers[0].Roadway).Count;
if (needCount < needBarcode.cacheNum)
{
--
Gitblit v1.9.3