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