Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
b09760007a
  1. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  2. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs
  3. 32
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  4. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

6
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs

@ -79,7 +79,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
///未税金额
/// </summary>
[Display(Name = "未税金额")]
[Display(Name = "税率")]
public decimal Tax { get; set; }
@ -125,7 +125,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
///税额
/// </summary>
[ExporterHeader(DisplayName = "税")]
[ExporterHeader(DisplayName = "税")]
public decimal Tax { get; set; }
/// <summary>
///税后金额
@ -174,7 +174,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
///税额
/// </summary>
[ImporterHeader(Name = "税", FixAllSpace = true)]
[ImporterHeader(Name = "税", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")]
public decimal Tax { get; set; }

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs

@ -87,6 +87,7 @@ public class ADJ_SERVICE : BASE_SERVICE
public virtual async Task<PagedResultDto<PUB_ADJ_DETAIL_DTO>> DetailQueryAsync(PUB_ADJ_DETAIL_REQ_DTO input)
{
var entitys = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<PUB_ADJ_DETAIL>, List<PUB_ADJ_DETAIL_DTO>>(entitys);

32
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -29,6 +29,7 @@ using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
@ -83,10 +84,35 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <returns></returns>
[HttpPost]
[UnitOfWork(false)]
public virtual async Task<string> ApprovalPassed(List<string> p_invs)
public virtual async Task<IActionResult> ApprovalPassed(List<string> p_invs)
{
List<ERR_EXP_DTO> errors = new List<ERR_EXP_DTO>();
var invs = await _invMng.GetInvoiceListAsync(p_invs);
if (invs.Count > 0)
{
var ls = invs.Where(p => p.State != SettleBillState.).Distinct();
if (ls.Count() > 0)
{
foreach (var itm in ls)
{
errors.Add(new ERR_EXP_DTO() { Message = $"{itm.InvbillNum}发票号状态不是商务审核!" });
}
}
var ls1 = invs.Where(p => p.InvoiceState == InvoiceBillState.).Distinct();
if (ls1.Count() > 1)
{
foreach (var itm in ls1)
{
errors.Add(new ERR_EXP_DTO() { Message = $"{itm.InvbillNum}发票号状态不是商务审核!" });
}
}
if (errors.Count() > 0)
{
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = await ExportErrorReportAsync(errors) });
}
}
await _invMng.SetForwardState(p_invs, SettleBillState.);
return ApplicationConsts.SuccessStr;
return new JsonResult(new { Code = "200", Message = "审核成功" });
}
/// <summary>
@ -193,8 +219,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
_excel.Append(adj, "发票调整数据" + itm.InvbillNum).SeparateBySheet();
}
_excel.Append(not, "发票分组未结对应结算分组");
var result = _excel.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制

16
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -377,6 +377,22 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
/// <summary>
/// 获得发票主表
/// </summary>
/// <param name="p_billNum"></param>
/// <returns></returns>
public virtual async Task<List<INVOICE_GRP>> GetInvoiceListAsync(List<string> invs)
{
return await _repository.Where(p => invs.Contains(p.InvbillNum)).ToListAsync();
}
/// <summary>
/// 客户已收票
/// </summary>

Loading…
Cancel
Save