Browse Source

更新字段

master
学 赵 1 year ago
parent
commit
d1637e7fe7
  1. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_PD_DTO.cs
  2. 14
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

2
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_PD_DTO.cs

@ -153,7 +153,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary> /// </summary>
public string Extend3 { get; set; } public string Extend3 { get; set; }
/// <summary> /// <summary>
/// 扩展字段4 /// 客户零件号
/// </summary> /// </summary>
public string Extend4 { get; set; } public string Extend4 { get; set; }

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

@ -23,6 +23,7 @@ using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories; using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Services; using Volo.Abp.Domain.Services;
using Volo.Abp.Json; using Volo.Abp.Json;
using Volo.Abp.Uow;
using Win.Sfs.SettleAccount.Bases; using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.Entities.BQ.Temp; using Win.Sfs.SettleAccount.Entities.BQ.Temp;
using Win.Sfs.SettleAccount.Entities.CodeSettings; using Win.Sfs.SettleAccount.Entities.CodeSettings;
@ -152,6 +153,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
/// <param name="p_State"></param> /// <param name="p_State"></param>
/// <returns></returns> /// <returns></returns>
/// <exception cref="BusinessException"></exception> /// <exception cref="BusinessException"></exception>
[UnitOfWork(false)]
public virtual async Task<bool> SetForwardState(List<string> p_invs, SettleBillState p_State) public virtual async Task<bool> SetForwardState(List<string> p_invs, SettleBillState p_State)
{ {
List<string> errors = new List<string>(); List<string> errors = new List<string>();
@ -167,7 +169,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
if (nols.Count > 0) if (nols.Count > 0)
{ {
var invs = nols.Select(p => p.InvbillNum); var invs = nols.Select(p => p.InvbillNum);
throw new UserFriendlyException($"选择发票{string.Join("", invs)}已报废或者已收票不能进行操作"); throw new BusinessException("8989",$"选择发票{string.Join("", invs)}已报废或者已收票不能进行操作");
} }
var state = p_State; var state = p_State;
switch (p_State) switch (p_State)
@ -230,7 +232,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
break; break;
} }
await _repository.BatchUpdateAsync(appls); await _repository.DbContext.BulkUpdateAsync(appls);
return true; return true;
} }
@ -263,7 +265,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
if (nols.Count > 0) if (nols.Count > 0)
{ {
var invs = nols.Select(p => p.InvbillNum); var invs = nols.Select(p => p.InvbillNum);
throw new UserFriendlyException($"选择发票{string.Join("", invs)}已报废或者已收票不能进行操作"); throw new UserFriendlyException($"选择发票{string.Join("", invs)}已报废或者已收票不能进行操作","400");
} }
var state = p_State; var state = p_State;
switch (p_State) switch (p_State)
@ -388,11 +390,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{ {
throw new UserFriendlyException($"发票不属于一个发票分组"); throw new UserFriendlyException($"发票不属于一个发票分组");
} }
var lostlist = invList.Where(p => p.InvoiceState == InvoiceBillState. || p.State ==SettleBillState.).ToList(); var lostlist = invList.Where(p => p.InvoiceState == InvoiceBillState. || p.State !=SettleBillState.).ToList();
if (lostlist.Count > 0) if (lostlist.Count > 0)
{ {
var invs=lostlist.Select(p => p.InvbillNum).ToList(); var invs=lostlist.Select(p => p.InvbillNum).ToList();
throw new UserFriendlyException($"发票{string.Join(",",invs)}已经报废或客户已收票!"); throw new UserFriendlyException($"发票{string.Join(",",invs)}已经报废或不是财务审核状态!","400");
} }
var inv = invList.FirstOrDefault(); var inv = invList.FirstOrDefault();
if (inv.BusinessType == EnumBusinessType.JisBBAC) if (inv.BusinessType == EnumBusinessType.JisBBAC)
@ -401,7 +403,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
if (pdlist != null && pdlist.Count > 0) if (pdlist != null && pdlist.Count > 0)
{ {
var invs = pdlist.Select(p => p.BillNum).ToList(); var invs = pdlist.Select(p => p.BillNum).ToList();
throw new UserFriendlyException($"发票{string.Join(",", invs)}已经生成待扣减过不能再次提交"); throw new UserFriendlyException($"发票{string.Join(",", invs)}已经生成待扣减过不能再次提交","400");
} }
var parentList = invList.Select(p => p.ParentInvbillNum).ToList();//所有发票存在父发票号 var parentList = invList.Select(p => p.ParentInvbillNum).ToList();//所有发票存在父发票号
List<string> oldinvs = new List<string>(); List<string> oldinvs = new List<string>();

Loading…
Cancel
Save