费用审核列表

usertest
嵇文龙 6 months ago
parent 2c6e3c1552
commit 78f61a6cfc

@ -0,0 +1,642 @@
using System.Runtime.Serialization;
using DS.Module.Core;
using DS.WMS.Core.Op.Entity;
using Masuit.Tools.Systems;
namespace DS.WMS.Core.Fee.Dtos
{
public class FeeAuditBusiness
{
/// <summary>
/// 业务Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 业务类型
/// </summary>
public BusinessType BusinessType { get; set; }
/// <summary>
/// 应收费用状态
/// </summary>
public BillFeeStatus? ARFeeStatus { get; set; }
/// <summary>
/// 应付费用状态
/// </summary>
public BillFeeStatus? APFeeStatus { get; set; }
/// <summary>
/// 更改单
/// </summary>
public string ChangeOrder { get; set; }
/// <summary>
/// 委托单位
/// </summary>
[IgnoreDataMember]
public long? CustomerId { get; set; }
public string CustomerName { get; set; }
/// <summary>
/// 主提单号
/// </summary>
public string MBLNO { get; set; }
/// <summary>
/// 分提单号
/// </summary>
public string HBLNO { get; set; }
/// <summary>
/// 开船日期
/// </summary>
public DateTime? ETD { get; set; }
/// <summary>
/// 业务状态
/// </summary>
public string BusinessStatus { get; set; }
/// <summary>
/// 业务锁定
/// </summary>
public bool? IsBusinessLocking { get; set; }
/// <summary>
/// 费用锁定
/// </summary>
public bool? IsFeeLocking { get; set; }
/// <summary>
/// 委托编号
/// </summary>
public string CustomerNo { get; set; }
/// <summary>
/// 报关单号
/// </summary>
public string CustomNo { get; set; }
/// <summary>
/// 揽货人
/// </summary>
[IgnoreDataMember]
public long? SaleId { get; set; }
public string SaleName { get; set; }
/// <summary>
/// 集装箱
/// </summary>
public string CntrTotal { get; set; }
/// <summary>
/// 会计期间
/// </summary>
public DateTime? AccountDate { get; set; }
/// <summary>
/// 业务来源
/// </summary>
[IgnoreDataMember]
public long? SourceId { get; set; }
public string Source { get; set; }
/// <summary>
/// 来源明细
/// </summary>
[IgnoreDataMember]
public long? SourceDetailId { get; set; }
public string SourceDetail { get; set; }
/// <summary>
/// 经营单位
/// </summary>
public string BusinessUnit { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 其他备注
/// </summary>
public string Note { get; set; }
/// <summary>
/// 录入人
/// </summary>
[IgnoreDataMember]
public long CreateBy { get; set; }
public string CreateByName { get; set; }
/// <summary>
/// 操作员
/// </summary>
[IgnoreDataMember]
public long? OperatorId { get; set; }
public string Operator { get; set; }
/// <summary>
/// 起运港
/// </summary>
public string LoadPort { get; set; }
/// <summary>
/// 卸货港
/// </summary>
public string DischargePort { get; set; }
/// <summary>
/// 船名
/// </summary>
public string Vessel { get; set; }
/// <summary>
/// 航次
/// </summary>
public string Voyage { get; set; }
/// <summary>
/// 报关项数
/// </summary>
public int CustomsNum { get; set; }
/// <summary>
/// 件数
/// </summary>
public int? PKGS { get; set; }
/// <summary>
/// 重量
/// </summary>
public decimal? KGS { get; set; }
/// <summary>
/// 尺码
/// </summary>
public decimal? CBM { get; set; }
/// <summary>
/// 客服员
/// </summary>
[IgnoreDataMember]
public long? CustomerService { get; set; }
public string CustomerServiceName { get; set; }
/// <summary>
/// 贸易条款
/// </summary>
public string TradeTerm { get; set; }
/// <summary>
/// 更改单更改原因
/// </summary>
public string ChangeReason { get; set; }
/// <summary>
/// 单证
/// </summary>
[IgnoreDataMember]
public long Doc { get; set; }
public string DocName { get; set; }
/// <summary>
/// 收货地
/// </summary>
public string ReceiptPlace { get; set; }
/// <summary>
/// 目的地
/// </summary>
public string Destination { get; set; }
/// <summary>
/// 发票号
/// </summary>
public string InvoiceNo { get; set; }
/// <summary>
/// 订单号
/// </summary>
public string OrderNo { get; set; }
/// <summary>
/// 运杂费比例
/// </summary>
public decimal? FreightRatio { get; set; }
/// <summary>
/// 品名
/// </summary>
public string GoodsName { get; set; }
/// <summary>
/// 付费方式
/// </summary>
public string MBLFrt { get; set; }
/// <summary>
/// 承运人
/// </summary>
public string Carrier { get; set; }
/// <summary>
/// 场站
/// </summary>
public string Yard { get; set; }
/// <summary>
/// 订舱公司
/// </summary>
public string BookingCompany { get; set; }
/// <summary>
/// 签单方式
/// </summary>
public string IssueType { get; set; }
/// <summary>
/// 运费协议号
/// </summary>
public string ContractNo { get; set; }
/// <summary>
/// 运输条款
/// </summary>
public string TransitTerms { get; set; }
/// <summary>
/// 整票提交
/// </summary>
//public int MyProperty { get; set; }
/// <summary>
/// 所属部门
/// </summary>
[IgnoreDataMember]
public long SaleDeptId { get; set; }
public string SaleDeptName { get; set; }
/// <summary>
/// 所属分部
/// </summary>
//public int MyProperty { get; set; }
/// <summary>
/// 装运方式
/// </summary>
public string BLType { get; set; }
/// <summary>
/// 货物标识
/// </summary>
public string CargoId { get; set; }
/// <summary>
/// 危险品等级
/// </summary>
public string DangerClass { get; set; }
/// <summary>
/// 国外代理
/// </summary>
[IgnoreDataMember]
public long? AgencyId { get; set; }
/// <summary>
/// 运输类型
/// </summary>
public string ShipmentType { get; set; }
/// <summary>
/// 业务日期
/// </summary>
public DateTime? BusinessDate { get; set; }
/// <summary>
/// 是否费用提交
/// </summary>
public bool IsSubmited { get; set; }
/// <summary>
/// 利润减少
/// </summary>
////public string ProfitReduction { get; set; }
}
public class FeeAudit
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 业务Id
/// </summary>
public long BusinessId { get; set; }
public BusinessType BusinessType { get; set; }
/// <summary>
/// 收付类型(收、付) 1应收 2 应付
/// </summary>
public FeeType FeeType { get; set; }
public string FeeTypeText { get { return FeeType.GetDescription(); } }
/// <summary>
/// 费用名称
/// </summary>
public string FeeName { get; set; }
/// <summary>
/// 费用英文名称
/// </summary>
public string FeeEnName { get; set; }
/// <summary>
/// 结算对象
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 结算对象全称
/// </summary>
public string CustomerFullName { get; set; }
/// <summary>
/// 客户类别
/// </summary>
public string CustomerType { get; set; }
/// <summary>
/// 费用标准
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 单价
/// </summary>
public decimal? UnitPrice { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal? Quantity { get; set; }
/// <summary>
/// 金额
/// </summary>
public decimal? Amount { get; set; }
/// <summary>
/// 币别
/// </summary>
public string Currency { get; set; }
public string CustomerTypeText { get; set; }
public string UnitText { get; set; }
public string CurrencyText { get; set; }
/// <summary>
/// 汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
/// <summary>
/// 驳回原因
/// </summary>
public string Reason { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// Desc:佣金比率
/// </summary>
public decimal? CommissionRate { get; set; }
/// <summary>
/// Desc:结算金额
/// </summary>
public decimal? SettlementAmount { get; set; }
/// <summary>
/// Desc:开票金额
/// </summary>
public decimal? InvoiceAmount { get; set; }
/// <summary>
/// 未开票金额
/// </summary>
public decimal? InvoiceAmountRest { get { return InvoiceAmount.HasValue ? Amount - InvoiceAmount.Value : null; } }
/// <summary>
/// Desc:申请金额
/// </summary>
public decimal? OrderAmount { get; set; }
/// <summary>
/// Desc:申请开票金额
/// </summary>
public decimal? OrderInvoiceAmount { get; set; }
/// <summary>
/// 是否机密费用
/// </summary>
public bool? IsOpen { get; set; }
/// <summary>
/// 对帐编号
/// </summary>
public string DebitNo { get; set; }
/// <summary>
/// 是否对帐
/// </summary>
public bool IsDebit { get; set; }
/// <summary>
/// 是否垫付费用
/// </summary>
public bool? IsAdvancedPay { get; set; }
/// <summary>
/// 是否禁开发票
/// </summary>
public bool? IsInvoice { get; set; }
/// <summary>
/// 费用状态
/// </summary>
public FeeStatus FeeStatus { get; set; }
public string FeeStatusText { get { return FeeStatus.GetDescription(); } }
/// <summary>
/// 发票号
/// </summary>
public string InvoiceNum { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal NoTaxAmount { get; set; }
/// <summary>
/// 财务税率 (销项税率)
/// </summary>
public decimal AccTaxRate { get; set; }
/// <summary>
/// 销项税额
/// </summary>
public decimal AccTax { get { return Amount.GetValueOrDefault() * AccTaxRate; } }
/// <summary>
/// 销项金额
/// </summary>
public decimal AccTaxValue { get { return Amount.GetValueOrDefault() - AccTax; } }
/// <summary>
/// 税额
/// </summary>
public decimal Tax { get; set; }
/// <summary>
/// 申请结算金额
/// </summary>
public decimal OrderSettlementAmount { get; set; }
/// <summary>
/// 含税单价
/// </summary>
public decimal TaxUnitPrice { get; set; }
/// <summary>
/// 申请发票开票金额
/// </summary>
public decimal OrderInvSettlementAmount { get; set; }
/// <summary>
/// 是否财务费用
/// </summary>
public bool IsAcc { get; set; }
/// <summary>
/// 核算单位
/// </summary>
public string SaleOrg { get; set; }
/// <summary>
/// 核算单位Id
/// </summary>
public long SaleOrgId { get; set; }
/// <summary>
/// 创建人
/// </summary>
public long CreateBy { get; set; }
/// <summary>
/// 创建人名字
/// </summary>
public string CreateByName { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
public long? SubmitBy { get; set; }
/// <summary>
/// 提交人
/// </summary>
public string SubmitByName { get; set; }
/// <summary>
/// 提交日期
/// </summary>
public DateTime? SubmitDate { get; set; }
/// <summary>
/// 审核人Id
/// </summary>
public long? AuditBy { get; set; }
/// <summary>
/// 审核人
/// </summary>
public string AuditOperator { get; set; }
/// <summary>
/// 审核日期
/// </summary>
public DateTime? AuditDate { get; set; }
/// <summary>
/// 单号
/// </summary>
public string OrderNo { get; set; }
/// <summary>
/// 船名
/// </summary>
public string Vessel { get; set; }
/// <summary>
/// 航次
/// </summary>
public string Voyage { get; set; }
/// <summary>
/// 国外代理
/// </summary>
public long? ForeignAgencyId { get; set; }
/// <summary>
/// 运输类型
/// </summary>
public string ShipmentType { get; set; }
/// <summary>
/// 揽货人
/// </summary>
public long? SaleId { get; set; }
/// <summary>
/// 业务日期
/// </summary>
public DateTime? BusinessDate { get; set; }
/// <summary>
/// 业务来源
/// </summary>
public long? SourceId { get; set; }
/// <summary>
/// 会计期间
/// </summary>
public DateTime? AccountDate { get; set; }
/// <summary>
/// 操作人
/// </summary>
public string Op { get; set; }
/// <summary>
/// 是否费用提交
/// </summary>
public bool IsSubmited { get; set; }
/// <summary>
/// 利润减少
/// </summary>
////public string ProfitReduction { get; set; }
}
}

@ -89,9 +89,9 @@ namespace DS.WMS.Core.Fee.Entity
public string UnitText { get; set; }
/// <summary>
/// 单价
/// 不含税单价
/// </summary>
[SugarColumn(ColumnDescription = "单价", IsNullable = true, Length = 18, DecimalDigits = 4, DefaultValue = "0")]
[SugarColumn(ColumnDescription = "不含税单价", IsNullable = true, Length = 18, DecimalDigits = 4, DefaultValue = "0")]
public decimal? UnitPrice { get; set; }
/// <summary>
/// 数量
@ -258,7 +258,7 @@ namespace DS.WMS.Core.Fee.Entity
public decimal NoTaxAmount { get; set; }
/// <summary>
/// 财务税率
/// 财务税率 (销项汇率)
/// </summary>
[SugarColumn(ColumnDescription = "财务税率", Length = 18, DecimalDigits = 4, DefaultValue = "0")]
public decimal AccTaxRate { get; set; }

@ -0,0 +1,12 @@
using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
namespace DS.WMS.Core.Fee.Interface
{
public interface IFeeAuditService
{
DataResult<List<FeeAuditBusiness>> GetListByPage(PageRequest request);
}
}

@ -75,6 +75,14 @@ public interface IFeeRecordService
/// <returns></returns>
DataResult UpdateAuditStatus(FlowCallback callback);
/// <summary>
/// 整单审核
/// </summary>
/// <param name="bid">业务ID</param>
/// <param name="type">业务类型</param>
/// <returns></returns>
DataResult AuditBusiness(long bid, BusinessType type);
/// <summary>
/// 获取费用核算单打印信息
/// </summary>

@ -0,0 +1,222 @@
using DS.Module.Core;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.Op.Entity;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Sys.Entity;
using DS.WMS.Core.Flow.Entity;
namespace DS.WMS.Core.Fee.Method
{
public class FeeAuditService : IFeeAuditService
{
//待审核的状态值
public static readonly FeeStatus[] AuditStatusArray = [FeeStatus.AuditSubmitted, FeeStatus.ApplyDeletion, FeeStatus.ApplyModification];
public int RunningStatus = (int)FlowStatusEnum.Running;
readonly IServiceProvider _serviceProvider;
readonly ISqlSugarClient db;
readonly IUser user;
readonly ISaasDbService saasService;
public FeeAuditService(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
user = _serviceProvider.GetRequiredService<IUser>();
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
}
public DataResult<List<FeeAuditBusiness>> GetListByPage(PageRequest request)
{
var flowList = db.Queryable<FlowInstance>().Where(x => x.FlowStatus == RunningStatus && x.MakerList.Contains(user.UserId))
.Select(x => new { x.BusinessId, x.BusinessType }).ToList();
//没有待审批的列表直接返回不再执行后续查询
if (flowList.Count == 0)
DataResult<List<FeeAuditBusiness>>.PageList(0, null, MultiLanguageConst.DataQuerySuccess);
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
List<IConditionalModel> whereList = null;
if (!request.QueryCondition.IsNullOrEmpty())
whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
//海运出口
var query1 = tenantDb.Queryable<SeaExport, BusinessFeeStatus, FeeRecord>((s, b, f) => new JoinQueryInfos(
JoinType.Left, s.Id == b.BusinessId && b.BusinessType == BusinessType.OceanShippingExport,
JoinType.Inner, s.Id == f.BusinessId && f.BusinessType == BusinessType.OceanShippingExport && AuditStatusArray.Contains(f.FeeStatus)
))
.GroupBy(s => s.Id)
.Select((s, b, f) => new FeeAuditBusiness
{
Id = s.Id,
AccountDate = SqlFunc.ToDate(s.AccountDate),
APFeeStatus = b.APFeeStatus,
ARFeeStatus = b.ARFeeStatus,
BusinessType = BusinessType.OceanShippingExport,
BusinessStatus = s.BusinessStatusName,
BusinessDate = s.BusinessDate,//业务日期
BLType = s.BLType,
//BookingCompany = //订舱公司
//BusinessUnit = //经营单位
CargoId = s.CargoId,
Carrier = s.Carrier,
AgencyId = s.AgentId,
CBM = s.CBM,
CntrTotal = s.CntrTotal,
ContractNo = s.ContractNo,
CreateBy = s.CreateBy,
CustomerId = s.CustomerId,
CustomerName = s.CustomerName,//委托单位
CustomerNo = s.CustomerNo,
CustomerService = s.CustomerService,
CustomNo = s.CustomNo,
CustomsNum = s.CustomsNum,
DangerClass = s.DangerClass,
Destination = s.Destination,
DischargePort = s.DischargePort,
Doc = s.Doc,
ETD = s.ETD,
GoodsName = s.GoodsName,
HBLNO = s.HBLNO,
InvoiceNo = s.InvoiceNo,
IsBusinessLocking = b.IsBusinessLocking,
IsFeeLocking = b.IsFeeLocking,
IssueType = s.IssueType,
KGS = s.KGS,
LoadPort = s.LoadPort,
MBLFrt = s.MBLFrt,
MBLNO = s.MBLNO,
Note = s.Note,
OperatorId = s.OperatorId,
OrderNo = s.OrderNo,
PKGS = s.PKGS,
ReceiptPlace = s.ReceiptPlace,
Remark = s.Remark,
SaleDeptId = s.SaleDeptId,
SaleId = s.SaleId,//揽货人
SaleName = s.Sale,
SourceId = s.SourceId,
SourceDetailId = s.SourceDetailId,
TradeTerm = s.TradeTerm,
Vessel = s.Vessel,//船名
Voyage = s.Voyno,//航次
Yard = s.Yard
});
var queryList = tenantDb.UnionAll(new List<ISugarQueryable<FeeAuditBusiness>> { query1 });
var bidList = flowList.Select(x => x.BusinessId);
queryList = queryList.Where(x => bidList.Contains(x.Id));
if (whereList != null)
queryList = queryList.Where(whereList);
var result = queryList.ToQueryPage(request.PageCondition);
if (result.Data.Count > 0)
{
//关联用户名称
var userIds = result.Data.Where(x => x.OperatorId.HasValue).Select(x => x.OperatorId.Value)
.Union(result.Data.Select(x => x.CreateBy))
.Distinct();
var users = db.Queryable<SysUser>().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToList();
foreach (var item in result.Data)
{
item.CreateByName = users.Find(x => x.Id == item.CreateBy)?.UserName;
if (item.OperatorId.HasValue)
{
item.Operator = users.Find(x => x.Id == item.OperatorId.Value)?.UserName;
}
}
}
return result;
}
//public DataResult<List<FeeAudit>> GetListByPage(PageRequest request)
//{
// var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
// var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
// var query1 = tenantDb.Queryable<FeeRecord>()
// .InnerJoin<SeaExport>((x, y) => x.BusinessId == y.Id)
// .LeftJoin<InfoClient>((x, y, z) => x.CustomerId == z.Id)
// .Select((x, y, z) => new FeeAudit
// {
// Id = x.Id,
// BusinessId = x.BusinessId,
// BusinessType = x.BusinessType,
// FeeStatus = x.FeeStatus,
// FeeType = x.FeeType,
// FeeName = x.FeeName,
// FeeEnName = x.FeeEnName,
// CustomerName = x.CustomerName,
// CustomerFullName = z.Description, //结算对象全称
// CustomerType = x.CustomerType,
// CustomerTypeText = x.CustomerTypeText,
// Unit = x.Unit,
// UnitText = x.UnitText,
// UnitPrice = x.UnitPrice,
// TaxUnitPrice = x.TaxUnitPrice,
// Quantity = x.Quantity,
// TaxRate = x.TaxRate,
// NoTaxAmount = x.NoTaxAmount,
// Amount = x.Amount,
// Currency = x.Currency,
// CurrencyText = x.CurrencyText,
// ExchangeRate = x.ExchangeRate,
// AccTaxRate = x.AccTaxRate,//销项汇率
// Remark = x.Remark,
// IsAdvancedPay = x.IsAdvancedPay,//是否垫付
// IsInvoice = x.IsInvoice, //是否开发票
// //FRT
// CommissionRate = x.CommissionRate, //佣金比率
// CreateBy = x.CreateBy,
// CreateTime = x.CreateTime,
// AuditOperator = x.AuditOperator,
// AuditDate = x.AuditDate,
// SettlementAmount = x.SettlementAmount,//结算金额
// InvoiceAmount = x.InvoiceAmount,//开票金额
// OrderAmount = x.OrderAmount,//申请金额
// InvoiceNum = x.InvoiceNum,//发票号
// Tax = x.Tax,//税额
// DebitNo = x.DebitNo,//对账编号
// SubmitBy = x.SubmitBy,
// SubmitDate = x.SubmitDate,
// SaleOrg = x.SaleOrg,
// Reason = x.Reason,
// IsOpen = x.IsOpen,//是否机密
// });
// var queryList = tenantDb.UnionAll(new List<ISugarQueryable<FeeAudit>> { query1 });
// var result = queryList.Where(whereList).ToQueryPage(request.PageCondition);
// if (result.Data.Count > 0)
// {
// //关联用户名称
// var userIds = result.Data.Where(x => x.SubmitBy.HasValue).Select(x => x.SubmitBy.Value)
// .Union(result.Data.Select(x => x.CreateBy))
// .Distinct();
// var users = db.Queryable<SysUser>().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToList();
// foreach (var item in result.Data)
// {
// item.CreateByName = users.Find(x => x.Id == item.CreateBy)?.UserName;
// if (item.SubmitBy.HasValue)
// {
// item.SubmitByName = users.Find(x => x.Id == item.SubmitBy.Value)?.UserName;
// }
// }
// }
// return result;
//}
}
}

@ -334,7 +334,7 @@ namespace DS.WMS.Core.Fee.Method
var bType = fees[0].BusinessType;
//业务状态检测
if (IsFeeLocked(bid, bType))
return DataResult.Failed("当前业务已费用锁定,禁止修改", MultiLanguageConst.Operation_Failed);
return DataResult.Failed("当前业务已费用锁定,禁止提交", MultiLanguageConst.Operation_Failed);
if (fees.Any(x => x.FlowId.HasValue))
return DataResult.Failed($"当前费用包含正在审批中的费用,无法提交", MultiLanguageConst.Operation_Failed);
@ -582,6 +582,7 @@ namespace DS.WMS.Core.Fee.Method
{
case FeeAuditType.ApplyAudit:
fee.AuditBy = long.Parse(user.UserId);
fee.AuditOperator = user.UserName;
fee.AuditDate = DateTime.Now;
if (callback.FlowStatus == FlowStatusEnum.Approve)
@ -596,6 +597,7 @@ namespace DS.WMS.Core.Fee.Method
{
x.FeeStatus,
x.AuditBy,
x.AuditOperator,
x.AuditDate,
x.Reason,
x.FlowId
@ -692,7 +694,7 @@ 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 &&
Where(x => x.BusinessId == businessFee.BusinessId && x.BusinessType == callback.BusinessType &&
(x.FeeStatus == FeeStatus.Entering || x.FeeStatus == FeeStatus.RejectSubmission)).ExecuteCommand();
break;

@ -31,6 +31,7 @@ public class ClientFlowInstanceService : FlowInstanceService, IClientFlowInstanc
CustomName = template.Name,
TemplateId = template.Id,
BusinessId = req.BusinessId,
BusinessType = req.BusinessType,
PermissionId = template.PermissionId,
ColumnView = template.ColumnView,
Content = template.Content,

@ -80,6 +80,7 @@ public class FlowInstanceService : IFlowInstanceService
CustomName = template.Name,
TemplateId = template.Id,
BusinessId = req.BusinessId,
BusinessType = req.BusinessType,
PermissionId = template.PermissionId,
ColumnView = template.ColumnView,
Content = template.Content,
@ -137,7 +138,7 @@ public class FlowInstanceService : IFlowInstanceService
db.Insertable(instance).ExecuteCommand();
//流程==4为结束执行回调URL
if (wfruntime.GetNextNodeType() == 4 && !instance.CallbackURL.IsNullOrEmpty() && Uri.TryCreate(instance.CallbackURL, UriKind.RelativeOrAbsolute, out Uri? uri))
if (wfruntime.GetNextNodeType() == 4 && !instance.CallbackURL.IsNullOrEmpty())
{
RunCallback(instance);
}
@ -266,7 +267,7 @@ public class FlowInstanceService : IFlowInstanceService
db.Updateable(instance).ExecuteCommand();
//流程==4为结束执行回调URL
if (wfruntime.GetNextNodeType() == 4 && !instance.CallbackURL.IsNullOrEmpty() && Uri.TryCreate(instance.CallbackURL, UriKind.RelativeOrAbsolute, out Uri? uri))
if (wfruntime.GetNextNodeType() == 4 && !instance.CallbackURL.IsNullOrEmpty())
{
RunCallback(instance);
}

@ -0,0 +1,34 @@
using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.Flow.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
/// <summary>
/// 费用审核服务
/// </summary>
public class FeeAuditController : ApiController
{
readonly IFeeAuditService _auditService;
readonly IClientFlowInstanceService _flowService;
public FeeAuditController(IFeeAuditService feeService, IClientFlowInstanceService flowService)
{
_auditService = feeService;
_flowService = flowService;
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost, Route("GetList")]
public DataResult<List<FeeAuditBusiness>> List([FromBody] PageRequest request)
{
return _auditService.GetListByPage(request);
}
}
}

@ -186,6 +186,20 @@ namespace DS.WMS.FeeApi.Controllers
return _feeService.UpdateAuditStatus(callback);
}
/// <summary>
/// 发起整单审核
/// </summary>
/// <param name="model">业务ID和类型</param>
/// <returns></returns>
[HttpPost, Route("AuditBusiness")]
public DataResult AuditBusiness(IdModel model)
{
if (model == null || !long.TryParse(model.Id, out long bid))
return DataResult.Failed("参数无效", MultiLanguageConst.IllegalRequest);
return _feeService.AuditBusiness(bid, (BusinessType)model.BusinessType);
}
/// <summary>
/// 获取费用核算单打印信息
/// </summary>

@ -866,3 +866,52 @@
2024-05-31 17:50:06.2901 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-31 17:50:06.3062 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-05-31 17:50:06.3062 Info Configuration initialized.
2024-06-03 14:54:44.7526 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-06-03 14:54:44.7646 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-06-03 14:54:44.7646 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-06-03 14:54:44.7646 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-06-03 14:54:44.7829 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-06-03 14:54:44.7829 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-06-03 14:54:44.7829 Info Configuration initialized.
2024-06-03 15:04:24.1940 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-06-03 15:04:24.2070 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-06-03 15:04:24.2070 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-06-03 15:04:24.2219 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-06-03 15:04:24.2219 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-06-03 15:04:24.2219 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-06-03 15:04:24.2336 Info Configuration initialized.
2024-06-03 15:08:19.2877 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-06-03 15:08:19.2989 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-06-03 15:08:19.2989 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-06-03 15:08:19.3146 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-06-03 15:08:19.3146 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-06-03 15:08:19.3270 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-06-03 15:08:19.3270 Info Configuration initialized.
2024-06-03 15:10:06.1445 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-06-03 15:10:06.1595 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-06-03 15:10:06.1595 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-06-03 15:10:06.1760 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-06-03 15:10:06.1760 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-06-03 15:10:06.1760 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-06-03 15:10:06.1897 Info Configuration initialized.
2024-06-03 15:16:18.8134 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-06-03 15:16:18.8275 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-06-03 15:16:18.8275 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-06-03 15:16:18.8436 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-06-03 15:16:18.8436 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-06-03 15:16:18.8436 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-06-03 15:16:18.8577 Info Configuration initialized.
2024-06-03 15:24:39.6810 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-06-03 15:24:39.6960 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-06-03 15:24:39.6960 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-06-03 15:24:39.7128 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-06-03 15:24:39.7190 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-06-03 15:24:39.7190 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-06-03 15:24:39.7190 Info Configuration initialized.
2024-06-03 15:44:38.8188 Info Registered target NLog.Targets.FileTarget(Name=allfile)
2024-06-03 15:44:38.8323 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web)
2024-06-03 15:44:38.8323 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console)
2024-06-03 15:44:38.8472 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-06-03 15:44:38.8472 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-06-03 15:44:38.8577 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile
2024-06-03 15:44:38.8577 Info Configuration initialized.

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

@ -6,7 +6,7 @@
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Code\PublishCopy\ds8-mainapi</_PublishTargetUrl>
<History>True|2024-05-31T07:25:20.8503086Z;True|2024-05-30T17:22:52.2563382+08:00;True|2024-05-30T17:05:35.7504154+08:00;True|2024-05-29T17:17:39.6966826+08:00;</History>
<History>True|2024-05-31T09:57:35.6858600Z||;True|2024-05-31T15:25:20.8503086+08:00||;True|2024-05-30T17:22:52.2563382+08:00||;True|2024-05-30T17:05:35.7504154+08:00||;True|2024-05-29T17:17:39.6966826+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
Loading…
Cancel
Save