cjy 3 months ago
commit c2f81a8163

@ -24,6 +24,11 @@ namespace DS.WMS.Core.Application.Dtos
/// </summary> /// </summary>
public BusinessType BusinessType { get; set; } public BusinessType BusinessType { get; set; }
/// <summary>
/// 客户ID
/// </summary>
public long CustomerId { get; set; }
/// <summary> /// <summary>
/// 客户名称 /// 客户名称
/// </summary> /// </summary>

@ -1,5 +1,4 @@
using System.Runtime.Serialization; using DS.Module.Core.Extensions;
using DS.Module.Core.Extensions;
namespace DS.WMS.Core.Application.Dtos namespace DS.WMS.Core.Application.Dtos
{ {
@ -18,6 +17,9 @@ namespace DS.WMS.Core.Application.Dtos
/// </summary> /// </summary>
public string ApplicationNO { get; set; } public string ApplicationNO { get; set; }
/// <summary>
/// 客户名称/结算单位ID
/// </summary>
public long? CustomerId { get; set; } public long? CustomerId { get; set; }
/// <summary> /// <summary>
@ -98,7 +100,6 @@ namespace DS.WMS.Core.Application.Dtos
/// <summary> /// <summary>
/// 所属分部 /// 所属分部
/// </summary> /// </summary>
[IgnoreDataMember]
public long? SaleDeptId { get; set; } public long? SaleDeptId { get; set; }
/// <summary> /// <summary>

@ -16,6 +16,11 @@ namespace DS.WMS.Core.Application.Dtos
/// <summary> /// <summary>
/// 业务信息 /// 业务信息
/// </summary> /// </summary>
public List<BizItem> Items { get; set; } public List<BizItem> Items { get; set; } = [];
/// <summary>
/// 查询条件字符串
/// </summary>
public string? QueryString { get; set; }
} }
} }

@ -110,13 +110,6 @@ namespace DS.WMS.Core.Application.Entity
[SugarColumn(ColumnDescription = "驳回原因", Length = 200, IsNullable = true)] [SugarColumn(ColumnDescription = "驳回原因", Length = 200, IsNullable = true)]
public string? Reason { get; set; } public string? Reason { get; set; }
/// <summary>
/// 工作流ID
/// </summary>
[SugarColumn(ColumnDescription = "工作流ID", IsNullable = true)]
public long? FlowId { get; set; }
/// <summary> /// <summary>
/// 是否已打印 /// 是否已打印
/// </summary> /// </summary>

@ -13,10 +13,14 @@ namespace DS.WMS.Core.Application.Method
/// <summary> /// <summary>
/// 申请单审核服务 /// 申请单审核服务
/// </summary> /// </summary>
public class ApplicationAuditService<TEntity> : FeeServiceBase, IApplicationAuditService<TEntity> public abstract class ApplicationAuditService<TEntity> : FeeServiceBase, IApplicationAuditService<TEntity>
where TEntity : ApplicationForm, new() where TEntity : ApplicationForm, new()
{ {
internal static readonly TaskBaseTypeEnum[] AuditTypes = [TaskBaseTypeEnum.APPLICATION_PAYMENT_AUDIT]; /// <summary>
/// 适用于当前申请单的审核类型
/// </summary>
public abstract TaskBaseTypeEnum AuditType { get; }
readonly IClientFlowInstanceService flowService; readonly IClientFlowInstanceService flowService;
/// <summary> /// <summary>
@ -36,7 +40,7 @@ namespace DS.WMS.Core.Application.Method
/// <returns></returns> /// <returns></returns>
public async Task<DataResult> AuditAsync(int yesOrNo, string? remark) public async Task<DataResult> AuditAsync(int yesOrNo, string? remark)
{ {
var recordIds = await GetCurrentFlowsQuery(AuditTypes).Select(x => x.BusinessId).ToArrayAsync(); var recordIds = await GetCurrentFlowsQuery([AuditType]).Select(x => x.BusinessId).ToArrayAsync();
//没有待审批的列表直接返回不再执行后续查询 //没有待审批的列表直接返回不再执行后续查询
if (recordIds.Length == 0) if (recordIds.Length == 0)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NoAuditItems)); return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NoAuditItems));
@ -55,49 +59,34 @@ namespace DS.WMS.Core.Application.Method
{ {
Id = x.Id, Id = x.Id,
ApplicationNO = x.ApplicationNO, ApplicationNO = x.ApplicationNO,
Status = x.Status, Status = x.Status
FlowId = x.FlowId
}).ToListAsync(); }).ToListAsync();
if (apps.Count == 0) if (apps.Count == 0)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData)); return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
if (apps.Exists(x => !x.FlowId.HasValue))
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NotInFlows));
var result = PreAudit(apps); var result = PreAudit(apps);
if (!result.Succeeded) if (!result.Succeeded)
return result; return result;
var flowIds = apps.Select(x => x.FlowId.GetValueOrDefault()); var flows = await flowService.GetInstanceByBSIdAsync(AuditType, null, request.Ids);
var flows = await Db.Queryable<FlowInstance>().Where(x => flowIds.Contains(x.Id)).ToListAsync(); if (flows.Count != request.Ids.Length)
if (flows.Count == 0)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FlowNotFound)); return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FlowNotFound));
if (flows.Exists(x => !x.MakerList.Contains(User.UserId)))
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.AuditUnauthorization));
List<string> list = []; List<string> list = [];
foreach (var app in apps) foreach (var item in flows)
{ {
var flow = flows.Find(x => x.Id == app.FlowId.Value);
if (flow == null)
continue;
result = flowService.AuditFlowInstance(new FlowAuditInfo result = flowService.AuditFlowInstance(new FlowAuditInfo
{ {
Instance = flow, Instance = item,
Status = request.Result, Status = request.Result,
AuditNote = request.Remark AuditNote = request.Remark
}); });
if (!result.Succeeded) if (!result.Succeeded)
list.Add(app.ApplicationNO); return result;
} }
if (list.Count > 0)
return DataResult.Failed($"{MultiLanguageConst.Operation_Failed}{string.Join("", list)}");
return DataResult.Success; return DataResult.Success;
} }
@ -199,8 +188,7 @@ namespace DS.WMS.Core.Application.Method
x.AuditerId, x.AuditerId,
x.AuditerName, x.AuditerName,
x.AuditTime, x.AuditTime,
x.Reason, x.Reason
x.FlowId
}).ExecuteCommandAsync(); }).ExecuteCommandAsync();
} }
} }

@ -1,4 +1,5 @@
using DS.Module.Core; using System.Collections.Generic;
using DS.Module.Core;
using DS.Module.Core.Extensions; using DS.Module.Core.Extensions;
using DS.WMS.Core.Application.Dtos; using DS.WMS.Core.Application.Dtos;
using DS.WMS.Core.Application.Entity; using DS.WMS.Core.Application.Entity;
@ -9,6 +10,8 @@ using DS.WMS.Core.Fee.Method;
using DS.WMS.Core.Flow.Dtos; using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Entity; using DS.WMS.Core.Flow.Entity;
using DS.WMS.Core.Flow.Interface; using DS.WMS.Core.Flow.Interface;
using DS.WMS.Core.Op.Dtos.TaskInteraction;
using DS.WMS.Core.Op.Interface.TaskInteraction;
using DS.WMS.Core.Sys.Interface; using DS.WMS.Core.Sys.Interface;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using SqlSugar; using SqlSugar;
@ -24,6 +27,7 @@ namespace DS.WMS.Core.Application.Method
{ {
readonly IClientFlowInstanceService flowService; readonly IClientFlowInstanceService flowService;
readonly Lazy<ICommonService> commonService; readonly Lazy<ICommonService> commonService;
readonly ITaskService taskService;
/// <summary> /// <summary>
/// 初始化 /// 初始化
@ -33,6 +37,7 @@ namespace DS.WMS.Core.Application.Method
{ {
flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>(); flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>();
commonService = new Lazy<ICommonService>(serviceProvider.GetRequiredService<ICommonService>()); commonService = new Lazy<ICommonService>(serviceProvider.GetRequiredService<ICommonService>());
taskService = serviceProvider.GetRequiredService<ITaskService>();
} }
#region 保存 #region 保存
@ -44,7 +49,7 @@ namespace DS.WMS.Core.Application.Method
/// <returns></returns> /// <returns></returns>
public async Task<DataResult<TEntity>> SaveAsync(TEntity application) public async Task<DataResult<TEntity>> SaveAsync(TEntity application)
{ {
TEntity dbValue = null; TEntity? dbValue = null;
if (application.Id > 0) if (application.Id > 0)
{ {
//修改需检查申请单状态 //修改需检查申请单状态
@ -110,8 +115,6 @@ namespace DS.WMS.Core.Application.Method
{ {
detail.ApplicationId = application.Id; detail.ApplicationId = application.Id;
var fee = fees.Find(x => x.Id == detail.RecordId); var fee = fees.Find(x => x.Id == detail.RecordId);
//detail.BusinessId = fee.BusinessId;
//detail.BusinessType = fee.BusinessType;
detail.ExchangeRate = detail.ExchangeRate ?? fee.ExchangeRate; detail.ExchangeRate = detail.ExchangeRate ?? fee.ExchangeRate;
detail.FeeId = fee.FeeId; detail.FeeId = fee.FeeId;
detail.FeeName = fee.FeeName; detail.FeeName = fee.FeeName;
@ -179,7 +182,12 @@ namespace DS.WMS.Core.Application.Method
public async Task<DataResult<TEntity>> SaveAsync(ApplicationRequest<TEntity> request) public async Task<DataResult<TEntity>> SaveAsync(ApplicationRequest<TEntity> request)
{ {
request.Application ??= new(); request.Application ??= new();
request.Application.Details = await GetDetailsAsync(request.Items);
List<IConditionalModel> whereList = [];
if (!string.IsNullOrEmpty(request.QueryString))
whereList = Db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryString);
request.Application.Details = await GetDetailsAsync(request.Items, whereList);
return await SaveAsync(request.Application); return await SaveAsync(request.Application);
} }
@ -189,7 +197,7 @@ namespace DS.WMS.Core.Application.Method
/// <param name="application">提交的申请单</param> /// <param name="application">提交的申请单</param>
/// <param name="dbValue">数据库值新增时为null</param> /// <param name="dbValue">数据库值新增时为null</param>
/// <returns></returns> /// <returns></returns>
protected virtual DataResult EnsureApplication(TEntity application, TEntity dbValue) protected virtual DataResult EnsureApplication(TEntity application, TEntity? dbValue)
{ {
return DataResult.Success; return DataResult.Success;
} }
@ -248,8 +256,9 @@ namespace DS.WMS.Core.Application.Method
/// 获取业务所关联的申请明细 /// 获取业务所关联的申请明细
/// </summary> /// </summary>
/// <param name="items"></param> /// <param name="items"></param>
/// <param name="conditions"></param>
/// <returns></returns> /// <returns></returns>
protected virtual Task<List<ApplicationDetail>> GetDetailsAsync(IEnumerable<BizItem> items) protected virtual Task<List<ApplicationDetail>> GetDetailsAsync(IEnumerable<BizItem> items, List<IConditionalModel>? conditions)
{ {
return Task.FromResult(new List<ApplicationDetail>()); return Task.FromResult(new List<ApplicationDetail>());
} }
@ -402,13 +411,36 @@ namespace DS.WMS.Core.Application.Method
if (!result.Succeeded) if (!result.Succeeded)
return result; return result;
List<TEntity> entities = new List<TEntity>(idArray.Length);
bool hasAuthorized = await taskService.HasAuthorizedAsync();
await TenantDb.Ado.BeginTranAsync();
try
{
if (hasAuthorized)
{
for (int i = 0; i < idArray.Length; i++)
{
var req = new TaskCreationRequest
{
BusinessId = idArray[i],
TaskTypeName = auditType.ToString()
};
result = await taskService.CreateTaskAsync(req);
if (result.Succeeded)
{
var entity = new TEntity { Id = req.BusinessId };
OnSubmitApproval(entity);
entities.Add(entity);
}
}
}
else
{
var template = await FindTemplateAsync(auditType); var template = await FindTemplateAsync(auditType);
if (template == null) if (template == null)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound)); return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound));
await TenantDb.Ado.BeginTranAsync();
try
{
var list2 = list.Select(x => new TEntity { Id = x.Id, Status = x.Status }).ToList(); var list2 = list.Select(x => new TEntity { Id = x.Id, Status = x.Status }).ToList();
foreach (var item in list2) foreach (var item in list2)
{ {
@ -423,12 +455,13 @@ namespace DS.WMS.Core.Application.Method
var instance = result.Data as FlowInstance; var instance = result.Data as FlowInstance;
flowService.StartFlowInstance(instance.Id.ToString()); flowService.StartFlowInstance(instance.Id.ToString());
item.FlowId = instance.Id;
OnSubmitApproval(item); OnSubmitApproval(item);
await TenantDb.Updateable(item).UpdateColumns(x => new { x.Status, x.FlowId }).ExecuteCommandAsync(); entities.Add(item);
}
} }
} }
await TenantDb.Updateable(entities).UpdateColumns(x => new { x.Status }).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync(); await TenantDb.Ado.CommitTranAsync();
return DataResult.Success; return DataResult.Success;
} }
@ -471,33 +504,29 @@ namespace DS.WMS.Core.Application.Method
{ {
Id = x.Id, Id = x.Id,
ApplicationNO = x.ApplicationNO, ApplicationNO = x.ApplicationNO,
Status = x.Status, Status = x.Status
FlowId = x.FlowId
}).ToListAsync(); }).ToListAsync();
if (list.Count == 0) if (list.Count == 0)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData)); return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
//未在审批状态中 //未在审批状态中
var list2 = list.FindAll(x => x.FlowId == null).ToList(); if (!await flowService.Exists(ids: ids))
if (list2.Count > 0) return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NotInAudit));
{
string msg = string.Join("; ", list2.Select(x => $"{x.ApplicationNO}"));
return DataResult.Failed(string.Format(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.NoNeedWithdraw)), msg));
}
var flows = list.Select(x => new FlowInstance { Id = x.FlowId.Value, FlowStatus = FlowStatusEnum.Draft, MakerList = string.Empty }).ToList(); DataResult result;
DateTime dtNow = DateTime.Now;
try try
{ {
await Db.Updateable(flows).UpdateColumns(x => new { x.FlowStatus, x.MakerList }).ExecuteCommandAsync(); result = await flowService.WithdrawAsync(ids);
if (!result.Succeeded)
return result;
foreach (var item in list) foreach (var item in list)
{ {
OnWithdraw(item); OnWithdraw(item);
item.FlowId = null;
} }
await TenantDb.Updateable(list).UpdateColumns(x => new { x.Status, x.FlowId }).ExecuteCommandAsync(); await TenantDb.Updateable(list).UpdateColumns(x => new { x.Status }).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync(); await TenantDb.Ado.CommitTranAsync();
return DataResult.Success; return DataResult.Success;

@ -18,6 +18,8 @@ namespace DS.WMS.Core.Application.Method
/// </summary> /// </summary>
public class InvoiceApplicationAuditService : ApplicationAuditService<InvoiceApplication>, IInvoiceApplicationAuditService public class InvoiceApplicationAuditService : ApplicationAuditService<InvoiceApplication>, IInvoiceApplicationAuditService
{ {
public override TaskBaseTypeEnum AuditType => TaskBaseTypeEnum.APPLICATION_INVOICE_AUDIT;
/// <summary> /// <summary>
/// 初始化 /// 初始化
/// </summary> /// </summary>

@ -34,10 +34,7 @@ namespace DS.WMS.Core.Application.Method
/// <returns></returns> /// <returns></returns>
public async Task<DataResult<List<InvoiceApplicationDto>>> GetListAsync(PageRequest request) public async Task<DataResult<List<InvoiceApplicationDto>>> GetListAsync(PageRequest request)
{ {
List<IConditionalModel> whereList = []; List<IConditionalModel> whereList = request.GetConditionalModels(Db);
if (!request.QueryCondition.IsNullOrEmpty())
whereList = Db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var result = await TenantDb.Queryable<InvoiceApplication>().Where(whereList) var result = await TenantDb.Queryable<InvoiceApplication>().Where(whereList)
.Select((x) => new InvoiceApplicationDto .Select((x) => new InvoiceApplicationDto
{ {
@ -243,6 +240,7 @@ namespace DS.WMS.Core.Application.Method
RecordId = f.Id, RecordId = f.Id,
BusinessId = f.BusinessId, BusinessId = f.BusinessId,
BusinessType = f.BusinessType, BusinessType = f.BusinessType,
CustomerId = f.CustomerId,
CustomerName = f.CustomerName, CustomerName = f.CustomerName,
FeeId = f.FeeId, FeeId = f.FeeId,
FeeName = f.FeeName, FeeName = f.FeeName,
@ -285,6 +283,7 @@ namespace DS.WMS.Core.Application.Method
{ {
Id = a.Id, Id = a.Id,
ApplicationNO = a.ApplicationNO, ApplicationNO = a.ApplicationNO,
AutualCustomerName = a.AutualCustomerName,
Currency = a.Currency, Currency = a.Currency,
CustomerId = a.CustomerId, CustomerId = a.CustomerId,
CustomerName = a.CustomerName, CustomerName = a.CustomerName,
@ -298,6 +297,7 @@ namespace DS.WMS.Core.Application.Method
InvoiceBillNO = a.InvoiceBillNO, InvoiceBillNO = a.InvoiceBillNO,
InvoiceRemark = a.InvoiceRemark, InvoiceRemark = a.InvoiceRemark,
SaleDeptId = a.SaleDeptId, SaleDeptId = a.SaleDeptId,
TaxID = a.TaxID,
Note = a.Note, Note = a.Note,
ApplyAmount = a.ApplyAmount, ApplyAmount = a.ApplyAmount,
OtherCurrencyAmount = a.OtherCurrencyAmount, OtherCurrencyAmount = a.OtherCurrencyAmount,
@ -305,12 +305,9 @@ namespace DS.WMS.Core.Application.Method
CustomerAddTel = a.CustomerAddTel, CustomerAddTel = a.CustomerAddTel,
CustomerBankId = a.CustomerBankId, CustomerBankId = a.CustomerBankId,
CustomerBankName = b1.BankName, CustomerBankName = b1.BankName + " " + b1.Account,
CustomerAccount = b1.Account,
USDCustomerBankId = a.USDCustomerBankId, USDCustomerBankId = a.USDCustomerBankId,
USDCustomerBankName = b2.BankName, USDCustomerBankName = b2.BankName + " " + b2.Account
USDCustomerAccount = b2.Account
}).FirstAsync(); }).FirstAsync();
if (dto != null) if (dto != null)
@ -410,18 +407,17 @@ namespace DS.WMS.Core.Application.Method
return rows > 0 ? DataResult.Success : DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed)); return rows > 0 ? DataResult.Success : DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
} }
protected override async Task<List<ApplicationDetail>> GetDetailsAsync(IEnumerable<BizItem> items) protected override async Task<List<ApplicationDetail>> GetDetailsAsync(IEnumerable<BizItem> items, List<IConditionalModel>? conditions)
{ {
var ids1 = items.Select(x => x.Id); var ids1 = items.Select(x => x.Id);
var ids2 = items.Select(x => x.BusinessType); var ids2 = items.Select(x => x.BusinessType);
var list = await TenantDb.Queryable<FeeRecord>().Where(x => var list = await TenantDb.Queryable<FeeRecord>().Where(x =>
ids1.Contains(x.BusinessId) && ids2.Contains(x.BusinessType) && x.FeeStatus == FeeStatus.AuditPassed) ids1.Contains(x.BusinessId) && ids2.Contains(x.BusinessType) && x.FeeStatus == FeeStatus.AuditPassed)
.Where(conditions)
.Select(x => new ApplicationDetail .Select(x => new ApplicationDetail
{ {
Id = x.Id, Id = x.Id,
//BusinessId = x.BusinessId,
//BusinessType = x.BusinessType,
ApplyAmount = x.Amount - x.InvoiceAmount - x.OrderInvoiceAmount + x.OrderInvSettlementAmount, ApplyAmount = x.Amount - x.InvoiceAmount - x.OrderInvoiceAmount + x.OrderInvSettlementAmount,
ExchangeRate = x.ExchangeRate, ExchangeRate = x.ExchangeRate,
OriginalCurrency = x.Currency OriginalCurrency = x.Currency
@ -434,14 +430,11 @@ namespace DS.WMS.Core.Application.Method
return list; return list;
} }
protected override DataResult EnsureApplication(InvoiceApplication application, InvoiceApplication dbValue) protected override DataResult EnsureApplication(InvoiceApplication application, InvoiceApplication? dbValue)
{ {
if (dbValue != null && dbValue.Status != InvoiceApplicationStatus.Pending && dbValue.Status != InvoiceApplicationStatus.AuditRejected) if (dbValue != null && dbValue.Status != InvoiceApplicationStatus.Pending && dbValue.Status != InvoiceApplicationStatus.AuditRejected)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.ApplicationSaveStatusError)); return DataResult.FailedWithDesc(nameof(MultiLanguageConst.ApplicationSaveStatusError));
if (application.Currency.IsNullOrEmpty())
application.Currency = FeeCurrency.RMB_CODE;
return DataResult.Success; return DataResult.Success;
} }

@ -15,10 +15,12 @@ using SqlSugar;
namespace DS.WMS.Core.Application.Method namespace DS.WMS.Core.Application.Method
{ {
/// <summary> /// <summary>
/// 申请审核服务 /// 费申请审核服务
/// </summary> /// </summary>
public class PaymentApplicationAuditService : ApplicationAuditService<PaymentApplication>, IPaymentApplicationAuditService public class PaymentApplicationAuditService : ApplicationAuditService<PaymentApplication>, IPaymentApplicationAuditService
{ {
public override TaskBaseTypeEnum AuditType => TaskBaseTypeEnum.APPLICATION_PAYMENT_AUDIT;
/// <summary> /// <summary>
/// 初始化 /// 初始化
/// </summary> /// </summary>
@ -51,7 +53,7 @@ namespace DS.WMS.Core.Application.Method
break; break;
case AuditStatusForQuery.MarkerOnly: case AuditStatusForQuery.MarkerOnly:
var ids = await GetCurrentFlowsQuery(AuditTypes).Select(x => x.BusinessId).ToListAsync(); var ids = await GetCurrentFlowsQuery([AuditType]).Select(x => x.BusinessId).ToListAsync();
if (ids.Count == 0) if (ids.Count == 0)
ids.Add(0L); ids.Add(0L);
query = query.Where(x => ids.Contains(x.Id)); query = query.Where(x => ids.Contains(x.Id));

@ -376,13 +376,14 @@ namespace DS.WMS.Core.Application.Method
return DataResult<PaymentApplicationDto>.Success(dto); return DataResult<PaymentApplicationDto>.Success(dto);
} }
protected override async Task<List<ApplicationDetail>> GetDetailsAsync(IEnumerable<BizItem> items) protected override async Task<List<ApplicationDetail>> GetDetailsAsync(IEnumerable<BizItem> items, List<IConditionalModel>? conditions)
{ {
var ids1 = items.Select(x => x.Id); var ids1 = items.Select(x => x.Id);
var ids2 = items.Select(x => x.BusinessType); var ids2 = items.Select(x => x.BusinessType);
var list = await TenantDb.Queryable<FeeRecord>().Where(x => var list = await TenantDb.Queryable<FeeRecord>().Where(x =>
ids1.Contains(x.BusinessId) && ids2.Contains(x.BusinessType) && x.FeeStatus == FeeStatus.AuditPassed) ids1.Contains(x.BusinessId) && ids2.Contains(x.BusinessType) && x.FeeStatus == FeeStatus.AuditPassed)
.Where(conditions)
.Select(x => new ApplicationDetail .Select(x => new ApplicationDetail
{ {
RecordId = x.Id, RecordId = x.Id,
@ -400,7 +401,7 @@ namespace DS.WMS.Core.Application.Method
} }
protected override DataResult EnsureApplication(PaymentApplication application, PaymentApplication dbValue) protected override DataResult EnsureApplication(PaymentApplication application, PaymentApplication? dbValue)
{ {
if (dbValue != null) if (dbValue != null)
{ {

@ -15,7 +15,6 @@ using DS.WMS.Core.Sys.Entity;
using Mapster; using Mapster;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using SqlSugar; using SqlSugar;
using static AnyDiff.DifferenceLines;
namespace DS.WMS.Core.Fee.Method namespace DS.WMS.Core.Fee.Method
{ {

@ -56,8 +56,8 @@ public class InfoClient : SharedOrgModel<long>
/// <summary> /// <summary>
/// Desc:邮箱 /// Desc:邮箱
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "邮箱", Length = 50)] [SugarColumn(ColumnDescription = "邮箱", IsNullable = true, Length = 50)]
public string Email { get; set; } public string? Email { get; set; }
/// <summary> /// <summary>
/// Desc:网页 /// Desc:网页

@ -30,10 +30,21 @@ public class ClientBankService : ServiceBase, IClientBankService
{ {
//序列化查询条件 //序列化查询条件
var whereList = request.GetConditionalModels(Db); var whereList = request.GetConditionalModels(Db);
var data = TenantDb.Queryable<InfoClientBank>() var result = TenantDb.Queryable<InfoClientBank>()
.Where(whereList) .Where(whereList)
.Select<ClientBankRes>().ToQueryPage(request.PageCondition); .Select<ClientBankRes>().ToQueryPage(request.PageCondition);
return data;
if (result.Data?.Count > 0)
{
var ids = result.Data.Select(x => x.Id);
var list = TenantDb.Queryable<InvoiceHeader>().Where(x => ids.Contains(x.RelativeId)).ToList();
foreach (var item in result.Data)
{
item.InvoiceHeaders = list.FindAll(x => x.RelativeId == item.Id);
}
}
return result;
} }
/// <summary> /// <summary>

@ -7,7 +7,7 @@ using DS.WMS.Core.Op.Interface.TaskInteraction;
namespace DS.WMS.Core.Op.Method.TaskInteraction namespace DS.WMS.Core.Op.Method.TaskInteraction
{ {
/// <summary> /// <summary>
/// 邮件配置服务 /// 邮件模板配置服务
/// </summary> /// </summary>
public class TaskMailService : ServiceBase, ITaskMailService public class TaskMailService : ServiceBase, ITaskMailService
{ {
@ -27,7 +27,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
public async Task<DataResult<List<BusinessTaskMail>>> GetListAsync(PageRequest request) public async Task<DataResult<List<BusinessTaskMail>>> GetListAsync(PageRequest request)
{ {
var whereList = request.GetConditionalModels(Db); var whereList = request.GetConditionalModels(Db);
return await TenantDb.Queryable<BusinessTaskMail>().Includes(x => x.Receiver).Includes(x => x.Sender).Includes(x => x.CC) return await TenantDb.Queryable<BusinessTaskMail>()
.Includes(x => x.Receiver).Includes(x => x.Sender).Includes(x => x.CC)
.Where(whereList).ToQueryPageAsync(request.PageCondition); .Where(whereList).ToQueryPageAsync(request.PageCondition);
} }
@ -39,7 +40,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
public async Task<DataResult<BusinessTaskMail>> GetAsync(long id) public async Task<DataResult<BusinessTaskMail>> GetAsync(long id)
{ {
var entity = await TenantDb.Queryable<BusinessTaskMail>() var entity = await TenantDb.Queryable<BusinessTaskMail>()
.Includes(x => x.Receiver).Includes(x => x.Sender).Includes(x => x.Attachments).Includes(x => x.CC) .Includes(x => x.Receiver).Includes(x => x.Sender).Includes(x => x.CC).Includes(x => x.Attachments)
.Where(x => x.Id == id).FirstAsync(); .Where(x => x.Id == id).FirstAsync();
return DataResult<BusinessTaskMail>.Success(entity); return DataResult<BusinessTaskMail>.Success(entity);
@ -53,8 +54,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
public async Task<BusinessTaskMail> GetAsync(string name) public async Task<BusinessTaskMail> GetAsync(string name)
{ {
return await TenantDb.Queryable<BusinessTaskMail>() return await TenantDb.Queryable<BusinessTaskMail>()
.Includes(x => x.Receiver).Includes(x => x.Sender).Includes(x => x.Attachments).Includes(x => x.CC) .Includes(x => x.Receiver).Includes(x => x.Sender).Includes(x => x.CC).Includes(x => x.Attachments)
.Where(x => x.Name == name).FirstAsync(); .Where(x => x.Name.Contains(name)).FirstAsync();
} }
/// <summary> /// <summary>
@ -73,11 +74,15 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
taskMail.Sender ??= new(); taskMail.Sender ??= new();
taskMail.CC ??= new(); taskMail.CC ??= new();
taskMail = await TenantDb.InsertNav(taskMail).Include(x => x.Receiver).Include(x => x.Sender).ExecuteReturnEntityAsync(); taskMail = await TenantDb.InsertNav(taskMail)
.Include(x => x.Receiver).Include(x => x.Sender).Include(x => x.CC)
.ExecuteReturnEntityAsync();
} }
else else
{ {
await TenantDb.UpdateNav(taskMail).Include(x => x.Receiver).Include(x => x.Sender).ExecuteCommandAsync(); await TenantDb.UpdateNav(taskMail)
.Include(x => x.Receiver).Include(x => x.Sender).Include(x => x.CC)
.ExecuteCommandAsync();
} }
if (taskMail.Attachments?.Count > 0) if (taskMail.Attachments?.Count > 0)
@ -88,6 +93,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
await TenantDb.Deleteable<BusinessTaskAttachment>().Where(x => x.TaskMailId == taskMail.Id).ExecuteCommandAsync(); await TenantDb.Deleteable<BusinessTaskAttachment>().Where(x => x.TaskMailId == taskMail.Id).ExecuteCommandAsync();
await TenantDb.Insertable(taskMail.Attachments).ExecuteCommandAsync(); await TenantDb.Insertable(taskMail.Attachments).ExecuteCommandAsync();
//await TenantDb.Storageable(taskMail.Attachments).DefaultAddElseUpdate().ExecuteCommandAsync();
} }
await TenantDb.Ado.CommitTranAsync(); await TenantDb.Ado.CommitTranAsync();
@ -113,7 +120,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
try try
{ {
await TenantDb.DeleteNav<BusinessTaskMail>(x => model.Ids.Contains(x.Id)) await TenantDb.DeleteNav<BusinessTaskMail>(x => model.Ids.Contains(x.Id))
.Include(x => x.Receiver).Include(x => x.Sender).Include(x => x.Attachments) .Include(x => x.Receiver).Include(x => x.Sender).Include(x => x.CC).Include(x => x.Attachments)
.ExecuteCommandAsync(); .ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync(); await TenantDb.Ado.CommitTranAsync();
@ -127,6 +134,5 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
} }
} }
} }
} }

@ -24,5 +24,22 @@
/// 接收人信息姓名 /// 接收人信息姓名
/// </summary> /// </summary>
public string RecvUserName { get; set; } public string RecvUserName { get; set; }
/// <summary>
/// 任务主键
/// </summary>
public long TaskId { get; set; }
/// <summary>
/// 接收人信息状态
/// </summary>
public string RecvUserStatus { get; set; }
/// <summary>
/// 接收人信息状态名称
/// </summary>
public string RecvUserStatusName { get; set; }
/// <summary>
/// 接收人信息状态时间
/// </summary>
public DateTime? RecvUserStatusTime { get; set; }
} }
} }

@ -36,8 +36,8 @@ namespace DS.WMS.Core.TaskPlat.Entity
/// <summary> /// <summary>
/// 状态名称 /// 状态名称
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "状态名称", IsNullable = true, Length = 50)] [SugarColumn(ColumnDescription = "状态名称", IsNullable = false, Length = 50, DefaultValue = "")]
public string? StatusName { get; set; } public string StatusName { get; set; } = "";
/// <summary> /// <summary>
/// 状态发生时间 /// 状态发生时间

@ -2688,10 +2688,10 @@ namespace DS.WMS.Core.TaskPlat.Method
{ {
return DataResult.Failed("未执行:" + seaExport.Message); return DataResult.Failed("未执行:" + seaExport.Message);
} }
if (seaExport.Data.MBLNO != taskBcInfo.MBL_NO && seaExport.Data.BookingNo != taskBcInfo.MBL_NO) //if (seaExport.Data.MBLNO != taskBcInfo.MBL_NO && seaExport.Data.BookingNo != taskBcInfo.MBL_NO)
{ //{
return DataResult.Failed(string.Format(MultiLanguageConst.GetDescription(MultiLanguageConst.BCMblnoNotMatchSeaexport), seaExport.Data.MBLNO, taskBcInfo.MBL_NO)); // return DataResult.Failed(string.Format(MultiLanguageConst.GetDescription(MultiLanguageConst.BCMblnoNotMatchSeaexport), seaExport.Data.MBLNO, taskBcInfo.MBL_NO));
} //}
TaskFlowDataContext dataContext = new((TaskFlowDataNameConst.Business, seaExport.Data)); TaskFlowDataContext dataContext = new((TaskFlowDataNameConst.Business, seaExport.Data));
@ -2699,10 +2699,10 @@ namespace DS.WMS.Core.TaskPlat.Method
var taskInfo = new TaskBaseInfo var taskInfo = new TaskBaseInfo
{ {
Id = SnowFlakeSingle.Instance.NextId(), Id = SnowFlakeSingle.Instance.NextId(),
STATUS = TaskStatusEnum.Complete.ToString(), STATUS = TaskStatusEnum.Create.ToString(),
STATUS_NAME = TaskStatusEnum.Complete.EnumDescription(), STATUS_NAME = TaskStatusEnum.Create.EnumDescription(),
IS_EXCEPT = 0, IS_EXCEPT = 0,
IS_COMPLETE = 1, IS_COMPLETE = 0,
MBL_NO = taskBcInfo.MBL_NO, MBL_NO = taskBcInfo.MBL_NO,
TASK_TYPE = TaskBaseTypeEnum.BC.ToString(), TASK_TYPE = TaskBaseTypeEnum.BC.ToString(),
TASK_TYPE_NAME = TaskBaseTypeEnum.BC.EnumDescription(), TASK_TYPE_NAME = TaskBaseTypeEnum.BC.EnumDescription(),
@ -2923,7 +2923,7 @@ namespace DS.WMS.Core.TaskPlat.Method
TaskFlowRuner taskFlow = new TaskFlowRuner(tenantDb, serviceProvider); TaskFlowRuner taskFlow = new TaskFlowRuner(tenantDb, serviceProvider);
await taskFlow.Run(TaskBaseTypeEnum.BC, taskInfo.Id, dataContext); await taskFlow.Run(TaskBaseTypeEnum.BC, taskInfo.Id, dataContext);
return DataResult.Successed("上传完成,请审核相关任务及订单状态", MultiLanguageConst.UploadBcThenRunTaskSuccess); return DataResult.Successed("上传完成,请查看相关任务状态", MultiLanguageConst.UploadBcThenRunTaskSuccess);
} }
/// <summary> /// <summary>

@ -351,10 +351,12 @@ namespace DS.WMS.Core.TaskPlat.Method
//任务不考虑OrgId,这里去掉 //任务不考虑OrgId,这里去掉
tenantDb.QueryFilter.Clear<IOrgId>(); tenantDb.QueryFilter.Clear<IOrgId>();
var time = DateTime.Now.AddMonths(-3);
var taskList = await tenantDb.Queryable<TaskBaseInfo>() var taskList = await tenantDb.Queryable<TaskBaseInfo>()
.Where(x => x.IS_PUBLIC == 1 .Where(x => x.IS_PUBLIC == 1
&& x.STATUS == TaskStatusEnum.Create.ToString() && x.STATUS == TaskStatusEnum.Create.ToString()
&& !string.IsNullOrEmpty(x.MBL_NO)) && !string.IsNullOrEmpty(x.MBL_NO)
&& x.CreateTime > time)
.WhereIF(taskIdList != null && taskIdList.Count > 0, x => taskIdList!.Contains(x.Id)) .WhereIF(taskIdList != null && taskIdList.Count > 0, x => taskIdList!.Contains(x.Id))
//.Where(x => x.Id == 1813475270208917504 || x.Id == 1816277472539447296 || x.Id == 1813509723408961536) //.Where(x => x.Id == 1813475270208917504 || x.Id == 1816277472539447296 || x.Id == 1813509723408961536)
.ToListAsync(x => new TaskBaseInfo .ToListAsync(x => new TaskBaseInfo
@ -589,7 +591,7 @@ namespace DS.WMS.Core.TaskPlat.Method
x.StatusTime = statusTime; x.StatusTime = statusTime;
}); });
await tenantDb.Updateable(taskBaseAllocationList).UpdateColumns(x => new await tenantDb.CopyNew().Updateable(taskBaseAllocationList).UpdateColumns(x => new
{ {
x.UpdateBy, x.UpdateBy,
x.UpdateTime, x.UpdateTime,

@ -1716,9 +1716,10 @@ namespace DS.WMS.Core.TaskPlat.Method
//throw new ArgumentException("TaskCategory"); //throw new ArgumentException("TaskCategory");
} }
var userId = long.Parse(user.UserId); var userId = long.Parse(user.UserId);
DataResult<List<dynamic>> result; DataResult<List<dynamic>> result = new();
try
{
switch (taskType) switch (taskType)
{ {
case TaskBaseTypeEnum.BC: case TaskBaseTypeEnum.BC:
@ -1732,9 +1733,6 @@ namespace DS.WMS.Core.TaskPlat.Method
result = await queryable.Select<dynamic>((t, a, bc) => new result = await queryable.Select<dynamic>((t, a, bc) => new
{ {
Id = t.Id.SelectAll(), Id = t.Id.SelectAll(),
TASK_USER_STATUS = a.Status,
TASK_USER_STATUS_NAME = a.StatusName,
TASK_USER_STATUS_TIME = a.StatusTime,
bc.BUSI_TYPE, bc.BUSI_TYPE,
bc.SHIPPER, bc.SHIPPER,
bc.CONSIGNEE, bc.CONSIGNEE,
@ -1825,9 +1823,6 @@ namespace DS.WMS.Core.TaskPlat.Method
result = await queryable.Select<dynamic>((t, a, bc) => new result = await queryable.Select<dynamic>((t, a, bc) => new
{ {
PK_ID = t.Id.SelectAll(), PK_ID = t.Id.SelectAll(),
TASK_USER_STATUS = a.Status,
TASK_USER_STATUS_NAME = a.StatusName,
TASK_USER_STATUS_TIME = a.StatusTime,
bc.CARRIER, bc.CARRIER,
//bc.MBL_NO, //bc.MBL_NO,
bc.TAKE_ISSUETYPE_NAME, bc.TAKE_ISSUETYPE_NAME,
@ -1882,9 +1877,6 @@ namespace DS.WMS.Core.TaskPlat.Method
result = await queryable.Select<dynamic>((t, a, bc) => new result = await queryable.Select<dynamic>((t, a, bc) => new
{ {
PK_ID = t.Id.SelectAll(), PK_ID = t.Id.SelectAll(),
TASK_USER_STATUS = a.Status,
TASK_USER_STATUS_NAME = a.StatusName,
TASK_USER_STATUS_TIME = a.StatusTime,
bc.TASK_PKID, bc.TASK_PKID,
//bc.MBL_NO, //bc.MBL_NO,
bc.INVOICE_NO, bc.INVOICE_NO,
@ -1909,9 +1901,6 @@ namespace DS.WMS.Core.TaskPlat.Method
result = await queryable.Select<dynamic>((t, a, bc) => new result = await queryable.Select<dynamic>((t, a, bc) => new
{ {
PK_ID = t.Id.SelectAll(), PK_ID = t.Id.SelectAll(),
TASK_USER_STATUS = a.Status,
TASK_USER_STATUS_NAME = a.StatusName,
TASK_USER_STATUS_TIME = a.StatusTime,
bc.TASK_ID, bc.TASK_ID,
bc.BookingTruckId, bc.BookingTruckId,
bc.BookingId, bc.BookingId,
@ -1977,9 +1966,6 @@ namespace DS.WMS.Core.TaskPlat.Method
result = await queryable.Select<dynamic>((t, a, bc) => new result = await queryable.Select<dynamic>((t, a, bc) => new
{ {
PK_ID = t.Id.SelectAll(), PK_ID = t.Id.SelectAll(),
TASK_USER_STATUS = a.Status,
TASK_USER_STATUS_NAME = a.StatusName,
TASK_USER_STATUS_TIME = a.StatusTime,
bc.TASK_ID, bc.TASK_ID,
bc.CARRIER, bc.CARRIER,
bc.VESSEL, bc.VESSEL,
@ -2000,9 +1986,6 @@ namespace DS.WMS.Core.TaskPlat.Method
result = await queryable.Select<dynamic>((t, a, bc) => new result = await queryable.Select<dynamic>((t, a, bc) => new
{ {
PK_ID = t.Id.SelectAll(), PK_ID = t.Id.SelectAll(),
TASK_USER_STATUS = a.Status,
TASK_USER_STATUS_NAME = a.StatusName,
TASK_USER_STATUS_TIME = a.StatusTime,
bc.TASK_ID, bc.TASK_ID,
bc.PLAN_TYPE, bc.PLAN_TYPE,
bc.BATCH_NO, bc.BATCH_NO,
@ -2028,9 +2011,6 @@ namespace DS.WMS.Core.TaskPlat.Method
result = await queryable.Select<dynamic>((t, a, bc) => new result = await queryable.Select<dynamic>((t, a, bc) => new
{ {
PK_ID = t.Id.SelectAll(), PK_ID = t.Id.SelectAll(),
TASK_USER_STATUS = a.Status,
TASK_USER_STATUS_NAME = a.StatusName,
TASK_USER_STATUS_TIME = a.StatusTime,
bc.TASK_ID, bc.TASK_ID,
bc.CARRIER, bc.CARRIER,
//bc.MBL_NO, //bc.MBL_NO,
@ -2053,9 +2033,6 @@ namespace DS.WMS.Core.TaskPlat.Method
result = await queryable.Select<dynamic>((t, a, bc) => new result = await queryable.Select<dynamic>((t, a, bc) => new
{ {
PK_ID = t.Id.SelectAll(), PK_ID = t.Id.SelectAll(),
TASK_USER_STATUS = a.Status,
TASK_USER_STATUS_NAME = a.StatusName,
TASK_USER_STATUS_TIME = a.StatusTime,
bc.TASK_ID, bc.TASK_ID,
bc.CARRIER, bc.CARRIER,
bc.NOTICE_TYPE, bc.NOTICE_TYPE,
@ -2075,9 +2052,6 @@ namespace DS.WMS.Core.TaskPlat.Method
result = await queryable.Select<dynamic>((t, a, bc) => new result = await queryable.Select<dynamic>((t, a, bc) => new
{ {
PK_ID = t.Id.SelectAll(), PK_ID = t.Id.SelectAll(),
TASK_USER_STATUS = a.Status,
TASK_USER_STATUS_NAME = a.StatusName,
TASK_USER_STATUS_TIME = a.StatusTime,
bc.TASK_ID, bc.TASK_ID,
bc.SOURCE_SYSTEM, bc.SOURCE_SYSTEM,
bc.SOURCE_BUSI_TYPE, bc.SOURCE_BUSI_TYPE,
@ -2109,9 +2083,6 @@ namespace DS.WMS.Core.TaskPlat.Method
result = await queryable.Select<dynamic>((t, a, bc) => new result = await queryable.Select<dynamic>((t, a, bc) => new
{ {
PK_ID = t.Id.SelectAll(), PK_ID = t.Id.SelectAll(),
TASK_USER_STATUS = a.Status,
TASK_USER_STATUS_NAME = a.StatusName,
TASK_USER_STATUS_TIME = a.StatusTime,
bc.TASK_ID, bc.TASK_ID,
bc.VESSEL, bc.VESSEL,
bc.VOYNO, bc.VOYNO,
@ -2143,16 +2114,60 @@ namespace DS.WMS.Core.TaskPlat.Method
result = await queryable.Select<dynamic>((t, a) => new result = await queryable.Select<dynamic>((t, a) => new
{ {
PK_ID = t.Id.SelectAll(), PK_ID = t.Id.SelectAll(),
TASK_USER_STATUS = a.Status, //TASK_USER_STATUS = a.Status,
TASK_USER_STATUS_NAME = a.StatusName, //TASK_USER_STATUS_NAME = a.StatusName,
TASK_USER_STATUS_TIME = a.StatusTime //TASK_USER_STATUS_TIME = a.StatusTime
}).Distinct().ToQueryPageAsync(querySearch.PageCondition); }).Distinct().ToQueryPageAsync(querySearch.PageCondition);
return result; return result;
} }
} }
} }
finally
{
if (result.Data?.Count > 0)
{
var taskIdList = result.Data.Select(x => (long)x.Id).ToList();
var allRecvUserList = await tenantDb.Queryable<TaskBaseAllocation>()
.Where(x => taskIdList.Contains(x.TaskId))
.Select(x => new RecvUserInfo()
{
TaskId = x.TaskId,
RecvUserId = x.UserId,
RecvUserName = x.UserName,
RecvUserStatus = x.Status,
RecvUserStatusName = x.StatusName,
RecvUserStatusTime = x.StatusTime
}).ToListAsync();
if (allRecvUserList.Count > 0)
{
foreach (var item in result.Data)
{
var recvUserList = allRecvUserList.Where(x => x.TaskId == item.Id).ToList();
var currentUserStatus = recvUserList.FirstOrDefault(x => x.RecvUserId == userId);
if (currentUserStatus != null)
{
var n = recvUserList.IndexOf(currentUserStatus);
if (n != 0)
{
recvUserList.RemoveAt(n);
recvUserList.Insert(0, currentUserStatus);
}
item.TASK_USER_STATUS = currentUserStatus.RecvUserStatus;
item.TASK_USER_STATUS_NAME = currentUserStatus.RecvUserStatusName;
item.TASK_USER_STATUS_TIME = currentUserStatus.RecvUserStatusTime;
}
item.RecvUserList = recvUserList;
}
}
}
}
}
/// <summary> /// <summary>
/// 获取登陆人相关的任务统计信息 /// 获取登陆人相关的任务统计信息
/// </summary> /// </summary>
@ -2212,7 +2227,7 @@ namespace DS.WMS.Core.TaskPlat.Method
.LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId) .LeftJoin<TaskBaseAllocation>((t, a) => t.Id == a.TaskId)
.Where(whereList) .Where(whereList)
.Where((t, a) => t.STATUS != TaskStatusEnum.Cancel.ToString()) .Where((t, a) => t.STATUS != TaskStatusEnum.Cancel.ToString())
.Where((t, a) => t.IS_PUBLIC == 1 || (t.IS_PUBLIC == 0 && a.Status != null && (a.UserId == userId))) // 2024-8-14 boss提出只显示自己需要审批的任务自己创建的任务不显示所以去掉t.CreateBy == userId || .Where((t, a) => t.IS_PUBLIC == 1 || (t.IS_PUBLIC == 0 && a.Status != null && (a.UserId == userId))) // 2024-8-14 只显示自己需要审批的任务自己创建的任务不显示所以去掉t.CreateBy == userId ||
.WhereIF(!string.IsNullOrEmpty(querySearch.BusinessNo), (t, a) => t.MBL_NO == querySearch.BusinessNo || t.CUSTOMER_NO == querySearch.BusinessNo) .WhereIF(!string.IsNullOrEmpty(querySearch.BusinessNo), (t, a) => t.MBL_NO == querySearch.BusinessNo || t.CUSTOMER_NO == querySearch.BusinessNo)
.GroupBy((t, a) => new { t.TASK_TYPE, t.STATUS, a.Status, t.IS_PUBLIC }) .GroupBy((t, a) => new { t.TASK_TYPE, t.STATUS, a.Status, t.IS_PUBLIC })
.Select((t, a) => new .Select((t, a) => new
@ -2685,7 +2700,7 @@ namespace DS.WMS.Core.TaskPlat.Method
.WhereIF(!string.IsNullOrEmpty(queryTaskManageDto.BusinessNo), (t, a) => t.MBL_NO == queryTaskManageDto.BusinessNo || t.CUSTOMER_NO == queryTaskManageDto.BusinessNo) .WhereIF(!string.IsNullOrEmpty(queryTaskManageDto.BusinessNo), (t, a) => t.MBL_NO == queryTaskManageDto.BusinessNo || t.CUSTOMER_NO == queryTaskManageDto.BusinessNo)
.WhereIF(taskStatLevel == TaskStatLevelEnum.PUBLIC, (t, a) => t.IS_PUBLIC == 1 && t.STATUS == queryTaskManageDto.Status) .WhereIF(taskStatLevel == TaskStatLevelEnum.PUBLIC, (t, a) => t.IS_PUBLIC == 1 && t.STATUS == queryTaskManageDto.Status)
.WhereIF(taskStatLevel == TaskStatLevelEnum.PERSON, (t, a) => t.IS_PUBLIC == 0 .WhereIF(taskStatLevel == TaskStatLevelEnum.PERSON, (t, a) => t.IS_PUBLIC == 0
&& (a.UserId == userId) // 2024-8-14 boss提出只显示自己需要审批的任务自己创建的任务不显示所以去掉t.CreateBy == userId || && (a.UserId == userId) // 2024-8-14 只显示自己需要审批的任务自己创建的任务不显示所以去掉t.CreateBy == userId ||
&& a.Status == queryTaskManageDto.Status) && a.Status == queryTaskManageDto.Status)
.OrderByDescending(t => t.Id); .OrderByDescending(t => t.Id);
} }
@ -2707,7 +2722,7 @@ namespace DS.WMS.Core.TaskPlat.Method
.WhereIF(!string.IsNullOrEmpty(queryTaskManageDto.BusinessNo), (t, a) => t.MBL_NO == queryTaskManageDto.BusinessNo || t.CUSTOMER_NO == queryTaskManageDto.BusinessNo) .WhereIF(!string.IsNullOrEmpty(queryTaskManageDto.BusinessNo), (t, a) => t.MBL_NO == queryTaskManageDto.BusinessNo || t.CUSTOMER_NO == queryTaskManageDto.BusinessNo)
.WhereIF(taskStatLevel == TaskStatLevelEnum.PUBLIC, (t, a) => t.IS_PUBLIC == 1 && t.STATUS == queryTaskManageDto.Status) .WhereIF(taskStatLevel == TaskStatLevelEnum.PUBLIC, (t, a) => t.IS_PUBLIC == 1 && t.STATUS == queryTaskManageDto.Status)
.WhereIF(taskStatLevel == TaskStatLevelEnum.PERSON, (t, a) => t.IS_PUBLIC == 0 .WhereIF(taskStatLevel == TaskStatLevelEnum.PERSON, (t, a) => t.IS_PUBLIC == 0
&& (a.UserId == userId) // 2024-8-14 boss提出只显示自己需要审批的任务自己创建的任务不显示所以去掉t.CreateBy == userId || && (a.UserId == userId) // 2024-8-14 只显示自己需要审批的任务自己创建的任务不显示所以去掉t.CreateBy == userId ||
&& a.Status == queryTaskManageDto.Status) && a.Status == queryTaskManageDto.Status)
.OrderByDescending(t => t.Id); .OrderByDescending(t => t.Id);
} }

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl> <_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl>
<History>True|2024-09-03T02:01:09.7656702Z||;False|2024-09-03T09:46:46.8956531+08:00||;True|2024-09-02T17:07:41.0268500+08:00||;True|2024-09-02T13:50:22.0203254+08:00||;True|2024-09-02T13:34:23.3441546+08:00||;True|2024-08-30T11:25:14.7431645+08:00||;True|2024-08-29T16:38:26.3491372+08:00||;True|2024-08-29T16:32:31.8580864+08:00||;False|2024-08-29T16:30:41.4763198+08:00||;True|2024-08-09T09:18:05.8484398+08:00||;True|2024-08-09T08:45:38.7858906+08:00||;True|2024-08-05T11:37:07.3133020+08:00||;True|2024-07-24T16:45:58.2272340+08:00||;True|2024-07-24T15:48:52.0128987+08:00||;True|2024-07-23T17:41:01.7494842+08:00||;True|2024-07-23T17:25:11.8773492+08:00||;True|2024-07-23T17:07:16.5460273+08:00||;True|2024-07-22T08:59:23.3235603+08:00||;True|2024-07-12T17:35:11.1225017+08:00||;True|2024-07-11T11:40:17.3581147+08:00||;True|2024-07-04T17:20:50.0175739+08:00||;True|2024-07-02T11:26:14.2092751+08:00||;True|2024-07-02T09:21:51.3513605+08:00||;True|2024-07-01T17:47:56.0407256+08:00||;True|2024-07-01T16:42:55.7374984+08:00||;True|2024-07-01T15:49:58.9266967+08:00||;True|2024-07-01T14:35:48.1117178+08:00||;True|2024-07-01T11:41:52.2969338+08:00||;True|2024-07-01T11:13:02.6561160+08:00||;True|2024-06-28T15:28:43.1470725+08:00||;True|2024-06-28T15:16:20.1999596+08:00||;True|2024-06-28T15:14:56.2534743+08:00||;True|2024-06-28T15:02:41.3033806+08:00||;True|2024-06-28T13:37:28.2462742+08:00||;True|2024-06-28T11:06:30.7400535+08:00||;True|2024-06-26T15:24:17.1939896+08:00||;True|2024-06-26T14:33:06.3530466+08:00||;True|2024-06-26T09:45:24.4055568+08:00||;True|2024-06-25T15:45:57.6052473+08:00||;True|2024-06-25T10:17:17.7408916+08:00||;False|2024-06-25T10:16:23.5639654+08:00||;False|2024-06-25T10:15:28.3857721+08:00||;False|2024-06-25T10:10:59.5536995+08:00||;False|2024-06-25T10:07:10.4050937+08:00||;True|2024-06-24T15:22:18.2672769+08:00||;True|2024-06-24T15:01:04.8153621+08:00||;False|2024-06-24T15:00:29.9618848+08:00||;True|2024-06-24T14:07:19.9401637+08:00||;False|2024-06-24T14:06:36.1250570+08:00||;True|2024-06-21T15:13:57.4273503+08:00||;True|2024-06-21T15:04:37.8218608+08:00||;True|2024-06-21T14:12:48.0266638+08:00||;True|2024-06-21T13:52:30.0950155+08:00||;True|2024-06-20T11:02:42.9508506+08:00||;True|2024-06-19T11:43:01.1899282+08:00||;True|2024-06-19T11:23:01.2938141+08:00||;True|2024-06-18T08:51:21.6222152+08:00||;True|2024-06-17T09:20:35.0804494+08:00||;True|2024-06-17T08:41:58.1319484+08:00||;True|2024-06-17T08:38:09.0137102+08:00||;True|2024-06-14T15:19:45.7395180+08:00||;True|2024-06-14T14:38:49.7094421+08:00||;True|2024-06-14T14:27:39.2815370+08:00||;True|2024-06-14T09:42:21.5397525+08:00||;True|2024-06-13T16:03:39.8475642+08:00||;True|2024-06-13T14:12:10.1725629+08:00||;True|2024-06-13T10:46:52.6971321+08:00||;True|2024-06-11T17:03:44.8328978+08:00||;True|2024-06-06T17:41:51.1810315+08:00||;True|2024-06-06T10:57:27.8273617+08:00||;True|2024-06-04T14:23:21.3742450+08:00||;True|2024-05-31T17:01:42.4717460+08:00||;True|2024-05-31T13:56:03.0734064+08:00||;True|2024-05-31T08:45:52.3549394+08:00||;True|2024-05-30T17:16:32.8907958+08:00||;True|2024-05-30T16:18:06.9957657+08:00||;True|2024-05-29T15:44:18.4051203+08:00||;True|2024-05-29T15:11:03.1518632+08:00||;True|2024-05-29T14:52:26.0823495+08:00||;True|2024-05-29T11:17:20.2245101+08:00||;True|2024-05-29T08:36:28.9569161+08:00||;True|2024-05-28T08:44:31.4427261+08:00||;False|2024-05-28T08:44:02.5254826+08:00||;True|2024-05-27T15:16:32.9413631+08:00||;True|2024-05-27T15:03:42.9803879+08:00||;True|2024-05-27T08:49:54.3933663+08:00||;True|2024-05-27T08:46:13.5862236+08:00||;True|2024-05-23T17:19:32.8154451+08:00||;True|2024-05-23T17:19:01.4587615+08:00||;True|2024-05-22T16:52:42.2166228+08:00||;True|2024-05-22T15:19:49.1773202+08:00||;True|2024-05-22T15:13:31.9485525+08:00||;True|2024-05-22T13:29:02.1355808+08:00||;True|2024-05-22T09:48:40.8753914+08:00||;True|2024-05-22T09:25:06.2068137+08:00||;True|2024-05-22T09:18:53.0759815+08:00||;True|2024-05-21T17:13:36.4091775+08:00||;True|2024-05-21T14:41:18.8486299+08:00||;True|2024-05-21T11:04:27.3649637+08:00||;</History> <History>True|2024-09-03T08:41:23.7516960Z||;True|2024-09-03T15:22:31.8718097+08:00||;True|2024-09-03T10:01:09.7656702+08:00||;False|2024-09-03T09:46:46.8956531+08:00||;True|2024-09-02T17:07:41.0268500+08:00||;True|2024-09-02T13:50:22.0203254+08:00||;True|2024-09-02T13:34:23.3441546+08:00||;True|2024-08-30T11:25:14.7431645+08:00||;True|2024-08-29T16:38:26.3491372+08:00||;True|2024-08-29T16:32:31.8580864+08:00||;False|2024-08-29T16:30:41.4763198+08:00||;True|2024-08-09T09:18:05.8484398+08:00||;True|2024-08-09T08:45:38.7858906+08:00||;True|2024-08-05T11:37:07.3133020+08:00||;True|2024-07-24T16:45:58.2272340+08:00||;True|2024-07-24T15:48:52.0128987+08:00||;True|2024-07-23T17:41:01.7494842+08:00||;True|2024-07-23T17:25:11.8773492+08:00||;True|2024-07-23T17:07:16.5460273+08:00||;True|2024-07-22T08:59:23.3235603+08:00||;True|2024-07-12T17:35:11.1225017+08:00||;True|2024-07-11T11:40:17.3581147+08:00||;True|2024-07-04T17:20:50.0175739+08:00||;True|2024-07-02T11:26:14.2092751+08:00||;True|2024-07-02T09:21:51.3513605+08:00||;True|2024-07-01T17:47:56.0407256+08:00||;True|2024-07-01T16:42:55.7374984+08:00||;True|2024-07-01T15:49:58.9266967+08:00||;True|2024-07-01T14:35:48.1117178+08:00||;True|2024-07-01T11:41:52.2969338+08:00||;True|2024-07-01T11:13:02.6561160+08:00||;True|2024-06-28T15:28:43.1470725+08:00||;True|2024-06-28T15:16:20.1999596+08:00||;True|2024-06-28T15:14:56.2534743+08:00||;True|2024-06-28T15:02:41.3033806+08:00||;True|2024-06-28T13:37:28.2462742+08:00||;True|2024-06-28T11:06:30.7400535+08:00||;True|2024-06-26T15:24:17.1939896+08:00||;True|2024-06-26T14:33:06.3530466+08:00||;True|2024-06-26T09:45:24.4055568+08:00||;True|2024-06-25T15:45:57.6052473+08:00||;True|2024-06-25T10:17:17.7408916+08:00||;False|2024-06-25T10:16:23.5639654+08:00||;False|2024-06-25T10:15:28.3857721+08:00||;False|2024-06-25T10:10:59.5536995+08:00||;False|2024-06-25T10:07:10.4050937+08:00||;True|2024-06-24T15:22:18.2672769+08:00||;True|2024-06-24T15:01:04.8153621+08:00||;False|2024-06-24T15:00:29.9618848+08:00||;True|2024-06-24T14:07:19.9401637+08:00||;False|2024-06-24T14:06:36.1250570+08:00||;True|2024-06-21T15:13:57.4273503+08:00||;True|2024-06-21T15:04:37.8218608+08:00||;True|2024-06-21T14:12:48.0266638+08:00||;True|2024-06-21T13:52:30.0950155+08:00||;True|2024-06-20T11:02:42.9508506+08:00||;True|2024-06-19T11:43:01.1899282+08:00||;True|2024-06-19T11:23:01.2938141+08:00||;True|2024-06-18T08:51:21.6222152+08:00||;True|2024-06-17T09:20:35.0804494+08:00||;True|2024-06-17T08:41:58.1319484+08:00||;True|2024-06-17T08:38:09.0137102+08:00||;True|2024-06-14T15:19:45.7395180+08:00||;True|2024-06-14T14:38:49.7094421+08:00||;True|2024-06-14T14:27:39.2815370+08:00||;True|2024-06-14T09:42:21.5397525+08:00||;True|2024-06-13T16:03:39.8475642+08:00||;True|2024-06-13T14:12:10.1725629+08:00||;True|2024-06-13T10:46:52.6971321+08:00||;True|2024-06-11T17:03:44.8328978+08:00||;True|2024-06-06T17:41:51.1810315+08:00||;True|2024-06-06T10:57:27.8273617+08:00||;True|2024-06-04T14:23:21.3742450+08:00||;True|2024-05-31T17:01:42.4717460+08:00||;True|2024-05-31T13:56:03.0734064+08:00||;True|2024-05-31T08:45:52.3549394+08:00||;True|2024-05-30T17:16:32.8907958+08:00||;True|2024-05-30T16:18:06.9957657+08:00||;True|2024-05-29T15:44:18.4051203+08:00||;True|2024-05-29T15:11:03.1518632+08:00||;True|2024-05-29T14:52:26.0823495+08:00||;True|2024-05-29T11:17:20.2245101+08:00||;True|2024-05-29T08:36:28.9569161+08:00||;True|2024-05-28T08:44:31.4427261+08:00||;False|2024-05-28T08:44:02.5254826+08:00||;True|2024-05-27T15:16:32.9413631+08:00||;True|2024-05-27T15:03:42.9803879+08:00||;True|2024-05-27T08:49:54.3933663+08:00||;True|2024-05-27T08:46:13.5862236+08:00||;True|2024-05-23T17:19:32.8154451+08:00||;True|2024-05-23T17:19:01.4587615+08:00||;True|2024-05-22T16:52:42.2166228+08:00||;True|2024-05-22T15:19:49.1773202+08:00||;True|2024-05-22T15:13:31.9485525+08:00||;True|2024-05-22T13:29:02.1355808+08:00||;True|2024-05-22T09:48:40.8753914+08:00||;True|2024-05-22T09:25:06.2068137+08:00||;True|2024-05-22T09:18:53.0759815+08:00||;True|2024-05-21T17:13:36.4091775+08:00||;True|2024-05-21T14:41:18.8486299+08:00||;</History>
<LastFailureDetails /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
</Project> </Project>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<NameOfLastUsedPublishProfile>D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>D:\Source\Repos\DS8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID> <Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath> <Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
</PropertyGroup> </PropertyGroup>

Loading…
Cancel
Save