From 0705cb6170a9ba77ba48bbb6dcebb9cf3d73cbea Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期二, 14 十月 2025 02:12:25 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs"
index cd459fa..a7dfded 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ProInStatisticsService.cs"
@@ -30,33 +30,29 @@
_invokeERPService = invokeERPService;
_basicRepository = basicRepository;
}
-
+ /// <summary>
+ /// 淇濆瓨鏁版嵁
+ /// </summary>
public void SaveStatic(MesBagInfoModel mesBagInfoModel)
{
- List<ProInStaticDTO> mESBagDetails = mesBagInfoModel.BagDetails.GroupBy(x=>new { x.ProductCode, x.ProductVersion }).Select(x=>new ProInStaticDTO
+ List<ProInStaticDTO> mESBagDetails = mesBagInfoModel.BagDetails.GroupBy(x => new { x.ProductCode, x.ProductVersion }).Select(x => new ProInStaticDTO
{
- ProductCode= x.Key.ProductCode,
- ProductVersion= x.Key.ProductVersion,
- SumPcs=x.Sum(x => x.OKPCSQTY)
+ ProductCode = x.Key.ProductCode,
+ ProductVersion = x.Key.ProductVersion,
+ SumPcs = x.Sum(x => x.OKPCSQTY),
+ SumPcsArea = x.Sum(x=>x.OKPCSArea)
}).ToList();
List<Dt_ProInStatistics> proInStatistics= new List<Dt_ProInStatistics>();
Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode==mesBagInfoModel.WarehouseCode);
foreach (var m in mESBagDetails)
{
- string response = _invokeERPService.InvokeProInErpStatic(m.ProductCode, m.ProductCode + m.ProductVersion);
- ErpProInErpStaticResponseContent erpProInErpStatic = response.DeserializeObject<ErpProInErpStaticResponseContent>();
- if (erpProInErpStatic.Code != 200)
- {
- return;
- }
- float adjusted = (float)Math.Round(erpProInErpStatic.Data[0].UnitArea, 3);
Dt_ProInStatistics inStatistics = new Dt_ProInStatistics()
{
WarehouseId = warehouse.WarehouseId,
ProductCode = m.ProductCode,
ProductRev = m.ProductVersion,
PcsQty = m.SumPcs,
- SquareMeter = (float)Math.Round((adjusted * m.SumPcs), 3),
+ SquareMeter = (float)Math.Round(m.SumPcsArea, 3),
Remark = mesBagInfoModel.BatchNo
};
proInStatistics.Add(inStatistics);
--
Gitblit v1.9.3