You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
4.8 KiB
C#

using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Op.Entity;
namespace DS.WMS.Core.Fee.Interface;
/// <summary>
/// 费用记录定义
/// </summary>
public interface IFeeRecordService
{
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<List<FeeRecordRes>>> GetListAsync(PageRequest request);
/// <summary>
/// 根据查询条件获取费用数据
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
Task<DataResult<List<FeeRecord>>> GetListAsync(string query);
/// <summary>
/// 获取费用统计对象
/// </summary>
/// <param name="bsId">业务ID</param>
/// <param name="bsType">业务类型</param>
/// <returns></returns>
Task<FeeStatistics> GetFeeStatisticsAsync(long bsId, BusinessType bsType);
/// <summary>
/// 获取已申请修改的费用记录值
/// </summary>
/// <param name="id">费用记录ID</param>
/// <returns></returns>
Task<DataResult<FeeModification>> GetModifyValue(long id);
/// <summary>
/// 提交
/// </summary>
/// <param name="items">要提交的费用记录</param>
/// <param name="excludeZeroFee">是否排除总价为零的费用默认为false</param>
/// <param name="useTransaction">是否使用事务默认为true</param>
/// <returns></returns>
Task<DataResult> SaveAsync(List<FeeRecord> items, bool excludeZeroFee = false, bool useTransaction = true);
/// <summary>
/// 费用保存后提交审核
/// </summary>
/// <param name="items">要提交的费用记录</param>
/// <param name="excludeZeroFee">是否排除总价为零的费用</param>
/// <param name="useTransaction">是否使用事务</param>
/// <returns></returns>
Task<DataResult> SaveAndSubmitAsync(List<FeeRecord> items, bool excludeZeroFee = false, bool useTransaction = true);
/// <summary>
/// 根据费用模板引入
/// </summary>
/// <param name="bid">业务ID</param>
/// <param name="type">业务类型</param>
/// <param name="tidArray">模板ID</param>
/// <returns></returns>
Task<DataResult> CreateByTemplateAsync(long bid, BusinessType type, params long[] tidArray);
/// <summary>
/// 删除
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
Task<DataResult> DeleteAsync(params long[] ids);
6 months ago
/// <summary>
/// 发起审批工作流
/// </summary>
/// <param name="auditType">审批类型</param>
/// <param name="remark">备注</param>
6 months ago
/// <param name="idArray">费用记录ID</param>
/// <returns></returns>
Task<DataResult> SubmitForApprovalAsync(TaskBaseTypeEnum auditType, string remark, params long[] idArray);
6 months ago
/// <summary>
/// 发起费用修改申请
/// </summary>
/// <param name="items">费用修改信息</param>
/// <returns></returns>
Task<DataResult> SubmitForModificationAsync(IEnumerable<FeeModification> items);
/// <summary>
/// 撤销审批
/// </summary>
6 months ago
/// <param name="ids">费用记录ID</param>
/// <returns></returns>
Task<DataResult> WithdrawAsync(params long[] ids);
/// <summary>
/// 发起整票审核
/// </summary>
/// <param name="bid">业务ID</param>
/// <param name="type">业务类型</param>
/// <param name="taskType">任务类型</param>
/// <returns></returns>
Task<DataResult> SubmitBillAuditAsync(long bid, BusinessType type, TaskBaseTypeEnum taskType);
/// <summary>
/// 撤销整票审批
/// </summary>
/// <param name="bid">业务ID</param>
/// <param name="type">业务类型</param>
/// <param name="taskType">任务类型</param>
/// <returns></returns>
Task<DataResult> WithdrawBillAsync(long bid, BusinessType type, TaskBaseTypeEnum taskType);
/// <summary>
/// 回写业务表费用状态
/// </summary>
/// <param name="businessId">业务ID</param>
/// <param name="businessType">业务类型</param>
/// <returns></returns>
Task WriteBackStatusAsync(long businessId, BusinessType businessType);
/// <summary>
/// 获取费用打印信息
/// </summary>
/// <param name="providerName">数据提供程序</param>
/// <param name="bsId">业务ID</param>
/// <param name="bsType">业务类型</param>
/// <param name="ids">费用记录ID</param>
/// <returns></returns>
Task<DataResult<dynamic>> GetPrintInfoAsync(string providerName, long bsId, BusinessType bsType, params long[] ids);
/// <summary>
/// 设置发票启用状态
/// </summary>
/// <param name="enabled">是否启用</param>
/// <param name="idArray">费用记录ID</param>
/// <returns></returns>
Task<DataResult> SetInvoiceEnabledAsync(bool enabled, params long[] idArray);
}