From fe9223b1cfa5bac6438afebf4ab6604fd89f3ed2 Mon Sep 17 00:00:00 2001
From: tjx <t2856754968@163.com>
Date: 星期四, 27 十一月 2025 16:58:19 +0800
Subject: [PATCH] 111
---
StandardPda/MES.Service/service/Warehouse/XbRackingTaskSyxtLogManager.cs | 21 ++++++++++++++++++++-
StandardPda/MES.Service/service/Warehouse/MesInvItemStocksManager.cs | 6 ++----
StandardPda/MESApplication/Controllers/Warehouse/XbRackingTaskSyxtLogController.cs | 25 ++++++++++++++++++++++++-
3 files changed, 46 insertions(+), 6 deletions(-)
diff --git a/StandardPda/MES.Service/service/Warehouse/MesInvItemStocksManager.cs b/StandardPda/MES.Service/service/Warehouse/MesInvItemStocksManager.cs
index 5f3c137..a9e4995 100644
--- a/StandardPda/MES.Service/service/Warehouse/MesInvItemStocksManager.cs
+++ b/StandardPda/MES.Service/service/Warehouse/MesInvItemStocksManager.cs
@@ -437,7 +437,7 @@
taskType = "1",
palletCode = rackingTaskInfo?.PalletCode ?? "",
widthType = rackingTaskInfo?.WidthType?.ToString() ?? "2000",
- station = "3"
+ station = dto.Station
};
var requestList = new[] { requestData };
var jsonRequest = JsonConvert.SerializeObject(requestList);
@@ -510,9 +510,7 @@
Quantity = firstStock.Quantity,
WarehousingJson = responseStr,
QcStatus = 2,
- ItemBarcode = barcode,
- Code = "200",
- JsonMessage = jsonMessage ?? "鎴愬姛"
+ ItemBarcode = barcode
};
Db.Insertable(taskLog).ExecuteCommand();
diff --git a/StandardPda/MES.Service/service/Warehouse/XbRackingTaskSyxtLogManager.cs b/StandardPda/MES.Service/service/Warehouse/XbRackingTaskSyxtLogManager.cs
index bf1e394..10e5495 100644
--- a/StandardPda/MES.Service/service/Warehouse/XbRackingTaskSyxtLogManager.cs
+++ b/StandardPda/MES.Service/service/Warehouse/XbRackingTaskSyxtLogManager.cs
@@ -7,6 +7,25 @@
public class XbRackingTaskSyxtLogManager : Repository<XbRackingTaskSyxtLog>
{
/// <summary>
+ /// 鏍搁獙浠诲姟鍗曞彿鏄惁瀛樺湪
+ /// </summary>
+ /// <param name="dto">浠诲姟瀹屾垚涓婃姤鍙傛暟</param>
+ /// <returns>浠诲姟鍗曞彿鏄惁瀛樺湪</returns>
+ public bool ValidateTaskExists(TaskCompleteReportDto dto)
+ {
+ if (dto == null || string.IsNullOrWhiteSpace(dto.TaskCode))
+ {
+ return false;
+ }
+
+ var task = Context.Queryable<XbRackingTaskSyxtLog>()
+ .Where(t => t.TaskCode == dto.TaskCode)
+ .Any();
+
+ return task;
+ }
+
+ /// <summary>
/// 浠诲姟瀹屾垚涓婃姤
/// </summary>
/// <param name="dto">浠诲姟瀹屾垚涓婃姤鍙傛暟</param>
@@ -166,4 +185,4 @@
return RackingTaskResponse.Fail($"鏇存柊浠诲姟鏃ュ織澶辫触锛歿ex.Message}");
}
}
-}
+}
\ No newline at end of file
diff --git a/StandardPda/MESApplication/Controllers/Warehouse/XbRackingTaskSyxtLogController.cs b/StandardPda/MESApplication/Controllers/Warehouse/XbRackingTaskSyxtLogController.cs
index 3d97bad..097bdbb 100644
--- a/StandardPda/MESApplication/Controllers/Warehouse/XbRackingTaskSyxtLogController.cs
+++ b/StandardPda/MESApplication/Controllers/Warehouse/XbRackingTaskSyxtLogController.cs
@@ -224,6 +224,29 @@
}
/// <summary>
+ /// 鏍搁獙浠诲姟鍗曞彿鏄惁瀛樺湪
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("ValidateTaskExists")]
+ public ResponseResult ValidateTaskExists(TaskCompleteReportDto dto)
+ {
+ try
+ {
+ var exists = m.ValidateTaskExists(dto);
+ return new ResponseResult
+ {
+ status = 0,
+ message = exists ? "浠诲姟鍗曞彿瀛樺湪" : "浠诲姟鍗曞彿涓嶅瓨鍦�",
+ data = exists
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
/// 寮傚父浠诲姟涓婃姤
/// </summary>
/// <returns></returns>
@@ -273,4 +296,4 @@
return ResponseResult.ResponseError(ex);
}
}
-}
+}
\ No newline at end of file
--
Gitblit v1.9.3