From ce7d0a96fbd5a60bec49a15f82faee01fa7ea5dd Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期五, 19 十二月 2025 19:51:47 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs | 48 ++++++++++++++++++++----
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db | 0
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db | 0
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_DTO/ReturnMES/AllocationReturnDTO.cs | 6 +++
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs | 8 ++--
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 3 +
6 files changed, 52 insertions(+), 13 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
index b5576cd..ca687f8 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
index f7a3397..44b6fcd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs"
index 22a0846..8f2dd52 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs"
@@ -51,17 +51,34 @@
}
List<Dt_MesReturnRecord> returnRecords = BaseDal.QueryData(x => x.OrderNo == orderNo && x.OrderId == outboundOrder.Id && x.ReturnStatus == 2);
+
foreach (var item in returnRecords)
{
HttpResponseResult<MesResponseDTO> httpResponse = _httpClientHelper.Post<MesResponseDTO>(item.ApiUrl, item.RequestData);
- item.ReturnCount += 1;
+
+ string rMsg = "鎴愬姛";
bool success = httpResponse.IsSuccess && httpResponse.Data.Code == "200";
+ if (!success)
+ {
+ if (!httpResponse.IsSuccess)
+ {
+ rMsg = $"MES鎺ュ彛杩斿洖閿欒锛孒TTP浠g爜锛歿httpResponse.StatusCode}锛屼俊鎭細{httpResponse.ErrorMessage}";
+ }
+ else if (httpResponse?.Data?.Code != "200")
+ {
+ rMsg = $"璋冪敤MES鎺ュ彛澶辫触锛屼唬鐮侊細{httpResponse?.Data?.Code}锛屼俊鎭細{httpResponse?.Data?.Message}";
+ }
+ }
+
+ item.ReturnCount += 1;
+
item.ReturnStatus = success ? 1 : 2;
item.HttpStatusCode = httpResponse.StatusCode.ObjToInt();
item.LastReturnTime = DateTime.Now;
item.ResponseData = httpResponse.Content;
- item.SuccessTime = httpResponse.IsSuccess ? DateTime.Now : null;
+ item.SuccessTime = success ? DateTime.Now : null;
}
+
BaseDal.UpdateData(returnRecords);
HttpResponseResult<MesResponseDTO> httpResponseResult = new HttpResponseResult<MesResponseDTO>();
@@ -76,6 +93,12 @@
{
return WebResponseContent.Instance.Error($"鏋勫缓鍥炶皟瀵硅薄澶辫触");
}
+
+ if (returnDTO.Details.Count <= 0)
+ {
+ return WebResponseContent.Instance.Error($"璇ュ崟鎹棤鏄庣粏鍙洖浼�");
+ }
+
string apiUrl = AppSettings.GetValue("MaterialOutboundFeedbackUrl");
returnDTO.ReqCode = reqCode;
returnDTO.ReqTime = reqTime;
@@ -95,11 +118,18 @@
{
return WebResponseContent.Instance.Error($"鏈壘鍒板搴旂殑璋冩嫧鍗�");
}
+
AllocationReturnDTO? returnDTO = BuildAllocationFeedbackData(outboundOrder, allocateOrder.FromWarehouse, allocateOrder.ToWarehouse);
if (returnDTO == null)
{
return WebResponseContent.Instance.Error($"鏋勫缓鍥炶皟瀵硅薄澶辫触");
}
+
+ if (returnDTO.Details.Count <= 0)
+ {
+ return WebResponseContent.Instance.Error($"璇ュ崟鎹棤鏄庣粏鍙洖浼�");
+ }
+
string apiUrl = AppSettings.GetValue("AllocationFeedbackUrl"); ;
returnDTO.ReqCode = reqCode;
returnDTO.ReqTime = reqTime;
@@ -141,8 +171,8 @@
ResponseData = httpResponseResult.Content,
ReturnType = 0,
ReturnCount = 1,
- ReturnStatus = httpResponseResult.IsSuccess ? 1 : 2,
- SuccessTime = httpResponseResult.IsSuccess ? DateTime.Now : null
+ ReturnStatus = isSuccess ? 1 : 2,
+ SuccessTime = isSuccess ? DateTime.Now : null
};
_unitOfWorkManage.BeginTran();
@@ -178,10 +208,11 @@
_outboundOrderRepository.UpdateData(outboundOrder);
_unitOfWorkManage.CommitTran();
-
+ int successCount = returnRecords.Where(x => x.ReturnStatus == 1).Count() + (isSuccess ? 1 : 0);
+ int failCount = returnRecords.Where(x => x.ReturnStatus == 2).Count() + (isSuccess ? 1 : 0);
WebResponseContent responseContent = new WebResponseContent();
- responseContent.Status = isSuccess;
- responseContent.Message = message;
+ responseContent.Status = true;
+ responseContent.Message = $"鍥炶皟鎴愬姛鏉℃暟锛歿successCount}锛屽洖璋冨け璐ユ潯鏁帮細{failCount}";
return responseContent;
}
catch (Exception ex)
@@ -227,7 +258,8 @@
OperationType = 1,
OrderNo = outboundOrder.UpperOrderNo,
FromWarehouse = fromWarehouse,
- ToWarehouse = toWarehouse
+ ToWarehouse = toWarehouse,
+ Operator = App.User.UserName
};
return outboundReturnDTO;
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/ReturnMES/AllocationReturnDTO.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/ReturnMES/AllocationReturnDTO.cs"
index 4e1f69b..fcdd3bf 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/ReturnMES/AllocationReturnDTO.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_DTO/ReturnMES/AllocationReturnDTO.cs"
@@ -41,6 +41,12 @@
/// </summary>
public string ToWarehouse { get; set; }
+
+ /// <summary>
+ /// 鎿嶄綔浜�
+ /// </summary>
+ public string Operator { get; set; }
+
/// <summary>
/// 鏄庣粏
/// </summary>
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
index 3855414..fb99433 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
@@ -253,10 +253,10 @@
// 鑾峰彇閫夋嫨鐨勫嚭搴撴槑缁�
List<Dt_OutboundOrderDetail> selectedDetails = _detailRepository.QueryData(x => x.OrderId == outboundOrder.Id && request.DetailIds.Contains(x.Id));
- if (outboundOrder.IsBatch == 1 && request.DetailIds.Count == 1)
- {
- selectedDetails = _detailRepository.QueryData(x => x.OrderId == selectedDetails.First().OrderId && x.WarehouseCode == selectedDetails.First().WarehouseCode && x.MaterielCode == selectedDetails.First().MaterielCode && x.BatchNo == selectedDetails.First().BatchNo && x.SupplyCode == selectedDetails.First().SupplyCode);
- }
+ //if (outboundOrder.IsBatch == 1 && request.DetailIds.Count == 1)
+ //{
+ // selectedDetails = _detailRepository.QueryData(x => x.OrderId == selectedDetails.First().OrderId && x.WarehouseCode == selectedDetails.First().WarehouseCode && x.MaterielCode == selectedDetails.First().MaterielCode && x.BatchNo == selectedDetails.First().BatchNo && x.SupplyCode == selectedDetails.First().SupplyCode);
+ //}
if (!selectedDetails.Any())
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index 36aee3d..a059c25 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -827,7 +827,8 @@
OperationType = 1,
OrderNo = outboundOrder.OrderNo,
FromWarehouse = fromWarehouse,
- ToWarehouse = toWarehouse
+ ToWarehouse = toWarehouse,
+ Operator = App.User.UserName
};
return outboundReturnDTO;
--
Gitblit v1.9.3