diff --git a/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskManageService.cs
index 3d37856d..3d6cc47c 100644
--- a/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskManageService.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/Interface/ITaskManageService.cs
@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
-using Myshipping.Application.Service.TaskManagePlat.Dtos;
using Myshipping.Core;
using NPOI.POIFS.Crypt.Dsig;
using NPOI.SS.Formula.Functions;
@@ -52,7 +51,7 @@ namespace Myshipping.Application
///
/// 任务台账查询请求
/// 返回结果
- Task> GetPageAsync(QueryTaskManageDto QuerySearch);
+ Task> GetPageAsync(QueryTaskManageDto QuerySearch);
///
diff --git a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs
index 8082aec6..c588fc7e 100644
--- a/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs
+++ b/Myshipping.Application/Service/TaskManagePlat/TaskManageService.cs
@@ -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;
@@ -20,9 +22,8 @@ using Myshipping.Application.Entity;
using Myshipping.Application.Entity.TaskManagePlat;
using Myshipping.Application.Helper;
using Myshipping.Application.Service.BookingOrder;
-using Myshipping.Application.Service.BookingOrder.Dto;
using Myshipping.Application.Service.BookingSlot.Dto;
-using Myshipping.Application.Service.TaskManagePlat.Dtos;
+using Myshipping.Application.Service.ExpressDelivery.Dto.SF;
using Myshipping.Application.Service.TaskManagePlat.Interface;
using Myshipping.Core;
using Myshipping.Core.Const;
@@ -35,9 +36,9 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Npoi.Mapper;
using NPOI.HPSF;
-using NPOI.HSSF.Record;
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;
@@ -61,12 +62,12 @@ using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
-using System.Net.NetworkInformation;
using System.Reflection.Metadata.Ecma335;
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;
@@ -1976,7 +1977,7 @@ namespace Myshipping.Application
/// 任务台账查询请求
/// 返回结果
[HttpPost("/TaskManage/GetPage")]
- public async Task> GetPageAsync(QueryTaskManageDto QuerySearch)
+ public async Task> GetPageAsync(QueryTaskManageDto QuerySearch)
{
List mblList = new List();
@@ -2045,111 +2046,571 @@ namespace Myshipping.Application
List userIds = new List();
- if (!string.IsNullOrWhiteSpace(QuerySearch.DJYUserId))
+ if (!string.IsNullOrWhiteSpace( QuerySearch.DJYUserId))
{
//获取缓存数据
- if (!_cache.Exists(QuerySearch.DJYUserId + "Authorization"))
+ if (!_cache.Exists(QuerySearch.DJYUserId+ "Authorization"))
{
throw Oops.Bah("无效授权");
}
- userIds = JsonConvert.DeserializeObject>(_cache.Get(QuerySearch.DJYUserId));
+ userIds = JsonConvert.DeserializeObject>( _cache.Get(QuerySearch.DJYUserId));
}
- 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>();
-
- var dto = entities.Adapt>();
- foreach (var item in dto.Items)
+ switch (QuerySearch.TaskType)
{
- switch (item.TaskType)
- {
- case "BC":
- var bc = _taskBCInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
- if (bc != null) item.BCModel = bc;
- break;
-
- case "SI_FEEDBACK": //si回执
- var si = _taskSISubmittedRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
- if (si != null) item.TaskSISubmitted = si;
- break;
-
- case "PER_BILL": //单票账单
-
- var PER = _taskPerBillBaseInfoRepository.AsQueryable().Where(t => t.TASK_PKID == item.PKId).First();
- if (PER != null) item.TaskPerBillBaseInfo = PER;
- break;
-
- case "TRUCK_DISPATCH": //派车任务
- var TRUCK = _taskTruckInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
- if (TRUCK != null) item.TaskTruckInfo = TRUCK;
- break;
-
-
- case "CUT_MODIFY": //截止时间变更通知
- var CUT = _taskCutDateChangeInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
- if (CUT != null) item.TaskCutDateChangeInfo = CUT;
- break;
-
- case "ROLLING_NOMINATION": //Rolling Nomination(预甩货通知)
- case "TRANSFER_NOMINATION":
- var ROL = _taskRollingNominationInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
- if (ROL != null) item.TaskRollingNominationInfo = ROL;
- break;
-
- case "DRAFT": //DRAFT转发客户
- var DRAFT = _taskDraftInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
- if (DRAFT != null) item.TaskDraftInfo = DRAFT;
- break;
-
- case "POD_DISCHARGE_FULL": //任务目的港未提货/任务目的港提货未返空
- case "POD_GATEOUT_FULL":
- var POD = _taskPODDischargeGateoutFullInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
- if (POD != null) item.TaskPODDischargeGateoutFullInfo = POD;
- break;
-
- case "CAUTION_NOTICE": //重要提醒
- var CAUT = _taskCautionNoticeInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
- if (CAUT != null) item.TaskCautionNoticeInfo = CAUT;
- break;
-
- case "ROUTE_CUT_CHANGE": //航线船舶截止时间调整的通知
- var ROUTE = _taskRouteChangeAdvisoryInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
- if (ROUTE != null) item.TaskRouteChangeAdvisoryInfo = ROUTE;
- break;
-
- default:
- //return entities.Adapt>();
- break;
-
- }
+ case "BC":
+ var bc = await _taskBaseInfoRepository.AsQueryable().LeftJoin((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((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>();
+
+ case "SI_FEEDBACK":
+ var SI_FEEDBACK = await _taskBaseInfoRepository.AsQueryable().LeftJoin((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((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>();
+
+ case "INVOICE_BILL_MAIL":
+
+ var INVOICE_BILL_MAIL = await _taskBaseInfoRepository.AsQueryable().LeftJoin((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((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>();
+
+
+ case "TRUCK_DISPATCH":
+
+ var TRUCK_DISPATCH = await _taskBaseInfoRepository.AsQueryable().LeftJoin((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((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>();
+
+ case "CUT_MODIFY":
+
+ var CUT_MODIFY = await _taskBaseInfoRepository.AsQueryable().LeftJoin((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((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>();
+
+ case "ROLLING_NOMINATION":
+ case "TRANSFER_NOMINATION":
+
+ var ysh = await _taskBaseInfoRepository.AsQueryable().LeftJoin((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((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>();
+
+
+ case "DRAFT":
+
+ var DRAFT = await _taskBaseInfoRepository.AsQueryable().LeftJoin((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((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>();
+
+
+ case "POD_DISCHARGE_FULL":
+ case "POD_GATEOUT_FULL":
+
+ var POD = await _taskBaseInfoRepository.AsQueryable().LeftJoin((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((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>();
+
+
+ case "CAUTION_NOTICE":
+
+ var CAUTION_NOTICE = await _taskBaseInfoRepository.AsQueryable().LeftJoin((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((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>();
+
+ case "ROUTE_CUT_CHANGE":
+
+ var ROUTE_CUT_CHANGE = await _taskBaseInfoRepository.AsQueryable().LeftJoin((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((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>();
+
+ 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(t => new
+ {
+ PK_ID = t.PK_ID.SelectAll()
+
+ })
+ .ToPagedListAsync(QuerySearch.PageNo, QuerySearch.PageSize);
+ return entities.Adapt>();
+ break;
}
-
- return dto;
-
+
}
#endregion
-
-
#region 下载正本提单(可批量)
///
/// 下载正本提单(可批量)
@@ -6222,7 +6683,4 @@ namespace Myshipping.Application
}
}
#endregion
-
-
-
}