修改派车

optimize
jianghaiqing 2 years ago
parent ccfe49b2e3
commit 901a86f7ef

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

@ -15274,6 +15274,14 @@
所属租户 所属租户
</summary> </summary>
</member> </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"> <member name="T:Myshipping.Core.Service.SysDataUserMenuService">
<summary> <summary>
用户数据范围 用户数据范围

@ -32,4 +32,11 @@ public interface ISysUserService
void CheckDataScopeByUserId(long userId); void CheckDataScopeByUserId(long userId);
void CheckDataScope(long orgId); void CheckDataScope(long orgId);
Task<List<SysUser>> GetTenantUser(string name,long? tenantId); 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