diff --git a/.vs/WMS.Web/DesignTimeBuild/.dtbcache.v2 b/.vs/WMS.Web/DesignTimeBuild/.dtbcache.v2
index 138b493f..d466eebc 100644
Binary files a/.vs/WMS.Web/DesignTimeBuild/.dtbcache.v2 and b/.vs/WMS.Web/DesignTimeBuild/.dtbcache.v2 differ
diff --git a/src/WMS.Web.Api/Controllers/InStockController.cs b/src/WMS.Web.Api/Controllers/InStockController.cs
index 95547a83..a6ab6873 100644
--- a/src/WMS.Web.Api/Controllers/InStockController.cs
+++ b/src/WMS.Web.Api/Controllers/InStockController.cs
@@ -54,13 +54,13 @@ namespace WMS.Web.Api.Controllers
///
[HttpPost]
[Route("GetList")]
- public async Task> GetPagedList([FromBody] InStockQueryRequest dto)
+ public async Task> GetPagedList([FromBody] InStockQueryRequest dto)
{
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
if (loginInfo == null || loginInfo.UserInfo == null)
- return ResultPagedList.ReFailure(ResultCodes.Token_Invalid_Error);
- var (list, count) = await _inStockRepositories.GetPagedList(dto, loginInfo.UserInfo.CompanyId);
- return ResultPagedList.ReSuccess(list, count);
+ return ResultPagedNumberList.ReFailure(ResultCodes.Token_Invalid_Error);
+ var (list, count,qty) = await _inStockRepositories.GetPagedList(dto, loginInfo.UserInfo.CompanyId);
+ return ResultPagedNumberList.ReSuccess(list, count,qty);
}
diff --git a/src/WMS.Web.Api/Controllers/InventoryController.cs b/src/WMS.Web.Api/Controllers/InventoryController.cs
index efc8f6c5..53037b2c 100644
--- a/src/WMS.Web.Api/Controllers/InventoryController.cs
+++ b/src/WMS.Web.Api/Controllers/InventoryController.cs
@@ -56,13 +56,13 @@ namespace WMS.Web.Api.Controllers
///
[HttpPost]
[Route("GetList")]
- public async Task> GetPagedList([FromBody] InventoryDetailsQueryRequest dto)
+ public async Task> GetPagedList([FromBody] InventoryDetailsQueryRequest dto)
{
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
if (loginInfo == null || loginInfo.UserInfo == null)
- return ResultPagedList.ReFailure(ResultCodes.Token_Invalid_Error);
- var (list, count) = await _inventoryDetailsRepositories.GetPagedList(dto,loginInfo.UserInfo.CompanyId);
- return ResultPagedList.ReSuccess(list, count);
+ return ResultPagedNumberList.ReFailure(ResultCodes.Token_Invalid_Error);
+ var (list, count,qty) = await _inventoryDetailsRepositories.GetPagedList(dto,loginInfo.UserInfo.CompanyId);
+ return ResultPagedNumberList.ReSuccess(list, count,qty);
}
///
diff --git a/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml b/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml
index 7a0542df..05ddb2ab 100644
--- a/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml
+++ b/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml
@@ -3023,11 +3023,6 @@
数量
-
-
- 总入库量
-
-
创建人
@@ -3779,11 +3774,6 @@
单位
-
-
- 总库存量
-
-
即时库存明细汇总
@@ -6802,6 +6792,83 @@
+
+
+ 分页列表结果对象
+
+
+
+
+ 实体分页集合结果
+
+
+
+
+ 实体分页集合结果
+
+ 实体集合
+ 总条数
+
+
+
+ 实体分页集合结果
+
+
+
+
+
+
+
+ Total count of Items.
+
+
+
+
+ 总数量
+
+
+
+
+ 创建成功的返回消息
+
+ 实体集合
+ 总条数
+
+
+
+
+ 创建成功的返回消息
+
+
+
+
+
+ 创建返回信息(返回处理失败)
+
+ 结果消息
+ 结果状态
+
+
+
+
+ 创建返回信息(返回处理失败)
+
+ 结果消息
+
+
+
+
+ 创建返回信息(返回处理失败)
+
+ 结果
+
+
+
+
+ 转换为 task
+
+
+
用于签名的私钥
diff --git a/src/WMS.Web.Core/Dto/InStock/InStockQueryResponse.cs b/src/WMS.Web.Core/Dto/InStock/InStockQueryResponse.cs
index fff53cf1..a816a6a6 100644
--- a/src/WMS.Web.Core/Dto/InStock/InStockQueryResponse.cs
+++ b/src/WMS.Web.Core/Dto/InStock/InStockQueryResponse.cs
@@ -83,11 +83,6 @@ namespace WMS.Web.Core.Dto
[Column("入库数量")]
public decimal Qty { get; set; }
///
- /// 总入库量
- ///
- [Column("总入库量")]
- public decimal TotalQty { get; set; }
- ///
/// 创建人
///
[Column("创建人")]
diff --git a/src/WMS.Web.Core/Dto/Inventory/InventoryDetailsQueryResponse.cs b/src/WMS.Web.Core/Dto/Inventory/InventoryDetailsQueryResponse.cs
index efe42da5..66d9b983 100644
--- a/src/WMS.Web.Core/Dto/Inventory/InventoryDetailsQueryResponse.cs
+++ b/src/WMS.Web.Core/Dto/Inventory/InventoryDetailsQueryResponse.cs
@@ -63,10 +63,5 @@ namespace WMS.Web.Core.Dto.Inventory
///
[Column("单位")]
public string Unit { get; set; }
- ///
- /// 总库存量
- ///
- [Column("总库存量")]
- public decimal TotalQty { get; set; }
}
}
diff --git a/src/WMS.Web.Core/Internal/Results/ResultPagedNumberList.cs b/src/WMS.Web.Core/Internal/Results/ResultPagedNumberList.cs
new file mode 100644
index 00000000..3eff9fcf
--- /dev/null
+++ b/src/WMS.Web.Core/Internal/Results/ResultPagedNumberList.cs
@@ -0,0 +1,117 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WMS.Web.Core.Internal.Results
+{
+ ///
+ /// 分页列表结果对象
+ ///
+ public class ResultPagedNumberList : ResultList
+ {
+ ///
+ /// 实体分页集合结果
+ ///
+ public ResultPagedNumberList()
+ {
+ }
+
+ ///
+ /// 实体分页集合结果
+ ///
+ /// 实体集合
+ /// 总条数
+ public ResultPagedNumberList(IList data, int totalCount,decimal totalQty) : base(data)
+ {
+ TotalCount = totalCount;
+ TotalQty = totalQty;
+ }
+
+ ///
+ /// 实体分页集合结果
+ ///
+ ///
+ ///
+ ///
+ public ResultPagedNumberList(IList data, int totalCount, ValueTuple result) : base(data, result)
+ {
+ TotalCount = totalCount;
+ }
+
+ ///
+ /// Total count of Items.
+ ///
+ public int TotalCount { get; set; }
+ ///
+ /// 总数量
+ ///
+ public decimal TotalQty { get; set; }
+
+ ///
+ /// 创建成功的返回消息
+ ///
+ /// 实体集合
+ /// 总条数
+ ///
+ public static ResultPagedNumberList ReSuccess(IList data, int totalCount,decimal totalQty)
+ {
+ return new ResultPagedNumberList(data, totalCount,totalQty);
+ }
+
+ ///
+ /// 创建成功的返回消息
+ ///
+ ///
+ public new static ResultPagedNumberList ReSuccess()
+ {
+ return new ResultPagedNumberList(new List(), 0,0);
+ }
+
+ ///
+ /// 创建返回信息(返回处理失败)
+ ///
+ /// 结果消息
+ /// 结果状态
+ ///
+ public new static ResultPagedNumberList ReFailure(string message, int status)
+ {
+ var result = new ResultPagedNumberList();
+ result.To(message, status);
+ return result;
+ }
+
+ ///
+ /// 创建返回信息(返回处理失败)
+ ///
+ /// 结果消息
+ ///
+ public new static ResultPagedNumberList ReFailure(ValueTuple result)
+ {
+ var res = new ResultPagedNumberList();
+ res.To(result);
+ return res;
+ }
+
+ ///
+ /// 创建返回信息(返回处理失败)
+ ///
+ /// 结果
+ ///
+ public new static ResultPagedNumberList ReFailure(Result result)
+ {
+ var re = new ResultPagedNumberList();
+ re.To(result);
+ return re;
+ }
+
+ ///
+ /// 转换为 task
+ ///
+ ///
+ public new Task> AsTask()
+ {
+ return Task.FromResult(this);
+ }
+ }
+}
diff --git a/src/WMS.Web.Domain/Infrastructure/IInStockRepositories.cs b/src/WMS.Web.Domain/Infrastructure/IInStockRepositories.cs
index 2751c5f9..5c8a1093 100644
--- a/src/WMS.Web.Domain/Infrastructure/IInStockRepositories.cs
+++ b/src/WMS.Web.Domain/Infrastructure/IInStockRepositories.cs
@@ -20,7 +20,7 @@ namespace WMS.Web.Domain.Infrastructure
///
///
///
- Task<(List list,int total)> GetPagedList(InStockQueryRequest dto,int companyId);
+ Task<(List list,int total,decimal totalQty)> GetPagedList(InStockQueryRequest dto,int companyId);
///
/// 箱是否存在于入库单明细中;(箱是否被上架了)
diff --git a/src/WMS.Web.Domain/Infrastructure/IInventoryDetailsRepositories.cs b/src/WMS.Web.Domain/Infrastructure/IInventoryDetailsRepositories.cs
index 72bf0952..94725f74 100644
--- a/src/WMS.Web.Domain/Infrastructure/IInventoryDetailsRepositories.cs
+++ b/src/WMS.Web.Domain/Infrastructure/IInventoryDetailsRepositories.cs
@@ -20,7 +20,7 @@ namespace WMS.Web.Domain.Infrastructure
///
///
///
- Task<(List list,int total)> GetPagedList(InventoryDetailsQueryRequest dto, int companyId);
+ Task<(List list,int total,decimal totalQty)> GetPagedList(InventoryDetailsQueryRequest dto, int companyId);
///
/// 批量添加
diff --git a/src/WMS.Web.Repositories/InStockRepositories.cs b/src/WMS.Web.Repositories/InStockRepositories.cs
index 966108d6..482036b4 100644
--- a/src/WMS.Web.Repositories/InStockRepositories.cs
+++ b/src/WMS.Web.Repositories/InStockRepositories.cs
@@ -113,7 +113,8 @@ namespace WMS.Web.Repositories
///
public async Task<(object obj, int total)> GetListField(InStockQueryRequest dto, int companyId)
{
- return await GetPagedList(dto, companyId);
+ var res= await GetPagedList(dto, companyId);
+ return (res.list, res.total);
}
///
@@ -270,7 +271,7 @@ namespace WMS.Web.Repositories
///
///
///
- public async Task<(List list, int total)> GetPagedList(InStockQueryRequest dto, int companyId)
+ public async Task<(List list, int total, decimal totalQty)> GetPagedList(InStockQueryRequest dto, int companyId)
{
//1.获取物料集合和组织集合和供应商的集合
var materials = new List();
@@ -381,7 +382,6 @@ namespace WMS.Web.Repositories
Specifications = _erpBasicDataExtendService.GetMaterialSpecifications(materials, s.detail.MaterialNumber),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.order.StockCode + s.order.OrgCode),
Qty = s.detail.Qty,
- TotalQty= totalQty,
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.order.CreatorId),
CreateTime = s.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
SuccessSync = (s.order.Type != InstockType.Purchase ? "--" : (s.order.SuccessSync == SyncStatus.Success ? "成功" : (s.order.SuccessSync == SyncStatus.SyncIng ? "同步中" : "失败"))),
@@ -402,7 +402,7 @@ namespace WMS.Web.Repositories
});
}
- return (list, total);
+ return (list, total, totalQty);
}
///
diff --git a/src/WMS.Web.Repositories/InventoryDetailsRepositories.cs b/src/WMS.Web.Repositories/InventoryDetailsRepositories.cs
index 77c00baa..339c8827 100644
--- a/src/WMS.Web.Repositories/InventoryDetailsRepositories.cs
+++ b/src/WMS.Web.Repositories/InventoryDetailsRepositories.cs
@@ -55,7 +55,7 @@ namespace WMS.Web.Repositories
///
///
///
- public async Task<(List list, int total)> GetPagedList(InventoryDetailsQueryRequest dto, int companyId)
+ public async Task<(List list, int total, decimal totalQty)> GetPagedList(InventoryDetailsQueryRequest dto, int companyId)
{
//1.获取物料集合和组织集合
var materials = new List();
@@ -115,12 +115,11 @@ namespace WMS.Web.Repositories
Org = _erpBasicDataExtendService.GetOrgName(orgs, s.OrgCode),
Stock = _singleDataService.GetSingleData(SingleAction.StocksJoinOrgCode, companyId, s.StockCode + s.OrgCode),
Qty = s.Qty,
- TotalQty= totalQty,
SubStock = _singleDataService.GetSingleData(SingleAction.SubStocksJoinOrgCode, companyId, s.SubStockCode + s.StockCode + s.OrgCode),
Unit = _erpBasicDataExtendService.GetMaterialUnitName(materials, s.MaterialNumber),
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
- return (list, total);
+ return (list, total, totalQty);
}
///
@@ -191,7 +190,8 @@ namespace WMS.Web.Repositories
///
public async Task<(object obj, int total)> GetListField(InventoryDetailsQueryRequest dto, int companyId)
{
- return await GetPagedList(dto, companyId);
+ var res= await GetPagedList(dto, companyId);
+ return (res.list, res.total);
}
///