增加出库任务单详情
增加订阅通知详情
This commit is contained in:
@@ -204,5 +204,20 @@ namespace WMS.Web.Api.Controllers
|
||||
//再刷新3天内所有的
|
||||
return await _outStockTaskService.Sync(null, begin);
|
||||
}
|
||||
/// <summary>
|
||||
/// 出库任务单详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Route("GetInfo/{id}")]
|
||||
public async Task<Result<OutStockTaskInfoResponse>> GetInfo([FromRoute] int id)
|
||||
{
|
||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return Result<OutStockTaskInfoResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
|
||||
return await _outStockTaskService.GetInfo(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,5 +128,23 @@ namespace WMS.Web.Api.Controllers
|
||||
if (!res) Result.ReFailure(ResultCodes.DateWriteError);
|
||||
return Result.ReSuccess();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("GetInfo/{id}")]
|
||||
public async Task<Result<SubscribeNotificationInfoResponse>> GetInfo([FromRoute] int id)
|
||||
{
|
||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return Result<SubscribeNotificationInfoResponse>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
|
||||
var entity = await _repositories.Get(id);
|
||||
if (entity == null) Result<SubscribeNotificationInfoResponse>.ReFailure(ResultCodes.SubscribeNotificationNoData);
|
||||
return Result<SubscribeNotificationInfoResponse>.ReSuccess(_mapper.Map<SubscribeNotificationInfoResponse>(entity));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ namespace WMS.Web.Api.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取出库单客户下拉列表
|
||||
/// 获取客户下拉列表(包含组织信息)
|
||||
/// </summary>
|
||||
/// <param name="name">客户名</param>
|
||||
/// <returns></returns>
|
||||
@@ -310,6 +310,32 @@ namespace WMS.Web.Api.Controllers
|
||||
|
||||
return Result<List<PullDownStrResponse>>.ReSuccess(pullList);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取客户下拉列表(纯客户信息 不包含组织信息)
|
||||
/// </summary>
|
||||
/// <param name="name">客户名</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[Route("GetCustomersNoOrg/{name}")]
|
||||
public async Task<Result<List<PullDownStrResponse>>> GetCustomersNoOrg([FromRoute] string name)
|
||||
{
|
||||
var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
|
||||
if (loginInfo == null || loginInfo.UserInfo == null)
|
||||
return Result<List<PullDownStrResponse>>.ReFailure(ResultCodes.Token_Invalid_Error);
|
||||
var customers = await _erpService.BillQueryForCustomer();
|
||||
|
||||
List<PullDownStrResponse> pullList = new List<PullDownStrResponse>();
|
||||
foreach (var c in customers.Data.Where(w => w.Name.Contains(name)))
|
||||
{
|
||||
pullList.Add(new PullDownStrResponse()
|
||||
{
|
||||
Id = c.Id.ToString(),
|
||||
Name = c.Name,
|
||||
Code = c.Number
|
||||
});
|
||||
}
|
||||
return Result<List<PullDownStrResponse>>.ReSuccess(pullList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取仓位:模糊名称
|
||||
|
||||
@@ -499,6 +499,13 @@
|
||||
<param name="dto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Api.Controllers.OutStockTaskController.GetInfo(System.Int32)">
|
||||
<summary>
|
||||
出库任务单详情
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Api.Controllers.SerialNumberController.Get(System.String)">
|
||||
<summary>
|
||||
获取序列号信息
|
||||
@@ -539,6 +546,13 @@
|
||||
<param name="dto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Api.Controllers.SubscribeNotificationController.GetInfo(System.Int32)">
|
||||
<summary>
|
||||
获取详情
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Api.Controllers.SysConfigController">
|
||||
<summary>
|
||||
系统配置
|
||||
@@ -593,7 +607,14 @@
|
||||
</member>
|
||||
<member name="M:WMS.Web.Api.Controllers.SysConfigController.GetCustomers(System.String)">
|
||||
<summary>
|
||||
获取出库单客户下拉列表
|
||||
获取客户下拉列表(包含组织信息)
|
||||
</summary>
|
||||
<param name="name">客户名</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Api.Controllers.SysConfigController.GetCustomersNoOrg(System.String)">
|
||||
<summary>
|
||||
获取客户下拉列表(纯客户信息 不包含组织信息)
|
||||
</summary>
|
||||
<param name="name">客户名</param>
|
||||
<returns></returns>
|
||||
|
||||
@@ -4563,6 +4563,111 @@
|
||||
单号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse">
|
||||
<summary>
|
||||
出库任务单对应出库明细
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.MaterialNumber">
|
||||
<summary>
|
||||
物料编码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.Specifications">
|
||||
<summary>
|
||||
物料规格型号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.BoxBillNo">
|
||||
<summary>
|
||||
箱号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.SerialNumbers">
|
||||
<summary>
|
||||
序列号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.SubStockCode">
|
||||
<summary>
|
||||
仓位
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.Qty">
|
||||
<summary>
|
||||
出库数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.AccruedQty">
|
||||
<summary>
|
||||
应出库数量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.Method">
|
||||
<summary>
|
||||
出库方式
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.Creator">
|
||||
<summary>
|
||||
出库人
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoDetailsResponse.CreateTime">
|
||||
<summary>
|
||||
出库时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoResponse">
|
||||
<summary>
|
||||
出库任务单详情
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoResponse.Id">
|
||||
<summary>
|
||||
主键
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoResponse.BillNo">
|
||||
<summary>
|
||||
单据编号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoResponse.SourceBillNo">
|
||||
<summary>
|
||||
来源单号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoResponse.DeliveryOrg">
|
||||
<summary>
|
||||
发货组织
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoResponse.ReceiptCustomer">
|
||||
<summary>
|
||||
客户
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoResponse.Status">
|
||||
<summary>
|
||||
单据状态
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoResponse.Type">
|
||||
<summary>
|
||||
单据类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoResponse.CreateTime">
|
||||
<summary>
|
||||
创建时间(erp那边的创建时间)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.OutStockTask.OutStockTaskInfoResponse.Details">
|
||||
<summary>
|
||||
出库箱信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Core.Dto.OutStockTask.OutStockTaskQueryInfoResponse">
|
||||
<summary>
|
||||
出库单任务列表
|
||||
@@ -5298,6 +5403,36 @@
|
||||
邮件
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Core.Dto.SubscribeNotification.SubscribeNotificationInfoResponse">
|
||||
<summary>
|
||||
订阅通知详情
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.SubscribeNotification.SubscribeNotificationInfoResponse.Id">
|
||||
<summary>
|
||||
主键
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.SubscribeNotification.SubscribeNotificationInfoResponse.CustomerName">
|
||||
<summary>
|
||||
客户名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.SubscribeNotification.SubscribeNotificationInfoResponse.CustomerNumber">
|
||||
<summary>
|
||||
客户编码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.SubscribeNotification.SubscribeNotificationInfoResponse.Telephones">
|
||||
<summary>
|
||||
电话
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.SubscribeNotification.SubscribeNotificationInfoResponse.Emails">
|
||||
<summary>
|
||||
邮件
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Core.Dto.SubscribeNotification.SubscribeNotificationQueryInfoResponse">
|
||||
<summary>
|
||||
订阅通知列表
|
||||
@@ -5368,12 +5503,12 @@
|
||||
操作人
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.SubscribeNotification.SubscribeNotificationQueryRequest.OperateBeginDate">
|
||||
<member name="P:WMS.Web.Core.Dto.SubscribeNotification.SubscribeNotificationQueryRequest.CreateBeginDate">
|
||||
<summary>
|
||||
操作时间 开始
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WMS.Web.Core.Dto.SubscribeNotification.SubscribeNotificationQueryRequest.OperateEndDate">
|
||||
<member name="P:WMS.Web.Core.Dto.SubscribeNotification.SubscribeNotificationQueryRequest.CreateEndDate">
|
||||
<summary>
|
||||
操作时间 结束
|
||||
</summary>
|
||||
|
||||
@@ -3849,6 +3849,13 @@
|
||||
<param name="begin"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Domain.IService.Public.IOutStockTaskService.GetInfo(System.Int32)">
|
||||
<summary>
|
||||
查询出库任务单详情
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Domain.IService.Public.ISingleDataService">
|
||||
<summary>
|
||||
单点数据返回服务接口
|
||||
@@ -4959,6 +4966,13 @@
|
||||
<param name="sourceBillNos"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:WMS.Web.Domain.Services.OutStockTaskService.GetInfo(System.Int32)">
|
||||
<summary>
|
||||
获取出库任务单详情
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:WMS.Web.Domain.Services.Public.ErpBaseDataSync">
|
||||
<summary>
|
||||
同步erp基础数据
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WMS.Web.Core.Dto.OutStockTask
|
||||
{
|
||||
/// <summary>
|
||||
/// 出库任务单对应出库明细
|
||||
/// </summary>
|
||||
public class OutStockTaskInfoDetailsResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string MaterialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// 物料规格型号
|
||||
/// </summary>
|
||||
public string Specifications { get; set; }
|
||||
/// <summary>
|
||||
/// 箱号
|
||||
/// </summary>
|
||||
public string BoxBillNo { get; set; }
|
||||
/// <summary>
|
||||
/// 序列号
|
||||
/// </summary>
|
||||
public string SerialNumbers { get; set; }
|
||||
/// <summary>
|
||||
/// 仓位
|
||||
/// </summary>
|
||||
public string SubStockCode { get; set; }
|
||||
/// <summary>
|
||||
/// 出库数量
|
||||
///</summary>
|
||||
public decimal Qty { get; set; }
|
||||
/// <summary>
|
||||
/// 应出库数量
|
||||
///</summary>
|
||||
public decimal AccruedQty { get; set; }
|
||||
/// <summary>
|
||||
/// 出库方式
|
||||
/// </summary>
|
||||
public string Method { get; set; }
|
||||
/// <summary>
|
||||
/// 出库人
|
||||
/// </summary>
|
||||
public string Creator { get; set; }
|
||||
/// <summary>
|
||||
/// 出库时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; } = DateTime.Now;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WMS.Web.Core.Dto.OutStockTask
|
||||
{
|
||||
/// <summary>
|
||||
/// 出库任务单详情
|
||||
/// </summary>
|
||||
public class OutStockTaskInfoResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 单据编号
|
||||
/// </summary>
|
||||
public string BillNo { get; set; }
|
||||
/// <summary>
|
||||
/// 来源单号
|
||||
/// </summary>
|
||||
public string SourceBillNo { get; set; }
|
||||
/// <summary>
|
||||
/// 发货组织
|
||||
///</summary>
|
||||
public string DeliveryOrg { get; set; }
|
||||
/// <summary>
|
||||
/// 客户
|
||||
///</summary>
|
||||
public string ReceiptCustomer { get; set; }
|
||||
/// <summary>
|
||||
/// 单据状态
|
||||
/// </summary>
|
||||
public string Status { get; set; }
|
||||
/// <summary>
|
||||
/// 单据类型
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间(erp那边的创建时间)
|
||||
///</summary>
|
||||
public string CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 出库箱信息
|
||||
/// </summary>
|
||||
public List<OutStockTaskInfoDetailsResponse> Details { get; set; } = new List<OutStockTaskInfoDetailsResponse>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WMS.Web.Core.Dto.SubscribeNotification
|
||||
{
|
||||
/// <summary>
|
||||
/// 订阅通知详情
|
||||
/// </summary>
|
||||
public class SubscribeNotificationInfoResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 客户名称
|
||||
/// </summary>
|
||||
public string CustomerName { get; set; }
|
||||
/// <summary>
|
||||
/// 客户编码
|
||||
/// </summary>
|
||||
public string CustomerNumber { get; set; }
|
||||
/// <summary>
|
||||
/// 电话
|
||||
/// </summary>
|
||||
public string Telephones { get; set; }
|
||||
/// <summary>
|
||||
/// 邮件
|
||||
/// </summary>
|
||||
public string Emails { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -24,10 +24,10 @@ namespace WMS.Web.Core.Dto.SubscribeNotification
|
||||
/// <summary>
|
||||
/// 操作时间 开始
|
||||
/// </summary>
|
||||
public DateTime? OperateBeginDate { get; set; }
|
||||
public DateTime? CreateBeginDate { get; set; }
|
||||
/// <summary>
|
||||
/// 操作时间 结束
|
||||
/// </summary>
|
||||
public DateTime? OperateEndDate { get; set; }
|
||||
public DateTime? CreateEndDate { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Threading.Tasks;
|
||||
using WMS.Web.Core.Dto;
|
||||
using WMS.Web.Core.Dto.Erp.OutStock;
|
||||
using WMS.Web.Core.Dto.Login;
|
||||
using WMS.Web.Core.Dto.OutStockTask;
|
||||
using WMS.Web.Core.Internal.Results;
|
||||
|
||||
namespace WMS.Web.Domain.IService.Public
|
||||
@@ -56,5 +57,11 @@ namespace WMS.Web.Domain.IService.Public
|
||||
/// <param name="begin"></param>
|
||||
/// <returns></returns>
|
||||
Task<Result> Sync(List<string> billNos = null,DateTime? begin=null);
|
||||
/// <summary>
|
||||
/// 查询出库任务单详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<Result<OutStockTaskInfoResponse>> GetInfo(int id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace WMS.Web.Domain.Infrastructure
|
||||
//编辑
|
||||
Task<OutStock> Edit(OutStock entity, bool isTransaction = true);
|
||||
//根据任务单Id搜索
|
||||
Task<OutStock> GetByTaskId(int taskId);
|
||||
Task<List<OutStock>> GetByTaskId(int taskId);
|
||||
// 获取列表
|
||||
Task<(List<OutStockQueryInfoResponse> list, int total)> GetListAsync(OutStockQueryRequest dto, int companyId = 0);
|
||||
/// 查询实体集合
|
||||
|
||||
@@ -17,6 +17,11 @@ namespace WMS.Web.Domain.Mappers
|
||||
CreateMap<SubscribeNotification, SubscribeNotification>();
|
||||
CreateMap<SaveSubscribeNotificationRequest, SubscribeNotification>();
|
||||
CreateMap<EditSubscribeNotificationRequest, SubscribeNotification>();
|
||||
CreateMap<SubscribeNotification, SubscribeNotificationInfoResponse>()
|
||||
.ForMember(x => x.Emails, ops => ops.MapFrom(x => string.Join(",", x.Emails)))
|
||||
.ForMember(x => x.Telephones, ops => ops.MapFrom(x => string.Join(",", x.Telephones)));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,9 +5,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WMS.Web.Core;
|
||||
using WMS.Web.Core.Dto;
|
||||
using WMS.Web.Core.Dto.Erp.Customer;
|
||||
using WMS.Web.Core.Dto.Erp.Org;
|
||||
using WMS.Web.Core.Dto.Erp.OutStock;
|
||||
using WMS.Web.Core.Dto.Login;
|
||||
using WMS.Web.Core.Dto.OutStockTask;
|
||||
using WMS.Web.Core.Help;
|
||||
using WMS.Web.Core.Internal.Results;
|
||||
using WMS.Web.Domain.Entitys;
|
||||
@@ -32,10 +36,11 @@ namespace WMS.Web.Domain.Services
|
||||
private readonly IOutStockTaskRepositories _outStockTaskRepositories;
|
||||
private readonly IErpOpsSyncDateRepositories _erpOpsSyncDateRepositories;
|
||||
private readonly RedisClientService _redisClientService;
|
||||
private readonly IErpBasicDataExtendService _erpBasicDataExtendService;
|
||||
public OutStockTaskService(IMapper mapper, IErpService erpService, ILoginService loginService,
|
||||
IBasicsRepositories transactionRepositories,
|
||||
IOutStockRepositories outStockRepositories, IOutStockTaskRepositories outStockTaskRepositories, IErpOpsSyncDateRepositories erpOpsSyncDateRepositories,
|
||||
RedisClientService redisClientService)
|
||||
RedisClientService redisClientService, IErpBasicDataExtendService erpBasicDataExtendService)
|
||||
{
|
||||
_mapper = mapper;
|
||||
_erpService = erpService;
|
||||
@@ -45,6 +50,7 @@ namespace WMS.Web.Domain.Services
|
||||
_outStockTaskRepositories = outStockTaskRepositories;
|
||||
_erpOpsSyncDateRepositories = erpOpsSyncDateRepositories;
|
||||
_redisClientService = redisClientService;
|
||||
_erpBasicDataExtendService = erpBasicDataExtendService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -435,6 +441,46 @@ namespace WMS.Web.Domain.Services
|
||||
|
||||
return Result.ReSuccess();
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取出库任务单详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<Result<OutStockTaskInfoResponse>> GetInfo(int id)
|
||||
{
|
||||
var entity = await _outStockTaskRepositories.Get(id);
|
||||
if (entity == null)
|
||||
return Result<OutStockTaskInfoResponse>.ReFailure(ResultCodes.OutStockTaskNoData);
|
||||
//获取任务单对应出库信息
|
||||
var outStockList = await _outStockRepositories.GetByTaskId(id);
|
||||
|
||||
//取组织
|
||||
var org_result = await _erpService.BillQueryForOrg();
|
||||
List<ErpOrgDto> orgs = new List<ErpOrgDto>();
|
||||
if (org_result.IsSuccess)
|
||||
orgs = org_result.Data.ToList();
|
||||
|
||||
//取客户
|
||||
var customer_result = await _erpService.BillQueryForCustomer();
|
||||
List<ErpCustomerDto> customers = new List<ErpCustomerDto>();
|
||||
if (customer_result.IsSuccess)
|
||||
customers = customer_result.Data.ToList();
|
||||
|
||||
OutStockTaskInfoResponse response = new OutStockTaskInfoResponse()
|
||||
{
|
||||
Id = entity.Id,
|
||||
BillNo = entity.BillNo,
|
||||
SourceBillNo = string.Join(",", entity.Details.SelectMany(s => s.ErpDetails).Select(s => s.SourceBillNo)),
|
||||
CreateTime = entity.CreateTime.DateToStringSeconds(),
|
||||
Status = entity.Status.GetRemark(),
|
||||
Type = entity.Type.GetRemark(),
|
||||
DeliveryOrg = _erpBasicDataExtendService.GetOrgName(orgs, entity.DeliveryOrgId),
|
||||
ReceiptCustomer = entity.Type == OutStockType.Sal
|
||||
? _erpBasicDataExtendService.GetCustomerName(customers, entity.ReceiptCustomerId)
|
||||
: _erpBasicDataExtendService.GetOrgName(orgs, entity.DeliveryOrgId),
|
||||
};
|
||||
|
||||
return Result<OutStockTaskInfoResponse>.ReSuccess(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,12 +306,12 @@ namespace WMS.Web.Repositories
|
||||
/// </summary>
|
||||
/// <param name="taskId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<OutStock> GetByTaskId(int taskId)
|
||||
public async Task<List<OutStock>> GetByTaskId(int taskId)
|
||||
{
|
||||
var res = await _context.OutStock
|
||||
.Include(s => s.Details).ThenInclude(s => s.ErpDetails)
|
||||
.Include(s => s.Details).ThenInclude(s => s.BoxsDetails)
|
||||
.FirstOrDefaultAsync(f => taskId == f.TaskId);
|
||||
.Where(f => taskId == f.TaskId).ToListAsync();
|
||||
|
||||
return res.Clone();
|
||||
}
|
||||
|
||||
@@ -184,10 +184,10 @@ namespace WMS.Web.Repositories
|
||||
query = query.Where(w => EF.Functions.Like(w.CustomerName, "%" + dto.CustomerName + "%"));
|
||||
if (!string.IsNullOrEmpty(dto.CustomerNumber))
|
||||
query = query.Where(w => EF.Functions.Like(w.CustomerNumber, "%" + dto.CustomerNumber + "%"));
|
||||
if (dto.OperateBeginDate != null)
|
||||
query = query.Where(w => w.OperateTime >= dto.OperateBeginDate);
|
||||
if (dto.OperateEndDate != null)
|
||||
query = query.Where(w => w.OperateTime <= dto.OperateEndDate);
|
||||
if (dto.CreateBeginDate != null)
|
||||
query = query.Where(w => w.OperateTime >= dto.CreateBeginDate);
|
||||
if (dto.CreateEndDate != null)
|
||||
query = query.Where(w => w.OperateTime <= dto.CreateEndDate);
|
||||
//组装
|
||||
int total = await query.CountAsync();
|
||||
var list = await query.Select(s => new SubscribeNotificationQueryInfoResponse()
|
||||
@@ -196,8 +196,8 @@ namespace WMS.Web.Repositories
|
||||
Id = s.Id,
|
||||
CustomerName = s.CustomerName,
|
||||
CustomerNumber = s.CustomerNumber,
|
||||
Telephones = s.CustomerName,
|
||||
Emails = s.CustomerName,
|
||||
Telephones = string.Join(",", s.Telephones),
|
||||
Emails = string.Join(",", s.Emails),
|
||||
Operate = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.OperateId),
|
||||
OperateTime = s.OperateTime.DateToStringSeconds(),
|
||||
Creator = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, s.CreatorId),
|
||||
|
||||
Reference in New Issue
Block a user