From c8aab9a0577325d579e3968769341386b77841b3 Mon Sep 17 00:00:00 2001
From: z8018 <1282578289@qq.com>
Date: 星期五, 19 十二月 2025 19:51:23 +0800
Subject: [PATCH] 1
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/MESOperation/FeedbackMesService.cs | 36 ++++++++++++++++--------------------
项目代码/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_OutboundService/OutboundService.cs | 8 ++++----
4 files changed, 20 insertions(+), 24 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 7341189..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"
@@ -50,10 +50,11 @@
return WebResponseContent.Instance.Error($"鏈壘鍒板搴旂殑鍑哄簱鍗曚俊鎭�");
}
- Dt_MesReturnRecord returnRecord = BaseDal.QueryFirst(x => x.OrderNo == orderNo && x.OrderId == outboundOrder.Id && x.ReturnStatus == 2, new Dictionary<string, OrderByType> { { nameof(Dt_MesReturnRecord.Id), OrderByType.Desc } });
- if (returnRecord != null)
+ 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>(returnRecord.ApiUrl, returnRecord.RequestData);
+ HttpResponseResult<MesResponseDTO> httpResponse = _httpClientHelper.Post<MesResponseDTO>(item.ApiUrl, item.RequestData);
string rMsg = "鎴愬姛";
bool success = httpResponse.IsSuccess && httpResponse.Data.Code == "200";
@@ -69,22 +70,16 @@
}
}
- returnRecord.ReturnCount += 1;
+ item.ReturnCount += 1;
- returnRecord.ReturnStatus = success ? 1 : 2;
- returnRecord.HttpStatusCode = httpResponse.StatusCode.ObjToInt();
- returnRecord.LastReturnTime = DateTime.Now;
- returnRecord.ResponseData = httpResponse.Content;
- returnRecord.SuccessTime = success ? DateTime.Now : null;
- BaseDal.UpdateData(returnRecord);
- WebResponseContent content = new WebResponseContent();
- content.Status = success;
- content.Message = rMsg;
- return content;
+ item.ReturnStatus = success ? 1 : 2;
+ item.HttpStatusCode = httpResponse.StatusCode.ObjToInt();
+ item.LastReturnTime = DateTime.Now;
+ item.ResponseData = httpResponse.Content;
+ item.SuccessTime = success ? DateTime.Now : null;
}
-
-
+ BaseDal.UpdateData(returnRecords);
HttpResponseResult<MesResponseDTO> httpResponseResult = new HttpResponseResult<MesResponseDTO>();
string reqCode = Guid.NewGuid().ToString();
@@ -99,7 +94,7 @@
return WebResponseContent.Instance.Error($"鏋勫缓鍥炶皟瀵硅薄澶辫触");
}
- if(returnDTO.Details.Count <= 0)
+ if (returnDTO.Details.Count <= 0)
{
return WebResponseContent.Instance.Error($"璇ュ崟鎹棤鏄庣粏鍙洖浼�");
}
@@ -213,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)
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())
--
Gitblit v1.9.3