|
|
@ -79,8 +79,6 @@ using System.Collections;
|
|
|
|
using System.Security.Principal;
|
|
|
|
using System.Security.Principal;
|
|
|
|
using Myshipping.Core.Const;
|
|
|
|
using Myshipping.Core.Const;
|
|
|
|
using ICSharpCode.SharpZipLib.BZip2;
|
|
|
|
using ICSharpCode.SharpZipLib.BZip2;
|
|
|
|
using Furion.ClayObject;
|
|
|
|
|
|
|
|
using System.Dynamic;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Myshipping.Application
|
|
|
|
namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -136,7 +134,6 @@ namespace Myshipping.Application
|
|
|
|
private readonly SqlSugarRepository<BookingExtendState> _repextendstate;
|
|
|
|
private readonly SqlSugarRepository<BookingExtendState> _repextendstate;
|
|
|
|
|
|
|
|
|
|
|
|
private readonly IServiceWorkFlowManageService _serviceWorkFlowManageService;
|
|
|
|
private readonly IServiceWorkFlowManageService _serviceWorkFlowManageService;
|
|
|
|
private readonly IDjyUserConfigService _djyUserConfigService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const string CONST_MAPPING_MODULE = "BOOK_OR_CLOSING";
|
|
|
|
const string CONST_MAPPING_MODULE = "BOOK_OR_CLOSING";
|
|
|
@ -160,7 +157,7 @@ namespace Myshipping.Application
|
|
|
|
SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<BookingStatus> repBookingStatus, SqlSugarRepository<BookingEDIExt> bookingEDIExt, SqlSugarRepository<BookingServiceItem> serviceItem,
|
|
|
|
SqlSugarRepository<SysTenant> repTenant, SqlSugarRepository<BookingStatus> repBookingStatus, SqlSugarRepository<BookingEDIExt> bookingEDIExt, SqlSugarRepository<BookingServiceItem> serviceItem,
|
|
|
|
SqlSugarRepository<ParaContractNoInfo> paraContractNoInfoRepository, IHttpContextAccessor httpContextAccessor, IBookingGoodsStatusConfigService GoodsConfig, SqlSugarRepository<DjyWebsiteAccountConfig> djyWebsiteAccountConfigRepository,
|
|
|
|
SqlSugarRepository<ParaContractNoInfo> paraContractNoInfoRepository, IHttpContextAccessor httpContextAccessor, IBookingGoodsStatusConfigService GoodsConfig, SqlSugarRepository<DjyWebsiteAccountConfig> djyWebsiteAccountConfigRepository,
|
|
|
|
ISysOrgService orgService, SqlSugarRepository<BookingLineOpMgrConfig> repLineOpMgrConfig, SqlSugarRepository<SysEmp> repSysEmp, SqlSugarRepository<BookingAutoYardImport> repAutoYard,
|
|
|
|
ISysOrgService orgService, SqlSugarRepository<BookingLineOpMgrConfig> repLineOpMgrConfig, SqlSugarRepository<SysEmp> repSysEmp, SqlSugarRepository<BookingAutoYardImport> repAutoYard,
|
|
|
|
IServiceWorkFlowManageService serviceWorkFlowManageService, IDjyUserConfigService djyUserConfigService)
|
|
|
|
IServiceWorkFlowManageService serviceWorkFlowManageService)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this._logger = logger;
|
|
|
|
this._logger = logger;
|
|
|
|
this._rep = rep;
|
|
|
|
this._rep = rep;
|
|
|
@ -206,7 +203,6 @@ namespace Myshipping.Application
|
|
|
|
this._repAutoYard = repAutoYard;
|
|
|
|
this._repAutoYard = repAutoYard;
|
|
|
|
this._repextendstate = repextendstate;
|
|
|
|
this._repextendstate = repextendstate;
|
|
|
|
_serviceWorkFlowManageService = serviceWorkFlowManageService;
|
|
|
|
_serviceWorkFlowManageService = serviceWorkFlowManageService;
|
|
|
|
_djyUserConfigService = djyUserConfigService;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region 主表和箱信息
|
|
|
|
#region 主表和箱信息
|
|
|
@ -470,23 +466,8 @@ namespace Myshipping.Application
|
|
|
|
var itgoodsStatus = new List<ITGoodsStatusDto>();
|
|
|
|
var itgoodsStatus = new List<ITGoodsStatusDto>();
|
|
|
|
var itconfigs = new List<ITConfigsDto>();
|
|
|
|
var itconfigs = new List<ITConfigsDto>();
|
|
|
|
|
|
|
|
|
|
|
|
//是否展示服务状态列表
|
|
|
|
|
|
|
|
bool isUserShowGoodsStatus = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<ServiceProjectStatusDto> statusList = new List<ServiceProjectStatusDto>();
|
|
|
|
List<ServiceProjectStatusDto> statusList = new List<ServiceProjectStatusDto>();
|
|
|
|
|
|
|
|
|
|
|
|
if (App.Configuration["ServiceStatusOpenAuto"] == "1")
|
|
|
|
if (App.Configuration["ServiceStatusOpenAuto"] == "1")
|
|
|
|
{
|
|
|
|
|
|
|
|
var djyUserCfg = _djyUserConfigService.Multi(new string[] { "booking_list_column" })
|
|
|
|
|
|
|
|
.GetAwaiter().GetResult().FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (djyUserCfg != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//如果不存在goodsStatusList则不获取服务状态详情
|
|
|
|
|
|
|
|
isUserShowGoodsStatus = !Regex.IsMatch(djyUserCfg.ConfigJson, "\\bfield\\b.*?\\bgoodsStatusList\\b");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isUserShowGoodsStatus)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QueryServiceProjectWithStatusBatch batchQuery = new QueryServiceProjectWithStatusBatch
|
|
|
|
QueryServiceProjectWithStatusBatch batchQuery = new QueryServiceProjectWithStatusBatch
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -494,7 +475,6 @@ namespace Myshipping.Application
|
|
|
|
QueryType = TrackingQueryTypeEnum.QUERY_SERVICE_ALL,
|
|
|
|
QueryType = TrackingQueryTypeEnum.QUERY_SERVICE_ALL,
|
|
|
|
TenantId = list.Items.FirstOrDefault().TenantId.Value
|
|
|
|
TenantId = list.Items.FirstOrDefault().TenantId.Value
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var queryRlt = _serviceWorkFlowManageService.GetEnableStatusListByBusinessBatch(batchQuery)
|
|
|
|
var queryRlt = _serviceWorkFlowManageService.GetEnableStatusListByBusinessBatch(batchQuery)
|
|
|
|
.GetAwaiter().GetResult();
|
|
|
|
.GetAwaiter().GetResult();
|
|
|
|
|
|
|
|
|
|
|
@ -503,7 +483,6 @@ namespace Myshipping.Application
|
|
|
|
statusList = JSON.Deserialize<List<ServiceProjectStatusDto>>(JSON.Serialize(queryRlt.ext));
|
|
|
|
statusList = JSON.Deserialize<List<ServiceProjectStatusDto>>(JSON.Serialize(queryRlt.ext));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//货物状态
|
|
|
|
//货物状态
|
|
|
@ -629,8 +608,6 @@ namespace Myshipping.Application
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
if (App.Configuration["ServiceStatusOpenAuto"] == "1")
|
|
|
|
if (App.Configuration["ServiceStatusOpenAuto"] == "1")
|
|
|
|
{
|
|
|
|
|
|
|
|
if (isUserShowGoodsStatus)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var currStatusList = statusList.Where(a => long.Parse(a.BusiId) == item.Id).ToList();
|
|
|
|
var currStatusList = statusList.Where(a => long.Parse(a.BusiId) == item.Id).ToList();
|
|
|
|
|
|
|
|
|
|
|
@ -638,27 +615,18 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (currStatusList.Any(a => a.StatusSKUCode.Equals("YFVGM", StringComparison.OrdinalIgnoreCase) && a.IsYield))
|
|
|
|
if (currStatusList.Any(a => a.StatusSKUCode.Equals("YFVGM", StringComparison.OrdinalIgnoreCase) && a.IsYield))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var currSt = currStatusList.FirstOrDefault(a =>
|
|
|
|
item.IsVGM = currStatusList.FirstOrDefault(a =>
|
|
|
|
a.StatusSKUCode.Equals("YFVGM", StringComparison.OrdinalIgnoreCase) && a.IsYield);
|
|
|
|
a.StatusSKUCode.Equals("YFVGM", StringComparison.OrdinalIgnoreCase) && a.IsYield).ActDate.Value;
|
|
|
|
|
|
|
|
|
|
|
|
if (currSt != null && currSt.ActDate.HasValue)
|
|
|
|
|
|
|
|
item.IsVGM = currSt.ActDate.Value;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (currStatusList.Any(a => a.StatusSKUCode.Equals("YFCD", StringComparison.OrdinalIgnoreCase) && a.IsYield))
|
|
|
|
if (currStatusList.Any(a => a.StatusSKUCode.Equals("YFCD", StringComparison.OrdinalIgnoreCase) && a.IsYield))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var currSt = currStatusList.FirstOrDefault(a =>
|
|
|
|
item.IsCanDan = currStatusList.FirstOrDefault(a =>
|
|
|
|
a.StatusSKUCode.Equals("YFCD", StringComparison.OrdinalIgnoreCase) && a.IsYield);
|
|
|
|
a.StatusSKUCode.Equals("YFCD", StringComparison.OrdinalIgnoreCase) && a.IsYield).ActDate.Value;
|
|
|
|
|
|
|
|
|
|
|
|
if (currSt != null && currSt.ActDate.HasValue)
|
|
|
|
|
|
|
|
item.IsCanDan = currSt.ActDate.Value;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (currStatusList.Any(a => a.StatusSKUCode.Equals("ZZFX", StringComparison.OrdinalIgnoreCase) && a.IsYield))
|
|
|
|
if (currStatusList.Any(a => a.StatusSKUCode.Equals("ZZFX", StringComparison.OrdinalIgnoreCase) && a.IsYield))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var currSt = currStatusList.FirstOrDefault(a =>
|
|
|
|
item.IsZZFX = currStatusList.FirstOrDefault(a =>
|
|
|
|
a.StatusSKUCode.Equals("ZZFX", StringComparison.OrdinalIgnoreCase) && a.IsYield);
|
|
|
|
a.StatusSKUCode.Equals("ZZFX", StringComparison.OrdinalIgnoreCase) && a.IsYield).ActDate.Value;
|
|
|
|
|
|
|
|
|
|
|
|
if (currSt != null && currSt.ActDate.HasValue)
|
|
|
|
|
|
|
|
item.IsZZFX = currSt.ActDate.Value;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
item.GoodsStatusList = currStatusList.OrderBy(a => a.CalcSortNo)
|
|
|
|
item.GoodsStatusList = currStatusList.OrderBy(a => a.CalcSortNo)
|
|
|
@ -679,11 +647,6 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
|
|
|
|
item.GoodsStatusList = new List<GoodsStatusList>();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var itgoods = itgoodsStatus.Where(x => x.CreatedUserId == item.CreatedUserId && x.bookingid == item.Id).OrderBy(x => x.Sort).
|
|
|
|
var itgoods = itgoodsStatus.Where(x => x.CreatedUserId == item.CreatedUserId && x.bookingid == item.Id).OrderBy(x => x.Sort).
|
|
|
|
Select(x => new GoodsStatusList
|
|
|
|
Select(x => new GoodsStatusList
|
|
|
@ -2252,6 +2215,19 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw Oops.Bah("调用运踪接口相关账号未维护!");
|
|
|
|
throw Oops.Bah("调用运踪接口相关账号未维护!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
* 2023-9-8,允许分单的主提单号和主单的主提单号不一致之后,操作填写的分单中的提单号可能是错误的,
|
|
|
|
|
|
|
|
* 导致订阅运踪且后期回推数据,然后又推送东胜,导致分单会在东胜中生成主单信息,
|
|
|
|
|
|
|
|
* 跟和川操作确认,取消分单订阅运踪
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
if (order.ParentId > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_logger.LogError("分单不再订阅运踪");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var url = _cache.GetAllDictData().Result;
|
|
|
|
var url = _cache.GetAllDictData().Result;
|
|
|
|
BillTraceDto billdto = new BillTraceDto();
|
|
|
|
BillTraceDto billdto = new BillTraceDto();
|
|
|
|
List<BillTraceList> billTraceList = new List<BillTraceList>();
|
|
|
|
List<BillTraceList> billTraceList = new List<BillTraceList>();
|
|
|
@ -8454,6 +8430,12 @@ HLCUTA12307DPXJ3 以这票为例 6个柜
|
|
|
|
var order = await _rep.AsQueryable().Filter(null, true).Where(x => ids.Contains(x.Id) && x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToListAsync();
|
|
|
|
var order = await _rep.AsQueryable().Filter(null, true).Where(x => ids.Contains(x.Id) && x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToListAsync();
|
|
|
|
foreach (var item in order)
|
|
|
|
foreach (var item in order)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
//2023-9-8,增加校验,分单不能单独推送东胜,只能随主单推送
|
|
|
|
|
|
|
|
if (item.ParentId > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var dto = item.Adapt<SyncBookingOrderDto>();
|
|
|
|
var dto = item.Adapt<SyncBookingOrderDto>();
|
|
|
|
//箱使
|
|
|
|
//箱使
|
|
|
|
var CtnDayNumlist = await GetGoodsStatusList(item.Id);
|
|
|
|
var CtnDayNumlist = await GetGoodsStatusList(item.Id);
|
|
|
@ -9255,8 +9237,6 @@ HLCUTA12307DPXJ3 以这票为例 6个柜
|
|
|
|
if (statusList != null)
|
|
|
|
if (statusList != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var maxStatus = statusList.Where(a => a.IsYield)
|
|
|
|
var maxStatus = statusList.Where(a => a.IsYield)
|
|
|
|
//.OrderByDescending(a=>a.WFSortNo)
|
|
|
|
|
|
|
|
//.ThenByDescending(a => a.CalcSortNo)
|
|
|
|
|
|
|
|
.OrderByDescending(a => a.SortNo)
|
|
|
|
.OrderByDescending(a => a.SortNo)
|
|
|
|
.FirstOrDefault();
|
|
|
|
.FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
|
@ -9266,7 +9246,7 @@ HLCUTA12307DPXJ3 以这票为例 6个柜
|
|
|
|
.First(a => a.Id == bookingId);
|
|
|
|
.First(a => a.Id == bookingId);
|
|
|
|
|
|
|
|
|
|
|
|
model.BSSTATUSNAME = maxStatus.ShowName;
|
|
|
|
model.BSSTATUSNAME = maxStatus.ShowName;
|
|
|
|
//model.VERSION = IDGen.NextID().ToString().Replace("-", "");
|
|
|
|
model.VERSION = IDGen.NextID().ToString().Replace("-", "");
|
|
|
|
|
|
|
|
|
|
|
|
//更新订舱
|
|
|
|
//更新订舱
|
|
|
|
_rep.AsUpdateable(model)
|
|
|
|
_rep.AsUpdateable(model)
|
|
|
@ -9350,8 +9330,6 @@ HLCUTA12307DPXJ3 以这票为例 6个柜
|
|
|
|
if (statusList != null)
|
|
|
|
if (statusList != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var maxStatus = statusList.Where(a => a.IsYield)
|
|
|
|
var maxStatus = statusList.Where(a => a.IsYield)
|
|
|
|
//.OrderByDescending(a => a.WFSortNo)
|
|
|
|
|
|
|
|
//.ThenByDescending(a => a.CalcSortNo)
|
|
|
|
|
|
|
|
.OrderByDescending(a => a.SortNo)
|
|
|
|
.OrderByDescending(a => a.SortNo)
|
|
|
|
.FirstOrDefault();
|
|
|
|
.FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
|
@ -9367,7 +9345,7 @@ HLCUTA12307DPXJ3 以这票为例 6个柜
|
|
|
|
model.BSSTATUSNAME = string.Empty;
|
|
|
|
model.BSSTATUSNAME = string.Empty;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//model.VERSION = IDGen.NextID().ToString().Replace("-", "");
|
|
|
|
model.VERSION = IDGen.NextID().ToString().Replace("-", "");
|
|
|
|
|
|
|
|
|
|
|
|
//更新订舱
|
|
|
|
//更新订舱
|
|
|
|
_rep.AsUpdateable(model)
|
|
|
|
_rep.AsUpdateable(model)
|
|
|
@ -9414,8 +9392,6 @@ HLCUTA12307DPXJ3 以这票为例 6个柜
|
|
|
|
if (statusList != null)
|
|
|
|
if (statusList != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var maxStatus = statusList.Where(a => a.IsYield)
|
|
|
|
var maxStatus = statusList.Where(a => a.IsYield)
|
|
|
|
//.OrderByDescending(a => a.WFSortNo)
|
|
|
|
|
|
|
|
//.ThenByDescending(a => a.CalcSortNo)
|
|
|
|
|
|
|
|
.OrderByDescending(a => a.SortNo)
|
|
|
|
.OrderByDescending(a => a.SortNo)
|
|
|
|
.FirstOrDefault();
|
|
|
|
.FirstOrDefault();
|
|
|
|
|
|
|
|
|
|
|
|