From 37faeb3fd7d8f204298d4d24a8a98110992d6b58 Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期三, 19 十一月 2025 08:38:28 +0800
Subject: [PATCH] 提交
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_BasicService/InvokeMESService.cs | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 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/WIDESEA_BasicService/InvokeMESService.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/InvokeMESService.cs"
index 51b35eb..328c761 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/InvokeMESService.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/InvokeMESService.cs"
@@ -64,7 +64,7 @@
return JsonConvert.DeserializeObject<ResponseModel>(body);
}
- public async Task FeedbackOutbound(FeedbackOutboundRequestModel model)
+ public async Task<ResponseModel> FeedbackOutbound(FeedbackOutboundRequestModel model)
{
string json = JsonConvert.SerializeObject(model, new JsonSerializerSettings
{
@@ -75,6 +75,8 @@
_client.DefaultRequestHeaders.Clear();
_client.DefaultRequestHeaders.Add("Accept", "application/json");
+ _logger.LogInformation("InvokeMESService FeedbackOutbound : " + json);
+
var response = await _client.PostAsync("AldMaterialOutbound/MaterialOutbound", content);
string body = await response.Content.ReadAsStringAsync();
@@ -84,7 +86,8 @@
throw new HttpRequestException(body);
}
- // JsonConvert.DeserializeObject<ResponseModel>(body);
+
+ return JsonConvert.DeserializeObject<ResponseModel>(body);
}
public async Task<ResponseModel> NewMaterielToMes(MaterielToMesDTO model)
@@ -113,7 +116,9 @@
var content = new StringContent(json, Encoding.UTF8, "application/json");
- using var response = await client.PostAsync("", content);
+ _logger.LogInformation("InvokeMESService FeedbackInbound : " + json);
+
+ using var response = await client.PostAsync("AldBarcodeInformation/BarcodeInformation", content);
var responseText = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
{
@@ -207,20 +212,21 @@
};
- var groupedData = lists.GroupBy(item => new { item.MaterielCode, item.SupplyCode, item.BatchNo, item.InboundOrderRowNo, item.Unit, item.WarehouseCode })
+ var groupedData = lists.GroupBy(item => new { item.MaterielCode, item.SupplyCode, item.BatchNo, item.InboundOrderRowNo, item.BarcodeUnit, item.WarehouseCode })
.Select(group => new FeedbackInboundDetailsModel
{
materialCode = group.Key.MaterielCode,
supplyCode = group.Key.SupplyCode,
batchNo = group.Key.BatchNo,
lineNo = group.Key.InboundOrderRowNo,
+ qty = group.Sum(x=>x.BarcodeQty),
// warehouseCode = group.Key.WarehouseCode=="0"?"1072": group.Key.WarehouseCode,
warehouseCode =group.Key.WarehouseCode,
- unit = group.Key.Unit,
+ unit = group.Key.BarcodeUnit,
barcodes = group.Select(row => new FeedbackBarcodesModel
{
barcode = row.Barcode,
- qty = row.StockQuantity
+ qty = row.BarcodeQty
}).ToList()
}).ToList();
feedmodel.details = groupedData;
--
Gitblit v1.9.3