|
|
@ -1716,441 +1716,456 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
//throw new ArgumentException("TaskCategory");
|
|
|
|
//throw new ArgumentException("TaskCategory");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var userId = long.Parse(user.UserId);
|
|
|
|
var userId = long.Parse(user.UserId);
|
|
|
|
DataResult<List<dynamic>> result;
|
|
|
|
DataResult<List<dynamic>> result = new();
|
|
|
|
switch (taskType)
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case TaskBaseTypeEnum.BC:
|
|
|
|
switch (taskType)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>()
|
|
|
|
case TaskBaseTypeEnum.BC:
|
|
|
|
.LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
{
|
|
|
|
.LeftJoin<TaskBCInfo>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>()
|
|
|
|
|
|
|
|
.LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
|
|
|
|
.LeftJoin<TaskBCInfo>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
|
|
|
|
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
|
|
|
|
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Id = t.Id.SelectAll(),
|
|
|
|
|
|
|
|
bc.BUSI_TYPE,
|
|
|
|
|
|
|
|
bc.SHIPPER,
|
|
|
|
|
|
|
|
bc.CONSIGNEE,
|
|
|
|
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,
|
|
|
|
|
|
|
|
bc.AUTO_SEND_USER,
|
|
|
|
|
|
|
|
bc.PROCESS_STATUS,
|
|
|
|
|
|
|
|
bc.PROCESS_RESULT,
|
|
|
|
|
|
|
|
bc.PROCESS_DATE,
|
|
|
|
|
|
|
|
bc.PRICE_CALCULATION_DATE
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var sql = queryable.ToSqlString();
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.SI_FEEDBACK:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Id = t.Id.SelectAll(),
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
TASK_USER_STATUS = a.Status,
|
|
|
|
.LeftJoin<TaskSiSubmitted>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
TASK_USER_STATUS_NAME = a.StatusName,
|
|
|
|
|
|
|
|
TASK_USER_STATUS_TIME = a.StatusTime,
|
|
|
|
|
|
|
|
bc.BUSI_TYPE,
|
|
|
|
|
|
|
|
bc.SHIPPER,
|
|
|
|
|
|
|
|
bc.CONSIGNEE,
|
|
|
|
|
|
|
|
bc.NOTIFYPARTY,
|
|
|
|
|
|
|
|
bc.BC_MODIFY_TIMES,
|
|
|
|
|
|
|
|
bc.BC_MODIFY_DATE,
|
|
|
|
|
|
|
|
//bc.MBL_NO,
|
|
|
|
|
|
|
|
bc.VESSEL,
|
|
|
|
|
|
|
|
bc.VOYNO,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
bc.PLACERECEIPT,
|
|
|
|
|
|
|
|
bc.PORTLOAD,
|
|
|
|
|
|
|
|
bc.CLOSING_DATE,
|
|
|
|
|
|
|
|
bc.VGM_CUT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_FREE_DAYS,
|
|
|
|
|
|
|
|
bc.SI_CUT_DATE,
|
|
|
|
|
|
|
|
bc.MANIFEST_CUT_DATE,
|
|
|
|
|
|
|
|
bc.MDGF_CUT_DATE,
|
|
|
|
|
|
|
|
bc.TRANSFER_PORT_1,
|
|
|
|
|
|
|
|
bc.TRANSFER_PORT_2,
|
|
|
|
|
|
|
|
bc.SECOND_VESSEL,
|
|
|
|
|
|
|
|
bc.SECOND_VOYNO,
|
|
|
|
|
|
|
|
bc.SECOND_ETD,
|
|
|
|
|
|
|
|
bc.SECOND_ETA,
|
|
|
|
|
|
|
|
//bc.STATUS,
|
|
|
|
|
|
|
|
bc.FILE_MD5,
|
|
|
|
|
|
|
|
bc.LAST_TOBOOKING_DATE,
|
|
|
|
|
|
|
|
bc.FROM_EMAIL,
|
|
|
|
|
|
|
|
bc.RECV_EMAIL,
|
|
|
|
|
|
|
|
bc.BOOKING_ORDER_ID,
|
|
|
|
|
|
|
|
bc.BOOKING_SLOT_ID,
|
|
|
|
|
|
|
|
bc.BOOKING_COMFIRM_DATE,
|
|
|
|
|
|
|
|
bc.BATCH_NO,
|
|
|
|
|
|
|
|
bc.CUSTOM_SI_CUT_DATE,
|
|
|
|
|
|
|
|
bc.IS_SET_AUTO_EMAIL,
|
|
|
|
|
|
|
|
bc.IS_SEND_EMAIL,
|
|
|
|
|
|
|
|
bc.DIFF_NUM,
|
|
|
|
|
|
|
|
bc.AUTO_SEND_USER,
|
|
|
|
|
|
|
|
bc.PROCESS_STATUS,
|
|
|
|
|
|
|
|
bc.PROCESS_RESULT,
|
|
|
|
|
|
|
|
bc.PROCESS_DATE,
|
|
|
|
|
|
|
|
bc.PRICE_CALCULATION_DATE
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var sql = queryable.ToSqlString();
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.SI_FEEDBACK:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
|
|
|
|
.LeftJoin<TaskSiSubmitted>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
|
|
|
|
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
//bc.MBL_NO,
|
|
|
|
|
|
|
|
bc.TAKE_ISSUETYPE_NAME,
|
|
|
|
|
|
|
|
bc.ISSUETYPE,
|
|
|
|
|
|
|
|
bc.NOTICE_DATE,
|
|
|
|
|
|
|
|
bc.BOOKING_ID,
|
|
|
|
|
|
|
|
bc.SUBMITTED_DATE,
|
|
|
|
|
|
|
|
bc.BILLOF_NUM,
|
|
|
|
|
|
|
|
bc.RELEASE_INSTRUCTION,
|
|
|
|
|
|
|
|
bc.SI_SUBTYPE,
|
|
|
|
|
|
|
|
bc.SHIPPER,
|
|
|
|
|
|
|
|
bc.CONSIGNEE,
|
|
|
|
|
|
|
|
bc.NOTIFYPARTY,
|
|
|
|
|
|
|
|
bc.NOTIFYPARTY2,
|
|
|
|
|
|
|
|
bc.TRANSPORT_RECEIVER,
|
|
|
|
|
|
|
|
bc.MARKS,
|
|
|
|
|
|
|
|
bc.HSCODE,
|
|
|
|
|
|
|
|
bc.DESCRIPTION,
|
|
|
|
|
|
|
|
bc.PKGS,
|
|
|
|
|
|
|
|
bc.KINDPKGS,
|
|
|
|
|
|
|
|
bc.KGS,
|
|
|
|
|
|
|
|
bc.CBM,
|
|
|
|
|
|
|
|
bc.VESSEL,
|
|
|
|
|
|
|
|
bc.VOYNO,
|
|
|
|
|
|
|
|
bc.COMMODITY,
|
|
|
|
|
|
|
|
bc.PLACERECEIPTID,
|
|
|
|
|
|
|
|
bc.PLACERECEIPT,
|
|
|
|
|
|
|
|
bc.PORTLOADID,
|
|
|
|
|
|
|
|
bc.PORTLOAD,
|
|
|
|
|
|
|
|
bc.PORTDISCHARGEID,
|
|
|
|
|
|
|
|
bc.PORTDISCHARGE,
|
|
|
|
|
|
|
|
bc.PLACEDELIVERYID,
|
|
|
|
|
|
|
|
bc.PLACEDELIVERY,
|
|
|
|
|
|
|
|
bc.PROCESS_STATUS,
|
|
|
|
|
|
|
|
bc.IS_SET_AUTO_UPD_BOOKING,
|
|
|
|
|
|
|
|
bc.PROCESS_RESULT,
|
|
|
|
|
|
|
|
bc.PROCESS_DATE,
|
|
|
|
|
|
|
|
bc.DIFF_NUM,
|
|
|
|
|
|
|
|
bc.IS_UPDATE_BOOKING,
|
|
|
|
|
|
|
|
bc.UPDATE_BOOKING_DATE
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.INVOICE_BILL_MAIL:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
TASK_USER_STATUS = a.Status,
|
|
|
|
.LeftJoin<TaskPerBillBase>((t, a, bc) => t.Id == bc.TASK_PKID);
|
|
|
|
TASK_USER_STATUS_NAME = a.StatusName,
|
|
|
|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STATUS,
|
|
|
|
|
|
|
|
bc.IS_SET_AUTO_UPD_BOOKING,
|
|
|
|
|
|
|
|
bc.PROCESS_RESULT,
|
|
|
|
|
|
|
|
bc.PROCESS_DATE,
|
|
|
|
|
|
|
|
bc.DIFF_NUM,
|
|
|
|
|
|
|
|
bc.IS_UPDATE_BOOKING,
|
|
|
|
|
|
|
|
bc.UPDATE_BOOKING_DATE
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.INVOICE_BILL_MAIL:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
|
|
|
|
.LeftJoin<TaskPerBillBase>((t, a, bc) => t.Id == bc.TASK_PKID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
|
|
|
|
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
|
|
|
|
bc.TASK_PKID,
|
|
|
|
|
|
|
|
//bc.MBL_NO,
|
|
|
|
|
|
|
|
bc.INVOICE_NO,
|
|
|
|
|
|
|
|
bc.CANCEL_NO,
|
|
|
|
|
|
|
|
bc.TOTAL_AMOUNT,
|
|
|
|
|
|
|
|
bc.IS_DONGSH_RECV,
|
|
|
|
|
|
|
|
bc.IS_DONGSH_RESULT,
|
|
|
|
|
|
|
|
bc.DONGSH_RECV_TIME,
|
|
|
|
|
|
|
|
bc.DONGSH_RESULT_TIME,
|
|
|
|
|
|
|
|
bc.DONGSH_RECV_REASON
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.TRUCK_DISPATCH:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
TASK_USER_STATUS = a.Status,
|
|
|
|
.LeftJoin<TaskTruck>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
TASK_USER_STATUS_NAME = a.StatusName,
|
|
|
|
|
|
|
|
TASK_USER_STATUS_TIME = a.StatusTime,
|
|
|
|
|
|
|
|
bc.TASK_PKID,
|
|
|
|
|
|
|
|
//bc.MBL_NO,
|
|
|
|
|
|
|
|
bc.INVOICE_NO,
|
|
|
|
|
|
|
|
bc.CANCEL_NO,
|
|
|
|
|
|
|
|
bc.TOTAL_AMOUNT,
|
|
|
|
|
|
|
|
bc.IS_DONGSH_RECV,
|
|
|
|
|
|
|
|
bc.IS_DONGSH_RESULT,
|
|
|
|
|
|
|
|
bc.DONGSH_RECV_TIME,
|
|
|
|
|
|
|
|
bc.DONGSH_RESULT_TIME,
|
|
|
|
|
|
|
|
bc.DONGSH_RECV_REASON
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.TRUCK_DISPATCH:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
|
|
|
|
.LeftJoin<TaskTruck>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
|
|
|
|
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.BookingTruckId,
|
|
|
|
|
|
|
|
bc.BookingId,
|
|
|
|
|
|
|
|
bc.TruckId,
|
|
|
|
|
|
|
|
bc.TruckCode,
|
|
|
|
|
|
|
|
bc.TruckName,
|
|
|
|
|
|
|
|
bc.ToName,
|
|
|
|
|
|
|
|
bc.Attn,
|
|
|
|
|
|
|
|
bc.AttnTel,
|
|
|
|
|
|
|
|
bc.AttnMail,
|
|
|
|
|
|
|
|
bc.AttnFax,
|
|
|
|
|
|
|
|
bc.FromName,
|
|
|
|
|
|
|
|
bc.FromTel,
|
|
|
|
|
|
|
|
bc.FromMail,
|
|
|
|
|
|
|
|
bc.FromMobile,
|
|
|
|
|
|
|
|
bc.FromFax,
|
|
|
|
|
|
|
|
bc.KGS,
|
|
|
|
|
|
|
|
bc.Fee,
|
|
|
|
|
|
|
|
bc.PayMethod,
|
|
|
|
|
|
|
|
bc.PayMethodName,
|
|
|
|
|
|
|
|
bc.TruckTime,
|
|
|
|
|
|
|
|
bc.YARDID,
|
|
|
|
|
|
|
|
bc.YARD,
|
|
|
|
|
|
|
|
bc.YARDCONTRACT,
|
|
|
|
|
|
|
|
bc.YARDCONTRACTTEL,
|
|
|
|
|
|
|
|
bc.FactoryId,
|
|
|
|
|
|
|
|
bc.FactoryCode,
|
|
|
|
|
|
|
|
bc.FactoryName,
|
|
|
|
|
|
|
|
bc.FactoryContact,
|
|
|
|
|
|
|
|
bc.FactoryTel,
|
|
|
|
|
|
|
|
bc.ReturnTime,
|
|
|
|
|
|
|
|
bc.InYardID,
|
|
|
|
|
|
|
|
bc.InYard,
|
|
|
|
|
|
|
|
bc.InYardContact,
|
|
|
|
|
|
|
|
bc.InYardContractTel,
|
|
|
|
|
|
|
|
//bc.NeedArriveTime,
|
|
|
|
|
|
|
|
bc.ClosingTime,
|
|
|
|
|
|
|
|
bc.PickUpTime,
|
|
|
|
|
|
|
|
bc.IsGuaJi,
|
|
|
|
|
|
|
|
//bc.Status,
|
|
|
|
|
|
|
|
bc.Attention,
|
|
|
|
|
|
|
|
bc.Remark,
|
|
|
|
|
|
|
|
bc.DispatcherId,
|
|
|
|
|
|
|
|
bc.DispatcherName,
|
|
|
|
|
|
|
|
bc.TruckFlowNo,
|
|
|
|
|
|
|
|
bc.TaskNo,
|
|
|
|
|
|
|
|
bc.Vessel,
|
|
|
|
|
|
|
|
bc.VoyNo,
|
|
|
|
|
|
|
|
bc.MBLNo,
|
|
|
|
|
|
|
|
bc.CntrTotal,
|
|
|
|
|
|
|
|
bc.FactoryAddr
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.CUT_MODIFY:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
TASK_USER_STATUS = a.Status,
|
|
|
|
.LeftJoin<TaskCutDateChangeInfo>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
TASK_USER_STATUS_NAME = a.StatusName,
|
|
|
|
|
|
|
|
TASK_USER_STATUS_TIME = a.StatusTime,
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.BookingTruckId,
|
|
|
|
|
|
|
|
bc.BookingId,
|
|
|
|
|
|
|
|
bc.TruckId,
|
|
|
|
|
|
|
|
bc.TruckCode,
|
|
|
|
|
|
|
|
bc.TruckName,
|
|
|
|
|
|
|
|
bc.ToName,
|
|
|
|
|
|
|
|
bc.Attn,
|
|
|
|
|
|
|
|
bc.AttnTel,
|
|
|
|
|
|
|
|
bc.AttnMail,
|
|
|
|
|
|
|
|
bc.AttnFax,
|
|
|
|
|
|
|
|
bc.FromName,
|
|
|
|
|
|
|
|
bc.FromTel,
|
|
|
|
|
|
|
|
bc.FromMail,
|
|
|
|
|
|
|
|
bc.FromMobile,
|
|
|
|
|
|
|
|
bc.FromFax,
|
|
|
|
|
|
|
|
bc.KGS,
|
|
|
|
|
|
|
|
bc.Fee,
|
|
|
|
|
|
|
|
bc.PayMethod,
|
|
|
|
|
|
|
|
bc.PayMethodName,
|
|
|
|
|
|
|
|
bc.TruckTime,
|
|
|
|
|
|
|
|
bc.YARDID,
|
|
|
|
|
|
|
|
bc.YARD,
|
|
|
|
|
|
|
|
bc.YARDCONTRACT,
|
|
|
|
|
|
|
|
bc.YARDCONTRACTTEL,
|
|
|
|
|
|
|
|
bc.FactoryId,
|
|
|
|
|
|
|
|
bc.FactoryCode,
|
|
|
|
|
|
|
|
bc.FactoryName,
|
|
|
|
|
|
|
|
bc.FactoryContact,
|
|
|
|
|
|
|
|
bc.FactoryTel,
|
|
|
|
|
|
|
|
bc.ReturnTime,
|
|
|
|
|
|
|
|
bc.InYardID,
|
|
|
|
|
|
|
|
bc.InYard,
|
|
|
|
|
|
|
|
bc.InYardContact,
|
|
|
|
|
|
|
|
bc.InYardContractTel,
|
|
|
|
|
|
|
|
//bc.NeedArriveTime,
|
|
|
|
|
|
|
|
bc.ClosingTime,
|
|
|
|
|
|
|
|
bc.PickUpTime,
|
|
|
|
|
|
|
|
bc.IsGuaJi,
|
|
|
|
|
|
|
|
//bc.Status,
|
|
|
|
|
|
|
|
bc.Attention,
|
|
|
|
|
|
|
|
bc.Remark,
|
|
|
|
|
|
|
|
bc.DispatcherId,
|
|
|
|
|
|
|
|
bc.DispatcherName,
|
|
|
|
|
|
|
|
bc.TruckFlowNo,
|
|
|
|
|
|
|
|
bc.TaskNo,
|
|
|
|
|
|
|
|
bc.Vessel,
|
|
|
|
|
|
|
|
bc.VoyNo,
|
|
|
|
|
|
|
|
bc.MBLNo,
|
|
|
|
|
|
|
|
bc.CntrTotal,
|
|
|
|
|
|
|
|
bc.FactoryAddr
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.CUT_MODIFY:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
|
|
|
|
.LeftJoin<TaskCutDateChangeInfo>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
|
|
|
|
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
bc.VESSEL,
|
|
|
|
|
|
|
|
bc.VOYNO,
|
|
|
|
|
|
|
|
bc.NOTICE_DATE
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.ROLLING_NOMINATION:
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.TRANSFER_NOMINATION:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
TASK_USER_STATUS = a.Status,
|
|
|
|
.LeftJoin<TaskRollingNomination>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
TASK_USER_STATUS_NAME = a.StatusName,
|
|
|
|
|
|
|
|
TASK_USER_STATUS_TIME = a.StatusTime,
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
bc.VESSEL,
|
|
|
|
|
|
|
|
bc.VOYNO,
|
|
|
|
|
|
|
|
bc.NOTICE_DATE
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.ROLLING_NOMINATION:
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.TRANSFER_NOMINATION:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
|
|
|
|
.LeftJoin<TaskRollingNomination>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
|
|
|
|
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.PLAN_TYPE,
|
|
|
|
|
|
|
|
bc.BATCH_NO,
|
|
|
|
|
|
|
|
bc.CARRIERID,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
bc.CONFIRM_DEAD_LINE,
|
|
|
|
|
|
|
|
bc.READ_CREATE_TIME,
|
|
|
|
|
|
|
|
bc.ROLL_DOUBLE_REMARK,
|
|
|
|
|
|
|
|
bc.PLAN_TXT,
|
|
|
|
|
|
|
|
//bc.REMARK,
|
|
|
|
|
|
|
|
bc.TASK_BATCH_TOTAL,
|
|
|
|
|
|
|
|
bc.TASK_BATCH_PER_TOTAL
|
|
|
|
|
|
|
|
}).Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.DRAFT:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
TASK_USER_STATUS = a.Status,
|
|
|
|
.LeftJoin<TaskDraftInfo>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
TASK_USER_STATUS_NAME = a.StatusName,
|
|
|
|
|
|
|
|
TASK_USER_STATUS_TIME = a.StatusTime,
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.PLAN_TYPE,
|
|
|
|
|
|
|
|
bc.BATCH_NO,
|
|
|
|
|
|
|
|
bc.CARRIERID,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
bc.CONFIRM_DEAD_LINE,
|
|
|
|
|
|
|
|
bc.READ_CREATE_TIME,
|
|
|
|
|
|
|
|
bc.ROLL_DOUBLE_REMARK,
|
|
|
|
|
|
|
|
bc.PLAN_TXT,
|
|
|
|
|
|
|
|
//bc.REMARK,
|
|
|
|
|
|
|
|
bc.TASK_BATCH_TOTAL,
|
|
|
|
|
|
|
|
bc.TASK_BATCH_PER_TOTAL
|
|
|
|
|
|
|
|
}).Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.DRAFT:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
|
|
|
|
.LeftJoin<TaskDraftInfo>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
|
|
|
|
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
//bc.MBL_NO,
|
|
|
|
|
|
|
|
bc.BOOKING_ID,
|
|
|
|
|
|
|
|
bc.IS_CHANGE,
|
|
|
|
|
|
|
|
bc.IS_EMAIL_SEND,
|
|
|
|
|
|
|
|
bc.SEND_EMAIL_DATE,
|
|
|
|
|
|
|
|
bc.NOTICE_DATE,
|
|
|
|
|
|
|
|
}).Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.POD_DISCHARGE_FULL:
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.POD_GATEOUT_FULL:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
TASK_USER_STATUS = a.Status,
|
|
|
|
.LeftJoin<TaskPodDischargeGateoutFull>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
TASK_USER_STATUS_NAME = a.StatusName,
|
|
|
|
|
|
|
|
TASK_USER_STATUS_TIME = a.StatusTime,
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
//bc.MBL_NO,
|
|
|
|
|
|
|
|
bc.BOOKING_ID,
|
|
|
|
|
|
|
|
bc.IS_CHANGE,
|
|
|
|
|
|
|
|
bc.IS_EMAIL_SEND,
|
|
|
|
|
|
|
|
bc.SEND_EMAIL_DATE,
|
|
|
|
|
|
|
|
bc.NOTICE_DATE,
|
|
|
|
|
|
|
|
}).Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.POD_DISCHARGE_FULL:
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.POD_GATEOUT_FULL:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
|
|
|
|
.LeftJoin<TaskPodDischargeGateoutFull>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
|
|
|
|
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
bc.NOTICE_TYPE,
|
|
|
|
|
|
|
|
bc.NOTICE_TYPE_NAME,
|
|
|
|
|
|
|
|
//bc.MBL_NO,
|
|
|
|
|
|
|
|
bc.NOTICE_DATE
|
|
|
|
|
|
|
|
}).Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.CAUTION_NOTICE:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
TASK_USER_STATUS = a.Status,
|
|
|
|
.LeftJoin<TaskCautionNotice>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
TASK_USER_STATUS_NAME = a.StatusName,
|
|
|
|
|
|
|
|
TASK_USER_STATUS_TIME = a.StatusTime,
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
bc.NOTICE_TYPE,
|
|
|
|
|
|
|
|
bc.NOTICE_TYPE_NAME,
|
|
|
|
|
|
|
|
//bc.MBL_NO,
|
|
|
|
|
|
|
|
bc.NOTICE_DATE
|
|
|
|
|
|
|
|
}).Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.CAUTION_NOTICE:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
|
|
|
|
.LeftJoin<TaskCautionNotice>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
|
|
|
|
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.SOURCE_SYSTEM,
|
|
|
|
|
|
|
|
bc.SOURCE_BUSI_TYPE,
|
|
|
|
|
|
|
|
bc.SOURCE_BUSI_TYPENAME,
|
|
|
|
|
|
|
|
bc.NOTIFY_CONTENT,
|
|
|
|
|
|
|
|
//bc.MBL_NO,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
bc.CAUTION_NOTICE_TYPE,
|
|
|
|
|
|
|
|
bc.IS_WEEK_DIFF,
|
|
|
|
|
|
|
|
bc.IS_PRICE_DATE_DIFF,
|
|
|
|
|
|
|
|
bc.IS_TRANSFER,
|
|
|
|
|
|
|
|
bc.IS_VESSEL_CHANGE,
|
|
|
|
|
|
|
|
bc.IS_CUT_DATE_ADVANCED,
|
|
|
|
|
|
|
|
bc.BOOKING_ID,
|
|
|
|
|
|
|
|
bc.BOOKING_SLOT_ID,
|
|
|
|
|
|
|
|
bc.SOURCE_TASK_ID,
|
|
|
|
|
|
|
|
bc.OLD_VAL,
|
|
|
|
|
|
|
|
bc.NEW_VAL,
|
|
|
|
|
|
|
|
}).Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.ROUTE_CUT_CHANGE:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
TASK_USER_STATUS = a.Status,
|
|
|
|
.LeftJoin<TaskRouteChangeAdvisory>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
TASK_USER_STATUS_NAME = a.StatusName,
|
|
|
|
|
|
|
|
TASK_USER_STATUS_TIME = a.StatusTime,
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.SOURCE_SYSTEM,
|
|
|
|
|
|
|
|
bc.SOURCE_BUSI_TYPE,
|
|
|
|
|
|
|
|
bc.SOURCE_BUSI_TYPENAME,
|
|
|
|
|
|
|
|
bc.NOTIFY_CONTENT,
|
|
|
|
|
|
|
|
//bc.MBL_NO,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
bc.CAUTION_NOTICE_TYPE,
|
|
|
|
|
|
|
|
bc.IS_WEEK_DIFF,
|
|
|
|
|
|
|
|
bc.IS_PRICE_DATE_DIFF,
|
|
|
|
|
|
|
|
bc.IS_TRANSFER,
|
|
|
|
|
|
|
|
bc.IS_VESSEL_CHANGE,
|
|
|
|
|
|
|
|
bc.IS_CUT_DATE_ADVANCED,
|
|
|
|
|
|
|
|
bc.BOOKING_ID,
|
|
|
|
|
|
|
|
bc.BOOKING_SLOT_ID,
|
|
|
|
|
|
|
|
bc.SOURCE_TASK_ID,
|
|
|
|
|
|
|
|
bc.OLD_VAL,
|
|
|
|
|
|
|
|
bc.NEW_VAL,
|
|
|
|
|
|
|
|
}).Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
case TaskBaseTypeEnum.ROUTE_CUT_CHANGE:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
|
|
|
|
.LeftJoin<TaskRouteChangeAdvisory>((t, a, bc) => t.Id == bc.TASK_ID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
|
|
|
|
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
result = await queryable.Select<dynamic>((t, a, bc) => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.VESSEL,
|
|
|
|
|
|
|
|
bc.VOYNO,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
bc.READ_PORTLOAD,
|
|
|
|
|
|
|
|
bc.ORIG_ETD,
|
|
|
|
|
|
|
|
bc.MDGF_CUT_DATE,
|
|
|
|
|
|
|
|
bc.ETA,
|
|
|
|
|
|
|
|
//bc.ETD,
|
|
|
|
|
|
|
|
bc.SI_CUT_DATE,
|
|
|
|
|
|
|
|
bc.TM_SHIFT_CUT_DATE,
|
|
|
|
|
|
|
|
bc.VGM_CUTOFF_TIME,
|
|
|
|
|
|
|
|
bc.CY_CUT_DATE,
|
|
|
|
|
|
|
|
bc.ROUTE_CODE,
|
|
|
|
|
|
|
|
bc.EMAIL_SUBJECT,
|
|
|
|
|
|
|
|
bc.WEEK,
|
|
|
|
|
|
|
|
bc.PORTLOADID,
|
|
|
|
|
|
|
|
bc.PORTLOAD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId);
|
|
|
|
TASK_USER_STATUS = a.Status,
|
|
|
|
|
|
|
|
TASK_USER_STATUS_NAME = a.StatusName,
|
|
|
|
|
|
|
|
TASK_USER_STATUS_TIME = a.StatusTime,
|
|
|
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
|
|
|
bc.VESSEL,
|
|
|
|
|
|
|
|
bc.VOYNO,
|
|
|
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
|
|
|
bc.READ_PORTLOAD,
|
|
|
|
|
|
|
|
bc.ORIG_ETD,
|
|
|
|
|
|
|
|
bc.MDGF_CUT_DATE,
|
|
|
|
|
|
|
|
bc.ETA,
|
|
|
|
|
|
|
|
//bc.ETD,
|
|
|
|
|
|
|
|
bc.SI_CUT_DATE,
|
|
|
|
|
|
|
|
bc.TM_SHIFT_CUT_DATE,
|
|
|
|
|
|
|
|
bc.VGM_CUTOFF_TIME,
|
|
|
|
|
|
|
|
bc.CY_CUT_DATE,
|
|
|
|
|
|
|
|
bc.ROUTE_CODE,
|
|
|
|
|
|
|
|
bc.EMAIL_SUBJECT,
|
|
|
|
|
|
|
|
bc.WEEK,
|
|
|
|
|
|
|
|
bc.PORTLOADID,
|
|
|
|
|
|
|
|
bc.PORTLOAD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var queryable = tenantDb.Queryable<TaskBaseInfo>().LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
SetCondition(queryable, whereList, taskType, taskStatLevel, querySearch.OtherQueryCondition, userId);
|
|
|
|
|
|
|
|
|
|
|
|
result = await queryable.Select<dynamic>((t, a) => new
|
|
|
|
result = await queryable.Select<dynamic>((t, a) => new
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
|
|
|
|
//TASK_USER_STATUS = a.Status,
|
|
|
|
|
|
|
|
//TASK_USER_STATUS_NAME = a.StatusName,
|
|
|
|
|
|
|
|
//TASK_USER_STATUS_TIME = a.StatusTime
|
|
|
|
|
|
|
|
}).Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
finally
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (result.Data?.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var taskIdList = result.Data.Select(x => (long)x.Id).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var allRecvUserList = await tenantDb.Queryable<TaskBaseAllocation>()
|
|
|
|
|
|
|
|
.Where(x => taskIdList.Contains(x.TaskId))
|
|
|
|
|
|
|
|
.Select(x => new RecvUserInfo()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
TaskId = x.TaskId,
|
|
|
|
|
|
|
|
RecvUserId = x.UserId,
|
|
|
|
|
|
|
|
RecvUserName = x.UserName,
|
|
|
|
|
|
|
|
RecvUserStatus = x.Status,
|
|
|
|
|
|
|
|
RecvUserStatusName = x.StatusName,
|
|
|
|
|
|
|
|
RecvUserStatusTime = x.StatusTime
|
|
|
|
|
|
|
|
}).ToListAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (allRecvUserList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
foreach (var item in result.Data)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PK_ID = t.Id.SelectAll(),
|
|
|
|
var recvUserList = allRecvUserList.Where(x => x.TaskId == item.Id).ToList();
|
|
|
|
TASK_USER_STATUS = a.Status,
|
|
|
|
|
|
|
|
TASK_USER_STATUS_NAME = a.StatusName,
|
|
|
|
|
|
|
|
TASK_USER_STATUS_TIME = a.StatusTime
|
|
|
|
|
|
|
|
}).Distinct().ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var currentUserStatus = recvUserList.FirstOrDefault(x => x.RecvUserId == userId);
|
|
|
|
|
|
|
|
if (currentUserStatus != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var n = recvUserList.IndexOf(currentUserStatus);
|
|
|
|
|
|
|
|
if (n != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
recvUserList.RemoveAt(n);
|
|
|
|
|
|
|
|
recvUserList.Insert(0, currentUserStatus);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
item.TASK_USER_STATUS = currentUserStatus.RecvUserStatus;
|
|
|
|
|
|
|
|
item.TASK_USER_STATUS_NAME = currentUserStatus.RecvUserStatusName;
|
|
|
|
|
|
|
|
item.TASK_USER_STATUS_TIME = currentUserStatus.RecvUserStatusTime;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
item.RecvUserList = recvUserList;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -2212,7 +2227,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
.LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
.LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
|
|
|
|
.Where(whereList)
|
|
|
|
.Where(whereList)
|
|
|
|
.Where((t, a) => t.STATUS != TaskStatusEnum.Cancel.ToString())
|
|
|
|
.Where((t, a) => t.STATUS != TaskStatusEnum.Cancel.ToString())
|
|
|
|
.Where((t, a) => t.IS_PUBLIC == 1 || (t.IS_PUBLIC == 0 && a.Status != null && (a.UserId == userId))) // 2024-8-14 boss提出只显示自己需要审批的任务,自己创建的任务不显示,所以去掉t.CreateBy == userId ||
|
|
|
|
.Where((t, a) => t.IS_PUBLIC == 1 || (t.IS_PUBLIC == 0 && a.Status != null && (a.UserId == userId))) // 2024-8-14 只显示自己需要审批的任务,自己创建的任务不显示,所以去掉t.CreateBy == userId ||
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(querySearch.BusinessNo), (t, a) => t.MBL_NO == querySearch.BusinessNo || t.CUSTOMER_NO == querySearch.BusinessNo)
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(querySearch.BusinessNo), (t, a) => t.MBL_NO == querySearch.BusinessNo || t.CUSTOMER_NO == querySearch.BusinessNo)
|
|
|
|
.GroupBy((t, a) => new { t.TASK_TYPE, t.STATUS, a.Status, t.IS_PUBLIC })
|
|
|
|
.GroupBy((t, a) => new { t.TASK_TYPE, t.STATUS, a.Status, t.IS_PUBLIC })
|
|
|
|
.Select((t, a) => new
|
|
|
|
.Select((t, a) => new
|
|
|
@ -2685,7 +2700,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryTaskManageDto.BusinessNo), (t, a) => t.MBL_NO == queryTaskManageDto.BusinessNo || t.CUSTOMER_NO == queryTaskManageDto.BusinessNo)
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryTaskManageDto.BusinessNo), (t, a) => t.MBL_NO == queryTaskManageDto.BusinessNo || t.CUSTOMER_NO == queryTaskManageDto.BusinessNo)
|
|
|
|
.WhereIF(taskStatLevel == TaskStatLevelEnum.PUBLIC, (t, a) => t.IS_PUBLIC == 1 && t.STATUS == queryTaskManageDto.Status)
|
|
|
|
.WhereIF(taskStatLevel == TaskStatLevelEnum.PUBLIC, (t, a) => t.IS_PUBLIC == 1 && t.STATUS == queryTaskManageDto.Status)
|
|
|
|
.WhereIF(taskStatLevel == TaskStatLevelEnum.PERSON, (t, a) => t.IS_PUBLIC == 0
|
|
|
|
.WhereIF(taskStatLevel == TaskStatLevelEnum.PERSON, (t, a) => t.IS_PUBLIC == 0
|
|
|
|
&& (a.UserId == userId) // 2024-8-14 boss提出只显示自己需要审批的任务,自己创建的任务不显示,所以去掉t.CreateBy == userId ||
|
|
|
|
&& (a.UserId == userId) // 2024-8-14 只显示自己需要审批的任务,自己创建的任务不显示,所以去掉t.CreateBy == userId ||
|
|
|
|
&& a.Status == queryTaskManageDto.Status)
|
|
|
|
&& a.Status == queryTaskManageDto.Status)
|
|
|
|
.OrderByDescending(t => t.Id);
|
|
|
|
.OrderByDescending(t => t.Id);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2707,7 +2722,7 @@ namespace DS.WMS.Core.TaskPlat.Method
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryTaskManageDto.BusinessNo), (t, a) => t.MBL_NO == queryTaskManageDto.BusinessNo || t.CUSTOMER_NO == queryTaskManageDto.BusinessNo)
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(queryTaskManageDto.BusinessNo), (t, a) => t.MBL_NO == queryTaskManageDto.BusinessNo || t.CUSTOMER_NO == queryTaskManageDto.BusinessNo)
|
|
|
|
.WhereIF(taskStatLevel == TaskStatLevelEnum.PUBLIC, (t, a) => t.IS_PUBLIC == 1 && t.STATUS == queryTaskManageDto.Status)
|
|
|
|
.WhereIF(taskStatLevel == TaskStatLevelEnum.PUBLIC, (t, a) => t.IS_PUBLIC == 1 && t.STATUS == queryTaskManageDto.Status)
|
|
|
|
.WhereIF(taskStatLevel == TaskStatLevelEnum.PERSON, (t, a) => t.IS_PUBLIC == 0
|
|
|
|
.WhereIF(taskStatLevel == TaskStatLevelEnum.PERSON, (t, a) => t.IS_PUBLIC == 0
|
|
|
|
&& (a.UserId == userId) // 2024-8-14 boss提出只显示自己需要审批的任务,自己创建的任务不显示,所以去掉t.CreateBy == userId ||
|
|
|
|
&& (a.UserId == userId) // 2024-8-14 只显示自己需要审批的任务,自己创建的任务不显示,所以去掉t.CreateBy == userId ||
|
|
|
|
&& a.Status == queryTaskManageDto.Status)
|
|
|
|
&& a.Status == queryTaskManageDto.Status)
|
|
|
|
.OrderByDescending(t => t.Id);
|
|
|
|
.OrderByDescending(t => t.Id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|