zhangxiaofeng 3 months ago
commit 5131013463

@ -3,7 +3,6 @@ using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.Op.Entity;
using NPOI.SS.Formula.Functions;
using SqlSugar;
namespace DS.WMS.Core.Fee.Entity
@ -384,8 +383,8 @@ namespace DS.WMS.Core.Fee.Entity
[SugarColumn(ColumnDescription = "提交人", IsNullable = true, Length = 50)]
public long? SubmitBy { get; set; }
[SugarColumn(ColumnDescription = "当前审批ID", IsNullable = true)]
public long? FlowId { get; set; }
//[SugarColumn(ColumnDescription = "当前审批ID", IsNullable = true)]
//public long? FlowId { get; set; }
/// <summary>
/// 排序

@ -8,11 +8,14 @@ using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Entity;
using DS.WMS.Core.Flow.Interface;
using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.Op.Dtos.TaskInteraction;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Interface.TaskInteraction;
using DS.WMS.Core.Sys.Entity;
using Mapster;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using static AnyDiff.DifferenceLines;
namespace DS.WMS.Core.Fee.Method
{
@ -31,6 +34,7 @@ namespace DS.WMS.Core.Fee.Method
readonly IClientFlowInstanceService flowService;
readonly IFeeRecordService feeService;
readonly ISeaExportTaskService taskService;
/// <summary>
/// 初始化
@ -40,6 +44,7 @@ namespace DS.WMS.Core.Fee.Method
{
flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>();
feeService = serviceProvider.GetRequiredService<IFeeRecordService>();
taskService = serviceProvider.GetRequiredService<ISeaExportTaskService>();
}
/// <summary>
@ -500,55 +505,82 @@ namespace DS.WMS.Core.Fee.Method
/// <param name="remark">备注</param>
/// <param name="idArray">待审批的费用ID</param>
/// <returns></returns>
public async Task<DataResult> AuditAsync(int yesOrNo, string remark, params long[] idArray)
public async Task<DataResult> AuditAsync(int yesOrNo, string? remark, params long[] idArray)
{
var fees = await TenantDb.Queryable<FeeRecord>().Where(x => idArray.Contains(x.Id)).Select(x => new
{
x.Id,
x.FeeName,
x.FeeStatus,
x.FlowId
}).ToListAsync();
if (fees.Count == 0)
return DataResult.Failed(MultiLanguageConst.EmptyData);
if (fees.Exists(x => !x.FlowId.HasValue))
return DataResult.Failed(MultiLanguageConst.NotInFlows);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
if (fees.Exists(x => !AuditStatusArray.Contains(x.FeeStatus)))
return DataResult.Failed(MultiLanguageConst.NotInAudit);
var flowIds = fees.Select(x => x.FlowId.GetValueOrDefault());
var flows = await Db.Queryable<FlowInstance>().Where(x => flowIds.Contains(x.Id)).ToListAsync();
if (flows.Count == 0)
return DataResult.Failed(MultiLanguageConst.FlowNotFound);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NotInAudit));
if (flows.Exists(x => !x.MakerList.Contains(User.UserId)))
return DataResult.Failed(MultiLanguageConst.AuditUnauthorization);
//未在审批状态中
if (!await flowService.Exists(ids: idArray))
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NotInAudit));
List<string> list = [];
List<Tuple<TaskBaseTypeEnum, long>> taskTypes = [];
foreach (var fee in fees)
{
var flow = flows.Find(x => x.Id == fee.FlowId.Value);
if (flow == null)
continue;
switch (fee.FeeStatus)
{
case FeeStatus.AuditSubmitted:
taskTypes.Add(new Tuple<TaskBaseTypeEnum, long>(TaskBaseTypeEnum.FEE_AUDIT, fee.Id));
break;
case FeeStatus.ApplyModification:
taskTypes.Add(new Tuple<TaskBaseTypeEnum, long>(TaskBaseTypeEnum.FEE_MODIFY_AUDIT, fee.Id));
break;
case FeeStatus.ApplyDeletion:
taskTypes.Add(new Tuple<TaskBaseTypeEnum, long>(TaskBaseTypeEnum.FEE_DELETE_AUDIT, fee.Id));
break;
}
}
var result = flowService.AuditFlowInstance(new FlowAuditInfo
DataResult result;
var groups = taskTypes.GroupBy(x => x.Item1);
bool hasAuthorized = await taskService.HasAuthorizedAsync();
foreach (var g in groups)
{
List<string> list = [];
var ids = g.Select(x => x.Item2).ToArray();
if (hasAuthorized)
{
Instance = flow,
Status = yesOrNo,
AuditNote = remark
});
result = await taskService.AuditAsync(new TaskAuditRequest
{
Ids = ids,
Remark = remark,
Result = yesOrNo,
TaskTypeName = g.Key.ToString()
});
if (!result.Succeeded)
if (!result.Succeeded)
list.AddRange(fees.Where(x => ids.Contains(x.Id)).Select(x => x.FeeName));
}
else
{
list.Add(fee.FeeName);
var instances = await flowService.GetInstanceByBSIdAsync(g.Key, null, ids);
foreach (var item in instances)
{
result = flowService.AuditFlowInstance(new FlowAuditInfo
{
Instance = item,
Status = yesOrNo,
AuditNote = remark
});
if (!result.Succeeded)
list.Add(fees.Find(x => x.Id == item.BusinessId)?.FeeName ?? string.Empty);
}
}
}
if (list.Count > 0)
return DataResult.Failed($"{MultiLanguageConst.Operation_Failed}{string.Join("", list)}");
if (list.Count > 0)
return DataResult.Failed($"{MultiLanguageConst.Operation_Failed}{string.Join("", list)}");
}
return DataResult.Success;
}
@ -564,7 +596,7 @@ namespace DS.WMS.Core.Fee.Method
var recordIds = await GetCurrentFlowsQuery(AuditTypes).Select(x => x.BusinessId).ToArrayAsync();
//没有待审批的列表直接返回不再执行后续查询
if (recordIds.Length == 0)
return DataResult.Failed(MultiLanguageConst.NoAuditItems);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NoAuditItems));
return await AuditAsync(yesOrNo, remark, recordIds);
}
@ -589,7 +621,7 @@ namespace DS.WMS.Core.Fee.Method
//取所选业务与过滤条件所产生的交集
var intersects = request.Items.Intersect(bizList, BizItem.DefaultComparer).ToList();
if (intersects.Count == 0)
return DataResult.Failed(MultiLanguageConst.NoAuditItems);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NoAuditItems));
var list1 = intersects.Select(x => x.Id).ToList();
var list2 = intersects.Select(x => x.BusinessType).Distinct().ToList();
@ -599,7 +631,7 @@ namespace DS.WMS.Core.Fee.Method
//没有待审批的列表直接返回不再执行后续查询
if (recordIds.Length == 0)
return DataResult.Failed(MultiLanguageConst.NoAuditItems);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NoAuditItems));
return await AuditAsync(request.Result, request.Remark, recordIds);
}
@ -611,51 +643,61 @@ namespace DS.WMS.Core.Fee.Method
/// <returns></returns>
public async Task<DataResult> AuditBusinessAsync(BizAuditRequest request)
{
var taskType = TaskBaseTypeEnum.FEE_BUSINESS_AUDIT;
DataResult result;
bool hasAuthorized = await taskService.HasAuthorizedAsync();
var gpList = request.Items.GroupBy(x => x.BusinessType).ToList();
foreach (var gp in gpList)
{
var bIdArr = gp.Select(x => x.Id).ToArray();
var bizList = await TenantDb.Queryable<BusinessFeeStatus>().Where(x => bIdArr.Contains(x.BusinessId) && x.BusinessType == gp.Key)
var ids = gp.Select(x => x.Id).ToArray();
var bizList = await TenantDb.Queryable<BusinessFeeStatus>().Where(x => ids.Contains(x.BusinessId) && x.BusinessType == gp.Key)
.Select(x => new
{
x.Id,
x.BillAuditStatus,
x.FlowId
}).ToListAsync();
if (bizList.Count == 0)
return DataResult.Failed(MultiLanguageConst.EmptyData);
if (!bizList.Any(x => x.FlowId.HasValue))
return DataResult.Failed(MultiLanguageConst.NotInFlows);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
if (bizList.Any(x => x.BillAuditStatus != BillAuditStatus.AuditSubmitted))
return DataResult.Failed(MultiLanguageConst.BusinessAuditStatusError);
var fIdArr = bizList.Select(x => x.FlowId).ToArray();
var flows = await Db.Queryable<FlowInstance>().Where(x => fIdArr.Contains(x.Id) && x.AuditType == TaskBaseTypeEnum.FEE_BUSINESS_AUDIT).ToListAsync();
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.BusinessAuditStatusError));
if (flows.Count == 0)
return DataResult.Failed(MultiLanguageConst.FlowNotFound);
if (flows.Any(x => !x.MakerList.Contains(User.UserId)))
continue;
foreach (var flow in flows)
if (hasAuthorized)
{
var result = flowService.AuditFlowInstance(new FlowAuditInfo
result = await taskService.AuditAsync(new TaskAuditRequest
{
Instance = flow,
Status = request.Result,
AuditNote = request.Remark
Ids = ids,
Remark = request.Remark,
Result = request.Result,
TaskTypeName = taskType.ToString()
});
if (!result.Succeeded)
return result;
}
else
{
var flows = await flowService.GetInstanceByBSIdAsync(taskType, gp.Key, ids);
if (flows.Count == 0)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FlowNotFound));
if (flows.Any(x => !x.MakerList.Contains(User.UserId)))
continue;
foreach (var flow in flows)
{
//todo:记录未能成功审核的数据
result = flowService.AuditFlowInstance(new FlowAuditInfo
{
Instance = flow,
Status = request.Result,
AuditNote = request.Remark
});
if (!result.Succeeded)
return result;
}
}
}
return DataResult.Success;
@ -684,8 +726,8 @@ namespace DS.WMS.Core.Fee.Method
public async Task<DataResult> UpdateStatusAsync(FlowCallback callback)
{
var auditType = callback.AuditType;
FeeRecord fee = null;
BusinessFeeStatus biz = null;
FeeRecord? fee = null;
BusinessFeeStatus? biz = null;
if (auditType == TaskBaseTypeEnum.FEE_BUSINESS_AUDIT)
{
biz = await TenantDb.Queryable<BusinessFeeStatus>().Where(x => x.Id == callback.BusinessId && x.BusinessType == callback.BusinessType)
@ -734,8 +776,7 @@ namespace DS.WMS.Core.Fee.Method
x.AuditBy,
x.AuditOperator,
x.AuditDate,
x.Reason,
x.FlowId
x.Reason
}).ExecuteCommandAsync();
break;
@ -774,8 +815,7 @@ namespace DS.WMS.Core.Fee.Method
await TenantDb.Updateable(fee).UpdateColumns(x => new
{
x.FeeStatus,
x.Reason,
x.FlowId
x.Reason
}).ExecuteCommandAsync();
}
@ -793,8 +833,7 @@ namespace DS.WMS.Core.Fee.Method
x.DeleteBy,
x.Deleted,
x.DeleteTime,
x.Reason,
x.FlowId
x.Reason
}).ExecuteCommandAsync();
//TenantDb.Deleteable(fee).ExecuteCommandAsync();
@ -806,8 +845,7 @@ namespace DS.WMS.Core.Fee.Method
await TenantDb.Updateable(fee).UpdateColumns(x => new
{
x.FeeStatus,
x.Reason,
x.FlowId
x.Reason
}).ExecuteCommandAsync();
}
break;
@ -826,13 +864,11 @@ namespace DS.WMS.Core.Fee.Method
await TenantDb.Updateable(biz).UpdateColumns(x => new
{
x.BillAuditStatus,
x.FlowId
x.BillAuditStatus
}).ExecuteCommandAsync();
await TenantDb.Updateable<FeeRecord>()
.SetColumns(x => x.FeeStatus == status)
.SetColumns(x => x.FlowId == null)
.SetColumns(x => x.AuditBy == UserId)
.SetColumns(x => x.AuditOperator == User.UserName)
.SetColumns(x => x.AuditDate == dtNow)
@ -842,17 +878,17 @@ namespace DS.WMS.Core.Fee.Method
break;
}
//驳回申请则逻辑删除关联工作流
if (callback.FlowStatus == FlowStatusEnum.Reject)
{
await Db.Updateable(new FlowInstance
{
Id = callback.InstanceId,
Deleted = true,
DeleteBy = 0,
DeleteTime = DateTime.Now
}).UpdateColumns(x => new { x.Deleted, x.DeleteBy, x.DeleteTime }).ExecuteCommandAsync();
}
////驳回申请则逻辑删除关联工作流
//if (callback.FlowStatus == FlowStatusEnum.Reject)
//{
// await Db.Updateable(new FlowInstance
// {
// Id = callback.InstanceId,
// Deleted = true,
// DeleteBy = 0,
// DeleteTime = DateTime.Now
// }).UpdateColumns(x => new { x.Deleted, x.DeleteBy, x.DeleteTime }).ExecuteCommandAsync();
//}
await TenantDb.Ado.CommitTranAsync();
return DataResult.Success;

@ -8,7 +8,9 @@ using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Entity;
using DS.WMS.Core.Flow.Interface;
using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.Op.Dtos.TaskInteraction;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Op.Interface.TaskInteraction;
using DS.WMS.Core.Sys.Entity;
using Mapster;
using Masuit.Tools.Systems;
@ -23,6 +25,7 @@ namespace DS.WMS.Core.Fee.Method
public class FeeRecordService : FeeServiceBase, IFeeRecordService
{
readonly IClientFlowInstanceService flowService;
readonly ITaskService taskService;
/// <summary>
/// 初始化
@ -31,6 +34,7 @@ namespace DS.WMS.Core.Fee.Method
public FeeRecordService(IServiceProvider serviceProvider) : base(serviceProvider)
{
flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>();
taskService = serviceProvider.GetRequiredService<ITaskService>();
}
/// <summary>
@ -136,11 +140,11 @@ namespace DS.WMS.Core.Fee.Method
ArgumentNullException.ThrowIfNull(items, nameof(items));
if (items.GroupBy(x => new { x.BusinessId, x.BusinessType }).Count() > 1)
return DataResult.Failed(MultiLanguageConst.FeeBusinessIdOnlyOne);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FeeBusinessIdOnlyOne));
var first = items.Select(x => new { x.BusinessType, x.BusinessId }).FirstOrDefault();
if (await IsFeeLockedAsync(first.BusinessId, first.BusinessType))
return DataResult.Failed(MultiLanguageConst.FeeLocked);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FeeLocked));
var order = await TenantDb.Queryable<SeaExport>().Where(x => x.Id == first.BusinessId).Select(x => new
{
@ -150,7 +154,7 @@ namespace DS.WMS.Core.Fee.Method
x.CBM //尺码
}).FirstAsync();
if (order == null)
return DataResult.Failed(MultiLanguageConst.EmptyData);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
//获取订单箱型箱量
string bsNo = first.BusinessId.ToString();
@ -406,7 +410,6 @@ namespace DS.WMS.Core.Fee.Method
Id = x.Id,
FeeName = x.FeeName,
FeeStatus = x.FeeStatus,
FlowId = x.FlowId,
BusinessId = x.BusinessId,
BusinessType = x.BusinessType
}).ToListAsync();
@ -419,13 +422,13 @@ namespace DS.WMS.Core.Fee.Method
if (await IsFeeLockedAsync(bid, bType))
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FeeLocked));
if (fees.Any(x => x.FlowId.HasValue))
if (await flowService.IsRunning(auditType, null, idArray))
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FeeRecordIsAuditing));
if (fees.Any(x => x.FeeStatus == FeeStatus.PartialSettlement || x.FeeStatus == FeeStatus.SettlementCompleted))
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FeeRecordIsSettled));
DataResult result = DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
DataResult result = DataResult.Success;
await TenantDb.Ado.BeginTranAsync();
try
{
@ -439,18 +442,14 @@ namespace DS.WMS.Core.Fee.Method
}
if (!result.Succeeded)
{
await TenantDb.Ado.RollbackTranAsync();
return result;
}
await TenantDb.Updateable(fees).UpdateColumns(x => new
{
x.Id,
x.FeeStatus,
x.SubmitBy,
x.SubmitDate,
x.FlowId
x.SubmitDate
}).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync();
return DataResult.Success;
@ -478,14 +477,40 @@ namespace DS.WMS.Core.Fee.Method
if (sb.Length > 0)
return DataResult.Failed(sb.ToString(), MultiLanguageConst.Operation_Failed);
DataResult result;
DateTime dtNow = DateTime.Now;
if (await taskService.HasAuthorizedAsync())
{
var requests = fees.Select(x => new TaskCreationRequest
{
BusinessId = x.Id,
TaskTypeName = TaskBaseTypeEnum.FEE_AUDIT.ToString(),
TaskTitle = $"【{TaskBaseTypeEnum.FEE_AUDIT.GetDescription()}】{x.FeeName}"
});
foreach (var request in requests)
{
result = await taskService.CreateTaskAsync(request, false);
if (!result.Succeeded)
return result;
var fee = fees.Find(x => x.Id == request.BusinessId);
//变更状态为提交审核
fee.FeeStatus = FeeStatus.AuditSubmitted;
fee.SubmitBy = long.Parse(User.UserId);
fee.SubmitDate = dtNow;
}
return DataResult.Success;
}
var template = await FindTemplateAsync(TaskBaseTypeEnum.FEE_AUDIT);
if (template == null)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound));
DateTime dtNow = DateTime.Now;
foreach (var item in fees)
{
var result = flowService.CreateFlowInstance(new CreateFlowInstanceReq
result = flowService.CreateFlowInstance(new CreateFlowInstanceReq
{
BusinessId = item.Id,
BusinessType = item.BusinessType,
@ -500,7 +525,6 @@ namespace DS.WMS.Core.Fee.Method
item.FeeStatus = FeeStatus.AuditSubmitted;
item.SubmitBy = long.Parse(User.UserId);
item.SubmitDate = dtNow;
item.FlowId = instance.Id;
}
}
@ -522,14 +546,41 @@ namespace DS.WMS.Core.Fee.Method
if (sb.Length > 0)
return DataResult.Failed(sb.ToString(), MultiLanguageConst.Operation_Failed);
DataResult result;
DateTime dtNow = DateTime.Now;
if (await taskService.HasAuthorizedAsync())
{
var requests = fees.Select(x => new TaskCreationRequest
{
BusinessId = x.Id,
TaskTypeName = TaskBaseTypeEnum.FEE_AUDIT.ToString(),
TaskTitle = $"【{TaskBaseTypeEnum.FEE_AUDIT.GetDescription()}】{x.FeeName}"
});
foreach (var request in requests)
{
result = await taskService.CreateTaskAsync(request, false);
if (!result.Succeeded)
return result;
var fee = fees.Find(x => x.Id == request.BusinessId);
//变更状态为申请删除
fee.FeeStatus = FeeStatus.ApplyDeletion;
fee.SubmitBy = long.Parse(User.UserId);
fee.SubmitDate = dtNow;
fee.Reason = reason;
}
return DataResult.Success;
}
var template = await FindTemplateAsync(TaskBaseTypeEnum.FEE_DELETE_AUDIT);
if (template == null)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound));
DateTime dtNow = DateTime.Now;
foreach (var item in fees)
{
var result = flowService.CreateFlowInstance(new CreateFlowInstanceReq
result = flowService.CreateFlowInstance(new CreateFlowInstanceReq
{
BusinessId = item.Id,
BusinessType = item.BusinessType,
@ -544,7 +595,6 @@ namespace DS.WMS.Core.Fee.Method
item.FeeStatus = FeeStatus.ApplyDeletion;
item.SubmitBy = long.Parse(User.UserId);
item.SubmitDate = dtNow;
item.FlowId = instance.Id;
item.Reason = reason;
}
}
@ -581,39 +631,61 @@ namespace DS.WMS.Core.Fee.Method
if (sb.Length > 0)
return DataResult.Failed(sb.ToString(), MultiLanguageConst.Operation_Failed);
var template = await FindTemplateAsync(TaskBaseTypeEnum.FEE_MODIFY_AUDIT);
if (template == null)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound));
DataResult result;
DateTime dtNow = DateTime.Now;
await TenantDb.Ado.BeginTranAsync();
try
{
foreach (var fee in fees)
if (await taskService.HasAuthorizedAsync())
{
var result = flowService.CreateFlowInstance(new CreateFlowInstanceReq
var requests = fees.Select(x => new TaskCreationRequest
{
BusinessId = fee.Id,
BusinessType = fee.BusinessType,
TemplateId = template.Id
BusinessId = x.Id,
TaskTypeName = TaskBaseTypeEnum.FEE_AUDIT.ToString(),
TaskTitle = $"【{TaskBaseTypeEnum.FEE_AUDIT.GetDescription()}】{x.FeeName}"
});
if (result.Succeeded)
foreach (var request in requests)
{
var instance = result.Data as FlowInstance;
flowService.StartFlowInstance(instance.Id.ToString());
result = await taskService.CreateTaskAsync(request, false);
if (!result.Succeeded)
return result;
var fee = fees.Find(x => x.Id == request.BusinessId);
//变更状态为申请修改
fee.FeeStatus = FeeStatus.ApplyModification;
//fee.SubmitBy = long.Parse(User.UserId);
//fee.SubmitDate = dtNow;
fee.FlowId = instance.Id;
fee.Reason = items.FirstOrDefault(x => x.FeeRecordId == fee.Id)?.Reason;
}
}
else
{
var template = await FindTemplateAsync(TaskBaseTypeEnum.FEE_MODIFY_AUDIT);
if (template == null)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound));
foreach (var fee in fees)
{
result = flowService.CreateFlowInstance(new CreateFlowInstanceReq
{
BusinessId = fee.Id,
BusinessType = fee.BusinessType,
TemplateId = template.Id
});
if (result.Succeeded)
{
var instance = result.Data as FlowInstance;
flowService.StartFlowInstance(instance.Id.ToString());
//变更状态为申请修改
fee.FeeStatus = FeeStatus.ApplyModification;
fee.Reason = items.FirstOrDefault(x => x.FeeRecordId == fee.Id)?.Reason;
}
}
}
var list = items.ToList();
await TenantDb.Insertable(list).ExecuteCommandAsync();
await TenantDb.Updateable(fees).UpdateColumns(x => new { x.FeeStatus, x.FlowId }).ExecuteCommandAsync();
await TenantDb.Updateable(fees).UpdateColumns(x => new { x.FeeStatus }).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync();
return DataResult.Success;
@ -638,58 +710,76 @@ namespace DS.WMS.Core.Fee.Method
{
Id = x.Id,
FeeName = x.FeeName,
FeeStatus = x.FeeStatus,
FlowId = x.FlowId
FeeStatus = x.FeeStatus
}).ToListAsync();
if (fees.Count == 0)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound));
//未在审批状态中
var fees2 = fees.FindAll(x => x.FlowId == null).ToList();
if (fees2.Count > 0)
{
string msg = string.Join("; ", fees2.Select(x => $"{x.FeeName}"));
return DataResult.Failed(string.Format(MultiLanguageConst.NoNeedWithdraw, msg));
}
var flows = fees.Select(x => new FlowInstance { Id = x.FlowId.Value, FlowStatus = FlowStatusEnum.Draft, MakerList = string.Empty }).ToList();
DataResult result;
List<Tuple<TaskBaseTypeEnum, long>> taskTypes = [];
DateTime dtNow = DateTime.Now;
await TenantDb.Ado.BeginTranAsync();
try
{
await Db.Updateable(flows).UpdateColumns(x => new { x.FlowStatus, x.MakerList }).ExecuteCommandAsync();
foreach (var item in fees)
{
switch (item.FeeStatus)
{
case FeeStatus.AuditSubmitted:
item.FeeStatus = FeeStatus.Entering;
taskTypes.Add(new Tuple<TaskBaseTypeEnum, long>(TaskBaseTypeEnum.FEE_AUDIT, item.Id));
break;
case FeeStatus.ApplyModification:
item.FeeStatus = FeeStatus.AuditPassed;
taskTypes.Add(new Tuple<TaskBaseTypeEnum, long>(TaskBaseTypeEnum.FEE_MODIFY_AUDIT, item.Id));
//删除暂存数据
var entity = await TenantDb.Queryable<FeeModification>().OrderByDescending(
x => x.CreateTime).Select(x => new { x.Id, x.FeeRecordId }).FirstAsync(x => x.FeeRecordId == item.Id);
if (entity != null)
{
await TenantDb.Deleteable<FeeModification>().Where(x => x.Id == entity.Id).ExecuteCommandAsync();
}
break;
case FeeStatus.ApplyDeletion:
item.FeeStatus = FeeStatus.AuditPassed;
taskTypes.Add(new Tuple<TaskBaseTypeEnum, long>(TaskBaseTypeEnum.FEE_DELETE_AUDIT, item.Id));
break;
}
item.SubmitBy = long.Parse(User.UserId);
item.SubmitDate = dtNow;
item.FlowId = null;
item.SubmitBy = null;
item.SubmitDate = null;
}
await TenantDb.Updateable(fees).UpdateColumns(x => new { x.Id, x.FeeStatus, x.SubmitBy, x.SubmitDate, x.FlowId }).ExecuteCommandAsync();
var groups = taskTypes.GroupBy(x => x.Item1);
if (await taskService.HasAuthorizedAsync())
{
foreach (var group in groups)
{
foreach (var item in group)
{
await taskService.WithdrawAsync(new TaskRequest
{
BusinessId = item.Item2,
TaskTypeName = item.Item1.ToString()
}, false);
}
}
}
else
{
//未在审批状态中
if (!await flowService.Exists(ids: idArray))
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NotInAudit));
foreach (var g in groups)
{
result = await flowService.WithdrawAsync(g.Key, g.Select(x => x.Item2).ToArray());
if (!result.Succeeded)
return result;
}
}
await TenantDb.Updateable(fees).UpdateColumns(x => new { x.FeeStatus, x.SubmitBy, x.SubmitDate }).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync();
return DataResult.Success;
}
@ -710,6 +800,8 @@ namespace DS.WMS.Core.Fee.Method
/// <returns></returns>
public async Task<DataResult> SubmitBusinessAuditAsync(long bid, BusinessType type)
{
var taskType = TaskBaseTypeEnum.FEE_BUSINESS_AUDIT;
var entity = await TenantDb.Queryable<BusinessFeeStatus>().Where(x => x.BusinessId == bid &&
x.BusinessType == BusinessType.OceanShippingExport).Select(x => new BusinessFeeStatus
{
@ -717,54 +809,75 @@ namespace DS.WMS.Core.Fee.Method
BusinessId = x.BusinessId,
BusinessType = x.BusinessType,
IsFeeLocking = x.IsFeeLocking,
BillAuditStatus = x.BillAuditStatus,
FlowId = x.FlowId
BillAuditStatus = x.BillAuditStatus
}).FirstAsync();
if (entity == null)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.BusinessNotFound));
if (entity.IsFeeLocking.GetValueOrDefault())
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FeeLocked));
if (entity.FlowId.HasValue)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FeeRecordIsAuditing));
if (entity.BillAuditStatus == BillAuditStatus.AuditPassed)
return DataResult.Failed(string.Format(MultiLanguageConst.BusinessStatusError, entity.BillAuditStatus.GetDescription()));
var template = await FindTemplateAsync(TaskBaseTypeEnum.FEE_BUSINESS_AUDIT);
if (template == null)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound));
if (await flowService.IsRunning(taskType, type, bid))
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FeeRecordIsAuditing));
var result = flowService.CreateFlowInstance(new CreateFlowInstanceReq
{
BusinessId = entity.Id,
BusinessType = entity.BusinessType,
TemplateId = template.Id
});
if (result.Succeeded)
DataResult result;
await TenantDb.Ado.BeginTranAsync();
try
{
var instance = result.Data as FlowInstance;
flowService.StartFlowInstance(instance.Id.ToString());
if (await taskService.HasAuthorizedAsync())
{
result = await taskService.SubmitAuditAsync(new TaskRequest
{
BusinessId = bid,
BusinessType = type,
TaskTypeName = taskType.ToString()
}, false);
}
else
{
var template = await FindTemplateAsync(taskType);
if (template == null)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound));
result = flowService.CreateFlowInstance(new CreateFlowInstanceReq
{
BusinessId = entity.Id,
BusinessType = entity.BusinessType,
TemplateId = template.Id
});
//var instance = result.Data as FlowInstance;
//flowService.StartFlowInstance(instance.Id.ToString());
}
if (!result.Succeeded)
return result;
//变更状态为提交审核
entity.BillAuditStatus = BillAuditStatus.AuditSubmitted;
entity.BillFeeStatusTime = DateTime.Now;
entity.FlowId = instance.Id;
await TenantDb.Updateable(entity).UpdateColumns(x => new
{
x.BillAuditStatus,
x.BillFeeStatusTime,
x.FlowId
x.BillFeeStatusTime
}).ExecuteCommandAsync();
//修改关联费用状态为提交审核
await TenantDb.Updateable<FeeRecord>().Where(x => x.BusinessId == entity.BusinessId && x.BusinessType == entity.BusinessType)
.SetColumns(x => x.FeeStatus, FeeStatus.AuditSubmitted).ExecuteCommandAsync();
await TenantDb.Ado.CommitTranAsync();
return DataResult.Success;
}
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
catch (Exception ex)
{
await TenantDb.Ado.RollbackTranAsync();
await ex.LogAsync(Db);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
}
}
/// <summary>

@ -1,3 +1,4 @@
using System.Linq.Expressions;
using DS.Module.Core;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Entity;
@ -10,6 +11,25 @@ namespace DS.WMS.Core.Flow.Interface;
/// </summary>
public interface IClientFlowInstanceService
{
/// <summary>
/// 确定工作流是否正在运行中
/// </summary>
/// <param name="type">工作流类型</param>
/// <param name="businessType">业务类型</param>
/// <param name="ids">业务ID</param>
/// <returns></returns>
Task<bool> IsRunning(TaskBaseTypeEnum type, BusinessType? businessType = null, params long[] ids);
/// <summary>
/// 确定工作流是否存在
/// </summary>
/// <param name="type">工作流类型</param>
/// <param name="businessType">业务类型</param>
/// <param name="expression">自定义查询条件</param>
/// <param name="ids">业务ID</param>
/// <returns></returns>
Task<bool> Exists(TaskBaseTypeEnum? type = null, BusinessType? businessType = null, Expression<Func<FlowInstance, bool>>? expression = null, params long[] ids);
/// <summary>
/// 根据业务ID获取关联工作流
/// </summary>
@ -82,6 +102,17 @@ public interface IClientFlowInstanceService
/// <returns></returns>
Task<DataResult> WithdrawAsync(long[] ids, string? note = null);
/// <summary>
/// 撤销审核
/// </summary>
/// <param name="taskType">任务类型</param>
/// <param name="bsIds">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <param name="note">备注</param>
/// <returns></returns>
Task<DataResult> WithdrawAsync(TaskBaseTypeEnum taskType, long[] bsIds,
BusinessType? businessType = null, string? note = null);
/// <summary>
/// 获取流程操作历史
/// </summary>

@ -1,3 +1,4 @@
using System.Linq.Expressions;
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Flow.Dtos;
@ -24,7 +25,43 @@ public class ClientFlowInstanceService : FlowInstanceService, IClientFlowInstanc
}
/// <summary>
/// 根据业务ID获取关联工作流
/// 确定工作流是否正在运行中
/// </summary>
/// <param name="type">工作流类型</param>
/// <param name="businessType">业务类型</param>
/// <param name="ids">业务ID</param>
/// <returns></returns>
public async Task<bool> IsRunning(TaskBaseTypeEnum type, BusinessType? businessType = null, params long[] ids)
{
return await Exists(type, businessType,
x => x.FlowStatus == FlowStatusEnum.Ready || x.FlowStatus == FlowStatusEnum.Running, ids);
}
/// <summary>
/// 确定工作流是否存在
/// </summary>
/// <param name="type">工作流类型</param>
/// <param name="businessType">业务类型</param>
/// <param name="expression">自定义查询条件</param>
/// <param name="ids">业务ID</param>
/// <returns></returns>
public async Task<bool> Exists(TaskBaseTypeEnum? type = null,
BusinessType? businessType = null,
Expression<Func<FlowInstance, bool>>? expression = null,
params long[] ids)
{
if (ids == null || ids.Length == 0)
return false;
return await Db.Queryable<FlowInstance>().Where(x => ids.Contains(x.BusinessId))
.WhereIF(type.HasValue, x => x.AuditType == type)
.WhereIF(businessType.HasValue, x => x.BusinessType == businessType)
.WhereIF(expression != null, expression)
.AnyAsync();
}
/// <summary>
/// 根据业务ID获取待处理的工作流
/// </summary>
/// <param name="type">工作流类型</param>
/// /// <param name="businessType">业务类型</param>
@ -35,7 +72,7 @@ public class ClientFlowInstanceService : FlowInstanceService, IClientFlowInstanc
if (ids == null || ids.Length == 0)
return [];
return await Db.Queryable<FlowInstance>().Where(x => x.AuditType == type && ids.Contains(x.BusinessId) &&
return await Db.Queryable<FlowInstance>().Where(x => x.AuditType == type && ids.Contains(x.BusinessId) &&
(x.FlowStatus == FlowStatusEnum.Ready || x.FlowStatus == FlowStatusEnum.Running))
.WhereIF(businessType.HasValue, x => x.BusinessType == businessType)
.OrderByDescending(x => x.CreateTime).Take(1).ToListAsync();
@ -151,8 +188,48 @@ public class ClientFlowInstanceService : FlowInstanceService, IClientFlowInstanc
return AuditFlowCore(info.Status, info.AuditNote, info.Instance);
}
/// <summary>
/// 撤销审核
/// </summary>
/// <param name="taskType">任务类型</param>
/// <param name="bsIds">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <param name="note">备注</param>
/// <returns></returns>
public async Task<DataResult> WithdrawAsync(TaskBaseTypeEnum taskType, long[] bsIds,
BusinessType? businessType = null, string? note = null)
{
var instances = await GetInstanceByBSIdAsync(taskType, businessType, bsIds);
return await WithdrawCoreAsync(instances, note);
}
/// <summary>
/// 撤销审核
/// </summary>
/// <param name="ids">ID</param>
/// <param name="note">备注</param>
/// <returns></returns>
public async Task<DataResult> WithdrawAsync(long[] ids, string? note = null)
{
var instances = ids.Select(x => new FlowInstance
{
Id = x,
ActivityId = FlowChild.END,
MakerList = string.Empty,
FlowStatus = FlowStatusEnum.Draft,
Note = note,
//Deleted = true,
//DeleteBy = userId,
//DeleteTime = dt,
//DeleteUserName = userInfo.UserName
}).ToList();
return await WithdrawCoreAsync(instances, note);
}
internal async Task<DataResult> WithdrawCoreAsync(List<FlowInstance> instances, string? note = null)
{
ArgumentNullException.ThrowIfNull(instances, nameof(instances));
long userId = long.Parse(User.UserId);
var userInfo = await Db.Queryable<SysUser>().Where(x => x.Id == userId).Select(x => new { x.Id, x.UserName }).FirstAsync();
//DateTime dt = DateTime.Now;
@ -160,19 +237,6 @@ public class ClientFlowInstanceService : FlowInstanceService, IClientFlowInstanc
await Db.Ado.BeginTranAsync();
try
{
var instances = ids.Select(x => new FlowInstance
{
Id = x,
ActivityId = FlowChild.END,
MakerList = string.Empty,
FlowStatus = FlowStatusEnum.Draft,
Note = note,
//Deleted = true,
//DeleteBy = userId,
//DeleteTime = dt,
//DeleteUserName = userInfo.UserName
}).ToList();
await Db.Updateable(instances).UpdateColumns(x => new
{
x.ActivityId,
@ -185,9 +249,9 @@ public class ClientFlowInstanceService : FlowInstanceService, IClientFlowInstanc
//x.DeleteUserName
}).ExecuteCommandAsync();
var historys = ids.Select(x => new FlowInstanceHistory
var historys = instances.Select(x => new FlowInstanceHistory
{
InstanceId = x,
InstanceId = x.Id,
Content = $"【撤销】由{userInfo.UserName}撤销,备注:{note}",
Result = -1,
UserName = userInfo.UserName
@ -203,6 +267,5 @@ public class ClientFlowInstanceService : FlowInstanceService, IClientFlowInstanc
await Db.Ado.RollbackTranAsync();
return DataResult.FailedWithDesc(MultiLanguageConst.Operation_Failed);
}
}
}

@ -84,7 +84,7 @@ public class ClientBankService : ServiceBase, IClientBankService
.FirstAsync();
if (data != null)
data.InvoiceHeaders = await TenantDb.Queryable<InvoiceHeader>().Where(x => x.RelativeId == id).ToListAsync();
data.InvoiceHeaders = await TenantDb.Queryable<InvoiceHeader>().Where(x => x.RelativeId == data.Id).ToListAsync();
return DataResult<ClientBankRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}

@ -59,17 +59,17 @@ public class ClientInfoService : ServiceBase, IClientInfoService
}).ToListAsync();
if (list.Exists(x => x.AuditStatus == AuditStatusEnum.Auditing))
return DataResult.FailedWithDesc(MultiLanguageConst.ItemsAreAuditing);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.ItemsAreAuditing));
var queryable = TenantDb.Queryable<InfoClientContact>().Where(x => idModel.Ids.Contains(x.ClientId));
if (await queryable.AnyAsync(x => (SqlFunc.IsNullOrEmpty(x.Tel) && SqlFunc.IsNullOrEmpty(x.Mobile)) || (SqlFunc.IsNullOrEmpty(x.Email) && SqlFunc.IsNullOrEmpty(x.QQ))))
return DataResult.FailedWithDesc(MultiLanguageConst.ClientInfoIncomplete);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.ClientInfoIncomplete));
var template = await FindTemplateAsync(INFO_CLIENT_TASK);
if (template == null)
return DataResult.FailedWithDesc(MultiLanguageConst.TemplateNotFound);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.TemplateNotFound));
if (await taskService.Value.HasAuthorized())
if (await taskService.Value.HasAuthorizedAsync())
{
var requests = list.Select(x => new TaskCreationRequest
{
@ -99,7 +99,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
{
await TenantDb.Ado.RollbackTranAsync();
await ex.LogAsync(Db);
return DataResult.FailedWithDesc(MultiLanguageConst.Operation_Failed);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
}
}
@ -121,7 +121,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
var rows = await TenantDb.Updateable<InfoClient>().Where(x => idModel.Ids.Contains(x.Id))
.SetColumns(x => x.AuditStatus == AuditStatusEnum.Auditing).ExecuteCommandAsync();
return rows > 0 ? DataResult.Success : DataResult.FailedWithDesc(MultiLanguageConst.Operation_Failed);
return rows > 0 ? DataResult.Success : DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
}
/// <summary>
@ -131,7 +131,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
/// <returns></returns>
public async Task<DataResult> AuditAsync(AuditRequest request)
{
if (await taskService.Value.HasAuthorized())
if (await taskService.Value.HasAuthorizedAsync())
{
return await taskService.Value.AuditAsync(new TaskAuditRequest
{
@ -144,7 +144,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
var list = await flowService.Value.GetInstanceByBSIdAsync(INFO_CLIENT_TASK, ids: request.Ids);
if (list.Count != request.Ids.Length)
return DataResult.FailedWithDesc(MultiLanguageConst.NotInAudit);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NotInAudit));
foreach (var item in list)
{
@ -170,7 +170,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
public async Task<DataResult> WithdrawAsync(IdModel idModel)
{
DataResult result;
if (await taskService.Value.HasAuthorized())
if (await taskService.Value.HasAuthorizedAsync())
{
await TenantDb.Ado.BeginTranAsync();
try
@ -206,7 +206,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
var list = await flowService.Value.GetInstanceByBSIdAsync(INFO_CLIENT_TASK, ids: idModel.Ids);
if (list.Count != idModel.Ids.Length)
return DataResult.FailedWithDesc(MultiLanguageConst.NotInAudit);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NotInAudit));
result = await flowService.Value.WithdrawAsync(idModel.Ids);
if (!result.Succeeded)
@ -214,7 +214,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
int rows = await TenantDb.Updateable<InfoClient>().Where(x => idModel.Ids.Contains(x.Id))
.SetColumns(x => x.AuditStatus == AuditStatusEnum.NoAudit).ExecuteCommandAsync();
return rows > 0 ? DataResult.Success : DataResult.FailedWithDesc(MultiLanguageConst.Operation_Failed);
return rows > 0 ? DataResult.Success : DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
}
/// <summary>
@ -225,7 +225,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
public async Task<DataResult> AuditCallbackAsync(FlowCallback callback)
{
if (callback.AuditType != INFO_CLIENT_TASK)
return DataResult.FailedWithDesc(MultiLanguageConst.NoAuditItems);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NoAuditItems));
InfoClient infoClient = new()
{
@ -243,7 +243,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
x.AuditStatus,
x.Status
}).ExecuteCommandAsync();
return rows > 0 ? DataResult.Success : DataResult.FailedWithDesc(MultiLanguageConst.Operation_Failed);
return rows > 0 ? DataResult.Success : DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
}
/// <summary>
@ -311,7 +311,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
x.AuditStatus
}).FirstAsync();
if (model != null && model.AuditStatus == AuditStatusEnum.Auditing)
return DataResult.FailedWithDesc(MultiLanguageConst.ItemsAreAuditing);
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.ItemsAreAuditing));
var tag = TenantDb.Queryable<InfoClientTag>().Where(x => x.ClientId == req.Id).First();
if (TenantDb.Queryable<InfoClient>().Where(x => x.Id != data.Id && (x.ShortName == req.ShortName.Trim() || x.Description == req.Description.Trim() || x.TaxNo == req.TaxNo.Trim())).Any())

@ -61,7 +61,10 @@ namespace DS.WMS.Core.Op.Dtos
/// Desc:邮箱
/// </summary>
public string Email { get; set; }
/// <summary>
/// 用户手机号
/// </summary>
public string Mobile { get; set; }
/// <summary>
/// 备注
/// </summary>

@ -59,6 +59,10 @@ namespace DS.WMS.Core.Op.Dtos
/// Desc:邮箱
/// </summary>
public string Email { get; set; }
/// <summary>
/// 用户手机号
/// </summary>
public string Mobile { get; set; }
/// <summary>
/// 备注

@ -80,8 +80,8 @@ namespace DS.WMS.Core.Op.Entity
[SqlSugar.SugarColumn(ColumnDescription = "整单费用状态时间", IsNullable = true)]
public DateTime BillFeeStatusTime { get; set; }
[SugarColumn(ColumnDescription = "当前审批工作流ID", IsNullable = true)]
public long? FlowId { get; set; }
//[SugarColumn(ColumnDescription = "当前审批工作流ID", IsNullable = true)]
//public long? FlowId { get; set; }
/// <summary>
/// Desc:业务锁定人Id

@ -62,6 +62,11 @@ namespace DS.WMS.Core.Op.Entity
/// </summary>
[SugarColumn(ColumnDescription = "邮箱", Length = 50, IsNullable = true)]
public string Email { get; set; }
/// <summary>
/// 用户手机号
/// </summary>
[SugarColumn(ColumnDescription = "用户手机号", Length = 50, IsNullable = true)]
public string Mobile { get; set; }
/// <summary>
/// 联系人ID

@ -14,7 +14,7 @@ namespace DS.WMS.Core.Op.Interface.TaskInteraction
/// 返回任务交互模块是否已授权
/// </summary>
/// <returns>如果已授权则为<c>true</c>,否则为<c>false</c></returns>
Task<bool> HasAuthorized();
Task<bool> HasAuthorizedAsync();
/// <summary>
/// 获取业务的任务信息

@ -95,6 +95,7 @@ namespace DS.WMS.Core.Op.Method
ClientId = req.CustomerId,
Name = req.Name,
Email = req.Email,
Mobile = req.Mobile,
Tel = req.Tel,
Note = req.Note,
};
@ -110,6 +111,7 @@ namespace DS.WMS.Core.Op.Method
if (contact.Name == req.Name.Trim())
{
contact.Email = req.Email;
contact.Mobile = req.Mobile;
contact.Tel = req.Tel;
await tenantDb.Updateable(contact).ExecuteCommandAsync();
}
@ -121,6 +123,7 @@ namespace DS.WMS.Core.Op.Method
ClientId = req.CustomerId,
Name = req.Name,
Email = req.Email,
Mobile = req.Mobile,
Tel = req.Tel,
Note = req.Note,
};

@ -463,8 +463,14 @@ public partial class SeaExportService : ISeaExportService
var contactLists = sqlSugarScope.Queryable<BusinessOrderContact>().Where(x => x.BusinessId == seaExport.Id).ToList();
var addList = new List<BusinessOrderContact>();
var delList = new List<BusinessOrderContact>();
if (seaExport.CustomerId != 0)
{
var delContrllers = contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "controller" && x.CustomerId != seaExport.CustomerId).ToList();
if (delContrllers.Count > 0)
{
delList.AddRange(delContrllers);
}
var defaultContact = sqlSugarScope.Queryable<InfoClientContact>().Where(x => x.ClientId == seaExport.CustomerId && x.IsDefault == true).First();
if (defaultContact.IsNotNull())
{
@ -479,14 +485,20 @@ public partial class SeaExportService : ISeaExportService
CustomerTypeName = "委托单位",
Name = defaultContact.Name,
Tel = defaultContact.Tel,
Mobile = defaultContact.Mobile,
Email = defaultContact.Email,
CustomerContactId = defaultContact.Id
});
}
}
}
}
if (seaExport.TruckerId != 0)
{
var delTrucks = contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "truck" && x.CustomerId != seaExport.TruckerId).ToList();
if (delTrucks.Count > 0)
{
delList.AddRange(delTrucks);
}
var defaultContact = sqlSugarScope.Queryable<InfoClientContact>().Where(x => x.ClientId == seaExport.TruckerId && x.IsDefault == true).First();
if (defaultContact.IsNotNull())
{
@ -500,6 +512,7 @@ public partial class SeaExportService : ISeaExportService
CustomerType = "truck",
CustomerTypeName = "车队",
Name = defaultContact.Name,
Mobile = defaultContact.Mobile,
Tel = defaultContact.Tel,
Email = defaultContact.Email,
CustomerContactId = defaultContact.Id
@ -509,6 +522,11 @@ public partial class SeaExportService : ISeaExportService
}
if (seaExport.YardId != 0)
{
var delYards = contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "yard" && x.CustomerId != seaExport.YardId).ToList();
if (delYards.Count > 0)
{
delList.AddRange(delYards);
}
var defaultContact = sqlSugarScope.Queryable<InfoClientContact>().Where(x => x.ClientId == seaExport.YardId && x.IsDefault == true).First();
if (defaultContact.IsNotNull())
{
@ -522,6 +540,7 @@ public partial class SeaExportService : ISeaExportService
CustomerType = "yard",
CustomerTypeName = "场站",
Name = defaultContact.Name,
Mobile = defaultContact.Mobile,
Tel = defaultContact.Tel,
Email = defaultContact.Email,
CustomerContactId = defaultContact.Id
@ -531,6 +550,11 @@ public partial class SeaExportService : ISeaExportService
}
if (seaExport.ForwarderId != 0)
{
var delForwarders = contactLists.Where(x => x.BusinessType == BusinessType.OceanShippingExport && x.CustomerType == "booking" && x.CustomerId != seaExport.ForwarderId).ToList();
if (delForwarders.Count > 0)
{
delList.AddRange(delForwarders);
}
var defaultContact = sqlSugarScope.Queryable<InfoClientContact>().Where(x => x.ClientId == seaExport.ForwarderId && x.IsDefault == true).First();
if (defaultContact.IsNotNull())
{
@ -544,6 +568,7 @@ public partial class SeaExportService : ISeaExportService
CustomerType = "booking",
CustomerTypeName = "订舱公司",
Name = defaultContact.Name,
Mobile = defaultContact.Mobile,
Tel = defaultContact.Tel,
Email = defaultContact.Email,
CustomerContactId = defaultContact.Id
@ -553,6 +578,8 @@ public partial class SeaExportService : ISeaExportService
}
if (addList.Count > 0)
sqlSugarScope.Insertable(addList).ExecuteCommand();
if (delList.Count > 0)
sqlSugarScope.Deleteable(delList).ExecuteCommand();
}

@ -3,7 +3,7 @@ using DS.Module.Core;
using DS.Module.Core.Data;
using DS.Module.Core.Helpers;
using DS.Module.DjyRulesEngine;
using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Entity;
using DS.WMS.Core.Flow.Interface;
@ -22,7 +22,9 @@ using DS.WMS.Core.TaskPlat.Interface;
using Mapster;
using Masuit.Tools;
using Masuit.Tools.Systems;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using SqlSugar;
namespace DS.WMS.Core.Op.Method.TaskInteraction
@ -39,16 +41,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// </summary>
public static readonly TaskBaseTypeEnum[] AuditTaskTypes;
/// <summary>
/// 确定任务类型是否为业务订单任务
/// </summary>
/// <param name="taskType">任务类型</param>
/// <returns></returns>
public static bool IsOrderType(TaskBaseTypeEnum taskType)
{
int val = (int)taskType;
return val >= 200 && val <= 399;
}
static readonly ApiFox Api;
static TaskService()
{
@ -60,6 +53,19 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
}).Where(x => x.Count > 1);
AuditTaskTypes = enumValues.Select(x => (TaskBaseTypeEnum)Math.Abs(x.Value)).Distinct().ToArray();
Api = new ApiFox();
}
/// <summary>
/// 确定任务类型是否为业务订单任务
/// </summary>
/// <param name="taskType">任务类型</param>
/// <returns></returns>
public static bool IsOrderType(TaskBaseTypeEnum taskType)
{
int val = (int)taskType;
return val >= 200 && val <= 399;
}
/// <summary>
@ -108,7 +114,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// </summary>
protected Lazy<IRuleEngineService> RuleEngineService { get; private set; }
Lazy<IFeeCustTemplateService> FeeTemplateService;
IConfiguration configuration;
/// <summary>
/// 初始化
@ -120,11 +126,11 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
LogService = provider.GetRequiredService<ITaskLogService>();
TaskAllocationService = provider.GetRequiredService<ITaskAllocationService>();
ActionService = provider.GetRequiredService<IActionManagerService>();
configuration = provider.GetRequiredService<IConfiguration>();
ClientParamService = new Lazy<IClientParamService>(provider.GetRequiredService<IClientParamService>());
FlowService = new Lazy<IClientFlowInstanceService>(provider.GetRequiredService<IClientFlowInstanceService>());
RuleEngineService = new Lazy<IRuleEngineService>(provider.GetRequiredService<IRuleEngineService>());
FeeTemplateService = new Lazy<IFeeCustTemplateService>(provider.GetRequiredService<IFeeCustTemplateService>());
TenantDb.QueryFilter.Clear<IOrgId>();
}
@ -137,7 +143,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// <returns></returns>
public async Task<DataResult> CreateTaskAsync(TaskCreationRequest request, bool useTransaction = true)
{
if (!await HasAuthorized())
if (!await HasAuthorizedAsync())
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.ModuleUnauthorized));
if (request.HasCabin.GetValueOrDefault() && request.BusinessType.HasValue)
@ -255,7 +261,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
BusinessType = request.BusinessType,
TaskType = request.TaskType,
TaskStatus = TaskStatusEnum.Create,
RecvUsers = string.Join(',', info.Main.RecvUserInfoList.Select(x => x.RecvUserId)),
RecvUsers = string.Join(',', info.Main.RecvUserInfoList.Select(x => x.RecvUserId)) ?? string.Empty,
NextType = request.NextType,
CreateBy = long.Parse(User.UserId),
CreateTime = DateTime.Now
@ -348,6 +354,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
await TenantDb.Updateable(task).UpdateColumns(x => x.RecvUsers).ExecuteCommandAsync();
}
}
result.Data = instance;
}
return result;
@ -371,7 +379,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// <returns></returns>
public async Task<DataResult> SetTaskStatusAsync(TaskUpdateRequest request, bool useTransaction = true)
{
if (!await HasAuthorized())
if (!await HasAuthorizedAsync())
return DataResult.FailedWithDesc(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.ModuleUnauthorized)));
if (useTransaction)
@ -496,7 +504,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// 返回任务交互模块是否已授权
/// </summary>
/// <returns></returns>
public virtual async Task<bool> HasAuthorized()
public virtual async Task<bool> HasAuthorizedAsync()
{
long tid = long.Parse(User.TenantId);
var authStr = await Db.Queryable<SysTenantPermissionAuth>().ClearFilter(typeof(ITenantId)).Where(x => x.PermissionId == PERMISSION_ID && x.TenantId == tid &&
@ -709,7 +717,23 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
//终审通过且任务类型为审单,则生成费用
if (request.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT && instance.FlowStatus == FlowStatusEnum.Approve && instance.IsCompleted)
await FeeTemplateService.Value.GenerateFeesAsync(request.Ids[0], request.BusinessType.GetValueOrDefault());
{
UriBuilder builder = new UriBuilder(configuration["FeeService:BaseUrl"]);
builder.Path = configuration["FeeService:GenerateFees"];
string url = builder.ToString();
if (string.IsNullOrEmpty(url))
{
await LogService.WriteLogAsync(req, "未在配置文件中配置费用服务URL无法根据费用模板生成费用");
continue;
}
string json = JsonConvert.SerializeObject(new BizItem
{
Id = req.BusinessId,
BusinessType = req.BusinessType.GetValueOrDefault()
});
Api.SendRequestAsync(HttpMethod.Post, url, json);
}
}
if (IsOrderType(request.TaskType))
@ -923,7 +947,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
/// <returns></returns>
public async Task<DataResult> Delete(long id, BusinessType? businessType, string? remark = null, params TaskBaseTypeEnum[] taskTypes)
{
if (!await HasAuthorized())
if (!await HasAuthorizedAsync())
return DataResult.SuccessedWithDesc(nameof(MultiLanguageConst.ModuleUnauthorized));
string[]? typeNames = taskTypes?.Select(x => x.ToString()).ToArray();

@ -71,7 +71,7 @@ public class CurrentUserViewModel
/// </summary>
public string ClientId { get; set; }
public bool IsLimitClient { get; set; }
public bool IsUseSystem { get; set; }
/// <summary>

@ -200,6 +200,11 @@ public class UserReq
/// 首页地址
/// </summary>
public string? HomePath { get; set; }
/// <summary>
/// 是否允许使用本系统
/// </summary>
public bool IsUseSystem { get; set; } = false;
}
/// <summary>

@ -217,4 +217,9 @@ public class UserViewModel
/// 首页地址
/// </summary>
public string? HomePath { get; set; }
/// <summary>
/// 是否允许使用本系统
/// </summary>
public bool IsUseSystem { get; set; } = false;
}

@ -167,10 +167,10 @@ public class SysUser : UserTenantModel<long>
[SugarColumn(ColumnDescription = "默认部门", Length = 100, IsNullable = true)]
public string DeptName { get; set; }
/// <summary>
/// 是否限制客户
/// 是否允许使用本系统
/// </summary>
[Description("是否限制客户")]
public bool IsLimitClient { get; set; }
[Description("是否允许使用本系统")]
public bool IsUseSystem { get; set; }
/// <summary>
/// 是否操作

@ -125,7 +125,7 @@ public class CommonService : ICommonService
UserType = a.UserType,
CompanyId = a.CompanyId,
// ClientId = a.ClientId,
IsLimitClient = a.IsLimitClient,
IsUseSystem = a.IsUseSystem,
RefreshToken = refreshToken,
// OrgId = a.OrgId.ToString(), CompanyName = a.CustomerName
})
@ -376,10 +376,10 @@ public class CommonService : ICommonService
public async Task<DataResult<string>> ClientUserLogin(UserLoginModel model)
{
var userInfo = await db.Queryable<SysUser>().Filter(null, true)
.FirstAsync(x => x.UserCode == model.UserName);
.FirstAsync(x => x.UserCode == model.UserName && x.IsUseSystem == true);
if (userInfo == null)
{
return await Task.FromResult(DataResult<string>.Failed("账号不存在,请检查!"));
return await Task.FromResult(DataResult<string>.Failed("账号不存在或账号禁用,请检查!"));
}
if (userInfo.MD5Password != model.Password)
@ -418,10 +418,10 @@ public class CommonService : ICommonService
public async Task<DataResult<string>> ClientUserEmailLogin(UserEmailLoginModel model)
{
var userInfo = await db.Queryable<SysUser>().Filter(null, true)
.FirstAsync(x => x.Email == model.Email);
.FirstAsync(x => x.Email == model.Email && x.IsUseSystem == true);
if (userInfo == null)
{
return await Task.FromResult(DataResult<string>.Failed("用户邮箱不存在,请检查!"));
return await Task.FromResult(DataResult<string>.Failed("用户邮箱不存在或邮箱账号禁用,请检查!"));
}
if (userInfo.MD5Password != model.Password)
@ -460,10 +460,10 @@ public class CommonService : ICommonService
public async Task<DataResult<string>> ClientUserPhoneLogin(UserPhoneLoginModel model)
{
var userInfo = await db.Queryable<SysUser>().Filter(null, true)
.FirstAsync(x => x.Phone == model.Phone);
.FirstAsync(x => x.Phone == model.Phone && x.IsUseSystem == true);
if (userInfo == null)
{
return await Task.FromResult(DataResult<string>.Failed("用户手机号不存在,请检查!"));
return await Task.FromResult(DataResult<string>.Failed("用户手机号不存在或手机号账号禁用,请检查!"));
}
if (userInfo.MD5Password != model.Password)
@ -536,7 +536,7 @@ public class CommonService : ICommonService
UserType = a.UserType,
CompanyId = a.CompanyId,
// ClientId = a.ClientId,
IsLimitClient = a.IsLimitClient,
IsUseSystem = a.IsUseSystem,
RefreshToken = refreshToken,
OrgId = user.GetOrgId().ToString(),
Tel = a.Tel,
@ -1323,6 +1323,7 @@ public class CommonService : ICommonService
Phone = req.Phone,
UserType = UserTypeEnum.ApplyUser.ToEnumInt(), //管理员
Status = 0, //正常
IsUseSystem = true,
TenantId = 1288018625843826688,
};
var adminUser = db.Insertable(userEntity).ExecuteReturnEntity();

@ -118,7 +118,7 @@ public class UserService : IUserService
if (userAuth.IsNotNull())
{
var authNum = EncrypteHelper.DecryptData(userAuth.AuthNum, tenant.AppSecret);
var userCount = db.Queryable<SysUser>().Count();
var userCount = db.Queryable<SysUser>().Where(x=>x.IsUseSystem == true).Count();
if (userCount>= int.Parse(authNum))
{
return DataResult.Failed(string.Format("用户数量超出授权数量{0}", int.Parse(authNum)),MultiLanguageConst.UserAuthNumLimit);

@ -165,7 +165,7 @@ namespace DS.WMS.Core.TaskPlat.Method
logger.LogInformation("接收到任务转交报文 任务主键={id} 转交人员列表={userinfo}", taskId, JsonConvert.SerializeObject(userInfos));
await tenantDb.Ado.BeginTranAsync();
//await tenantDb.Ado.BeginTranAsync();
await tenantDb.Deleteable<TaskBaseAllocation>(x => x.TaskId == taskId).ExecuteCommandHasChangeAsync();
@ -179,12 +179,12 @@ namespace DS.WMS.Core.TaskPlat.Method
}).ToList();
await tenantDb.Insertable(allocationList).ExecuteCommandAsync();
await tenantDb.Ado.CommitTranAsync();
//await tenantDb.Ado.CommitTranAsync();
return DataResult.Successed("操作成功!", MultiLanguageConst.DataUpdateSuccess);
}
catch (Exception)
{
await tenantDb.Ado.RollbackTranAsync();
//await tenantDb.Ado.RollbackTranAsync();
throw;
}
}

@ -1,5 +1,7 @@
using DS.Module.Core;
using System.Net;
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface;
using Microsoft.AspNetCore.Mvc;
@ -22,6 +24,29 @@ namespace DS.WMS.FeeApi.Controllers
_invokeService = invokeService;
}
/// <summary>
/// 生成订单费用
/// </summary>
/// <param name="biz"></param>
/// <returns></returns>
[HttpPost, Route("GenerateFees")]
public async Task<IActionResult> GenerateFeesAsync([FromBody] BizItem biz)
{
HttpStatusCode httpStatusCode;
try
{
await _invokeService.GenerateFeesAsync(biz.Id, biz.BusinessType);
httpStatusCode = HttpStatusCode.NoContent;
}
catch
{
httpStatusCode = HttpStatusCode.InternalServerError;
throw;
}
return new StatusCodeResult((int)httpStatusCode);
}
/// <summary>
/// 列表
/// </summary>

@ -1,19 +1,17 @@
using Autofac;
using Autofac.Extensions.DependencyInjection;
using DS.Module.AutofacModule;
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.Core.Middlewares;
using DS.Module.Core.ServiceExtensions;
using DS.Module.ExcelModule;
using DS.Module.DjyRulesEngine;
using DS.Module.Jwt;
using DS.Module.MultiLanguage;
using DS.Module.PrintModule;
using DS.Module.RedisModule;
using DS.Module.SqlSugar;
using DS.Module.Swagger;
using DS.Module.UserModule;
using NLog.Web;
using Swashbuckle.AspNetCore.SwaggerUI;
var builder = WebApplication.CreateBuilder(args);
var environment = builder.Environment.EnvironmentName;
@ -41,6 +39,10 @@ builder.Services.AddSwaggerInstall();
builder.Services.AddJwtInstall();
builder.Services.AddSaasDbInstall();//·Ö¿â·þÎñ
builder.Services.AddMultiLanguageInstall();//¶àÓïÑÔ·þÎñ
builder.Services.AddDjyModuleInstall();//Djy·þÎñ
builder.Services.AddRuleEngineModuleInstall();//Djy¹æÔòÒýÇæУÑé·þÎñ
// builder.Services.AddEndpointsApiExplorer();
// builder.Services.AddSwaggerGen();

@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Publish\DS8\FeeApi</_PublishTargetUrl>
<History>True|2024-08-30T03:25:14.7431645Z||;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-02T09:07:41.0268500Z||;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>
<LastFailureDetails />
</PropertyGroup>
</Project>

@ -113,10 +113,14 @@
"SQLPrint": "/printApi/OpenPrint/GetOpenSqlPrintInfo",
"MailApiUrl": "http://47.104.73.97:8801/mail/send"
},
"FeeService": {
"BaseUrl": "http://118.190.144.189:3008",
"GenerateFees": "/feeApi/FeeCustTemplate/GenerateFees"
},
"HangfireSettings": {
"DbString": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;port=3306;uid=rulesengine_admin;pwd=Rule1qaz2wsx!QAZ;database=shippingweb8_hangfire;Allow User Variables=true",
"WorkerCount": 10,
"ServerName": "OpApi",
"Queues": "op"
"Queues": "op"
}
}

Loading…
Cancel
Save