修改派车

optimize
jianghaiqing 2 years ago
parent ccfe49b2e3
commit 901a86f7ef

@ -56,6 +56,7 @@ namespace Myshipping.Application
private readonly SqlSugarRepository<BookingExcelTemplate> _bookingExcelTemplateRepository;
private readonly SqlSugarRepository<SysUser> _sysUserRepository;
private readonly ITaskManageExternalService _taskManageExternalService;
private readonly ISysUserService _sysUserService;
const string PRINT_LIST_TYPE_KEY = "booking_truck_print_list";
const string PRINT_DATASOURCE_KEY = "booking_order";
@ -69,6 +70,7 @@ namespace Myshipping.Application
SqlSugarRepository<DjyUserConfig> djyUserConfigConfig,
SqlSugarRepository<BookingExcelTemplate> bookingExcelTemplateRepository,
SqlSugarRepository<SysUser> sysUserRepository,
ISysUserService sysUserService,
ITaskManageExternalService taskManageExternalService)
{
_cache = cache;
@ -84,6 +86,7 @@ namespace Myshipping.Application
_djyUserConfigConfig = djyUserConfigConfig;
_bookingExcelTemplateRepository = bookingExcelTemplateRepository;
_sysUserRepository = sysUserRepository;
_sysUserService = sysUserService;
}
/// <summary>
@ -259,7 +262,7 @@ namespace Myshipping.Application
try
{
var model = InnerCreateTruckFromBookingOrder(bookingId);
var model = await InnerCreateTruckFromBookingOrder(bookingId);
result.succ = true;
result.ext = model;
@ -445,7 +448,7 @@ namespace Myshipping.Application
}
private BookingTruckShowDto InnerCreateTruckFromBookingOrder(long bookingId)
private async Task<BookingTruckShowDto> InnerCreateTruckFromBookingOrder(long bookingId)
{
BookingTruckShowDto model = null;
@ -466,11 +469,22 @@ namespace Myshipping.Application
model.MBLNo = orderInfo.MBLNO;
model.Vessel = orderInfo.VESSEL;
model.VoyNo = orderInfo.VOYNO;
model.YARDCONTRACT = orderInfo.YARDCONTRACT;
model.YARDCONTRACTTEL = orderInfo.YARDCONTRACTTEL;
model.TruckTime = DateTime.Now;
model.FromName = UserManager.Name;
model.FromTel = UserManager.TEl;
model.FromMail = UserManager.Email;
var userPosInfo = await _sysUserService.QueryUserByPos("", "PCDD");
if(userPosInfo.Count > 0)
{
model.DispatcherId = userPosInfo.FirstOrDefault().SysEmpId;
model.DispatcherName = userPosInfo.FirstOrDefault().SysEmpName;
}
if (orderInfo.KGS.HasValue)
{
//计算总吨数
@ -542,7 +556,7 @@ namespace Myshipping.Application
try
{
var model = InnerCreateTruckFromBookingOrder(bookingId);
var model = await InnerCreateTruckFromBookingOrder(bookingId);
result.succ = true;
result.ext = model;
@ -568,7 +582,7 @@ namespace Myshipping.Application
try
{
var model = InnerCreateTruckFromBookingOrder(bookingId);
var model = await InnerCreateTruckFromBookingOrder(bookingId);
result.succ = true;

@ -15274,6 +15274,14 @@
所属租户
</summary>
</member>
<member name="M:Myshipping.Core.Service.ISysUserService.QueryUserByPos(System.String,System.String)">
<summary>
通过职位获取用户信息
</summary>
<param name="name"></param>
<param name="pos">职位代码 PCDD-调度</param>
<returns>返回用户详情</returns>
</member>
<member name="T:Myshipping.Core.Service.SysDataUserMenuService">
<summary>
用户数据范围

@ -32,4 +32,11 @@ public interface ISysUserService
void CheckDataScopeByUserId(long userId);
void CheckDataScope(long orgId);
Task<List<SysUser>> GetTenantUser(string name,long? tenantId);
/// <summary>
/// 通过职位获取用户信息
/// </summary>
/// <param name="name"></param>
/// <param name="pos">职位代码 PCDD-调度</param>
/// <returns>返回用户详情</returns>
Task<List<EmpPosOutput>> QueryUserByPos(string name, string pos);
}

Loading…
Cancel
Save