|
|
|
@ -8,8 +8,10 @@ using Furion.JsonSerialization;
|
|
|
|
|
using Furion.Localization;
|
|
|
|
|
using Furion.RemoteRequest;
|
|
|
|
|
using Furion.RemoteRequest.Extensions;
|
|
|
|
|
using HtmlAgilityPack;
|
|
|
|
|
using Mapster;
|
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
@ -21,6 +23,7 @@ using Myshipping.Application.Entity.TaskManagePlat;
|
|
|
|
|
using Myshipping.Application.Helper;
|
|
|
|
|
using Myshipping.Application.Service.BookingOrder;
|
|
|
|
|
using Myshipping.Application.Service.BookingSlot.Dto;
|
|
|
|
|
using Myshipping.Application.Service.ExpressDelivery.Dto.SF;
|
|
|
|
|
using Myshipping.Application.Service.TaskManagePlat.Interface;
|
|
|
|
|
using Myshipping.Core;
|
|
|
|
|
using Myshipping.Core.Const;
|
|
|
|
@ -35,6 +38,7 @@ using Npoi.Mapper;
|
|
|
|
|
using NPOI.HPSF;
|
|
|
|
|
using NPOI.HSSF.UserModel;
|
|
|
|
|
using NPOI.OpenXmlFormats;
|
|
|
|
|
using NPOI.OpenXmlFormats.Dml.Diagram;
|
|
|
|
|
using NPOI.OpenXmlFormats.Wordprocessing;
|
|
|
|
|
using NPOI.POIFS.Crypt.Dsig;
|
|
|
|
|
using NPOI.SS.Formula.Atp;
|
|
|
|
@ -63,6 +67,7 @@ using System.Runtime.InteropServices;
|
|
|
|
|
using System.Security.Policy;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Xml.Linq;
|
|
|
|
|
using static Aliyun.OSS.Model.CreateSelectObjectMetaInputFormatModel;
|
|
|
|
@ -347,9 +352,11 @@ namespace Myshipping.Application
|
|
|
|
|
CUSTOMER_ID = info.Main.CustomerId,
|
|
|
|
|
CUSTOMER_NAME = info.Main.CustomerName,
|
|
|
|
|
BATCH_STATIC = info.Main.BatchStatic,
|
|
|
|
|
DJYUserId = info.Head.DJYUserId
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
DJYUserId = info.Head.DJYUserId,
|
|
|
|
|
SYSTEM_CODE = info.Main.SYSTEM_CODE,
|
|
|
|
|
SYSTEM_NAME = info.Main.SYSTEM_NAME,
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
long taskReqUserId = 0;
|
|
|
|
|
|
|
|
|
@ -1972,7 +1979,7 @@ namespace Myshipping.Application
|
|
|
|
|
/// <param name="QuerySearch">任务台账查询请求</param>
|
|
|
|
|
/// <returns>返回结果</returns>
|
|
|
|
|
[HttpPost("/TaskManage/GetPage")]
|
|
|
|
|
public async Task<SqlSugarPagedList<TaskBaseInfoDto>> GetPageAsync(QueryTaskManageDto QuerySearch)
|
|
|
|
|
public async Task<SqlSugarPagedList<dynamic>> GetPageAsync(QueryTaskManageDto QuerySearch)
|
|
|
|
|
{
|
|
|
|
|
List<string> mblList = new List<string>();
|
|
|
|
|
|
|
|
|
@ -2053,27 +2060,556 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var entities = await _taskBaseInfoRepository.AsQueryable()
|
|
|
|
|
.Where(t=> userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value) ) || t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), t => mblList.Contains(t.MBL_NO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), t => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, t => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, t => t.ETD.HasValue && t.ETD.Value < etdEnd)
|
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, t => t.CreatedTime >= taskDateBegin)
|
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, t => t.CreatedTime < taskDateEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), t => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskSource), t => t.TASK_SOURCE.Equals(QuerySearch.TaskSource))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.EXCPTION.ToString(), t => t.IS_EXCEPT == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PUBLIC.ToString(), t => t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PERSON.ToString(), t => t.IS_PUBLIC == 0 && t.IS_EXCEPT == 0)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), t => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), t => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
|
.WhereIF(userIds.Count>0,t=>userIds.Contains( t.DJYUserId))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
.ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return entities.Adapt<SqlSugarPagedList<TaskBaseInfoDto>>();
|
|
|
|
|
switch (QuerySearch.TaskType)
|
|
|
|
|
{
|
|
|
|
|
case "BC":
|
|
|
|
|
var bc = await _taskBaseInfoRepository.AsQueryable().LeftJoin<TaskBCInfo>((t, bc) => t.PK_ID==bc.TASK_ID)
|
|
|
|
|
.Where((t, bc) => userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value)) || t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), (t, bc) => mblList.Contains(t.MBL_NO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), (t, bc) => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value < etdEnd)
|
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, (t, bc) => t.CreatedTime >= taskDateBegin)
|
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, (t, bc) => t.CreatedTime < taskDateEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), (t, bc) => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskSource), (t, bc) => t.TASK_SOURCE.Equals(QuerySearch.TaskSource))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.EXCPTION.ToString(), (t, bc) => t.IS_EXCEPT == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PUBLIC.ToString(), (t, bc) => t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PERSON.ToString(), (t, bc) => t.IS_PUBLIC == 0 && t.IS_EXCEPT == 0)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), (t, bc) => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), (t, bc) => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
|
.WhereIF(userIds.Count>0, (t, bc) => userIds.Contains(t.DJYUserId))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
|
|
|
|
|
.Select<dynamic>((t, bc) => new
|
|
|
|
|
{
|
|
|
|
|
PK_ID = t.PK_ID.SelectAll(),
|
|
|
|
|
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_CUTOFF_TIME,
|
|
|
|
|
bc.ETA,
|
|
|
|
|
//bc.ETD,
|
|
|
|
|
bc.POD_ETA,
|
|
|
|
|
bc.CUT_SINGLE_TIME,
|
|
|
|
|
bc.PORTDISCHARGE,
|
|
|
|
|
bc.PLACEDELIVERY,
|
|
|
|
|
bc.SHIPPING_METHOD,
|
|
|
|
|
bc.SERVICE,
|
|
|
|
|
bc.PRETRANS_MODE,
|
|
|
|
|
bc.DESCRIPTION,
|
|
|
|
|
bc.ISSUEPLACE,
|
|
|
|
|
bc.COLLECTION_TERMINAL,
|
|
|
|
|
bc.CONTRACTNO,
|
|
|
|
|
bc.PREPARDAT,
|
|
|
|
|
bc.SHIP_AGENT,
|
|
|
|
|
bc.YARD,
|
|
|
|
|
bc.YARD_CONTACT_USR,
|
|
|
|
|
bc.YARD_CONTACT_TEL,
|
|
|
|
|
bc.FST_CUSTOMER_SER_USRNAME,
|
|
|
|
|
bc.FST_CUSTOMER_SER_TEL,
|
|
|
|
|
bc.FST_CUSTOMER_SER_EMAIL,
|
|
|
|
|
bc.REMARK1,
|
|
|
|
|
bc.CY_CUTOFF_TIME,
|
|
|
|
|
bc.CARRIERID,
|
|
|
|
|
bc.LANECODE,
|
|
|
|
|
bc.LANENAME,
|
|
|
|
|
bc.CARRIAGE_TYPE,
|
|
|
|
|
bc.CARRIAGE_TYPE_NAME,
|
|
|
|
|
bc.BOOKING_SLOT_TYPE,
|
|
|
|
|
bc.BOOKING_SLOT_TYPE_NAME,
|
|
|
|
|
bc.CTN_STAT,
|
|
|
|
|
bc.WEEK_AT,
|
|
|
|
|
bc.DETENSION_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
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return bc.Adapt<SqlSugarPagedList<dynamic>>();
|
|
|
|
|
|
|
|
|
|
case "SI_FEEDBACK":
|
|
|
|
|
var SI_FEEDBACK = await _taskBaseInfoRepository.AsQueryable().LeftJoin<TaskSISubmitted>((t, bc) => t.PK_ID==bc.TASK_ID)
|
|
|
|
|
.Where((t, bc) => userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value)) || t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), (t, bc) => mblList.Contains(t.MBL_NO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), (t, bc) => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value < etdEnd)
|
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, (t, bc) => t.CreatedTime >= taskDateBegin)
|
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, (t, bc) => t.CreatedTime < taskDateEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), (t, bc) => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskSource), (t, bc) => t.TASK_SOURCE.Equals(QuerySearch.TaskSource))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.EXCPTION.ToString(), (t, bc) => t.IS_EXCEPT == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PUBLIC.ToString(), (t, bc) => t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PERSON.ToString(), (t, bc) => t.IS_PUBLIC == 0 && t.IS_EXCEPT == 0)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), (t, bc) => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), (t, bc) => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
|
.WhereIF(userIds.Count>0, (t, bc) => userIds.Contains(t.DJYUserId))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
|
|
|
|
|
.Select<dynamic>((t, bc) => new
|
|
|
|
|
{
|
|
|
|
|
PK_ID = t.PK_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
|
|
|
|
|
|
|
|
|
|
}) .ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return SI_FEEDBACK.Adapt<SqlSugarPagedList<dynamic>>();
|
|
|
|
|
|
|
|
|
|
case "INVOICE_BILL_MAIL":
|
|
|
|
|
|
|
|
|
|
var INVOICE_BILL_MAIL = await _taskBaseInfoRepository.AsQueryable().LeftJoin<TaskPerBillBaseInfo>((t, bc) => t.PK_ID==bc.TASK_PKID)
|
|
|
|
|
.Where((t, bc) => userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value)) || t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), (t, bc) => mblList.Contains(t.MBL_NO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), (t, bc) => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value < etdEnd)
|
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, (t, bc) => t.CreatedTime >= taskDateBegin)
|
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, (t, bc) => t.CreatedTime < taskDateEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), (t, bc) => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskSource), (t, bc) => t.TASK_SOURCE.Equals(QuerySearch.TaskSource))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.EXCPTION.ToString(), (t, bc) => t.IS_EXCEPT == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PUBLIC.ToString(), (t, bc) => t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PERSON.ToString(), (t, bc) => t.IS_PUBLIC == 0 && t.IS_EXCEPT == 0)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), (t, bc) => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), (t, bc) => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
|
.WhereIF(userIds.Count>0, (t, bc) => userIds.Contains(t.DJYUserId))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
|
|
|
|
|
.Select<dynamic>((t, bc) => new
|
|
|
|
|
{
|
|
|
|
|
PK_ID = t.PK_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
|
|
|
|
|
|
|
|
|
|
}).ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return INVOICE_BILL_MAIL.Adapt<SqlSugarPagedList<dynamic>>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case "TRUCK_DISPATCH":
|
|
|
|
|
|
|
|
|
|
var TRUCK_DISPATCH = await _taskBaseInfoRepository.AsQueryable().LeftJoin<TaskTruckInfo>((t, bc) => t.PK_ID==bc.TASK_ID)
|
|
|
|
|
.Where((t, bc) => userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value)) || t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), (t, bc) => mblList.Contains(t.MBL_NO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), (t, bc) => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value < etdEnd)
|
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, (t, bc) => t.CreatedTime >= taskDateBegin)
|
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, (t, bc) => t.CreatedTime < taskDateEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), (t, bc) => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskSource), (t, bc) => t.TASK_SOURCE.Equals(QuerySearch.TaskSource))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.EXCPTION.ToString(), (t, bc) => t.IS_EXCEPT == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PUBLIC.ToString(), (t, bc) => t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PERSON.ToString(), (t, bc) => t.IS_PUBLIC == 0 && t.IS_EXCEPT == 0)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), (t, bc) => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), (t, bc) => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
|
.WhereIF(userIds.Count>0, (t, bc) => userIds.Contains(t.DJYUserId))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
|
|
|
|
|
.Select<dynamic>((t, bc) => new
|
|
|
|
|
{
|
|
|
|
|
PK_ID = t.PK_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
|
|
|
|
|
|
|
|
|
|
}).ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return TRUCK_DISPATCH.Adapt<SqlSugarPagedList<dynamic>>();
|
|
|
|
|
|
|
|
|
|
case "CUT_MODIFY":
|
|
|
|
|
|
|
|
|
|
var CUT_MODIFY = await _taskBaseInfoRepository.AsQueryable().LeftJoin<TaskCutDateChangeInfo>((t, bc) => t.PK_ID==bc.TASK_ID)
|
|
|
|
|
.Where((t, bc) => userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value)) || t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), (t, bc) => mblList.Contains(t.MBL_NO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), (t, bc) => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value < etdEnd)
|
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, (t, bc) => t.CreatedTime >= taskDateBegin)
|
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, (t, bc) => t.CreatedTime < taskDateEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), (t, bc) => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskSource), (t, bc) => t.TASK_SOURCE.Equals(QuerySearch.TaskSource))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.EXCPTION.ToString(), (t, bc) => t.IS_EXCEPT == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PUBLIC.ToString(), (t, bc) => t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PERSON.ToString(), (t, bc) => t.IS_PUBLIC == 0 && t.IS_EXCEPT == 0)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), (t, bc) => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), (t, bc) => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
|
.WhereIF(userIds.Count>0, (t, bc) => userIds.Contains(t.DJYUserId))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
|
|
|
|
|
.Select<dynamic>((t, bc) => new
|
|
|
|
|
{
|
|
|
|
|
PK_ID = t.PK_ID.SelectAll(),
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
bc.VESSEL,
|
|
|
|
|
bc.VOYNO,
|
|
|
|
|
bc.NOTICE_DATE
|
|
|
|
|
|
|
|
|
|
}).ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return CUT_MODIFY.Adapt<SqlSugarPagedList<dynamic>>();
|
|
|
|
|
|
|
|
|
|
case "ROLLING_NOMINATION":
|
|
|
|
|
case "TRANSFER_NOMINATION":
|
|
|
|
|
|
|
|
|
|
var ysh = await _taskBaseInfoRepository.AsQueryable().LeftJoin<TaskRollingNominationInfo>((t, bc) => t.PK_ID==bc.TASK_ID)
|
|
|
|
|
.Where((t, bc) => userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value)) || t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), (t, bc) => mblList.Contains(t.MBL_NO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), (t, bc) => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value < etdEnd)
|
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, (t, bc) => t.CreatedTime >= taskDateBegin)
|
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, (t, bc) => t.CreatedTime < taskDateEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), (t, bc) => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskSource), (t, bc) => t.TASK_SOURCE.Equals(QuerySearch.TaskSource))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.EXCPTION.ToString(), (t, bc) => t.IS_EXCEPT == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PUBLIC.ToString(), (t, bc) => t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PERSON.ToString(), (t, bc) => t.IS_PUBLIC == 0 && t.IS_EXCEPT == 0)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), (t, bc) => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), (t, bc) => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
|
.WhereIF(userIds.Count>0, (t, bc) => userIds.Contains(t.DJYUserId))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
|
|
|
|
|
.Select<dynamic>((t, bc) => new
|
|
|
|
|
{
|
|
|
|
|
PK_ID = t.PK_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
|
|
|
|
|
|
|
|
|
|
}).ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return ysh.Adapt<SqlSugarPagedList<dynamic>>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case "DRAFT":
|
|
|
|
|
|
|
|
|
|
var DRAFT = await _taskBaseInfoRepository.AsQueryable().LeftJoin<TaskDraftInfo>((t, bc) => t.PK_ID==bc.TASK_ID)
|
|
|
|
|
.Where((t, bc) => userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value)) || t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), (t, bc) => mblList.Contains(t.MBL_NO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), (t, bc) => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value < etdEnd)
|
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, (t, bc) => t.CreatedTime >= taskDateBegin)
|
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, (t, bc) => t.CreatedTime < taskDateEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), (t, bc) => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskSource), (t, bc) => t.TASK_SOURCE.Equals(QuerySearch.TaskSource))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.EXCPTION.ToString(), (t, bc) => t.IS_EXCEPT == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PUBLIC.ToString(), (t, bc) => t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PERSON.ToString(), (t, bc) => t.IS_PUBLIC == 0 && t.IS_EXCEPT == 0)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), (t, bc) => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), (t, bc) => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
|
.WhereIF(userIds.Count>0, (t, bc) => userIds.Contains(t.DJYUserId))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
|
|
|
|
|
.Select<dynamic>((t, bc) => new
|
|
|
|
|
{
|
|
|
|
|
PK_ID = t.PK_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,
|
|
|
|
|
|
|
|
|
|
}).ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return DRAFT.Adapt<SqlSugarPagedList<dynamic>>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case "POD_DISCHARGE_FULL":
|
|
|
|
|
case "POD_GATEOUT_FULL":
|
|
|
|
|
|
|
|
|
|
var POD = await _taskBaseInfoRepository.AsQueryable().LeftJoin<TaskPODDischargeGateoutFullInfo>((t, bc) => t.PK_ID==bc.TASK_ID)
|
|
|
|
|
.Where((t, bc) => userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value)) || t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), (t, bc) => mblList.Contains(t.MBL_NO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), (t, bc) => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value < etdEnd)
|
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, (t, bc) => t.CreatedTime >= taskDateBegin)
|
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, (t, bc) => t.CreatedTime < taskDateEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), (t, bc) => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskSource), (t, bc) => t.TASK_SOURCE.Equals(QuerySearch.TaskSource))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.EXCPTION.ToString(), (t, bc) => t.IS_EXCEPT == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PUBLIC.ToString(), (t, bc) => t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PERSON.ToString(), (t, bc) => t.IS_PUBLIC == 0 && t.IS_EXCEPT == 0)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), (t, bc) => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), (t, bc) => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
|
.WhereIF(userIds.Count>0, (t, bc) => userIds.Contains(t.DJYUserId))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
|
|
|
|
|
.Select<dynamic>((t, bc) => new
|
|
|
|
|
{
|
|
|
|
|
PK_ID = t.PK_ID.SelectAll(),
|
|
|
|
|
bc.TASK_ID,
|
|
|
|
|
bc.CARRIER,
|
|
|
|
|
bc.NOTICE_TYPE,
|
|
|
|
|
bc.NOTICE_TYPE_NAME,
|
|
|
|
|
bc.MBL_NO,
|
|
|
|
|
bc.NOTICE_DATE
|
|
|
|
|
|
|
|
|
|
}).ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return POD.Adapt<SqlSugarPagedList<dynamic>>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case "CAUTION_NOTICE":
|
|
|
|
|
|
|
|
|
|
var CAUTION_NOTICE = await _taskBaseInfoRepository.AsQueryable().LeftJoin<TaskCautionNoticeInfo>((t, bc) => t.PK_ID==bc.TASK_ID)
|
|
|
|
|
.Where((t, bc) => userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value)) || t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), (t, bc) => mblList.Contains(t.MBL_NO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), (t, bc) => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value < etdEnd)
|
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, (t, bc) => t.CreatedTime >= taskDateBegin)
|
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, (t, bc) => t.CreatedTime < taskDateEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), (t, bc) => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskSource), (t, bc) => t.TASK_SOURCE.Equals(QuerySearch.TaskSource))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.EXCPTION.ToString(), (t, bc) => t.IS_EXCEPT == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PUBLIC.ToString(), (t, bc) => t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PERSON.ToString(), (t, bc) => t.IS_PUBLIC == 0 && t.IS_EXCEPT == 0)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), (t, bc) => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), (t, bc) => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
|
.WhereIF(userIds.Count>0, (t, bc) => userIds.Contains(t.DJYUserId))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
|
|
|
|
|
.Select<dynamic>((t, bc) => new
|
|
|
|
|
{
|
|
|
|
|
PK_ID = t.PK_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,
|
|
|
|
|
|
|
|
|
|
}).ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return CAUTION_NOTICE.Adapt<SqlSugarPagedList<dynamic>>();
|
|
|
|
|
|
|
|
|
|
case "ROUTE_CUT_CHANGE":
|
|
|
|
|
|
|
|
|
|
var ROUTE_CUT_CHANGE = await _taskBaseInfoRepository.AsQueryable().LeftJoin<TaskRouteChangeAdvisoryInfo>((t, bc) => t.PK_ID==bc.TASK_ID)
|
|
|
|
|
.Where((t, bc) => userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value)) || t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), (t, bc) => mblList.Contains(t.MBL_NO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), (t, bc) => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, (t, bc) => t.ETD.HasValue && t.ETD.Value < etdEnd)
|
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, (t, bc) => t.CreatedTime >= taskDateBegin)
|
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, (t, bc) => t.CreatedTime < taskDateEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), (t, bc) => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskSource), (t, bc) => t.TASK_SOURCE.Equals(QuerySearch.TaskSource))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.EXCPTION.ToString(), (t, bc) => t.IS_EXCEPT == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PUBLIC.ToString(), (t, bc) => t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PERSON.ToString(), (t, bc) => t.IS_PUBLIC == 0 && t.IS_EXCEPT == 0)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), (t, bc) => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), (t, bc) => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
|
.WhereIF(userIds.Count>0, (t, bc) => userIds.Contains(t.DJYUserId))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
|
|
|
|
|
.Select<dynamic>((t, bc) => new
|
|
|
|
|
{
|
|
|
|
|
PK_ID = t.PK_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
|
|
|
|
|
|
|
|
|
|
}).ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return ROUTE_CUT_CHANGE.Adapt<SqlSugarPagedList<dynamic>>();
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
var entities = await _taskBaseInfoRepository.AsQueryable()
|
|
|
|
|
.Where(t => userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value)) || t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), t => mblList.Contains(t.MBL_NO))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), t => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
|
.WhereIF(etdBegin != DateTime.MinValue, t => t.ETD.HasValue && t.ETD.Value >= etdBegin)
|
|
|
|
|
.WhereIF(etdEnd != DateTime.MinValue, t => t.ETD.HasValue && t.ETD.Value < etdEnd)
|
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, t => t.CreatedTime >= taskDateBegin)
|
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, t => t.CreatedTime < taskDateEnd)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), t => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskSource), t => t.TASK_SOURCE.Equals(QuerySearch.TaskSource))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.EXCPTION.ToString(), t => t.IS_EXCEPT == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PUBLIC.ToString(), t => t.IS_PUBLIC == 1)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskCategory) && QuerySearch.TaskCategory == TaskStatLevelEnum.PERSON.ToString(), t => t.IS_PUBLIC == 0 && t.IS_EXCEPT == 0)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), t => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), t => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
|
.WhereIF(userIds.Count>0, t => userIds.Contains(t.DJYUserId))
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
|
|
|
|
|
|
.Select<dynamic>(t => new
|
|
|
|
|
{
|
|
|
|
|
PK_ID = t.PK_ID.SelectAll()
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
.ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
|
|
|
|
|
return entities.Adapt<SqlSugarPagedList<dynamic>>();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|