Browse Source

更新

master
学 赵 1 year ago
parent
commit
f23c0f2be7
  1. 105
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  2. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs
  3. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs
  4. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
  5. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_GRP.cs
  6. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  7. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs

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

@ -106,18 +106,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public List<INVOICE_WAIT_DETAIL_DTO> DETIAL { set; get; } public List<INVOICE_WAIT_DETAIL_DTO> DETIAL { set; get; }
} }
@ -170,7 +158,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
//[ExporterHeader(DisplayName ="发票税后尾差")] //[ExporterHeader(DisplayName ="发票税后尾差")]
//public decimal TaxDiff { get; set; } //public decimal TaxDiff { get; set; }
[Display(Name = "客户代码")] [ExporterHeader(DisplayName = "客户编码")]
public string ClientCode { get; set; } public string ClientCode { get; set; }
} }
@ -183,7 +171,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary> /// <summary>
///实际纸质发票号 ///实际纸质发票号
/// </summary> /// </summary>
[ImporterHeader(Name = "实际纸质发票号", FixAllSpace = true)] [ImporterHeader(Name = "金税发票号", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")] [MaxLength(CommonConsts.MaxNameLength, ErrorMessage = "{0}最多输入{1}个字符")]
public string RealnvBillNum { get; set; } public string RealnvBillNum { get; set; }
@ -191,7 +179,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary> /// <summary>
///实际纸质发票号 ///实际纸质发票号
/// </summary> /// </summary>
[ImporterHeader(Name = "系统生成发票号", FixAllSpace = true)] [ImporterHeader(Name = "系统发票号", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "{0}是必填项")]
[MaxLength(200, ErrorMessage = "{0}最多输入{1}个字符")] [MaxLength(200, ErrorMessage = "{0}最多输入{1}个字符")]
public string InvbillNum { get; set; } public string InvbillNum { get; set; }
@ -203,6 +191,18 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public decimal Tax { get; set; } public decimal Tax { get; set; }
[ImporterHeader(Name = "客户号", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")]
public string ClientCode { get; set; }
[ImporterHeader(Name = "金税发票金额", FixAllSpace = true)]
[Required(ErrorMessage = "{0}是必填项")]
public decimal RealAmt { get; set; }
} }
public class INVOICE_GRP_REQ_DTO : RequestInputBase public class INVOICE_GRP_REQ_DTO : RequestInputBase
@ -385,11 +385,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public class INVOICE_MAP_GROUP_EXP_DTO public class INVOICE_MAP_GROUP_EXP_DTO
{ {
/// <summary> ///// <summary>
///期间 /////期间
/// </summary> ///// </summary>
[ExporterHeader(DisplayName = "期间")] //[ExporterHeader(DisplayName = "期间")]
public int Version { get; set; } //public int Version { get; set; }
/// <summary> /// <summary>
///发票号 ///发票号
/// </summary> /// </summary>
@ -406,20 +406,20 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ExporterHeader(DisplayName = "结算分组号")] [ExporterHeader(DisplayName = "结算分组号")]
public string SettleGroupNum { get; set; } public string SettleGroupNum { get; set; }
/// <summary> /// <summary>
///金额 /////金额
/// </summary> ///// </summary>
[ExporterHeader(DisplayName = "金额")] //[ExporterHeader(DisplayName = "金额")]
public decimal Amt { get; set; } //public decimal Amt { get; set; }
/// <summary> ///// <summary>
///扩展字段1 /////扩展字段1
/// </summary> ///// </summary>
[ExporterHeader(DisplayName = "扩展字段1")] //[ExporterHeader(DisplayName = "扩展字段1")]
public string Extend1 { get; set; } //public string Extend1 { get; set; }
/// <summary> ///// <summary>
///扩展字段2 /////扩展字段2
/// </summary> ///// </summary>
[ExporterHeader(DisplayName = "扩展字段2")] //[ExporterHeader(DisplayName = "扩展字段2")]
public string Extend2 { get; set; } //public string Extend2 { get; set; }
} }
@ -436,11 +436,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public class INVOICE_NOT_SETTLE_DTO : EntityDto<Guid> public class INVOICE_NOT_SETTLE_DTO : EntityDto<Guid>
{ {
/// <summary> ///// <summary>
///期间 /////期间
/// </summary> ///// </summary>
[Display(Name = "期间")] //[Display(Name = "期间")]
public int Version { get; set; } //public int Version { get; set; }
/// <summary> /// <summary>
///发票分组号 ///发票分组号
/// </summary> /// </summary>
@ -461,16 +461,23 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary> /// </summary>
[Display(Name = "不可结算零件号")] [Display(Name = "不可结算零件号")]
public string LU1 { get; set; } public string LU1 { get; set; }
/// <summary>
///扩展字段1
/// </summary> //[Display(Name = "不可结算零件号")]
[Display(Name = "扩展字段1")] //public string LU1 { get; set; }
public string Extend1 { get; set; }
/// <summary>
///扩展字段2
/// </summary> ///// <summary>
[Display(Name = "扩展字段2")] /////扩展字段1
public string Extend2 { get; set; } ///// </summary>
//[Display(Name = "扩展字段1")]
//public string Extend1 { get; set; }
///// <summary>
/////扩展字段2
///// </summary>
//[Display(Name = "扩展字段2")]
//public string Extend2 { get; set; }
public Dictionary<string, object> ExtraProperties { get; set; } public Dictionary<string, object> ExtraProperties { get; set; }

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_BA_SERVICE.cs

@ -122,8 +122,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
partcode: itm.PartCode partcode: itm.PartCode
); );
entity.IsMaiDan = itm.IsMaiDan; entity.IsMaiDan = itm.IsMaiDan;
bbaclist.Add(entity); bbaclist.Add(entity);
} }
} }
@ -324,7 +322,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
public virtual async Task<List<INVOICE_REPEAT_DTO>> ReissueInvoiceList(List<PUB_ADJ_DETAIL_DTO> p_list) public virtual async Task<INVOICE_REPEAT_DTO> ReissueInvoiceList(List<PUB_ADJ_DETAIL_DTO> p_list)
{ {
var invBill = new INVOICE_REPEAT_DTO(); var invBill = new INVOICE_REPEAT_DTO();

8
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_BA_SERVICE.cs

@ -110,7 +110,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
invGroupNum: itm.InvGroupNum, invGroupNum: itm.InvGroupNum,
invbillnum: string.Empty, invbillnum: string.Empty,
partcode: itm.PartCode, partcode: itm.PartCode,
pobillnum:itm.bil pobillnum:string.Empty
)); ));
@ -235,7 +235,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
groupNum: itm.GroupNum, groupNum: itm.GroupNum,
invGroupNum: itm.InvGroupNum, invGroupNum: itm.InvGroupNum,
invbillnum: string.Empty, invbillnum: string.Empty,
partcode:itm.PartCode partcode:itm.PartCode,
pobillnum:string.Empty
)); ));
@ -368,7 +369,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
invGroupNum: itm.InvGroupNum, invGroupNum: itm.InvGroupNum,
invbillnum: string.Empty, invbillnum: string.Empty,
partcode: itm.PartCode partcode: itm.PartCode,
pobillnum:string.Empty
)); ));
} }
} }

9
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs

@ -22,9 +22,11 @@ using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
using static Win.Sfs.SettleAccount.SettleAccountPermissions; using static Win.Sfs.SettleAccount.SettleAccountPermissions;
namespace Win.Sfs.SettleAccount.Entities.BQ namespace Win.Sfs.SettleAccount.Entities.BQ
{ {
/// <summary> /// <summary>
/// 通用业务可结算单 /// 通用业务可结算单
/// </summary> /// </summary>
@ -62,8 +64,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
_priceRepository = priceRepository; _priceRepository = priceRepository;
_pricebjRepository = pricebjRepository; _pricebjRepository = pricebjRepository;
} }
[HttpPost] [HttpPost]
public async override Task<IActionResult> GenerateInvoice(string billnum) public async override Task<IActionResult> GenerateInvoice(string billnum)
{ {
@ -116,9 +116,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
BeginDate = p.BeginTime, BeginDate = p.BeginTime,
EndDate = p.EndTime, EndDate = p.EndTime,
PartCode=d.PartCode,//客户零件号 PartCode=d.PartCode,//客户零件号
PoNum=
}; };
var dtos = q.ToList(); var dtos = q.ToList();
if (dtos != null && dtos.Count > 0) if (dtos != null && dtos.Count > 0)

5
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_GRP.cs

@ -10,7 +10,7 @@ public class INVOICE_GRP : FullAuditedAggregateRoot<Guid>
[Display(Name = "金税发票号")] [Display(Name = "金税发票号")]
public string RealnvBillNum { get; set; } = null!; public string RealnvBillNum { get; set; } = null!;
[Display(Name = "系统生成发票号")] [Display(Name = "系统发票号")]
public string InvbillNum { get; set; } = null!; public string InvbillNum { get; set; } = null!;
[Display(Name = "未税金额")] [Display(Name = "未税金额")]
@ -52,12 +52,13 @@ public class INVOICE_GRP : FullAuditedAggregateRoot<Guid>
public decimal TaxDiff { get; set; } public decimal TaxDiff { get; set; }
[Display(Name = "客户代码")] [Display(Name = "客户代码")]
public string ClientCode { get; set; } public string ClientCode { get; set; }
[Display(Name = "实际发票金额")] [Display(Name = "金税发票金额")]
public decimal RealAmt { get; set; } public decimal RealAmt { get; set; }
public INVOICE_GRP(Guid guid, string realnvBillNum, string invbillNum, decimal amt, decimal taxAmt, public INVOICE_GRP(Guid guid, string realnvBillNum, string invbillNum, decimal amt, decimal taxAmt,
string invGroupNum, string invGroupNum,
string fileName, string fileName,

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

@ -380,7 +380,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
/// <returns></returns> /// <returns></returns>
public virtual async Task<bool> ReceivedAsync(List<string> p_invs) public virtual async Task<bool> ReceivedAsync(List<string> p_invs)
{ {
var invList = _repository.Where(p => p_invs.Contains(p.InvbillNum)).ToList();//所有提交发票信息 var invList = _repository.Where(p => p_invs.Contains(p.InvbillNum)).ToList();//所有提交发票信息
int count = invList.Select(p => p.InvGroupNum).Distinct().Count(); int count = invList.Select(p => p.InvGroupNum).Distinct().Count();
if (count > 1) if (count > 1)
@ -594,8 +593,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
invGroupNum: itm.InvGroupNum, invGroupNum: itm.InvGroupNum,
invbillnum: itm.InvBillNum, invbillnum: itm.InvBillNum,
partcode:itm.PartCode partcode:itm.PartCode
)); ));
} }
} }
@ -626,7 +623,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
invGroupNum: itm.InvGroupNum, invGroupNum: itm.InvGroupNum,
invbillnum: itm.InvBillNum, invbillnum: itm.InvBillNum,
partcode: itm.PartCode partcode: itm.PartCode
)); ));
} }
} }
@ -645,7 +641,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
site: string.Empty site: string.Empty
); );
bbacmainlist.Add(bbac); bbacmainlist.Add(bbac);
} }
var bbacDetail = new List<HBPO_PD_DETAIL>(); var bbacDetail = new List<HBPO_PD_DETAIL>();
foreach (var itm in entityList) foreach (var itm in entityList)
@ -678,7 +673,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{ {
itm.State = SettleBillState.; itm.State = SettleBillState.;
}; };
await _repository.DbContext.BulkUpdateAsync(invList); await _repository.DbContext.BulkUpdateAsync(invList);
return true; return true;
} }
@ -705,7 +699,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
oldlist = pdoldlist.Select(p => p.BillNum).ToList();//已经存在扣减记录,的发票号 oldlist = pdoldlist.Select(p => p.BillNum).ToList();//已经存在扣减记录,的发票号
} }
newlist = p_invs.Where(p => !oldlist.Contains(p)).ToList();//不存在扣减记录的发票号 newlist = p_invs.Where(p => !oldlist.Contains(p)).ToList();//不存在扣减记录的发票号
List<PUB_CAN_SA_DETAIL> entityList = new List<PUB_CAN_SA_DETAIL>();//结算明细 List<PUB_CAN_SA_DETAIL> entityList = new List<PUB_CAN_SA_DETAIL>();//结算明细
var namelist = invList.Select(p => p.InvbillNum).ToList(); var namelist = invList.Select(p => p.InvbillNum).ToList();
if (oldlist.Count > 0) if (oldlist.Count > 0)
@ -734,7 +727,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
groupNum: itm.GroupNum, groupNum: itm.GroupNum,
invGroupNum: itm.InvGroupNum, invGroupNum: itm.InvGroupNum,
invbillnum: itm.InvBillNum, invbillnum: itm.InvBillNum,
partcode:itm.PartCode partcode:itm.PartCode,
pobillnum:string.Empty
)); ));
@ -766,7 +762,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
groupNum: itm.GroupNum, groupNum: itm.GroupNum,
invGroupNum: itm.InvGroupNum, invGroupNum: itm.InvGroupNum,
invbillnum: itm.InvBillNum, invbillnum: itm.InvBillNum,
partcode: itm.PartCode partcode: itm.PartCode,
pobillnum: string.Empty
)); ));
} }
} }

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs

@ -929,7 +929,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{ {
throw new UserFriendlyException($"选择要重开发票号{p_OldInvBillNum}已经作废不能重开"); throw new UserFriendlyException($"选择要重开发票号{p_OldInvBillNum}已经作废不能重开");
} }
inv.InvoiceState = InvoiceBillState.; //inv.InvoiceState = InvoiceBillState.报废;

Loading…
Cancel
Save