|
|
@ -8,8 +8,10 @@ using Furion.JsonSerialization;
|
|
|
|
using Furion.Localization;
|
|
|
|
using Furion.Localization;
|
|
|
|
using Furion.RemoteRequest;
|
|
|
|
using Furion.RemoteRequest;
|
|
|
|
using Furion.RemoteRequest.Extensions;
|
|
|
|
using Furion.RemoteRequest.Extensions;
|
|
|
|
|
|
|
|
using HtmlAgilityPack;
|
|
|
|
using Mapster;
|
|
|
|
using Mapster;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
@ -20,9 +22,8 @@ using Myshipping.Application.Entity;
|
|
|
|
using Myshipping.Application.Entity.TaskManagePlat;
|
|
|
|
using Myshipping.Application.Entity.TaskManagePlat;
|
|
|
|
using Myshipping.Application.Helper;
|
|
|
|
using Myshipping.Application.Helper;
|
|
|
|
using Myshipping.Application.Service.BookingOrder;
|
|
|
|
using Myshipping.Application.Service.BookingOrder;
|
|
|
|
using Myshipping.Application.Service.BookingOrder.Dto;
|
|
|
|
|
|
|
|
using Myshipping.Application.Service.BookingSlot.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.Application.Service.TaskManagePlat.Interface;
|
|
|
|
using Myshipping.Core;
|
|
|
|
using Myshipping.Core;
|
|
|
|
using Myshipping.Core.Const;
|
|
|
|
using Myshipping.Core.Const;
|
|
|
@ -35,9 +36,9 @@ using Newtonsoft.Json;
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
using Npoi.Mapper;
|
|
|
|
using Npoi.Mapper;
|
|
|
|
using NPOI.HPSF;
|
|
|
|
using NPOI.HPSF;
|
|
|
|
using NPOI.HSSF.Record;
|
|
|
|
|
|
|
|
using NPOI.HSSF.UserModel;
|
|
|
|
using NPOI.HSSF.UserModel;
|
|
|
|
using NPOI.OpenXmlFormats;
|
|
|
|
using NPOI.OpenXmlFormats;
|
|
|
|
|
|
|
|
using NPOI.OpenXmlFormats.Dml.Diagram;
|
|
|
|
using NPOI.OpenXmlFormats.Wordprocessing;
|
|
|
|
using NPOI.OpenXmlFormats.Wordprocessing;
|
|
|
|
using NPOI.POIFS.Crypt.Dsig;
|
|
|
|
using NPOI.POIFS.Crypt.Dsig;
|
|
|
|
using NPOI.SS.Formula.Atp;
|
|
|
|
using NPOI.SS.Formula.Atp;
|
|
|
@ -61,12 +62,12 @@ using System.IO;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Net;
|
|
|
|
using System.Net;
|
|
|
|
using System.Net.Http;
|
|
|
|
using System.Net.Http;
|
|
|
|
using System.Net.NetworkInformation;
|
|
|
|
|
|
|
|
using System.Reflection.Metadata.Ecma335;
|
|
|
|
using System.Reflection.Metadata.Ecma335;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
using System.Security.Policy;
|
|
|
|
using System.Security.Policy;
|
|
|
|
using System.Text;
|
|
|
|
using System.Text;
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
using System.Text.RegularExpressions;
|
|
|
|
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Xml.Linq;
|
|
|
|
using System.Xml.Linq;
|
|
|
|
using static Aliyun.OSS.Model.CreateSelectObjectMetaInputFormatModel;
|
|
|
|
using static Aliyun.OSS.Model.CreateSelectObjectMetaInputFormatModel;
|
|
|
@ -1976,7 +1977,7 @@ namespace Myshipping.Application
|
|
|
|
/// <param name="QuerySearch">任务台账查询请求</param>
|
|
|
|
/// <param name="QuerySearch">任务台账查询请求</param>
|
|
|
|
/// <returns>返回结果</returns>
|
|
|
|
/// <returns>返回结果</returns>
|
|
|
|
[HttpPost("/TaskManage/GetPage")]
|
|
|
|
[HttpPost("/TaskManage/GetPage")]
|
|
|
|
public async Task<SqlSugarPagedList<GetTaskBaseOutModel>> GetPageAsync(QueryTaskManageDto QuerySearch)
|
|
|
|
public async Task<SqlSugarPagedList<dynamic>> GetPageAsync(QueryTaskManageDto QuerySearch)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
List<string> mblList = new List<string>();
|
|
|
|
List<string> mblList = new List<string>();
|
|
|
|
|
|
|
|
|
|
|
@ -2045,111 +2046,571 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<string> userIds = new List<string>();
|
|
|
|
List<string> userIds = new List<string>();
|
|
|
|
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("无效授权");
|
|
|
|
throw Oops.Bah("无效授权");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
userIds = JsonConvert.DeserializeObject<List<string>>(_cache.Get(QuerySearch.DJYUserId));
|
|
|
|
userIds = JsonConvert.DeserializeObject<List<string>>( _cache.Get(QuerySearch.DJYUserId));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var entities = await _taskBaseInfoRepository.AsQueryable()
|
|
|
|
switch (QuerySearch.TaskType)
|
|
|
|
.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>>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dto = entities.Adapt<SqlSugarPagedList<GetTaskBaseOutModel>>();
|
|
|
|
|
|
|
|
foreach (var item in dto.Items)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
switch (item.TaskType)
|
|
|
|
case "BC":
|
|
|
|
{
|
|
|
|
var bc = await _taskBaseInfoRepository.AsQueryable().LeftJoin<TaskBCInfo>((t, bc) => t.PK_ID==bc.TASK_ID)
|
|
|
|
case "BC":
|
|
|
|
.Where((t, bc) => userlist.Contains(t.CreatedUserId) || (t.RealUserId != null && userlist.Contains(t.RealUserId.Value)) || t.IS_PUBLIC == 1)
|
|
|
|
var bc = _taskBCInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.MBlNo), (t, bc) => mblList.Contains(t.MBL_NO))
|
|
|
|
if (bc != null) item.BCModel = bc;
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskRecvName), (t, bc) => t.CreatedUserName.Contains(QuerySearch.TaskRecvName.Trim()))
|
|
|
|
break;
|
|
|
|
.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)
|
|
|
|
case "SI_FEEDBACK": //si回执
|
|
|
|
.WhereIF(taskDateBegin != DateTime.MinValue, (t, bc) => t.CreatedTime >= taskDateBegin)
|
|
|
|
var si = _taskSISubmittedRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
|
|
|
|
.WhereIF(taskDateEnd != DateTime.MinValue, (t, bc) => t.CreatedTime < taskDateEnd)
|
|
|
|
if (si != null) item.TaskSISubmitted = si;
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.TaskType), (t, bc) => t.TASK_TYPE.Equals(QuerySearch.TaskType))
|
|
|
|
break;
|
|
|
|
.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)
|
|
|
|
case "PER_BILL": //单票账单
|
|
|
|
.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)
|
|
|
|
var PER = _taskPerBillBaseInfoRepository.AsQueryable().Where(t => t.TASK_PKID == item.PKId).First();
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.Status), (t, bc) => t.STATUS.Equals(QuerySearch.Status))
|
|
|
|
if (PER != null) item.TaskPerBillBaseInfo = PER;
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(QuerySearch.PKId), (t, bc) => t.PK_ID.Equals(QuerySearch.PKId))
|
|
|
|
break;
|
|
|
|
.WhereIF(userIds.Count>0, (t, bc) => userIds.Contains(t.DJYUserId))
|
|
|
|
|
|
|
|
.OrderBy(entityOrderCol + (QuerySearch.descSort ? " desc " : " asc "))
|
|
|
|
case "TRUCK_DISPATCH": //派车任务
|
|
|
|
|
|
|
|
var TRUCK = _taskTruckInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
|
|
|
|
.Select<dynamic>((t, bc) => new
|
|
|
|
if (TRUCK != null) item.TaskTruckInfo = TRUCK;
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
PK_ID = t.PK_ID.SelectAll(),
|
|
|
|
|
|
|
|
bc.BUSI_TYPE,
|
|
|
|
|
|
|
|
bc.SHIPPER,
|
|
|
|
case "CUT_MODIFY": //截止时间变更通知
|
|
|
|
bc.CONSIGNEE,
|
|
|
|
var CUT = _taskCutDateChangeInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
|
|
|
|
bc.NOTIFYPARTY,
|
|
|
|
if (CUT != null) item.TaskCutDateChangeInfo = CUT;
|
|
|
|
bc.BC_MODIFY_TIMES,
|
|
|
|
break;
|
|
|
|
bc.BC_MODIFY_DATE,
|
|
|
|
|
|
|
|
//bc.MBL_NO,
|
|
|
|
case "ROLLING_NOMINATION": //Rolling Nomination(预甩货通知)
|
|
|
|
bc.VESSEL,
|
|
|
|
case "TRANSFER_NOMINATION":
|
|
|
|
bc.VOYNO,
|
|
|
|
var ROL = _taskRollingNominationInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
|
|
|
|
bc.CARRIER,
|
|
|
|
if (ROL != null) item.TaskRollingNominationInfo = ROL;
|
|
|
|
bc.PLACERECEIPT,
|
|
|
|
break;
|
|
|
|
bc.PORTLOAD,
|
|
|
|
|
|
|
|
bc.CLOSING_DATE,
|
|
|
|
case "DRAFT": //DRAFT转发客户
|
|
|
|
bc.VGM_CUTOFF_TIME,
|
|
|
|
var DRAFT = _taskDraftInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
|
|
|
|
bc.ETA,
|
|
|
|
if (DRAFT != null) item.TaskDraftInfo = DRAFT;
|
|
|
|
//bc.ETD,
|
|
|
|
break;
|
|
|
|
bc.POD_ETA,
|
|
|
|
|
|
|
|
bc.CUT_SINGLE_TIME,
|
|
|
|
case "POD_DISCHARGE_FULL": //任务目的港未提货/任务目的港提货未返空
|
|
|
|
bc.PORTDISCHARGE,
|
|
|
|
case "POD_GATEOUT_FULL":
|
|
|
|
bc.PLACEDELIVERY,
|
|
|
|
var POD = _taskPODDischargeGateoutFullInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
|
|
|
|
bc.SHIPPING_METHOD,
|
|
|
|
if (POD != null) item.TaskPODDischargeGateoutFullInfo = POD;
|
|
|
|
bc.SERVICE,
|
|
|
|
break;
|
|
|
|
bc.PRETRANS_MODE,
|
|
|
|
|
|
|
|
bc.DESCRIPTION,
|
|
|
|
case "CAUTION_NOTICE": //重要提醒
|
|
|
|
bc.ISSUEPLACE,
|
|
|
|
var CAUT = _taskCautionNoticeInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
|
|
|
|
bc.COLLECTION_TERMINAL,
|
|
|
|
if (CAUT != null) item.TaskCautionNoticeInfo = CAUT;
|
|
|
|
bc.CONTRACTNO,
|
|
|
|
break;
|
|
|
|
bc.PREPARDAT,
|
|
|
|
|
|
|
|
bc.SHIP_AGENT,
|
|
|
|
case "ROUTE_CUT_CHANGE": //航线船舶截止时间调整的通知
|
|
|
|
bc.YARD,
|
|
|
|
var ROUTE = _taskRouteChangeAdvisoryInfoRepository.AsQueryable().Where(t => t.TASK_ID == item.PKId).First();
|
|
|
|
bc.YARD_CONTACT_USR,
|
|
|
|
if (ROUTE != null) item.TaskRouteChangeAdvisoryInfo = ROUTE;
|
|
|
|
bc.YARD_CONTACT_TEL,
|
|
|
|
break;
|
|
|
|
bc.FST_CUSTOMER_SER_USRNAME,
|
|
|
|
|
|
|
|
bc.FST_CUSTOMER_SER_TEL,
|
|
|
|
default:
|
|
|
|
bc.FST_CUSTOMER_SER_EMAIL,
|
|
|
|
//return entities.Adapt<SqlSugarPagedList<GetTaskBaseOutModel>>();
|
|
|
|
bc.REMARK1,
|
|
|
|
break;
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return dto;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 下载正本提单(可批量)
|
|
|
|
#region 下载正本提单(可批量)
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 下载正本提单(可批量)
|
|
|
|
/// 下载正本提单(可批量)
|
|
|
@ -6222,7 +6683,4 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|