From 57f6acb2cc6750f5793839b2049859ad7873a923 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 23 十二月 2024 21:28:49 +0800
Subject: [PATCH] 1
---
/dev/null | 0
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dba84b80-59a3-4d5b-9a50-dd830ce6c4f5.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs | 15 ++++++++++++---
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 9 +++++++--
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs | 10 ++++++++++
6 files changed, 29 insertions(+), 5 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5dc6e739-d03f-48e2-b874-daeddde08c2d.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5dc6e739-d03f-48e2-b874-daeddde08c2d.vsidx"
deleted file mode 100644
index 16ed6cd..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/5dc6e739-d03f-48e2-b874-daeddde08c2d.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dba84b80-59a3-4d5b-9a50-dd830ce6c4f5.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dba84b80-59a3-4d5b-9a50-dd830ce6c4f5.vsidx"
new file mode 100644
index 0000000..8ea9b79
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/dba84b80-59a3-4d5b-9a50-dd830ce6c4f5.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock"
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/read.lock"
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
index 05b4cf3..765f994 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
@@ -100,7 +100,12 @@
/// <param name="taskNum">浠诲姟鍙�</param>
/// <param name="locationCode">鍏ュ簱鎴栧嚭搴撶殑璐т綅鍙�</param>
/// <returns></returns>
- WebResponseContent IsRelocation(int taskNum, string locationCode);
- MesResponseContent TestReturnStock(TestToolBackModel content);
+ MesResponseContent TestReturnStock(TestToolBackModel backModel);
+ /// <summary>
+ /// 娴嬭瘯鏋舵姤搴�
+ /// </summary>
+ /// <param name="toolScrap"></param>
+ /// <returns></returns>
+ MesResponseContent TestScrap(TestToolScrap toolScrap);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
index 6b3fe45..51ea1cd 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -37,7 +37,7 @@
Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x =>
x.WarehouseId == warehouse.WarehouseId &&
x.StockStatus==(int)StockStatusEmun.鍏ュ簱瀹屾垚)
- .Includes(x => x.Details).Where(x => x.Details.Any(x => x.MaterielCode == model.ToolCode)).First();
+ .Includes(x => x.Details).Where(x => x.Details.Any(x => x.BatchNo == model.ToolCode)).First();
if (stockInfo==null)
{
return responseContent.Error($"娴嬭瘯鏋�:{model.ToolCode}鏃犲彲鐢ㄥ簱瀛�");
@@ -100,7 +100,13 @@
MesResponseContent responseContent = new MesResponseContent();
try
{
-
+ //鑾峰彇娴嬭瘯鏋跺師搴撳瓨淇℃伅
+ Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA64.ToString());
+ //鑾峰彇搴撳瓨璁板綍
+ Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x =>
+ x.WarehouseId == warehouse.WarehouseId &&
+ x.StockStatus == (int)StockStatusEmun.鍑哄簱瀹屾垚)
+ .Includes(x => x.Details).Where(x => x.Details.Any(x => x.BatchNo == backModel.TestToolCode)).First();
}
catch (Exception ex)
{
@@ -122,7 +128,10 @@
//鑾峰彇搴撳瓨璁板綍
Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x =>
x.WarehouseId == warehouse.WarehouseId)
- .Includes(x => x.Details).Where(x => x.Details.Any(x => x.MaterielCode == toolScrap.ToolCode)).First();
+ .Includes(x => x.Details).Where(x => x.Details.Any(x => x.BatchNo == toolScrap.ToolCode)).First();
+ //娓呴櫎搴撳瓨淇℃伅
+ _unitOfWorkManage.BeginTran();
+
}
catch (Exception ex)
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
index 4ef3bc1..6381648 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
@@ -54,5 +54,15 @@
{
return _taskService.TestReturnStock(model.Content);
}
+ /// <summary>
+ /// 娴嬭瘯鏋舵姤搴�
+ /// </summary>
+ /// <param name="model"></param>
+ /// <returns></returns>
+ [HttpPost, Route("TestScrap"), AllowAnonymous, MethodParamsValidate]
+ public MesResponseContent TestScrap([FromBody] Root<TestToolScrap> model)
+ {
+ return _taskService.TestScrap(model.Content);
+ }
}
}
--
Gitblit v1.9.3