From 492720e137f448a507e1d959dee93b64ac89c969 Mon Sep 17 00:00:00 2001
From: 18942506660 <18942506660@A18942506660>
Date: Thu, 21 Nov 2024 09:54:02 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/WMS.Web.Api/wwwroot/WMS.Web.Api.xml | 13 +++++++++++
src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml | 5 ++++
.../SingleData/InStockSingleDataResponse.cs | 14 +++++++++++
.../OutStockTaskRepositories.cs | 23 +++++++++++++++----
4 files changed, 51 insertions(+), 4 deletions(-)
create mode 100644 src/WMS.Web.Core/Dto/SingleData/InStockSingleDataResponse.cs
diff --git a/src/WMS.Web.Api/wwwroot/WMS.Web.Api.xml b/src/WMS.Web.Api/wwwroot/WMS.Web.Api.xml
index 73566b75..c9ba946c 100644
--- a/src/WMS.Web.Api/wwwroot/WMS.Web.Api.xml
+++ b/src/WMS.Web.Api/wwwroot/WMS.Web.Api.xml
@@ -438,6 +438,19 @@
+
+
+ 物料
+
+
+
+
+ 刷新物料 69条码或物料编码 名字
+
+ 物料编码
+ 69 条码,other 名字和规格型号
+
+
列表
diff --git a/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml b/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml
index 4201d621..d8e3732f 100644
--- a/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml
+++ b/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml
@@ -6385,6 +6385,11 @@
Id集合
+
+
+ 组织编码对应金蝶
+
+
名称请求对象
diff --git a/src/WMS.Web.Core/Dto/SingleData/InStockSingleDataResponse.cs b/src/WMS.Web.Core/Dto/SingleData/InStockSingleDataResponse.cs
new file mode 100644
index 00000000..c8e68d32
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/SingleData/InStockSingleDataResponse.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WMS.Web.Core.Dto.SingleData
+{
+ public class InStockSingleDataResponse: SingleDataResponse
+ {
+ ///
+ /// 组织编码对应金蝶
+ ///
+ public string ErpOrgCode { get; set; }
+ }
+}
diff --git a/src/WMS.Web.Repositories/OutStockTaskRepositories.cs b/src/WMS.Web.Repositories/OutStockTaskRepositories.cs
index 63c855c5..810626c6 100644
--- a/src/WMS.Web.Repositories/OutStockTaskRepositories.cs
+++ b/src/WMS.Web.Repositories/OutStockTaskRepositories.cs
@@ -16,6 +16,7 @@ using WMS.Web.Core.Dto.Erp.Customer;
using WMS.Web.Core.Dto.Erp.Org;
using WMS.Web.Core.Dto.Login;
using WMS.Web.Core.Dto.OutStockTask;
+using WMS.Web.Core.Dto.SingleData;
using WMS.Web.Core.Help;
using WMS.Web.Domain.Entitys;
using WMS.Web.Domain.Infrastructure;
@@ -284,8 +285,8 @@ namespace WMS.Web.Repositories
List stocks = new List();
if (!string.IsNullOrEmpty(dto.InStock))
{
- var r = await _basicsRepositories.GetUcStockAsync(ManagementSystemCode.GLXT0004.ToString(), dto.InStock, companyId);
- stocks = r.Select(s => s.Code).ToList();
+ //var r = await _basicsRepositories.GetUcStockAsync(ManagementSystemCode.GLXT0004.ToString(), dto.InStock, companyId);
+ stocks = GetStockCodes(dto.InStock, companyId);
}
List taskIds = null;
@@ -393,8 +394,8 @@ namespace WMS.Web.Repositories
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialNumber),
Unit = _erpBasicDataExtendService.GetMaterialUnitName(materials, s.detail.MaterialNumber),
Remark = s.detail.Remark,
- InStockCodes= s.detail.ErpDetails.Select(s => s.InStockCode).ToList(),
- OrgCode= s.order.OrgCode
+ InStockCodes = s.detail.ErpDetails.Select(s => s.InStockCode).ToList(),
+ OrgCode = s.order.OrgCode
#endregion
}).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
@@ -611,6 +612,20 @@ namespace WMS.Web.Repositories
if (names.Count() == 0) return "";
return string.Join(",", names);
}
+
+ public List GetStockCodes(string name, int companyId)
+ {
+ var list = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId);
+
+ foreach (var l in list)
+ {
+ if (string.IsNullOrEmpty(l.ErpOrgCode)) continue;
+ l.Code = l.Code.Replace(l.ErpOrgCode, "");
+ }
+ var str = list.Where(w => w.Name.Contains(name)).Select(s => s.Code).ToList();
+ return str;
+ }
+
///
/// 获取订单信息
///