|
|
@ -32,6 +32,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
private readonly ICodeCtnService codeCtnService;
|
|
|
|
private readonly ICodeCtnService codeCtnService;
|
|
|
|
private readonly ICodePortService codePortService;
|
|
|
|
private readonly ICodePortService codePortService;
|
|
|
|
private readonly IMappingPortService mappingPortService;
|
|
|
|
private readonly IMappingPortService mappingPortService;
|
|
|
|
|
|
|
|
private readonly IMappingCarrierService mappingCarrierService;
|
|
|
|
|
|
|
|
|
|
|
|
// 按需构建
|
|
|
|
// 按需构建
|
|
|
|
|
|
|
|
|
|
|
@ -42,11 +43,13 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
IWebHostEnvironment environment,
|
|
|
|
IWebHostEnvironment environment,
|
|
|
|
ICodeCtnService codeCtnService,
|
|
|
|
ICodeCtnService codeCtnService,
|
|
|
|
ICodePortService codePortService,
|
|
|
|
ICodePortService codePortService,
|
|
|
|
IMappingPortService mappingPortService) : base(user, logger, saasDbService, serviceProvider, environment)
|
|
|
|
IMappingPortService mappingPortService,
|
|
|
|
|
|
|
|
IMappingCarrierService mappingCarrierService) : base(user, logger, saasDbService, serviceProvider, environment)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.codeCtnService = codeCtnService;
|
|
|
|
this.codeCtnService = codeCtnService;
|
|
|
|
this.codePortService = codePortService;
|
|
|
|
this.codePortService = codePortService;
|
|
|
|
this.mappingPortService = mappingPortService;
|
|
|
|
this.mappingPortService = mappingPortService;
|
|
|
|
|
|
|
|
this.mappingCarrierService = mappingCarrierService;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#region 对工作流提供的接口
|
|
|
|
#region 对工作流提供的接口
|
|
|
@ -285,7 +288,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
MBL_NO = info.Main.MBlNo,
|
|
|
|
MBL_NO = info.Main.MBlNo,
|
|
|
|
TASK_TYPE = info.Main.TaskType.ToString(),
|
|
|
|
TASK_TYPE = info.Main.TaskType.ToString(),
|
|
|
|
//TASK_BASE_TYPE = info.Main.TaskType.ToString(),
|
|
|
|
//TASK_BASE_TYPE = info.Main.TaskType.ToString(),
|
|
|
|
CARRIER_ID = info.Main.CarrierId?.Trim(),
|
|
|
|
//CARRIER_ID = info.Main.CarrierId?.Trim(),
|
|
|
|
//IS_PUBLIC = string.IsNullOrWhiteSpace(info.Main.TaskUserId) ? 1 : 0,
|
|
|
|
//IS_PUBLIC = string.IsNullOrWhiteSpace(info.Main.TaskUserId) ? 1 : 0,
|
|
|
|
IS_PUBLIC = 1,
|
|
|
|
IS_PUBLIC = 1,
|
|
|
|
BOOK_ORDER_NO = info.Main.BookingOrderNo,
|
|
|
|
BOOK_ORDER_NO = info.Main.BookingOrderNo,
|
|
|
@ -311,6 +314,27 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
taskInfo.TASK_TYPE_NAME = ((TaskBaseTypeEnum)taskTypeTemp).EnumDescription();
|
|
|
|
taskInfo.TASK_TYPE_NAME = ((TaskBaseTypeEnum)taskTypeTemp).EnumDescription();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 如果船公司主键不为空,则直接保存船公司主键、Code、Name等信息
|
|
|
|
|
|
|
|
if (info.Main.CarrierPK != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
taskInfo.CARRIER_ID = info.Main.CarrierPK;
|
|
|
|
|
|
|
|
taskInfo.CARRIER_CODE = info.Main.CarrierId;
|
|
|
|
|
|
|
|
taskInfo.CARRIER_NAME = info.Main.CarrierName;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// 如果船公司主键为空,但是Code不为空,则通过映射查出船公司信息并保存
|
|
|
|
|
|
|
|
else if (!string.IsNullOrEmpty(info.Main.CarrierId))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
// 船公司转换
|
|
|
|
|
|
|
|
var allMapCarrierList = (await mappingCarrierService.GetAllList())?.Data ?? new List<MappingCarrierRes>();
|
|
|
|
|
|
|
|
MappingCarrierRes? carrierInfo = allMapCarrierList.Where(t => t.MapCode.Equals(info.Main.CarrierId, StringComparison.OrdinalIgnoreCase) && t.Module == MappingModuleConst.CONST_MAPPING_CARRIER_MODULE).FirstOrDefault();
|
|
|
|
|
|
|
|
if (carrierInfo != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
taskInfo.CARRIER_ID = carrierInfo.LinkId;
|
|
|
|
|
|
|
|
taskInfo.CARRIER_CODE = carrierInfo.MapCode;
|
|
|
|
|
|
|
|
taskInfo.CARRIER_NAME = carrierInfo.MapName;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 人员字段说明:
|
|
|
|
// 人员字段说明:
|
|
|
|
// TaskBaseInfo.CreateBy 创建人:谁创建的,只有一个人(可能是某个租户的管理员,因为任务可以由外部(邮件)创建,无法为每个人创建接口授权信息)
|
|
|
|
// TaskBaseInfo.CreateBy 创建人:谁创建的,只有一个人(可能是某个租户的管理员,因为任务可以由外部(邮件)创建,无法为每个人创建接口授权信息)
|
|
|
|
// TaskBaseInfo.TASK_REQ_USERID 制单人:只有一个人,使用任务创建报文中传入的TaskUserId
|
|
|
|
// TaskBaseInfo.TASK_REQ_USERID 制单人:只有一个人,使用任务创建报文中传入的TaskUserId
|
|
|
@ -2126,6 +2150,8 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
|
|
|
|
|
|
|
|
var tenantDb = saasDbService.GetBizDbScopeById(user.TenantId);
|
|
|
|
var tenantDb = saasDbService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//await MatchTask();
|
|
|
|
|
|
|
|
|
|
|
|
var userId = long.Parse(user.UserId);
|
|
|
|
var userId = long.Parse(user.UserId);
|
|
|
|
//任务列表分组统计
|
|
|
|
//任务列表分组统计
|
|
|
|
var groupList = await tenantDb.Queryable<TaskBaseInfo>()
|
|
|
|
var groupList = await tenantDb.Queryable<TaskBaseInfo>()
|
|
|
|