列表
This commit is contained in:
@@ -5,8 +5,12 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using WMS.Web.Core.Dto;
|
||||||
|
using WMS.Web.Core.Dto.ChangeBoxRecord;
|
||||||
|
using WMS.Web.Core.Internal.Results;
|
||||||
using WMS.Web.Domain.Infrastructure;
|
using WMS.Web.Domain.Infrastructure;
|
||||||
using WMS.Web.Domain.IService.Public;
|
using WMS.Web.Domain.IService.Public;
|
||||||
|
using WMS.Web.Domain.Values;
|
||||||
|
|
||||||
namespace WMS.Web.Api.Controllers
|
namespace WMS.Web.Api.Controllers
|
||||||
{
|
{
|
||||||
@@ -27,19 +31,20 @@ namespace WMS.Web.Api.Controllers
|
|||||||
_repositories = repositories;
|
_repositories = repositories;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 列表-组织间需求订单
|
/// 列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dto"></param>
|
/// <param name="dto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("list")]
|
[Route("GetList")]
|
||||||
public async Task<Result<OrderOrgListBaseResponse>> GetPagedList([FromBody] OrderOrgRequset dto)
|
public async Task<Result<PaginationResponseDto<ChangeBoxRecordQueryInfoResponse>>> GetPagedList([FromBody] ChangeBoxRecordQueryRequest dto)
|
||||||
{
|
{
|
||||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||||
return Result<OrderOrgListBaseResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
return Result<PaginationResponseDto<ChangeBoxRecordQueryInfoResponse>>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||||
var response = await _organizationOrderRepositories.GetPagedListAsync(dto, loginInfo.UserInfo.CompanyId);
|
|
||||||
var result = Result<OrderOrgListBaseResponse>.ReSuccess(response);
|
var response = await _repositories.GetListAsync(dto);
|
||||||
|
var result = Result<PaginationResponseDto<ChangeBoxRecordQueryInfoResponse>>.ReSuccess(response);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,44 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace WMS.Web.Core.Dto
|
namespace WMS.Web.Core.Dto.ChangeBoxRecord
|
||||||
{
|
{
|
||||||
public class ChangeBoxRecordQueryRequest
|
/// <summary>
|
||||||
|
/// 改箱列表请求
|
||||||
|
/// </summary>
|
||||||
|
public class ChangeBoxRecordQueryRequest: PaginationBaseRequestDto
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 原箱子ID
|
||||||
|
/// </summary>
|
||||||
|
public string SrcBox { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 目标箱子ID
|
||||||
|
/// </summary>
|
||||||
|
public string DestBox { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 仓库
|
||||||
|
/// </summary>
|
||||||
|
public int StockId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 原仓位ID
|
||||||
|
/// </summary>
|
||||||
|
public int SrcSubStockId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 现仓位ID
|
||||||
|
/// </summary>
|
||||||
|
public int DestSubStockId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 操作人
|
||||||
|
/// </summary>
|
||||||
|
public string Creator { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 操作时间 开始
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? CreateBeginDate { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 操作时间 结束
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? CreateEndDate { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.ChangeBoxRecord
|
||||||
|
{
|
||||||
|
public class ChangeBoxRecordQueryInfoResponse
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
28
src/WMS.Web.Core/Dto/PaginationRequestDto.cs
Normal file
28
src/WMS.Web.Core/Dto/PaginationRequestDto.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto
|
||||||
|
{
|
||||||
|
public class PaginationRequestDto: PaginationBaseRequestDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 组织Id(所有列表页都需要 全局)
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage = "组织不能为空")]
|
||||||
|
public virtual int OrgId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class PaginationBaseRequestDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 页数 不传默认为1
|
||||||
|
/// </summary>
|
||||||
|
public int PageNo { get; set; } = 1;
|
||||||
|
/// <summary>
|
||||||
|
/// 每页条数 不传默认每页10 条
|
||||||
|
/// </summary>
|
||||||
|
public int PageSize { get; set; } = 10;
|
||||||
|
}
|
||||||
|
}
|
||||||
24
src/WMS.Web.Core/Dto/PaginationResponseDto.cs
Normal file
24
src/WMS.Web.Core/Dto/PaginationResponseDto.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto
|
||||||
|
{
|
||||||
|
public class PaginationResponseDto<T>
|
||||||
|
{
|
||||||
|
public PaginationResponseDto(List<T> list, int? total)
|
||||||
|
{
|
||||||
|
this.List = list;
|
||||||
|
this.Total = total;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询列表内容
|
||||||
|
/// </summary>
|
||||||
|
public List<T> List { get; set; } = new List<T>();
|
||||||
|
/// <summary>
|
||||||
|
/// 总条数
|
||||||
|
/// </summary>
|
||||||
|
public int? Total { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using WMS.Web.Core.Dto;
|
||||||
|
using WMS.Web.Core.Dto.ChangeBoxRecord;
|
||||||
using WMS.Web.Domain.Entitys;
|
using WMS.Web.Domain.Entitys;
|
||||||
|
|
||||||
namespace WMS.Web.Domain.Infrastructure
|
namespace WMS.Web.Domain.Infrastructure
|
||||||
@@ -10,5 +12,8 @@ namespace WMS.Web.Domain.Infrastructure
|
|||||||
{
|
{
|
||||||
// 新增
|
// 新增
|
||||||
Task<ChangeBoxRecord> Add(ChangeBoxRecord entity, bool isTransaction = true);
|
Task<ChangeBoxRecord> Add(ChangeBoxRecord entity, bool isTransaction = true);
|
||||||
|
|
||||||
|
// 获取销售列表
|
||||||
|
Task<PaginationResponseDto<ChangeBoxRecordQueryInfoResponse>> GetListAsync(ChangeBoxRecordQueryRequest dto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,5 +12,9 @@ namespace WMS.Web.Domain.Values
|
|||||||
public static ValueTuple<int, string> Erp_Login_Error = (1001, "Erp登录返回错误");
|
public static ValueTuple<int, string> Erp_Login_Error = (1001, "Erp登录返回错误");
|
||||||
|
|
||||||
public static ValueTuple<int, string> Erp_BillQuery_Error = (1002, "Erp单据查询返回错误");
|
public static ValueTuple<int, string> Erp_BillQuery_Error = (1002, "Erp单据查询返回错误");
|
||||||
|
/// <summary>
|
||||||
|
/// 无效
|
||||||
|
/// </summary>
|
||||||
|
public static ValueTuple<int, string> Token_Invalid_Error = (401, "验证Token无效,请重新登录");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using WMS.Web.Core.Dto;
|
||||||
|
using WMS.Web.Core.Dto.ChangeBoxRecord;
|
||||||
using WMS.Web.Domain.Entitys;
|
using WMS.Web.Domain.Entitys;
|
||||||
using WMS.Web.Domain.Infrastructure;
|
using WMS.Web.Domain.Infrastructure;
|
||||||
using WMS.Web.Repositories.Configuration;
|
using WMS.Web.Repositories.Configuration;
|
||||||
@@ -23,7 +25,12 @@ namespace WMS.Web.Repositories
|
|||||||
_mapper = mapper;
|
_mapper = mapper;
|
||||||
_serviceProvider = serviceProvider;
|
_serviceProvider = serviceProvider;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 新增
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="entity"></param>
|
||||||
|
/// <param name="isTransaction"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public async Task<ChangeBoxRecord> Add(ChangeBoxRecord entity, bool isTransaction = true)
|
public async Task<ChangeBoxRecord> Add(ChangeBoxRecord entity, bool isTransaction = true)
|
||||||
{
|
{
|
||||||
IDbContextTransaction _transaction = null;
|
IDbContextTransaction _transaction = null;
|
||||||
@@ -52,5 +59,14 @@ namespace WMS.Web.Repositories
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Task<PaginationResponseDto<ChangeBoxRecordQueryInfoResponse>> GetListAsync(ChangeBoxRecordQueryRequest dto)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user