调整
This commit is contained in:
46
src/WMS.Web.Api/Controllers/ChangeBoxRecordController.cs
Normal file
46
src/WMS.Web.Api/Controllers/ChangeBoxRecordController.cs
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using WMS.Web.Domain.Infrastructure;
|
||||||
|
using WMS.Web.Domain.IService.Public;
|
||||||
|
|
||||||
|
namespace WMS.Web.Api.Controllers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 改箱
|
||||||
|
/// </summary>
|
||||||
|
[Route("api/[controller]")]
|
||||||
|
[ApiController]
|
||||||
|
public class ChangeBoxRecordController : ControllerBase
|
||||||
|
{
|
||||||
|
private readonly IMapper _mapper;
|
||||||
|
private readonly ILoginService _loginService;
|
||||||
|
private readonly IChangeBoxRecordRepositories _repositories;
|
||||||
|
public ChangeBoxRecordController(IMapper mapper, ILoginService loginService, IChangeBoxRecordRepositories repositories)
|
||||||
|
{
|
||||||
|
_mapper = mapper;
|
||||||
|
_loginService = loginService;
|
||||||
|
_repositories = repositories;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 列表-组织间需求订单
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[Route("list")]
|
||||||
|
public async Task<Result<OrderOrgListBaseResponse>> GetPagedList([FromBody] OrderOrgRequset dto)
|
||||||
|
{
|
||||||
|
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||||
|
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||||
|
return Result<OrderOrgListBaseResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||||
|
var response = await _organizationOrderRepositories.GetPagedListAsync(dto, loginInfo.UserInfo.CompanyId);
|
||||||
|
var result = Result<OrderOrgListBaseResponse>.ReSuccess(response);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto
|
||||||
|
{
|
||||||
|
public class ChangeBoxRecordQueryRequest
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,8 +23,8 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单据头Id
|
/// 单据头Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Column("FID")]
|
[Column("FId")]
|
||||||
public int OutStockId { get; set; }
|
public int FId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 来源单号
|
/// 来源单号
|
||||||
///</summary>
|
///</summary>
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单据头Id
|
/// 单据头Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Column("FID")]
|
[Column("FId")]
|
||||||
public int OutStockTaskId { get; set; }
|
public int FId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 来源单号
|
/// 来源单号
|
||||||
///</summary>
|
///</summary>
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单据头Id
|
/// 单据头Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Column("FID")]
|
[Column("FId")]
|
||||||
public int TakeStockId { get; set; }
|
public int FId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单据头Id
|
/// 单据头Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ namespace WMS.Web.Repositories.Configuration
|
|||||||
|
|
||||||
ent.HasMany(p => p.Details)
|
ent.HasMany(p => p.Details)
|
||||||
.WithOne()
|
.WithOne()
|
||||||
.HasForeignKey(p => p.OutStockId)
|
.HasForeignKey(p => p.FId)
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
builder.Entity<OutStockDetails>(ent =>
|
builder.Entity<OutStockDetails>(ent =>
|
||||||
@@ -70,7 +70,7 @@ namespace WMS.Web.Repositories.Configuration
|
|||||||
|
|
||||||
ent.HasMany(p => p.Details)
|
ent.HasMany(p => p.Details)
|
||||||
.WithOne()
|
.WithOne()
|
||||||
.HasForeignKey(p => p.OutStockTaskId)
|
.HasForeignKey(p => p.FId)
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
builder.Entity<OutStockTaskDetails>(ent =>
|
builder.Entity<OutStockTaskDetails>(ent =>
|
||||||
@@ -88,7 +88,7 @@ namespace WMS.Web.Repositories.Configuration
|
|||||||
|
|
||||||
ent.HasMany(p => p.Details)
|
ent.HasMany(p => p.Details)
|
||||||
.WithOne()
|
.WithOne()
|
||||||
.HasForeignKey(p => p.TakeStockId)
|
.HasForeignKey(p => p.FId)
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
builder.Entity<TakeStockDetails>(ent =>
|
builder.Entity<TakeStockDetails>(ent =>
|
||||||
|
|||||||
Reference in New Issue
Block a user