全局增加BusinessType

usertest
嵇文龙 6 months ago
parent f2527e5d9e
commit 2b32afc508

@ -91,29 +91,77 @@ namespace DS.Module.Core
[Description("部分录入")]
PartialEntering = 2,
/// <summary>
/// 提交审核
/// </summary>
[Description("提交审核")]
AuditSubmitted = 3,
/// <summary>
/// 部分提交
/// </summary>
[Description("部分提交")]
PartialSubmitted = 4,
/// <summary>
/// 审核通过
/// </summary>
[Description("审核通过")]
AuditPassed = 3,
AuditPassed = 5,
/// <summary>
/// 驳回提交
/// </summary>
[Description("驳回提交")]
RejectSubmission = 4,
RejectSubmission = 6,
/// <summary>
/// 部分审核
/// </summary>
[Description("部分审核")]
PartialAudited = 7,
/// <summary>
/// 部分结算
/// </summary>
[Description("部分结算")]
PartialSettlement = 5,
PartialSettlement = 8,
/// <summary>
/// 结算完毕
/// </summary>
[Description("结算完毕")]
SettlementCompleted = 6
SettlementCompleted = 9
}
/// <summary>
/// 整单审核状态
/// </summary>
public enum BillAuditStatus
{
/// <summary>
/// 待提交
/// </summary>
[Description("待提交")]
Pending = 0,
/// <summary>
/// 提交审核
/// </summary>
[Description("提交审核")]
AuditSubmitted = 1,
/// <summary>
/// 审核通过
/// </summary>
[Description("审核通过")]
AuditPassed = 2,
/// <summary>
/// 驳回提交
/// </summary>
[Description("驳回提交")]
Rejected = 3
}
/// <summary>

@ -1,4 +1,6 @@
namespace DS.WMS.Core.Fee.Dtos
using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.Fee.Dtos
{
public class FeeRecordSubmit
{
@ -7,6 +9,8 @@
/// </summary>
public long BusinessId { get; set; }
public BusinessType BusinessType { get; set; }
/// <summary>
/// 要提交的费用项
/// </summary>
@ -20,6 +24,8 @@
/// </summary>
public long BusinessId { get; set; }
public BusinessType BusinessType { get; set; }
/// <summary>
/// 要引入费用模板的ID
/// </summary>

@ -1,5 +1,6 @@
using System.ComponentModel;
using DS.Module.Core.Data;
using DS.WMS.Core.Op.Entity;
using SqlSugar;
namespace DS.WMS.Core.Fee.Entity
@ -18,6 +19,13 @@ namespace DS.WMS.Core.Fee.Entity
/// </summary>
[SugarColumn(ColumnDescription = "业务Id")]
public long BusinessId { get; set; }
/// <summary>
/// 业务类型
/// </summary>
[SugarColumn(ColumnDescription = "业务类型")]
public BusinessType BusinessType { get; set; }
/// <summary>
/// 收付类型(收、付) 1应收 2 应付
/// </summary>
@ -308,15 +316,9 @@ namespace DS.WMS.Core.Fee.Entity
[SugarColumn(ColumnDescription = "是否财务费用", IsNullable = true, DefaultValue = "0")]
public bool IsAcc { get; set; }
/// <summary>
///
/// </summary>
[SugarColumn(ColumnDescription = "PaymentId", IsNullable = true, Length = 50)]
public string PaymentId { get; set; }
/// <summary>
///
/// </summary>
[SugarColumn(ColumnDescription = "StatementNo", IsNullable = true, Length = 50)]
public string StatementNo { get; set; }
@ -337,7 +339,5 @@ namespace DS.WMS.Core.Fee.Entity
/// </summary>
[SugarColumn(ColumnDescription = "发票自助连接", IsNullable = true, Length = 50)]
public string InvLinkId { get; set; }
}
}

@ -1,6 +1,7 @@
using System.ComponentModel;
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Op.Entity;
using SqlSugar;
namespace DS.WMS.Core.Fee.Entity
@ -16,6 +17,13 @@ namespace DS.WMS.Core.Fee.Entity
/// </summary>
[SugarColumn(ColumnDescription = "业务Id")]
public long BusinessId { get; set; }
/// <summary>
/// 业务类型
/// </summary>
[SugarColumn(ColumnDescription = "业务类型")]
public BusinessType BusinessType { get; set; }
/// <summary>
/// 收付类型(收、付) 1应收 2 应付
/// </summary>

@ -2,6 +2,7 @@ using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.Fee.Interface;
@ -24,18 +25,18 @@ public interface IFeeRecordService
/// <summary>
/// 提交
/// </summary>
/// <param name="bid">业务ID</param>
/// <param name="items">要提交的费用记录</param>
/// <returns></returns>
DataResult InsertOrUpdate(long bid, IEnumerable<FeeRecord> items);
DataResult InsertOrUpdate(IEnumerable<FeeRecord> items);
/// <summary>
/// 根据费用模板引入
/// </summary>
/// <param name="bid"></param>
/// <param name="tidArray"></param>
/// <param name="bid">业务ID</param>
/// <param name="type">业务类型</param>
/// <param name="tidArray">模板ID</param>
/// <returns></returns>
DataResult CreateByTemplate(long bid, params long[] tidArray);
DataResult CreateByTemplate(long bid, BusinessType type, params long[] tidArray);
/// <summary>
/// 删除

@ -1,4 +1,5 @@
using System.Text;
using System.Collections.Generic;
using System.Text;
using AngleSharp.Dom;
using DS.Module.Core;
using DS.Module.Core.Extensions;
@ -107,9 +108,10 @@ namespace DS.WMS.Core.Fee.Method
/// 检查业务是否已费用锁定
/// </summary>
/// <param name="bid">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <param name="type">锁定范围</param>
/// <returns></returns>
bool IsFeeLocked(long bid, FeeType type = FeeType.All)
bool IsFeeLocked(long bid, BusinessType businessType, FeeType type = FeeType.All)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
bool? isFeeLocking = null;
@ -120,23 +122,24 @@ namespace DS.WMS.Core.Fee.Method
case FeeType.Payable:
break;
case FeeType.All:
isFeeLocking = tenantDb.Queryable<BusinessFeeStatus>().Where(x => x.BusinessId == bid).Select(x => x.IsFeeLocking).First();
isFeeLocking = tenantDb.Queryable<BusinessFeeStatus>().Where(
x => x.BusinessId == bid && x.BusinessType == businessType).Select(x => x.IsFeeLocking).First();
break;
}
return isFeeLocking.GetValueOrDefault();
}
/// <summary>
/// 提交
/// 费用提交
/// </summary>
/// <param name="bid">业务ID</param>
/// <param name="items">要提交的费用记录</param>
/// <returns></returns>
public DataResult InsertOrUpdate(long bid, IEnumerable<FeeRecord> items)
public DataResult InsertOrUpdate(IEnumerable<FeeRecord> items)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (IsFeeLocked(bid))
var first = items.Select(x => new { x.BusinessType, x.BusinessId }).FirstOrDefault();
if (IsFeeLocked(first.BusinessId, first.BusinessType))
return DataResult.Failed("当前业务已费用锁定,禁止提交", MultiLanguageConst.Operation_Failed);
try
@ -178,7 +181,8 @@ namespace DS.WMS.Core.Fee.Method
if (item.Id == 0)
{
item.BusinessId = bid;
item.BusinessId = first.BusinessId;
item.BusinessType = first.BusinessType;
tenantDb.Insertable(item).ExecuteCommand();
}
else
@ -211,7 +215,10 @@ namespace DS.WMS.Core.Fee.Method
ex.Log(db);
return DataResult.Failed("保存失败", MultiLanguageConst.DataUpdateFailed);
}
finally
{
WriteBackStatus(tenantDb, first.BusinessId, first.BusinessType);
}
}
//获取汇率
@ -247,9 +254,10 @@ namespace DS.WMS.Core.Fee.Method
/// 根据模板ID创建
/// </summary>
/// <param name="bid">业务ID</param>
/// <param name="type">业务类型</param>
/// <param name="tidArray">模板ID</param>
/// <returns></returns>
public DataResult CreateByTemplate(long bid, params long[] tidArray)
public DataResult CreateByTemplate(long bid, BusinessType type, params long[] tidArray)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
@ -297,6 +305,9 @@ namespace DS.WMS.Core.Fee.Method
FetchExchangeRate(tenantDb, records);
int result = tenantDb.Insertable(records).ExecuteCommand();
WriteBackStatus(tenantDb, bid, type);
return result > 0 ? DataResult.Successed("保存成功", records, MultiLanguageConst.DataCreateSuccess) : DataResult.Successed("操作失败!", MultiLanguageConst.Operation_Failed);
}
@ -321,14 +332,17 @@ namespace DS.WMS.Core.Fee.Method
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var bid = tenantDb.Queryable<FeeRecord>().Where(x => ids.Contains(x.Id)).Select(x => x.BusinessId).First();
if (IsFeeLocked(bid))
var model = tenantDb.Queryable<FeeRecord>().Where(x => ids.Contains(x.Id)).Select(x => new { x.BusinessId, x.BusinessType }).First();
if (IsFeeLocked(model.BusinessId, model.BusinessType))
return DataResult.Failed("当前业务已费用锁定,禁止修改", MultiLanguageConst.Operation_Failed);
if (tenantDb.Queryable<FeeRecord>().Any(x => ids.Contains(x.Id) && (x.FeeStatus != FeeStatus.Entering && x.FeeStatus != FeeStatus.RejectSubmission)))
return DataResult.Failed("只能删除状态为‘录入’或‘驳回提交’的费用", MultiLanguageConst.FeeRecordDelete);
int result = tenantDb.Deleteable<FeeRecord>(x => ids.Contains(x.Id)).ExecuteCommand();
WriteBackStatus(tenantDb, model.BusinessId, model.BusinessType);
return result > 0 ? DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess) : DataResult.Failed("删除失败!", MultiLanguageConst.Operation_Failed);
}
@ -352,8 +366,10 @@ namespace DS.WMS.Core.Fee.Method
if (fees.IsNullOrEmpty())
return DataResult.Failed($"未能获取费用信息,提交失败", MultiLanguageConst.Operation_Failed);
var bid = fees[0].BusinessId;
var bType = fees[0].BusinessType;
//业务状态检测
if (IsFeeLocked(fees[0].BusinessId))
if (IsFeeLocked(bid, bType))
return DataResult.Failed("当前业务已费用锁定,禁止修改", MultiLanguageConst.Operation_Failed);
if (fees.Any(x => x.FlowId.HasValue))
@ -389,7 +405,6 @@ namespace DS.WMS.Core.Fee.Method
x.SubmitDate,
x.FlowId
}).ExecuteCommand();
tenantDb.Ado.CommitTran();
return DataResult.Successed("提交成功!", MultiLanguageConst.DataUpdateSuccess);
}
@ -423,7 +438,12 @@ namespace DS.WMS.Core.Fee.Method
DateTime dtNow = DateTime.Now;
foreach (var item in fees)
{
var result = flowService.CreateFlowInstance(new CreateFlowInstanceReq { BusinessId = item.Id, TemplateId = template.Id });
var result = flowService.CreateFlowInstance(new CreateFlowInstanceReq
{
BusinessId = item.Id,
BusinessType = item.BusinessType,
TemplateId = template.Id
});
if (result.Succeeded)
{
var instance = result.Data as FlowInstance;
@ -462,7 +482,12 @@ namespace DS.WMS.Core.Fee.Method
DateTime dtNow = DateTime.Now;
foreach (var item in fees)
{
var result = flowService.CreateFlowInstance(new CreateFlowInstanceReq { BusinessId = item.Id, TemplateId = template.Id });
var result = flowService.CreateFlowInstance(new CreateFlowInstanceReq
{
BusinessId = item.Id,
BusinessType = item.BusinessType,
TemplateId = template.Id
});
if (result.Succeeded)
{
var instance = result.Data as FlowInstance;
@ -488,7 +513,7 @@ namespace DS.WMS.Core.Fee.Method
{
var idList = items.Select(x => x.FeeRecordId).Distinct().ToList();
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var fees = tenantDb.Queryable<FeeRecord>().Select(x => new FeeRecord
var fees = tenantDb.Queryable<FeeRecord>().Where(x => idList.Contains(x.Id)).Select(x => new FeeRecord
{
Id = x.Id,
FeeName = x.FeeName,
@ -517,7 +542,12 @@ namespace DS.WMS.Core.Fee.Method
{
foreach (var fee in fees)
{
var result = flowService.CreateFlowInstance(new CreateFlowInstanceReq { BusinessId = fee.Id, TemplateId = template.Id });
var result = flowService.CreateFlowInstance(new CreateFlowInstanceReq
{
BusinessId = fee.Id,
BusinessType = fee.BusinessType,
TemplateId = template.Id
});
if (result.Succeeded)
{
var instance = result.Data as FlowInstance;
@ -678,8 +708,8 @@ namespace DS.WMS.Core.Fee.Method
tenantDb.Updateable<FeeRecord>().
SetColumns(x => x.FeeStatus == status).
SetColumns(x=>x.FlowId == null).
Where(x => x.BusinessId == businessFee.BusinessId &&
SetColumns(x => x.FlowId == null).
Where(x => x.BusinessId == businessFee.BusinessId &&
(x.FeeStatus == FeeStatus.Entering || x.FeeStatus == FeeStatus.RejectSubmission)).ExecuteCommand();
break;
@ -708,6 +738,10 @@ namespace DS.WMS.Core.Fee.Method
ex.Log(db);
return DataResult.Failed("提交失败!", MultiLanguageConst.Operation_Failed);
}
finally
{
WriteBackStatus(tenantDb, callback.BusinessId, callback.BusinessType);
}
}
/// <summary>
@ -809,7 +843,12 @@ namespace DS.WMS.Core.Fee.Method
if (template == null)
return DataResult.Failed("未能找到审批模板", MultiLanguageConst.Operation_Failed);
var result = flowService.CreateFlowInstance(new CreateFlowInstanceReq { BusinessId = entity.Id, TemplateId = template.Id });
var result = flowService.CreateFlowInstance(new CreateFlowInstanceReq
{
BusinessId = entity.Id,
BusinessType = entity.BusinessType,
TemplateId = template.Id
});
if (result.Succeeded)
{
var instance = result.Data as FlowInstance;
@ -836,9 +875,82 @@ namespace DS.WMS.Core.Fee.Method
//回写业务主表的费用状态
void WriteBackStatus(SqlSugarScopeProvider tenantDb, List<FeeRecord> fees)
void WriteBackStatus(SqlSugarScopeProvider tenantDb, long businessId, BusinessType businessType)
{
var fees = tenantDb.Queryable<FeeRecord>().Where(x => x.BusinessId == businessId && x.BusinessType == businessType)
.Select(x => new FeeRecord
{
//BusinessId = businessId,
//BusinessType = businessType,
FeeType = x.FeeType,
FeeStatus = x.FeeStatus
}).ToList();
var arFeeStatus = DetermineStatus(fees.FindAll(x => x.FeeType == FeeType.Receivable));
var apFeeStatus = DetermineStatus(fees.FindAll(x => x.FeeType == FeeType.Payable));
if (arFeeStatus != null || apFeeStatus != null)
{
var upt = tenantDb.Updateable<BusinessFeeStatus>();
if (arFeeStatus != null)
{
upt = upt.SetColumns(x => x.ARFeeStatus == arFeeStatus);
}
if (apFeeStatus != null)
{
upt = upt.SetColumns(x => x.APFeeStatus == apFeeStatus);
}
upt.Where(x => x.BusinessType == businessType && x.BusinessId == businessId)
.ExecuteCommand();
}
}
//业务表费用状态判定
static BillFeeStatus? DetermineStatus(List<FeeRecord> fees)
{
BillFeeStatus? billFeeStatus = null;
if (fees.Count == 0)
{
billFeeStatus = BillFeeStatus.NotEntered;
}
else if (fees.All(x => x.FeeStatus == FeeStatus.Entering))
{
billFeeStatus = BillFeeStatus.Entering;
}
else if (fees.All(x => x.FeeStatus == FeeStatus.AuditSubmitted))
{
billFeeStatus = BillFeeStatus.AuditSubmitted;
}
else if (fees.All(x => x.FeeStatus == FeeStatus.AuditPassed))
{
billFeeStatus = BillFeeStatus.AuditPassed;
}
else if (fees.All(x => x.FeeStatus == FeeStatus.RejectSubmission))
{
billFeeStatus = BillFeeStatus.RejectSubmission;
}
else if (fees.All(x => x.FeeStatus == FeeStatus.PartialSettlement))
{
billFeeStatus = BillFeeStatus.PartialSettlement;
}
else if (fees.All(x => x.FeeStatus == FeeStatus.SettlementCompleted))
{
billFeeStatus = BillFeeStatus.SettlementCompleted;
}
else if (fees.Any(x => x.FeeStatus == FeeStatus.Entering))
{
billFeeStatus = BillFeeStatus.PartialEntering;
}
else if (fees.Any(x => x.FeeStatus == FeeStatus.AuditSubmitted))
{
billFeeStatus = BillFeeStatus.PartialSubmitted;
}
else if (fees.Any(x => x.FeeStatus == FeeStatus.AuditPassed))
{
billFeeStatus = BillFeeStatus.PartialAudited;
}
return billFeeStatus;
}
/// <summary>

@ -1,3 +1,5 @@
using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.Flow.Dtos;
/// <summary>
@ -10,6 +12,10 @@ public class CreateFlowInstanceReq
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// 业务类型
/// </summary>
public BusinessType BusinessType { get; set; }
/// <summary>
/// 模板Id
/// </summary>
public long? TemplateId { get; set; }

@ -1,4 +1,5 @@
using DS.Module.Core;
using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.Flow.Dtos
{
@ -8,6 +9,8 @@ namespace DS.WMS.Core.Flow.Dtos
public long BusinessId { get; set; }
public BusinessType BusinessType { get; set; }
public string AuditType { get; set; }
public FlowStatusEnum FlowStatus { get; set; }

@ -1,6 +1,7 @@
using System.ComponentModel;
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Op.Entity;
using SqlSugar;
namespace DS.WMS.Core.Flow.Entity;
@ -15,6 +16,10 @@ public class FlowInstance : BaseTenantModel<long>
/// </summary>
[Description("业务Id")]
public long BusinessId { get; set; }
[Description("业务类型")]
public BusinessType BusinessType { get; set; }
/// <summary>
/// 模板Id
/// </summary>

@ -1,5 +1,6 @@
using DS.Module.Core;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.Flow.Interface;
@ -60,5 +61,5 @@ public interface IClientFlowInstanceService
/// <returns></returns>
DataResult<List<FlowInstanceHistoryRes>> GetFlowInstanceHistoryList(string id);
DataResult<FlowInstanceRes> GetFlowInstance(long businessId, string type);
DataResult<FlowInstanceRes> GetFlowInstance(long businessId, BusinessType businessType, string type);
}

@ -3,6 +3,7 @@ using DS.Module.SqlSugar;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Entity;
using DS.WMS.Core.Flow.Interface;
using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Sys.Entity;
using Mapster;
using Microsoft.Extensions.DependencyInjection;
@ -13,7 +14,6 @@ public class ClientFlowInstanceService : FlowInstanceService, IClientFlowInstanc
{
readonly ISaasDbService saasService;
public ClientFlowInstanceService(IServiceProvider serviceProvider) : base(serviceProvider)
{
saasService = serviceProvider.GetRequiredService<ISaasDbService>();
@ -67,9 +67,9 @@ public class ClientFlowInstanceService : FlowInstanceService, IClientFlowInstanc
return new FlowRuntime(instance, db, saasService, user);
}
public DataResult<FlowInstanceRes> GetFlowInstance(long businessId, string type)
public DataResult<FlowInstanceRes> GetFlowInstance(long businessId, BusinessType businessType, string type)
{
var entity = db.Queryable<FlowInstance>().Where(x => x.BusinessId == businessId && x.AuditType == type)
var entity = db.Queryable<FlowInstance>().Where(x => x.BusinessId == businessId && x.BusinessType == businessType && x.AuditType == type)
.OrderByDescending(x => x.CreateTime).First();
var result = entity == null ? null : entity.Adapt<FlowInstanceRes>();
return DataResult<FlowInstanceRes>.Success(result);

@ -1,4 +1,3 @@
using System.Net;
using System.Text;
using DS.Module.Core;
using DS.Module.Core.Extensions;
@ -427,6 +426,7 @@ public class FlowInstanceService : IFlowInstanceService
{
InstanceId = instance.Id,
BusinessId = instance.BusinessId,
BusinessType = instance.BusinessType,
AuditType = instance.AuditType,
FlowStatus = (FlowStatusEnum)instance.FlowStatus,
RejectReason = instance.Note

@ -109,6 +109,11 @@ namespace DS.WMS.Core.Op.Entity
/// </summary>
public enum BusinessType
{
/// <summary>
/// 费用更改单
/// </summary>
ChangeOrder = 0,
/// <summary>
/// 海运出口
/// </summary>
@ -119,34 +124,4 @@ namespace DS.WMS.Core.Op.Entity
/// </summary>
OceanShippingImport = 2
}
/// <summary>
/// 整单审核状态
/// </summary>
public enum BillAuditStatus
{
/// <summary>
/// 待提交
/// </summary>
[Description("待提交")]
Pending = 0,
/// <summary>
/// 提交审核
/// </summary>
[Description("提交审核")]
AuditSubmitted = 1,
/// <summary>
/// 审核通过
/// </summary>
[Description("审核通过")]
AuditPassed = 2,
/// <summary>
/// 驳回提交
/// </summary>
[Description("驳回提交")]
Rejected = 3
}
}

@ -233,8 +233,8 @@ public class SeaExportService : ISeaExportService
{
it.SourceDetailName = tenantDb.Queryable<CodeSourceDetail>().Where(x => x.Id == it.SourceDetailId).Select(n => n.DetailName).First();
var feeStatus = tenantDb.Queryable<BusinessFeeStatus>().First(x => x.BusinessId == it.Id);
it.ARFeeStatus = feeStatus.IsNull() ? 0 : feeStatus.ARFeeStatus;
it.APFeeStatus = feeStatus.IsNull() ? 0 : feeStatus.APFeeStatus;
it.ARFeeStatus = feeStatus.IsNull() ? 0 : (int)feeStatus.ARFeeStatus;
it.APFeeStatus = feeStatus.IsNull() ? 0 : (int)feeStatus.APFeeStatus;
it.ARInvoiceStatus = feeStatus.IsNull() ? 0 : feeStatus.ARInvoiceStatus;
it.APInvoiceStatus = feeStatus.IsNull() ? 0 : feeStatus.APInvoiceStatus;
it.ARCheckStatus = feeStatus.IsNull() ? 0 : feeStatus.ARCheckStatus;

@ -70,14 +70,19 @@ namespace DS.WMS.FeeApi.Controllers
[HttpPost, Route("Submit")]
public DataResult Submit([FromBody] FeeRecordSubmit recordSubmit)
{
if (recordSubmit == null)
if (recordSubmit == null || recordSubmit.Items.IsNullOrEmpty())
return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest);
if (recordSubmit.Items.Any(x => x.FeeStatus != FeeStatus.Entering && x.FeeStatus != FeeStatus.RejectSubmission))
return DataResult.Failed("只能提交状态为‘录入’或‘驳回提交’的费用", MultiLanguageConst.IllegalRequest);
var list = recordSubmit.Items.Select(x => x.Adapt<FeeRecord>());
return _feeService.InsertOrUpdate(recordSubmit.BusinessId, list);
foreach (var item in list)
{
item.BusinessId = recordSubmit.BusinessId;
item.BusinessType = recordSubmit.BusinessType;
}
return _feeService.InsertOrUpdate(list);
}
/// <summary>
@ -91,7 +96,7 @@ namespace DS.WMS.FeeApi.Controllers
if (request == null || request.TemplateIdList.Length == 0)
return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest);
var res = _feeService.CreateByTemplate(request.BusinessId, request.TemplateIdList);
var res = _feeService.CreateByTemplate(request.BusinessId, request.BusinessType, request.TemplateIdList);
return res;
}

@ -803,3 +803,17 @@
2024-05-29 17:54:33.7416 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-05-29 17:54:33.7416 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-29 17:54:33.7527 Info Configuration initialized.
2024-05-30 16:12:43.6522 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-30 16:12:43.6669 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-30 16:12:43.6669 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-30 16:12:43.6850 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-05-30 16:12:43.6915 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-05-30 16:12:43.6915 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-30 16:12:43.6915 Info Configuration initialized.
2024-05-30 16:14:34.5160 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-30 16:14:34.5306 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-30 16:14:34.5353 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-30 16:14:34.5353 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-05-30 16:14:34.5552 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.FeeApi\bin\Debug\net8.0\nlog.config
2024-05-30 16:14:34.5552 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-30 16:14:34.5552 Info Configuration initialized.

@ -1,6 +1,7 @@
using DS.Module.Core;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Interface;
using DS.WMS.Core.Op.Entity;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
@ -117,12 +118,13 @@ public class ClientFlowInstanceController : ApiController
/// 获取流程运行实例的内容
/// </summary>
/// <param name="businessId">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <param name="type">流程类型</param>
/// <returns></returns>
[HttpGet, Route("GetFlowContent")]
public IActionResult GetFlowContent([FromQuery] long businessId, [FromQuery] FeeAuditType type)
public IActionResult GetFlowContent([FromQuery] long businessId, [FromQuery] BusinessType businessType, [FromQuery] FeeAuditType type)
{
var res = _invokeService.GetFlowInstance(businessId, type.ToString());
var res = _invokeService.GetFlowInstance(businessId, businessType, type.ToString());
string? content = res.Data?.Content;
string json = JsonConvert.SerializeObject(DataResult<string>.Success(content ?? string.Empty));
return new ContentResult { Content = json, ContentType = "application/json" };

@ -1639,3 +1639,17 @@
2024-05-29 17:54:34.1263 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config
2024-05-29 17:54:34.1263 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-29 17:54:34.1263 Info Configuration initialized.
2024-05-30 16:12:43.6519 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-30 16:12:43.6677 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-30 16:12:43.6677 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-30 16:12:43.6852 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-05-30 16:12:43.6917 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config
2024-05-30 16:12:43.6917 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-30 16:12:43.6917 Info Configuration initialized.
2024-05-30 16:14:35.3817 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-05-30 16:14:35.3974 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-05-30 16:14:35.3974 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-05-30 16:14:35.4162 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False
2024-05-30 16:14:35.4162 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\bin\Debug\net8.0\nlog.config
2024-05-30 16:14:35.4162 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-30 16:14:35.4302 Info Configuration initialized.

Loading…
Cancel
Save