|
|
|
@ -257,6 +257,48 @@ namespace Myshipping.Application
|
|
|
|
|
return await Get(entity.Id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取当前登陆人的寄件信息(最后一次寄件信息或登陆人的个人信息)
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("GetSenderInfo")]
|
|
|
|
|
public async Task<object> GetSenderInfo()
|
|
|
|
|
{
|
|
|
|
|
var order = await _orderRep.AsQueryable()
|
|
|
|
|
.Where(o => o.CreatedUserId == UserManager.UserId)
|
|
|
|
|
.OrderBy(o => o.Id, OrderByType.Desc)
|
|
|
|
|
.FirstAsync();
|
|
|
|
|
|
|
|
|
|
// 如果当前登陆人没有创建过快递订单,则只返回当前登陆人所在公司;否则返回最新一条快递单的寄件人信息
|
|
|
|
|
if (order != null)
|
|
|
|
|
{
|
|
|
|
|
return new
|
|
|
|
|
{
|
|
|
|
|
expressDeliveryAddressDto = new ExpressDeliveryAddressDto()
|
|
|
|
|
{
|
|
|
|
|
Address = order.FJAddress,
|
|
|
|
|
City = order.FJCity,
|
|
|
|
|
Company = order.FJCompany,
|
|
|
|
|
People = order.FJPeople,
|
|
|
|
|
Province = order.FJProvince,
|
|
|
|
|
ProvinceId = order.FJProvinceId,
|
|
|
|
|
Tel = order.FJTel,
|
|
|
|
|
Type = 2
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return new
|
|
|
|
|
{
|
|
|
|
|
expressDeliveryAddressDto = new ExpressDeliveryAddressDto()
|
|
|
|
|
{
|
|
|
|
|
Company = UserManager.TENANT_NAME,
|
|
|
|
|
People = UserManager.Name,
|
|
|
|
|
Type = 2
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除单据
|
|
|
|
|