|
|
@ -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;
|
|
|
|
|
|
|
|
|
|
|
|