入库接口调整
This commit is contained in:
@@ -48,19 +48,19 @@ namespace WMS.Web.Api.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存
|
/// 上架
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dto"></param>
|
/// <param name="dto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("Save")]
|
[Route("Shelf")]
|
||||||
public async Task<Result> Save(List<SaveInStockRequest> dto)
|
public async Task<Result> Shelf([FromBody] SaveInStockRequest 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.ReFailure(ResultCodes.Token_Invalid_Error);
|
return Result.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||||
|
|
||||||
return await _inStockService.Save(dto, loginInfo);
|
return await _inStockService.Shelf(dto, loginInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -70,7 +70,7 @@ namespace WMS.Web.Api.Controllers
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Route("Sync")]
|
[Route("Sync")]
|
||||||
public async Task<Result> Sync(OperateRequest dto)
|
public async Task<Result> Sync([FromBody] OperateRequest 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)
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ 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;
|
||||||
|
using WMS.Web.Core.Dto.InStockTask;
|
||||||
using WMS.Web.Core.Internal.Results;
|
using WMS.Web.Core.Internal.Results;
|
||||||
using WMS.Web.Domain.Infrastructure;
|
using WMS.Web.Domain.Infrastructure;
|
||||||
|
using WMS.Web.Domain.IService;
|
||||||
using WMS.Web.Domain.IService.Public;
|
using WMS.Web.Domain.IService.Public;
|
||||||
using WMS.Web.Domain.Values;
|
using WMS.Web.Domain.Values;
|
||||||
|
|
||||||
@@ -20,10 +22,12 @@ namespace WMS.Web.Api.Controllers
|
|||||||
public class InStockTaskController : ControllerBase
|
public class InStockTaskController : ControllerBase
|
||||||
{
|
{
|
||||||
private readonly ILoginService _loginService;
|
private readonly ILoginService _loginService;
|
||||||
|
private readonly IInStockService _inStockService;
|
||||||
private readonly IInStockTaskRepositories _inStockTaskRepositories;
|
private readonly IInStockTaskRepositories _inStockTaskRepositories;
|
||||||
public InStockTaskController(ILoginService loginService, IInStockTaskRepositories inStockTaskRepositories)
|
public InStockTaskController(ILoginService loginService, IInStockTaskRepositories inStockTaskRepositories, IInStockService inStockService)
|
||||||
{
|
{
|
||||||
this._loginService = loginService;
|
this._loginService = loginService;
|
||||||
|
this._inStockService = inStockService;
|
||||||
this._inStockTaskRepositories = inStockTaskRepositories;
|
this._inStockTaskRepositories = inStockTaskRepositories;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,5 +46,21 @@ namespace WMS.Web.Api.Controllers
|
|||||||
var result = await _inStockTaskRepositories.GetPagedList(dto);
|
var result = await _inStockTaskRepositories.GetPagedList(dto);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 收货
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
[Route("Receive")]
|
||||||
|
public async Task<Result> Receive([FromBody] UpdateInStockTaskRequest dto)
|
||||||
|
{
|
||||||
|
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||||
|
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||||
|
return Result.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||||
|
|
||||||
|
return await _inStockService.Receive(dto, loginInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,10 @@ namespace WMS.Web.Api.Controllers
|
|||||||
{
|
{
|
||||||
response.InstockType.Add(enumv.ToString(), enumv.GetRemark());
|
response.InstockType.Add(enumv.ToString(), enumv.GetRemark());
|
||||||
}
|
}
|
||||||
|
foreach (InstockStatus enumv in Enum.GetValues(typeof(InstockStatus)))
|
||||||
|
{
|
||||||
|
response.InstockStatus.Add(enumv.ToString(), enumv.GetRemark());
|
||||||
|
}
|
||||||
//2
|
//2
|
||||||
//1
|
//1
|
||||||
return Task.FromResult(Result<EnumStatusResponse>.ReSuccess(response));
|
return Task.FromResult(Result<EnumStatusResponse>.ReSuccess(response));
|
||||||
|
|||||||
@@ -35,9 +35,9 @@
|
|||||||
<param name="dto"></param>
|
<param name="dto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:WMS.Web.Api.Controllers.InStockController.Save(System.Collections.Generic.List{WMS.Web.Core.Dto.InStock.SaveInStockRequest})">
|
<member name="M:WMS.Web.Api.Controllers.InStockController.Shelf(WMS.Web.Core.Dto.InStock.SaveInStockRequest)">
|
||||||
<summary>
|
<summary>
|
||||||
保存
|
上架
|
||||||
</summary>
|
</summary>
|
||||||
<param name="dto"></param>
|
<param name="dto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
@@ -61,6 +61,13 @@
|
|||||||
<param name="dto"></param>
|
<param name="dto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Api.Controllers.InStockTaskController.Receive(WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskRequest)">
|
||||||
|
<summary>
|
||||||
|
收货
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Api.Controllers.LoginController">
|
<member name="T:WMS.Web.Api.Controllers.LoginController">
|
||||||
<summary>
|
<summary>
|
||||||
登录接口
|
登录接口
|
||||||
|
|||||||
@@ -250,6 +250,11 @@
|
|||||||
入库单类型
|
入库单类型
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.EnumStatusResponse.InstockStatus">
|
||||||
|
<summary>
|
||||||
|
入库状态
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Core.Dto.Erp.ErpBillQueryDto">
|
<member name="T:WMS.Web.Core.Dto.Erp.ErpBillQueryDto">
|
||||||
<summary>
|
<summary>
|
||||||
ERP:单据查询-dto
|
ERP:单据查询-dto
|
||||||
@@ -390,6 +395,51 @@
|
|||||||
创建时间
|
创建时间
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.InStockTask.InStockTaskInfoDto">
|
||||||
|
<summary>
|
||||||
|
入库任务单-详情信息
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskDetailsRequest">
|
||||||
|
<summary>
|
||||||
|
修改-入库任务单-明细对象
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskDetailsRequest.Id">
|
||||||
|
<summary>
|
||||||
|
明细ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskDetailsRequest.Fid">
|
||||||
|
<summary>
|
||||||
|
单据头ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskDetailsRequest.MaterialId">
|
||||||
|
<summary>
|
||||||
|
物料ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskDetailsRequest.ReceiveQty">
|
||||||
|
<summary>
|
||||||
|
收货数量
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskRequest">
|
||||||
|
<summary>
|
||||||
|
入库任务-修改请求对象
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskRequest.Id">
|
||||||
|
<summary>
|
||||||
|
单据ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskRequest.Details">
|
||||||
|
<summary>
|
||||||
|
明细
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Core.Dto.InStockQueryRequest">
|
<member name="T:WMS.Web.Core.Dto.InStockQueryRequest">
|
||||||
<summary>
|
<summary>
|
||||||
入库单查询请求对象
|
入库单查询请求对象
|
||||||
@@ -525,6 +575,46 @@
|
|||||||
同步成功或者失败
|
同步成功或者失败
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:WMS.Web.Core.Dto.InStock.SaveInStockDetailsRequest">
|
||||||
|
<summary>
|
||||||
|
保存入库单明细-请求对象
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockDetailsRequest.SourceBillNo">
|
||||||
|
<summary>
|
||||||
|
来源单号
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockDetailsRequest.SupplierId">
|
||||||
|
<summary>
|
||||||
|
供应商
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockDetailsRequest.OrgId">
|
||||||
|
<summary>
|
||||||
|
组织
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockDetailsRequest.MaterialId">
|
||||||
|
<summary>
|
||||||
|
物料Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockDetailsRequest.StockId">
|
||||||
|
<summary>
|
||||||
|
仓库ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockDetailsRequest.SubStockId">
|
||||||
|
<summary>
|
||||||
|
仓位ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockDetailsRequest.Qty">
|
||||||
|
<summary>
|
||||||
|
入库数量
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Core.Dto.InStock.SaveInStockRequest">
|
<member name="T:WMS.Web.Core.Dto.InStock.SaveInStockRequest">
|
||||||
<summary>
|
<summary>
|
||||||
保存入库单-请求对象
|
保存入库单-请求对象
|
||||||
@@ -535,41 +625,16 @@
|
|||||||
入库类型
|
入库类型
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockRequest.SourceBillNo">
|
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockRequest.TaskId">
|
||||||
<summary>
|
|
||||||
来源单号
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockRequest.SupplierId">
|
|
||||||
<summary>
|
<summary>
|
||||||
供应商
|
任务单ID
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockRequest.OrgId">
|
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockRequest.Details">
|
||||||
<summary>
|
<summary>
|
||||||
组织
|
明细
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockRequest.MaterialId">
|
|
||||||
<summary>
|
|
||||||
物料Id
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockRequest.StockId">
|
|
||||||
<summary>
|
|
||||||
仓库ID
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockRequest.SubStockId">
|
|
||||||
<summary>
|
|
||||||
仓位ID
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:WMS.Web.Core.Dto.InStock.SaveInStockRequest.Qty">
|
|
||||||
<summary>
|
|
||||||
入库数量
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:WMS.Web.Core.Dto.Login.AccessTokenDto.Token">
|
<member name="P:WMS.Web.Core.Dto.Login.AccessTokenDto.Token">
|
||||||
<summary>
|
<summary>
|
||||||
授权token -- 给前端用的验证token
|
授权token -- 给前端用的验证token
|
||||||
@@ -955,11 +1020,6 @@
|
|||||||
用户在单点中维一ID
|
用户在单点中维一ID
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.MoveBoxRecord.MoveBoxRecordQueryInfoResponse.Specifications">
|
|
||||||
<summary>
|
|
||||||
规格型号
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:WMS.Web.Core.Dto.MoveBoxRecord.MoveBoxRecordQueryInfoResponse.Box">
|
<member name="P:WMS.Web.Core.Dto.MoveBoxRecord.MoveBoxRecordQueryInfoResponse.Box">
|
||||||
<summary>
|
<summary>
|
||||||
箱号
|
箱号
|
||||||
@@ -1615,6 +1675,56 @@
|
|||||||
来源单号
|
来源单号
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryRequest.Type">
|
||||||
|
<summary>
|
||||||
|
入库类型
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryRequest.Status">
|
||||||
|
<summary>
|
||||||
|
入库状态
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryRequest.Receiver">
|
||||||
|
<summary>
|
||||||
|
收货人
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryRequest.Operator">
|
||||||
|
<summary>
|
||||||
|
上架人
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryRequest.CreateBeginDate">
|
||||||
|
<summary>
|
||||||
|
创建时间(入库时间)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryRequest.CreateEndDate">
|
||||||
|
<summary>
|
||||||
|
创建时间(入库时间)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryRequest.SupplierId">
|
||||||
|
<summary>
|
||||||
|
供应商ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryRequest.OrgId">
|
||||||
|
<summary>
|
||||||
|
组织ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryRequest.MaterialNumber">
|
||||||
|
<summary>
|
||||||
|
物料编码
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryRequest.StockId">
|
||||||
|
<summary>
|
||||||
|
仓库ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Core.Dto.InStockTaskQueryResponse">
|
<member name="T:WMS.Web.Core.Dto.InStockTaskQueryResponse">
|
||||||
<summary>
|
<summary>
|
||||||
入库任务表-查询对象
|
入库任务表-查询对象
|
||||||
@@ -1710,12 +1820,12 @@
|
|||||||
收货时间
|
收货时间
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryResponse.Operator">
|
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryResponse.Shelfer">
|
||||||
<summary>
|
<summary>
|
||||||
上架人
|
上架人
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryResponse.OperateTime">
|
<member name="P:WMS.Web.Core.Dto.InStockTaskQueryResponse.ShelfTime">
|
||||||
<summary>
|
<summary>
|
||||||
入库时间
|
入库时间
|
||||||
</summary>
|
</summary>
|
||||||
|
|||||||
@@ -270,6 +270,11 @@
|
|||||||
ID
|
ID
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:WMS.Web.Domain.Entitys.InStock.TaskId">
|
||||||
|
<summary>
|
||||||
|
任务单ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:WMS.Web.Domain.Entitys.InStock.BillNo">
|
<member name="P:WMS.Web.Domain.Entitys.InStock.BillNo">
|
||||||
<summary>
|
<summary>
|
||||||
单据编号
|
单据编号
|
||||||
@@ -391,14 +396,14 @@
|
|||||||
收货时间
|
收货时间
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WMS.Web.Domain.Entitys.InStockTask.OperatorId">
|
<member name="P:WMS.Web.Domain.Entitys.InStockTask.ShelferId">
|
||||||
<summary>
|
<summary>
|
||||||
操作人(上架人)
|
上架人
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:WMS.Web.Domain.Entitys.InStockTask.OperateTime">
|
<member name="P:WMS.Web.Domain.Entitys.InStockTask.ShelfTime">
|
||||||
<summary>
|
<summary>
|
||||||
操作时间(入库时间)
|
入库时间(上架时间)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:WMS.Web.Domain.Entitys.InStockTask.Details">
|
<member name="F:WMS.Web.Domain.Entitys.InStockTask.Details">
|
||||||
@@ -412,6 +417,18 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<param name="newId"></param>
|
<param name="newId"></param>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Entitys.InStockTask.Receive(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
收货
|
||||||
|
</summary>
|
||||||
|
<param name="creatorId"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Entitys.InStockTask.Shelf(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
上架
|
||||||
|
</summary>
|
||||||
|
<param name="creatorId"></param>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Entitys.InStockTaskDetails">
|
<member name="T:WMS.Web.Domain.Entitys.InStockTaskDetails">
|
||||||
<summary>
|
<summary>
|
||||||
erp入库任务明细表
|
erp入库任务明细表
|
||||||
@@ -995,6 +1012,20 @@
|
|||||||
<param name="dto"></param>
|
<param name="dto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Infrastructure.IInStockTaskRepositories.Get(System.Int32)">
|
||||||
|
<summary>
|
||||||
|
详情
|
||||||
|
</summary>
|
||||||
|
<param name="id"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Infrastructure.IInStockTaskRepositories.GetList(System.Collections.Generic.List{System.Int32})">
|
||||||
|
<summary>
|
||||||
|
列表
|
||||||
|
</summary>
|
||||||
|
<param name="ids"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:WMS.Web.Domain.Infrastructure.IInStockTaskRepositories.AddRange(System.Collections.Generic.List{WMS.Web.Domain.Entitys.InStockTask},System.Boolean)">
|
<member name="M:WMS.Web.Domain.Infrastructure.IInStockTaskRepositories.AddRange(System.Collections.Generic.List{WMS.Web.Domain.Entitys.InStockTask},System.Boolean)">
|
||||||
<summary>
|
<summary>
|
||||||
批量添加
|
批量添加
|
||||||
@@ -1069,14 +1100,6 @@
|
|||||||
入库单服务接口
|
入库单服务接口
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:WMS.Web.Domain.IService.IInStockService.Save(System.Collections.Generic.List{WMS.Web.Core.Dto.InStock.SaveInStockRequest},WMS.Web.Core.Dto.Login.LoginInDto)">
|
|
||||||
<summary>
|
|
||||||
保存
|
|
||||||
</summary>
|
|
||||||
<param name="dto"></param>
|
|
||||||
<param name="loginInfo"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:WMS.Web.Domain.IService.IInStockService.Sync(WMS.Web.Core.Dto.OperateRequest)">
|
<member name="M:WMS.Web.Domain.IService.IInStockService.Sync(WMS.Web.Core.Dto.OperateRequest)">
|
||||||
<summary>
|
<summary>
|
||||||
同步金蝶
|
同步金蝶
|
||||||
@@ -1084,6 +1107,51 @@
|
|||||||
<param name="dto"></param>
|
<param name="dto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.IService.IInStockService.Receive(WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskRequest,WMS.Web.Core.Dto.Login.LoginInDto)">
|
||||||
|
<summary>
|
||||||
|
收货
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<param name="loginInfo"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.IService.IInStockService.Shelf(WMS.Web.Core.Dto.InStock.SaveInStockRequest,WMS.Web.Core.Dto.Login.LoginInDto)">
|
||||||
|
<summary>
|
||||||
|
上架
|
||||||
|
</summary>
|
||||||
|
<param name="instock"></param>
|
||||||
|
<param name="loginInfo"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.IService.IInStockService.Save(WMS.Web.Core.Dto.InStock.SaveInStockRequest,System.Int32,System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
保存-出库单
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<param name="staffId"></param>
|
||||||
|
<param name="isTransaction"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.IService.IInStockService.Update(WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskRequest,System.Int32,System.Boolean,System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
修改-入库任务信息
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<param name="staffId"></param>
|
||||||
|
<param name="isReceive"></param>
|
||||||
|
<param name="isTransaction"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.IService.IInStockService.UpdateRange(System.Collections.Generic.List{System.Int32},System.Int32,System.Boolean,System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
批量修改-入库任务信息
|
||||||
|
</summary>
|
||||||
|
<param name="ids"></param>
|
||||||
|
<param name="staffId"></param>
|
||||||
|
<param name="isReceive"></param>
|
||||||
|
<param name="isTransaction"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.IService.IOutStockService">
|
<member name="T:WMS.Web.Domain.IService.IOutStockService">
|
||||||
<summary>
|
<summary>
|
||||||
出库服务
|
出库服务
|
||||||
@@ -1582,14 +1650,6 @@
|
|||||||
入库单服务
|
入库单服务
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:WMS.Web.Domain.Services.InStockService.Save(System.Collections.Generic.List{WMS.Web.Core.Dto.InStock.SaveInStockRequest},WMS.Web.Core.Dto.Login.LoginInDto)">
|
|
||||||
<summary>
|
|
||||||
出库单
|
|
||||||
</summary>
|
|
||||||
<param name="dto"></param>
|
|
||||||
<param name="loginInfo"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:WMS.Web.Domain.Services.InStockService.Sync(WMS.Web.Core.Dto.OperateRequest)">
|
<member name="M:WMS.Web.Domain.Services.InStockService.Sync(WMS.Web.Core.Dto.OperateRequest)">
|
||||||
<summary>
|
<summary>
|
||||||
同步金蝶
|
同步金蝶
|
||||||
@@ -1597,6 +1657,51 @@
|
|||||||
<param name="dto"></param>
|
<param name="dto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Services.InStockService.Receive(WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskRequest,WMS.Web.Core.Dto.Login.LoginInDto)">
|
||||||
|
<summary>
|
||||||
|
收货
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<param name="loginInfo"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Services.InStockService.Shelf(WMS.Web.Core.Dto.InStock.SaveInStockRequest,WMS.Web.Core.Dto.Login.LoginInDto)">
|
||||||
|
<summary>
|
||||||
|
上架
|
||||||
|
</summary>
|
||||||
|
<param name="instock"></param>
|
||||||
|
<param name="loginInfo"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Services.InStockService.Save(WMS.Web.Core.Dto.InStock.SaveInStockRequest,System.Int32,System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
保存-出库单
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<param name="staffId"></param>
|
||||||
|
<param name="isTransaction"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Services.InStockService.Update(WMS.Web.Core.Dto.InStockTask.UpdateInStockTaskRequest,System.Int32,System.Boolean,System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
修改-入库任务信息
|
||||||
|
</summary>
|
||||||
|
<param name="dto"></param>
|
||||||
|
<param name="staffId"></param>
|
||||||
|
<param name="isReceive"></param>
|
||||||
|
<param name="isTransaction"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:WMS.Web.Domain.Services.InStockService.UpdateRange(System.Collections.Generic.List{System.Int32},System.Int32,System.Boolean,System.Boolean)">
|
||||||
|
<summary>
|
||||||
|
批量修改-入库任务信息
|
||||||
|
</summary>
|
||||||
|
<param name="ids"></param>
|
||||||
|
<param name="staffId"></param>
|
||||||
|
<param name="isReceive"></param>
|
||||||
|
<param name="isTransaction"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:WMS.Web.Domain.Services.OutStockService">
|
<member name="T:WMS.Web.Domain.Services.OutStockService">
|
||||||
<summary>
|
<summary>
|
||||||
出库服务
|
出库服务
|
||||||
|
|||||||
@@ -26,8 +26,12 @@ namespace WMS.Web.Core.Dto
|
|||||||
/// 入库单类型
|
/// 入库单类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Dictionary<string, string> InstockType { get; set; } = new Dictionary<string, string>();
|
public Dictionary<string, string> InstockType { get; set; } = new Dictionary<string, string>();
|
||||||
|
/// <summary>
|
||||||
|
/// 入库状态
|
||||||
|
/// </summary>
|
||||||
|
public Dictionary<string, string> InstockStatus { get; set; } = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
53
src/WMS.Web.Core/Dto/InStock/SaveInStockDetailsRequest.cs
Normal file
53
src/WMS.Web.Core/Dto/InStock/SaveInStockDetailsRequest.cs
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.InStock
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 保存入库单明细-请求对象
|
||||||
|
/// </summary>
|
||||||
|
public class SaveInStockDetailsRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 来源单号
|
||||||
|
///</summary>
|
||||||
|
[Required(ErrorMessage = "来源单号不能为空")]
|
||||||
|
public string SourceBillNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 供应商
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage = "供应商不能为空")]
|
||||||
|
public int SupplierId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 组织
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage = "组织不能为空")]
|
||||||
|
public int OrgId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 物料Id
|
||||||
|
///</summary>
|
||||||
|
[Required(ErrorMessage = "物料不能为空")]
|
||||||
|
public int MaterialId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 仓库ID
|
||||||
|
///</summary>
|
||||||
|
[Required(ErrorMessage = "仓库不能为空")]
|
||||||
|
public int StockId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 仓位ID
|
||||||
|
///</summary>
|
||||||
|
[Required(ErrorMessage = " 仓位不能为空")]
|
||||||
|
public int SubStockId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 入库数量
|
||||||
|
///</summary>
|
||||||
|
[Required(ErrorMessage = "入库数量不能为空")]
|
||||||
|
public decimal Qty { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -18,43 +18,14 @@ namespace WMS.Web.Core.Dto.InStock
|
|||||||
public int Type { get; set; }
|
public int Type { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 来源单号
|
/// 任务单ID
|
||||||
///</summary>
|
|
||||||
[Required(ErrorMessage = "来源单号不能为空")]
|
|
||||||
public string SourceBillNo { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 供应商
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required(ErrorMessage = "供应商不能为空")]
|
[Required(ErrorMessage = "任务单ID不能为空")]
|
||||||
public int SupplierId { get; set; }
|
public int TaskId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 组织
|
/// 明细
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required(ErrorMessage = "组织不能为空")]
|
public List<SaveInStockDetailsRequest> Details { get; set; } = new List<SaveInStockDetailsRequest>();
|
||||||
public int OrgId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 物料Id
|
|
||||||
///</summary>
|
|
||||||
[Required(ErrorMessage = "物料不能为空")]
|
|
||||||
public int MaterialId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 仓库ID
|
|
||||||
///</summary>
|
|
||||||
[Required(ErrorMessage = "仓库不能为空")]
|
|
||||||
public int StockId { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// 仓位ID
|
|
||||||
///</summary>
|
|
||||||
[Required(ErrorMessage = " 仓位不能为空")]
|
|
||||||
public int SubStockId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 入库数量
|
|
||||||
///</summary>
|
|
||||||
[Required(ErrorMessage = "入库数量不能为空")]
|
|
||||||
public decimal Qty { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
13
src/WMS.Web.Core/Dto/InStockTask/InStockTaskInfoDto.cs
Normal file
13
src/WMS.Web.Core/Dto/InStockTask/InStockTaskInfoDto.cs
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.InStockTask
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 入库任务单-详情信息
|
||||||
|
/// </summary>
|
||||||
|
public class InStockTaskInfoDto
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.InStockTask
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 修改-入库任务单-明细对象
|
||||||
|
/// </summary>
|
||||||
|
public class UpdateInStockTaskDetailsRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 明细ID
|
||||||
|
/// </summary>
|
||||||
|
public int Id { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 单据头ID
|
||||||
|
/// </summary>
|
||||||
|
public int Fid { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 物料ID
|
||||||
|
/// </summary>
|
||||||
|
public int MaterialId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 收货数量
|
||||||
|
/// </summary>
|
||||||
|
public decimal ReceiveQty { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
24
src/WMS.Web.Core/Dto/InStockTask/UpdateInStockTaskRequest.cs
Normal file
24
src/WMS.Web.Core/Dto/InStockTask/UpdateInStockTaskRequest.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace WMS.Web.Core.Dto.InStockTask
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 入库任务-修改请求对象
|
||||||
|
/// </summary>
|
||||||
|
public class UpdateInStockTaskRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 单据ID
|
||||||
|
/// </summary>
|
||||||
|
[Required(ErrorMessage = "唯一编号不能未空")]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 明细
|
||||||
|
/// </summary>
|
||||||
|
public List<UpdateInStockTaskDetailsRequest> Details { get; set; } = new List<UpdateInStockTaskDetailsRequest>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,5 +13,50 @@ namespace WMS.Web.Core.Dto
|
|||||||
/// 来源单号
|
/// 来源单号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SourceBillNo { get; set; }
|
public string SourceBillNo { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 入库类型
|
||||||
|
/// </summary>
|
||||||
|
public int? Type { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 入库状态
|
||||||
|
/// </summary>
|
||||||
|
public int? Status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 收货人
|
||||||
|
/// </summary>
|
||||||
|
public string Receiver { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 上架人
|
||||||
|
/// </summary>
|
||||||
|
public string Operator { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间(入库时间)
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? CreateBeginDate { get; set; } = null;
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间(入库时间)
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? CreateEndDate { get; set; } = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 供应商ID
|
||||||
|
/// </summary>
|
||||||
|
public int? SupplierId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 组织ID
|
||||||
|
/// </summary>
|
||||||
|
public int? OrgId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 物料编码
|
||||||
|
///</summary>
|
||||||
|
public string MaterialNumber { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 仓库ID
|
||||||
|
/// </summary>
|
||||||
|
public int? StockId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,11 +94,11 @@ namespace WMS.Web.Core.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 上架人
|
/// 上架人
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Operator { get; set; }
|
public string Shelfer { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 入库时间
|
/// 入库时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime OperateTime { get; set; }
|
public DateTime ShelfTime { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 明细备注
|
/// 明细备注
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -17,6 +17,12 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
/// ID
|
/// ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 任务单ID
|
||||||
|
/// </summary>
|
||||||
|
public int TaskId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 单据编号
|
/// 单据编号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -38,13 +38,13 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime ReceiveTime { get; set; }
|
public DateTime ReceiveTime { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 操作人(上架人)
|
/// 上架人
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int OperatorId { get; set; }
|
public int ShelferId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 操作时间(入库时间)
|
/// 入库时间(上架时间)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime OperateTime { get; set; }
|
public DateTime ShelfTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 明细
|
/// 明细
|
||||||
@@ -76,5 +76,25 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
this.BillNo = "RKRW" + needStr + newId.ToString();
|
this.BillNo = "RKRW" + needStr + newId.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 收货
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="creatorId"></param>
|
||||||
|
public void Receive(int creatorId)
|
||||||
|
{
|
||||||
|
this.ReceiverId = creatorId;
|
||||||
|
this.ReceiveTime = DateTime.Now;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 上架
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="creatorId"></param>
|
||||||
|
public void Shelf(int creatorId)
|
||||||
|
{
|
||||||
|
this.ShelferId = creatorId;
|
||||||
|
this.ShelfTime = DateTime.Now;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using WMS.Web.Core.Dto;
|
using WMS.Web.Core.Dto;
|
||||||
using WMS.Web.Core.Dto.InStock;
|
using WMS.Web.Core.Dto.InStock;
|
||||||
|
using WMS.Web.Core.Dto.InStockTask;
|
||||||
using WMS.Web.Core.Dto.Login;
|
using WMS.Web.Core.Dto.Login;
|
||||||
using WMS.Web.Core.Internal.Results;
|
using WMS.Web.Core.Internal.Results;
|
||||||
|
|
||||||
@@ -14,13 +15,6 @@ namespace WMS.Web.Domain.IService
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IInStockService
|
public interface IInStockService
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// 保存
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="dto"></param>
|
|
||||||
/// <param name="loginInfo"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
Task<Result> Save(List<SaveInStockRequest> dto, LoginInDto loginInfo);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 同步金蝶
|
/// 同步金蝶
|
||||||
@@ -28,5 +22,50 @@ namespace WMS.Web.Domain.IService
|
|||||||
/// <param name="dto"></param>
|
/// <param name="dto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<Result> Sync(OperateRequest dto);
|
Task<Result> Sync(OperateRequest dto);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 收货
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="loginInfo"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<Result> Receive(UpdateInStockTaskRequest dto, LoginInDto loginInfo);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 上架
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="instock"></param>
|
||||||
|
/// <param name="loginInfo"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<Result> Shelf(SaveInStockRequest instock, LoginInDto loginInfo);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存-出库单
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="staffId"></param>
|
||||||
|
/// <param name="isTransaction"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<Result> Save(SaveInStockRequest dto, int staffId, bool isTransaction = true);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改-入库任务信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="staffId"></param>
|
||||||
|
/// <param name="isReceive"></param>
|
||||||
|
/// <param name="isTransaction"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<Result> Update(UpdateInStockTaskRequest dto, int staffId, bool isReceive, bool isTransaction = true);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 批量修改-入库任务信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <param name="staffId"></param>
|
||||||
|
/// <param name="isReceive"></param>
|
||||||
|
/// <param name="isTransaction"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<Result> UpdateRange(List<int> ids, int staffId, bool isReceive, bool isTransaction = true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,20 @@ namespace WMS.Web.Domain.Infrastructure
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<ResultPagedList<InStockTaskQueryResponse>> GetPagedList(InStockTaskQueryRequest dto);
|
Task<ResultPagedList<InStockTaskQueryResponse>> GetPagedList(InStockTaskQueryRequest dto);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<InStockTask> Get(int id);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<List<InStockTask>> GetList(List<int> ids);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 批量添加
|
/// 批量添加
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -2,10 +2,12 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Storage;
|
using Microsoft.EntityFrameworkCore.Storage;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using WMS.Web.Core.Dto;
|
using WMS.Web.Core.Dto;
|
||||||
using WMS.Web.Core.Dto.InStock;
|
using WMS.Web.Core.Dto.InStock;
|
||||||
|
using WMS.Web.Core.Dto.InStockTask;
|
||||||
using WMS.Web.Core.Dto.Login;
|
using WMS.Web.Core.Dto.Login;
|
||||||
using WMS.Web.Core.Internal.Results;
|
using WMS.Web.Core.Internal.Results;
|
||||||
using WMS.Web.Domain.Entitys;
|
using WMS.Web.Domain.Entitys;
|
||||||
@@ -19,7 +21,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 入库单服务
|
/// 入库单服务
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class InStockService: IInStockService
|
public class InStockService : IInStockService
|
||||||
{
|
{
|
||||||
private readonly IMapper _mapper;
|
private readonly IMapper _mapper;
|
||||||
private readonly ILoginService _loginService;
|
private readonly ILoginService _loginService;
|
||||||
@@ -37,35 +39,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
_inStockTaskRepositories = inStockTaskRepositories;
|
_inStockTaskRepositories = inStockTaskRepositories;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 出库单
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="dto"></param>
|
|
||||||
/// <param name="loginInfo"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<Result> Save(List<SaveInStockRequest> dto, LoginInDto loginInfo)
|
|
||||||
{
|
|
||||||
var entity = new InStock();
|
|
||||||
entity.Details = _mapper.Map<List<InStockDetails>>(dto);
|
|
||||||
entity.Create(loginInfo.UserInfo.StaffId);
|
|
||||||
|
|
||||||
//需要填写序列号
|
|
||||||
//需要修改库存
|
|
||||||
//需要同步金蝶
|
|
||||||
|
|
||||||
IDbContextTransaction _transaction = _transactionRepositories.GetTransaction();
|
|
||||||
bool isRollback = false;
|
|
||||||
bool isSuccess = true;
|
|
||||||
entity = await _inStockRepositories.Add(entity, true);
|
|
||||||
if (entity == null) isRollback = true;
|
|
||||||
|
|
||||||
//提交事务
|
|
||||||
isSuccess = _transactionRepositories.CommitTransaction(isRollback, _transaction);
|
|
||||||
if (!isSuccess)
|
|
||||||
return Result.ReFailure(ResultCodes.DateWriteError);
|
|
||||||
|
|
||||||
return Result.ReSuccess();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 同步金蝶
|
/// 同步金蝶
|
||||||
@@ -78,5 +52,139 @@ namespace WMS.Web.Domain.Services
|
|||||||
|
|
||||||
return Task.FromResult(Result.ReSuccess());
|
return Task.FromResult(Result.ReSuccess());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 收货
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="loginInfo"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<Result> Receive(UpdateInStockTaskRequest dto, LoginInDto loginInfo)
|
||||||
|
{
|
||||||
|
IDbContextTransaction _transaction = _transactionRepositories.GetTransaction();
|
||||||
|
bool isRollback = false;
|
||||||
|
bool isTransaction = false;
|
||||||
|
var result = await this.Update(dto, loginInfo.UserInfo.StaffId,true, isTransaction);
|
||||||
|
if (!result.IsSuccess) isRollback = true;
|
||||||
|
|
||||||
|
//提交事务
|
||||||
|
var isSuccess = _transactionRepositories.CommitTransaction(isRollback, _transaction);
|
||||||
|
if (!isSuccess)
|
||||||
|
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||||
|
|
||||||
|
return Result.ReSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 上架
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="instock"></param>
|
||||||
|
/// <param name="loginInfo"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<Result> Shelf(SaveInStockRequest instock, LoginInDto loginInfo)
|
||||||
|
{
|
||||||
|
IDbContextTransaction _transaction = _transactionRepositories.GetTransaction();
|
||||||
|
bool isRollback = false;
|
||||||
|
bool isTransaction = false;
|
||||||
|
|
||||||
|
//1.添加入库单:(同步金蝶在save方法里面进行)
|
||||||
|
var save_result = await this.Save(instock, loginInfo.UserInfo.StaffId, isTransaction);
|
||||||
|
if (!save_result.IsSuccess) isRollback = true;
|
||||||
|
{
|
||||||
|
//2.修改入库任务单
|
||||||
|
var ids = new List<int>();
|
||||||
|
ids.Add(instock.TaskId);
|
||||||
|
var result = await this.UpdateRange(ids, loginInfo.UserInfo.StaffId, false, isTransaction);
|
||||||
|
if (!result.IsSuccess) isRollback = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//提交事务
|
||||||
|
var isSuccess = _transactionRepositories.CommitTransaction(isRollback, _transaction);
|
||||||
|
if (!isSuccess)
|
||||||
|
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||||
|
|
||||||
|
return Result.ReSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存-出库单
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="staffId"></param>
|
||||||
|
/// <param name="isTransaction"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<Result> Save(SaveInStockRequest dto, int staffId, bool isTransaction = true)
|
||||||
|
{
|
||||||
|
var entity = new InStock();
|
||||||
|
entity.Type = (InstockType)dto.Type;
|
||||||
|
entity.TaskId = dto.TaskId;
|
||||||
|
entity.Details = _mapper.Map<List<InStockDetails>>(dto.Details);
|
||||||
|
entity.Create(staffId);
|
||||||
|
|
||||||
|
//需要填写序列号
|
||||||
|
//需要修改库存
|
||||||
|
//需要同步金蝶
|
||||||
|
|
||||||
|
entity = await _inStockRepositories.Add(entity, isTransaction);
|
||||||
|
|
||||||
|
if (entity != null)
|
||||||
|
return Result.ReSuccess();
|
||||||
|
else
|
||||||
|
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改-入库任务信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dto"></param>
|
||||||
|
/// <param name="staffId"></param>
|
||||||
|
/// <param name="isReceive"></param>
|
||||||
|
/// <param name="isTransaction"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<Result> Update(UpdateInStockTaskRequest dto, int staffId,bool isReceive, bool isTransaction = true)
|
||||||
|
{
|
||||||
|
var entity = await _inStockTaskRepositories.Get(dto.Id);
|
||||||
|
if (entity == null)
|
||||||
|
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||||
|
|
||||||
|
entity = _mapper.Map(dto, entity);
|
||||||
|
if (isReceive)
|
||||||
|
entity.Receive(staffId);
|
||||||
|
else
|
||||||
|
entity.Shelf(staffId);
|
||||||
|
var result = _inStockTaskRepositories.Update(entity, isTransaction);
|
||||||
|
if (result != null)
|
||||||
|
return Result.ReSuccess();
|
||||||
|
else
|
||||||
|
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 批量修改-入库任务信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="ids"></param>
|
||||||
|
/// <param name="staffId"></param>
|
||||||
|
/// <param name="isReceive"></param>
|
||||||
|
/// <param name="isTransaction"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<Result> UpdateRange(List<int> ids, int staffId, bool isReceive, bool isTransaction = true)
|
||||||
|
{
|
||||||
|
var entitys = await _inStockTaskRepositories.GetList(ids);
|
||||||
|
if (entitys == null || entitys.Count==0)
|
||||||
|
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||||
|
|
||||||
|
foreach (var item in entitys)
|
||||||
|
{
|
||||||
|
if (isReceive)
|
||||||
|
item.Receive(staffId);
|
||||||
|
else
|
||||||
|
item.Shelf(staffId);
|
||||||
|
}
|
||||||
|
var isSuccess = await _inStockTaskRepositories.UpdateRange(entitys, isTransaction);
|
||||||
|
if (isSuccess)
|
||||||
|
return Result.ReSuccess();
|
||||||
|
else
|
||||||
|
return Result.ReFailure(ResultCodes.DateWriteError);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,12 +66,12 @@ namespace WMS.Web.Repositories
|
|||||||
query = query.Where(w => w.detail.StockId == dto.StockId.Value);
|
query = query.Where(w => w.detail.StockId == dto.StockId.Value);
|
||||||
|
|
||||||
if (dto.Type.HasValue)
|
if (dto.Type.HasValue)
|
||||||
query = query.Where(w => (int)w.order.Type == dto.Type);
|
query = query.Where(w => (int)w.order.Type == dto.Type.Value);
|
||||||
|
|
||||||
if (dto.CreateBeginDate != null)
|
if (dto.CreateBeginDate != null)
|
||||||
query = query.Where(w => w.order.CreateTime >= dto.CreateBeginDate);
|
query = query.Where(w => w.order.CreateTime >= dto.CreateBeginDate.Value);
|
||||||
if (dto.CreateEndDate != null)
|
if (dto.CreateEndDate != null)
|
||||||
query = query.Where(w => w.order.CreateTime <= dto.CreateEndDate);
|
query = query.Where(w => w.order.CreateTime <= dto.CreateEndDate.Value);
|
||||||
|
|
||||||
var response = new ResultPagedList<InStockQueryResponse>();
|
var response = new ResultPagedList<InStockQueryResponse>();
|
||||||
int total = await query.CountAsync();
|
int total = await query.CountAsync();
|
||||||
|
|||||||
@@ -47,6 +47,29 @@ namespace WMS.Web.Repositories
|
|||||||
if (!string.IsNullOrEmpty(dto.SourceBillNo))
|
if (!string.IsNullOrEmpty(dto.SourceBillNo))
|
||||||
query = query.Where(w => EF.Functions.Like(w.detail.SourceBillNo, "%" + dto.SourceBillNo + "%"));
|
query = query.Where(w => EF.Functions.Like(w.detail.SourceBillNo, "%" + dto.SourceBillNo + "%"));
|
||||||
|
|
||||||
|
//if (!string.IsNullOrEmpty(dto.MaterialNumber))
|
||||||
|
// query = query.Where(w => EF.Functions.Like(w.detail.BillNo, "%" + dto.BillNo + "%"));
|
||||||
|
|
||||||
|
if (dto.SupplierId.HasValue)
|
||||||
|
query = query.Where(w => w.detail.SupplierId == dto.SupplierId.Value);
|
||||||
|
|
||||||
|
if (dto.OrgId.HasValue)
|
||||||
|
query = query.Where(w => w.detail.OrgId == dto.OrgId.Value);
|
||||||
|
|
||||||
|
if (dto.StockId.HasValue)
|
||||||
|
query = query.Where(w => w.detail.StockId == dto.StockId.Value);
|
||||||
|
|
||||||
|
if (dto.Type.HasValue)
|
||||||
|
query = query.Where(w => (int)w.order.Type == dto.Type.Value);
|
||||||
|
|
||||||
|
if (dto.Status.HasValue)
|
||||||
|
query = query.Where(w => (int)w.order.Status == dto.Status.Value);
|
||||||
|
|
||||||
|
if (dto.CreateBeginDate != null)
|
||||||
|
query = query.Where(w => w.order.ShelfTime >= dto.CreateBeginDate.Value);
|
||||||
|
if (dto.CreateEndDate != null)
|
||||||
|
query = query.Where(w => w.order.ShelfTime <= dto.CreateEndDate.Value);
|
||||||
|
|
||||||
var response = new ResultPagedList<InStockTaskQueryResponse>();
|
var response = new ResultPagedList<InStockTaskQueryResponse>();
|
||||||
int total = await query.CountAsync();
|
int total = await query.CountAsync();
|
||||||
response.TotalCount = total;
|
response.TotalCount = total;
|
||||||
@@ -71,8 +94,8 @@ namespace WMS.Web.Repositories
|
|||||||
RealityQty = s.detail.RealityQty,
|
RealityQty = s.detail.RealityQty,
|
||||||
Receiver = "",
|
Receiver = "",
|
||||||
ReceiveTime = s.order.ReceiveTime,
|
ReceiveTime = s.order.ReceiveTime,
|
||||||
Operator = "",
|
Shelfer = "",
|
||||||
OperateTime = s.order.OperateTime,
|
ShelfTime = s.order.ShelfTime,
|
||||||
CreateTime = s.detail.CreateTime,
|
CreateTime = s.detail.CreateTime,
|
||||||
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
||||||
|
|
||||||
@@ -80,6 +103,31 @@ namespace WMS.Web.Repositories
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 详情
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<InStockTask> Get(int id)
|
||||||
|
{
|
||||||
|
return await _context.InStockTask
|
||||||
|
.Include(s => s.Details)
|
||||||
|
.FirstOrDefaultAsync(f => f.Id == id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<List<InStockTask>> GetList(List<int> ids)
|
||||||
|
{
|
||||||
|
return await _context.InStockTask
|
||||||
|
.Include(s => s.Details)
|
||||||
|
.Where(f => ids.Contains(f.Id))
|
||||||
|
.ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 批量添加
|
/// 批量添加
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user