mahao 1 year ago
parent
commit
830ab1ee64
  1. 189
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs
  2. 62
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_NOT_SA_DTO.cs
  3. 92
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_CAN_SA_DTO.cs
  4. 68
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_NOT_SA_DTO.cs
  5. 28
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  6. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_CAN_SA_DTO.cs
  7. 20
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_NOT_SA_DTO.cs
  8. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
  9. 14
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs
  10. 14
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
  11. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
  12. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
  13. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_CAN_SA_SERVICE.cs
  14. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs
  15. 22
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  16. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
  17. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs
  18. 42
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  19. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/PD_SERVICE.cs
  20. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccount.Job.csproj

189
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs

@ -41,15 +41,32 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
}
public class BBAC_CAN_SA_DETAIL_DTO : EntityDto<Guid>
{
/// <summary>
///关联结算单号
/// </summary>
public string SettleBillNum { get; set; }
/// <summary>
///工厂地点
/// </summary>
[ExporterHeader(DisplayName = "关联结算单号")] //全部业务都有显示
public string SettleBillNum { get; set; }
[ExporterHeader(DisplayName = "发票分组号")] //全部业务都显示 (默认)
public string BillNum { get; set; }
[ExporterHeader(DisplayName = "下线日期")] //全部业务都显示
public DateTime SettleDate { get; set; }
[ExporterHeader(DisplayName = "发票号")] //全部业务都显示
public string InvBillNum { get; set; }
[ExporterHeader(DisplayName = "厂内零件号")] //全部业务都显示
public string LU { get; set; }
[ExporterHeader(DisplayName = "客户零件号")] //全部业务都显示 (查询条件)
public string PartCode { get; set; }
[ExporterHeader(DisplayName = "零件描述")] //全部业务都显示
public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "生产码")] //全部业务都显示 JIS业务叫生产码,其他业务叫标识号 (查询条件)
public string PN { get; set; }
[ExporterHeader(DisplayName = "结算数量")] //全部业务都显示
public decimal Qty { get; set; }
[ExporterHeader(DisplayName = "结算分组号")] //全部业务都显示 (查询条件)
public string GroupNum { get; set; }
[ExporterHeader(DisplayName = "工厂地点")] //HBPO-JIS业务显示
public string Site { get; set; }
[ExporterHeader(DisplayName = "是否退货")] //BBAC-JIS显示 其他没有这个字段
public string IsReturn { get; set; }
/// <summary>
/// 版本
/// </summary>
@ -61,36 +78,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
/// 结算单号(发票分组号)
/// </summary>
public string BillNum { get; set; }
/// <summary>
/// 结算日期
/// </summary>
public DateTime SettleDate { get; set; }
/// <summary>
///发票组号
/// </summary>
public string InvGroupNum { get; set; }
/// <summary>
/// 零件号
/// </summary>
public string LU { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 生产号
/// </summary>
public string PN { get; set; }
/// <summary>
/// 结算数量
/// </summary>
public decimal Qty { get; set; }
/// <summary>
/// 结算分组号
/// </summary>
public string GroupNum { get; set; }
/// <summary>
/// 金额
/// </summary>
public decimal Amt { get; set; }
@ -98,63 +88,47 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 合同号
/// </summary>
public string ContractDocID { set; get; }
/// <summary>
/// 客户零件号
/// </summary>
public string PartCode { get; set; }
}
public class BBAC_CAN_SA_DETAIL_EXP_DTO
{
/// <summary>
///关联结算单号
/// </summary>
[ExporterHeader(DisplayName = "关联结算单号")]
[ExporterHeader(DisplayName = "关联结算单号")] //全部业务都有显示
public string SettleBillNum { get; set; }
/// <summary>
///工厂地点
/// </summary>
[ExporterHeader(DisplayName = "工厂地点")]
public string Site { get; set; }
/// <summary>
///业务类别
/// </summary>
[ExporterHeader(DisplayName = "业务类别")]
public string Category { get; set; }
/// <summary>
///是否退货
/// </summary>
[ExporterHeader(DisplayName = "是否退货")]
public string IsReturn { get; set; }
[ExporterHeader(DisplayName = "是否退货")]
public int Version { get; set; }
[ExporterHeader(DisplayName = "单价")]
public decimal Price { get; set; }
[ExporterHeader(DisplayName = "发票分组号")]
[ExporterHeader(DisplayName = "发票分组号")] //全部业务都显示 (默认)
public string BillNum { get; set; }
[ExporterHeader(DisplayName = "下线日期")]
[ExporterHeader(DisplayName = "下线日期")] //全部业务都显示
public DateTime SettleDate { get; set; }
[ExporterHeader(DisplayName = "发票分组号")]
public string InvGroupNum { get; set; }
[ExporterHeader(DisplayName = "LU")]
[ExporterHeader(DisplayName = "发票号")] //全部业务都显示
public string InvBillNum { get; set; }
[ExporterHeader(DisplayName = "厂内零件号")] //全部业务都显示
public string LU { get; set; }
[ExporterHeader(DisplayName = "物料描述")]
[ExporterHeader(DisplayName = "客户零件号")] //全部业务都显示 (查询条件)
public string PartCode { get; set; }
[ExporterHeader(DisplayName = "零件描述")] //全部业务都显示
public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "生产码")]
[ExporterHeader(DisplayName = "生产码")] //全部业务都显示 JIS业务叫生产码,其他业务叫标识号 (查询条件)
public string PN { get; set; }
public string KeyCode { get; set; }
[ExporterHeader(DisplayName = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")] //全部业务都显示
public decimal Qty { get; set; }
[ExporterHeader(DisplayName = "结算分组号")]
[ExporterHeader(DisplayName = "结算分组号")] //全部业务都显示 (查询条件)
public string GroupNum { get; set; }
[ExporterHeader(DisplayName = "工厂地点")] //HBPO-JIS业务显示
public string Site { get; set; }
[ExporterHeader(DisplayName = "是否退货")] //BBAC-JIS显示 其他没有这个字段
public string IsReturn { get; set; }
/// <summary>
/// 客户零件号
///业务类别
/// </summary>
[ExporterHeader(DisplayName = "客户零件号")]
public string PartCode { get; set; }
[ExporterHeader(DisplayName = "业务类别")]
public EnumBusinessType Category { get; set; }
/// <summary>
///是否退货
/// </summary>
[ExporterHeader(DisplayName = "版本号")]
public int Version { get; set; }
}
//public class BBAC_CAN_SA_EXP_DTO
@ -194,53 +168,36 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
// }
public class BBAC_CAN_SA_REQ_DTO : RequestInputBase
{
[Display(Name = "期间")]
public int Version { get; set; }
[Display(Name = "结算单据")]
public string BillNum { get; set; }
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
[Display(Name = "状态")]
public string State { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
//[Display(Name = "期间")]
//public int Version { get; set; }
//[Display(Name = "结算单据")]
//public string BillNum { get; set; }
//[Display(Name = "关联结算单号")]
//public string SettleBillNum { get; set; }
//[Display(Name = "状态")]
//public string State { get; set; }
//[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; }
}
public class BBAC_CAN_SA_DETAIL_REQ_DTO : RequestInputBase
{
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
//[Display(Name = "业务类别")]
//public string Category { get; set; }
//[Display(Name = "是否退货")]
//public string IsReturn { get; set; }
[Display(Name = "版本号")]
public int Version { get; set; }
//[Display(Name = "单价")]
//public decimal Price { get; set; }
/// <summary>
///
/// </summary>
[Display(Name = "发票分组号")]
//[Display(Name = "发票分组号")]
//public string BillNum { get; set; }
public string BillNum { get; set; }
[Display(Name = "下线日期")]
public DateTime SettleDate { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
[Display(Name = "LU")]
public string LU { get; set; }
[Display(Name = "生产码")]
public string PN { get; set; }
//[Display(Name = "键值")]
//public string KeyCode { get; set; }
[Display(Name = "结算数量")]
public decimal Qty { get; set; }
[Display(Name = "结算分组号")]
public string GroupNum { get; set; }
//[Display(Name = "LU")]
//public string LU { get; set; }
//[Display(Name = "生产码")]
//public string PN { get; set; }
//[Display(Name = "结算数量")]
//public decimal Qty { get; set; }
//[Display(Name = "结算分组号")]
//public string GroupNum { get; set; }
}

62
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_NOT_SA_DTO.cs

@ -128,37 +128,37 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public class BBAC_NOT_SA_DETAIL_REQ_DTO : RequestInputBase
{
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
//[Display(Name = "业务类别")]
//public string Category { get; set; }
//[Display(Name = "是否退货")]
//public string IsReturn { get; set; }
[Display(Name = "版本号")]
public int Version { get; set; }
//[Display(Name = "单价")]
//public decimal Price { get; set; }
[Display(Name = "发票分组号")]
/// <summary>
///
/// </summary>
public string BillNum { get; set; }
[Display(Name = "下线日期")]
public DateTime SettleDate { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
[Display(Name = "LU")]
public string LU { get; set; }
[Display(Name = "生产码")]
public string PN { get; set; }
//[Display(Name = "键值")]
//public string KeyCode { get; set; }
[Display(Name = "结算数量")]
public decimal Qty { get; set; }
[Display(Name = "结算分组号")]
public string GroupNum { get; set; }
//[Display(Name = "关联结算单号")]
//public string SettleBillNum { get; set; }
////[Display(Name = "业务类别")]
////public string Category { get; set; }
////[Display(Name = "是否退货")]
////public string IsReturn { get; set; }
//[Display(Name = "版本号")]
//public int Version { get; set; }
////[Display(Name = "单价")]
////public decimal Price { get; set; }
//[Display(Name = "发票分组号")]
///// <summary>
/////
///// </summary>
//public string BillNum { get; set; }
//[Display(Name = "下线日期")]
//public DateTime SettleDate { get; set; }
//[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; }
//[Display(Name = "LU")]
//public string LU { get; set; }
//[Display(Name = "生产码")]
//public string PN { get; set; }
////[Display(Name = "键值")]
////public string KeyCode { get; set; }
//[Display(Name = "结算数量")]
//public decimal Qty { get; set; }
//[Display(Name = "结算分组号")]
//public string GroupNum { get; set; }
}

92
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_CAN_SA_DTO.cs

@ -80,7 +80,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 生产号
/// </summary>
@ -97,7 +96,20 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public decimal Amt { get; set; }
public string InvBillNum { get; set; }
public string PartCode { get; set; }
}
public class HBPO_CAN_SA_DETAIL_EXP_DTO
{
@ -155,50 +167,50 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public class HBPO_CAN_SA_REQ_DTO : RequestInputBase
{
[Display(Name = "期间")]
public int Version { get; set; }
[Display(Name = "结算单据")]
public string BillNum { get; set; }
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
[Display(Name = "状态")]
public string State { get; set; }
//[Display(Name = "期间")]
//public int Version { get; set; }
//[Display(Name = "结算单据")]
//public string BillNum { get; set; }
//[Display(Name = "关联结算单号")]
//public string SettleBillNum { get; set; }
//[Display(Name = "状态")]
//public string State { get; set; }
}
public class HBPO_CAN_SA_DETAIL_REQ_DTO : RequestInputBase
{
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
//[Display(Name = "业务类别")]
//public string Category { get; set; }
//[Display(Name = "是否退货")]
//public string IsReturn { get; set; }
[Display(Name = "版本号")]
public int Version { get; set; }
//[Display(Name = "单价")]
//public decimal Price { get; set; }
[Display(Name = "发票分组号")]
/// <summary>
///
/// </summary>
public string BillNum { get; set; }
[Display(Name = "下线日期")]
public DateTime SettleDate { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
[Display(Name = "LU")]
public string LU { get; set; }
[Display(Name = "生产码")]
public string PN { get; set; }
//[Display(Name = "键值")]
//public string KeyCode { get; set; }
[Display(Name = "结算数量")]
public decimal Qty { get; set; }
[Display(Name = "结算分组号")]
public string GroupNum { get; set; }
//[Display(Name = "关联结算单号")]
//public string SettleBillNum { get; set; }
////[Display(Name = "业务类别")]
////public string Category { get; set; }
////[Display(Name = "是否退货")]
////public string IsReturn { get; set; }
//[Display(Name = "版本号")]
//public int Version { get; set; }
////[Display(Name = "单价")]
////public decimal Price { get; set; }
//[Display(Name = "发票分组号")]
///// <summary>
/////
///// </summary>
//public string BillNum { get; set; }
//[Display(Name = "下线日期")]
//public DateTime SettleDate { get; set; }
//[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; }
//[Display(Name = "LU")]
//public string LU { get; set; }
//[Display(Name = "生产码")]
//public string PN { get; set; }
////[Display(Name = "键值")]
////public string KeyCode { get; set; }
//[Display(Name = "结算数量")]
//public decimal Qty { get; set; }
//[Display(Name = "结算分组号")]
//public string GroupNum { get; set; }
}

68
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_NOT_SA_DTO.cs

@ -124,40 +124,40 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public class HBPO_NOT_SA_DETAIL_REQ_DTO : RequestInputBase
{
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
//[Display(Name = "业务类别")]
//public string Category { get; set; }
//[Display(Name = "是否退货")]
//public string IsReturn { get; set; }
[Display(Name = "版本号")]
public int Version { get; set; }
//[Display(Name = "单价")]
//public decimal Price { get; set; }
[Display(Name = "发票分组号")]
/// <summary>
///
/// </summary>
public string BillNum { get; set; }
[Display(Name = "下线日期")]
public DateTime SettleDate { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
[Display(Name = "LU")]
public string LU { get; set; }
[Display(Name = "生产码")]
public string PN { get; set; }
//[Display(Name = "键值")]
//public string KeyCode { get; set; }
[Display(Name = "结算数量")]
public decimal Qty { get; set; }
[Display(Name = "结算分组号")]
public string GroupNum { get; set; }
public string PartCode { get; set; }
//[Display(Name = "关联结算单号")]
//public string SettleBillNum { get; set; }
////[Display(Name = "业务类别")]
////public string Category { get; set; }
////[Display(Name = "是否退货")]
////public string IsReturn { get; set; }
//[Display(Name = "版本号")]
//public int Version { get; set; }
////[Display(Name = "单价")]
////public decimal Price { get; set; }
//[Display(Name = "发票分组号")]
///// <summary>
/////
///// </summary>
//public string BillNum { get; set; }
//[Display(Name = "下线日期")]
//public DateTime SettleDate { get; set; }
//[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; }
//[Display(Name = "LU")]
//public string LU { get; set; }
//[Display(Name = "生产码")]
//public string PN { get; set; }
////[Display(Name = "键值")]
////public string KeyCode { get; set; }
//[Display(Name = "结算数量")]
//public decimal Qty { get; set; }
//[Display(Name = "结算分组号")]
//public string GroupNum { get; set; }
//public string PartCode { get; set; }
}

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

@ -146,20 +146,20 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public class INVOICE_GRP_REQ_DTO : RequestInputBase
{
[Display(Name = "实际纸质发票号")]
public string RealnvBillNum { get; set; }
[Display(Name = "未税金额")]
public decimal Amt { get; set; }
[Display(Name = "税后金额")]
public decimal TaxAmt { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
[Display(Name = "发票号")]
public string InvbillNum { get; set; }
[Display(Name = "发票分组状态")]
public int State { set; get; }
[Display(Name = "业务类别")]
public EnumBusinessType BusinessType { get; set; }
//[Display(Name = "实际纸质发票号")]
//public string RealnvBillNum { get; set; }
//[Display(Name = "未税金额")]
//public decimal Amt { get; set; }
//[Display(Name = "税后金额")]
//public decimal TaxAmt { get; set; }
//[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; }
//[Display(Name = "发票号")]
//public string InvbillNum { get; set; }
//[Display(Name = "发票分组状态")]
//public int State { set; get; }
//[Display(Name = "业务类别")]
//public EnumBusinessType BusinessType { get; set; }
}

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

@ -94,10 +94,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public string InvGroupNum { get; set; }
[Display(Name = "零件号")]
public string LU { get; set; }
[Display(Name = "")]
[Display(Name = "标识号")]
public string PN { get; set; }
[Display(Name = "键值")]
public string KeyCode { get; set; }
//[Display(Name = "键值")]
//public string KeyCode { get; set; }
[Display(Name = "结算数量")]
public decimal Qty { get; set; }
[Display(Name = "结算分组号")]

20
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_NOT_SA_DTO.cs

@ -113,20 +113,20 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
[Display(Name = "工厂地点")]
public string Site { get; set; }
//[Display(Name = "工厂地点")]
//public string Site { get; set; }
[Display(Name = "业务分类")]
public EnumBusinessType BusinessType { get; set; }
//[Display(Name = "业务分类")]
//public EnumBusinessType BusinessType { get; set; }
public int Version { get; set; }
public string SettleBillNum { get; set; }
//public int Version { get; set; }
//public string SettleBillNum { get; set; }
public string InvGroupNum { get; set; }
public string LU { get; set; }
public string PN { get; set; }
//public string InvGroupNum { get; set; }
//public string LU { get; set; }
//public string PN { get; set; }
public string GroupNum { get; set; }
//public string GroupNum { get; set; }
}

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs

@ -201,9 +201,9 @@ namespace Win.Sfs.SettleAccount.Bases
/// <param name="input">主表查询条件</param>
/// <returns></returns>
[HttpPost]
public virtual async Task<string> RejectAsync(INVOICE_GRP_REQ_DTO input)
public virtual async Task<string> RejectAsync(string p_invGroupNum)
{
await _invMng.Reject(input.InvGroupNum);
await _invMng.Reject(p_invGroupNum);
return ApplicationConsts.SuccessStr;
}

14
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs

@ -133,7 +133,7 @@ namespace Win.Sfs.SettleAccount.Bases
/// <returns></returns>
[HttpPost]
//[Route("generateinvoice")]
public virtual async Task<string> GenerateInvoice(TRequestMainInput input)
public virtual async Task<string> GenerateInvoice(string input)
{
return ApplicationConsts.SuccessStr;
@ -195,15 +195,6 @@ namespace Win.Sfs.SettleAccount.Bases
}
//var ls= await _invmng.SecInvoice(p_list,p_adjlist,p_tmplist,p_version, p_InvGroupNum, p_parentInvBillNum, businessType);
if (invlist.Count > 0)
{
@ -255,10 +246,7 @@ namespace Win.Sfs.SettleAccount.Bases
case EnumBusinessType.YinDuJian:
invlist = await _invmng.JITInvoice(p_list, p_adjlist, dtos, new List<TEMP_NOT_SA_DETAIL>(), p_version, p_invGroupNum, string.Empty, businessType, true);//重开可以变多张发票
break;
}
if (invlist.Count > 0)
{
return true;

14
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs

@ -51,9 +51,18 @@ namespace Win.Sfs.SettleAccount.Bases
protected readonly INormalEfCoreRepository<TEntity, Guid> _repository;
protected readonly INormalEfCoreRepository<TEntityDetail, Guid> _detailRepository;
public PD_SERVICE(
protected readonly INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> _bbacSecRepository;
protected readonly INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> _hbpoSecRepository;
protected readonly INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> _pubSecRepository;
public PD_SERVICE(
INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository,
INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository,
INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager,
@ -65,6 +74,9 @@ namespace Win.Sfs.SettleAccount.Bases
_vimservice = vimservice;
_repository = repository;
_detailRepository = detailRepository;
_bbacSecRepository=bbacSecRepository;
_pubSecRepository=pubSecRepository;
_hbpoSecRepository=hbpoSecRepository;
}
/// <summary>

10
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs

@ -82,14 +82,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <returns></returns>
[HttpPost]
public async override Task<string> GenerateInvoice(BBAC_CAN_SA_REQ_DTO input)
public async override Task<string> GenerateInvoice(string invbillNum)
{
var main =await _bbacMng.GetMainAsync(input.BillNum);
var main =await _bbacMng.GetMainAsync(invbillNum);
if (main != null)
{
if (await _bbacMng.SetForwardState(main, SettleBillState.))
{
var entitys = await _bbacMng.GetDetalListAsync(input.BillNum);//可结算
var entitys = await _bbacMng.GetDetalListAsync(invbillNum);//可结算
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
//var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList();
var notQuery = _notRepository.Where(p => groupNumList.Contains(p.InvGroupNum)).ToList();//不能结算
@ -127,7 +127,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
if (dtos != null && dtos.Count > 0)
{
if (input.BillNum.Substring(0, 1) == "C")//一次开票
if (invbillNum.Substring(0, 1) == "C")//一次开票
{
var notlist = notQuery.Select(p => new TEMP_NOT_SA_DETAIL
{
@ -159,7 +159,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
else
{
throw new UserFriendlyException(string.Format("{0}不存在该可结算单号", input.BillNum));
throw new UserFriendlyException(string.Format("{0}不存在该可结算单号", invbillNum));
}
return ApplicationConsts.SuccessStr;
}

6
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs

@ -28,13 +28,17 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
BBAC_PD_DETAIL, BBAC_PD_DETAIL_DTO, BBAC_PD_REQ_DTO,
BBAC_PD_DETAIL_REQ_DTO, BBAC_PD_DETAIL_EXP_DTO>
{
public BBAC_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<BBAC_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<BBAC_PD_DETAIL, Guid> detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
public BBAC_PD_SERVICE(INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository, INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository, INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<BBAC_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<BBAC_PD_DETAIL, Guid> detailRepository) : base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{
}
public override async Task<string> ApprovalPassed(List<string> p_list)
{
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
// _bbacSecRepository.Where(p=>)
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)

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

@ -74,15 +74,15 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <returns></returns>
[HttpPost]
//[Route("generateinvoice")]
public async override Task<string> GenerateInvoice(HBPO_CAN_SA_REQ_DTO input)
public async override Task<string> GenerateInvoice(string invbillnum)
{
var main =await _hbpoMng.GetMainAsync(input.BillNum);
var main =await _hbpoMng.GetMainAsync(invbillnum);
if (main != null)
{
if (await _hbpoMng.SetForwardState(main, SettleBillState.))
{
var entitys = await _hbpoMng.GetDetalListAsync(input.BillNum);
var entitys = await _hbpoMng.GetDetalListAsync(invbillnum);
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
var notQuery = _notRepository.Where(p => groupNumList.Contains(p.InvGroupNum)).ToList();
@ -120,7 +120,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var dtos = q.ToList();
if (dtos != null && dtos.Count > 0)
{
if (input.BillNum.Substring(0, 1) == "C")//一次开票
if (invbillnum.Substring(0, 1) == "C")//一次开票
{
var notlist = notQuery.Select(p => new TEMP_NOT_SA_DETAIL
{

7
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs

@ -29,6 +29,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
HBPO_PD_DETAIL, HBPO_PD_DETAIL_DTO, HBPO_PD_REQ_DTO,
HBPO_PD_DETAIL_REQ_DTO, HBPO_PD_DETAIL_EXP_DTO>
{
public HBPO_PD_SERVICE(INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository, INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository, INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<HBPO_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> detailRepository) : base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{
}
//public HBPO_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<HBPO_PD, Guid> repository, INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, detailRepository)
@ -61,9 +64,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//}
public HBPO_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<HBPO_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{
}
public override async Task<string> ApprovalPassed(List<string> p_list)
{

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

@ -1,3 +1,4 @@
using CodeArts.Db;
using DocumentFormat.OpenXml.Bibliography;
using DocumentFormat.OpenXml.Drawing.Diagrams;
using EFCore.BulkExtensions;
@ -203,30 +204,33 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}
[HttpPost]
public virtual async Task<string> RejectAsync(INVOICE_GRP_REQ_DTO input)
public virtual async Task<string> RejectAsync(string p_invGroupNum)
{
bool state = await _invMng.Reject(input.InvGroupNum);
bool state = await _invMng.Reject(p_invGroupNum);
var entities=await _invMng.GetMainListAsync(p_invGroupNum);
var entity=entities.FirstOrDefault();
if (state == true)
{
switch (input.BusinessType)
switch (entity.BusinessType)
{
case EnumBusinessType.BeiJian:
await _pubMng.SetNewState(input.InvGroupNum);
await _pubMng.SetNewState(p_invGroupNum);
break;
case EnumBusinessType.ZhiGongJianBBAC:
await _pubMng.SetNewState(input.InvGroupNum);
await _pubMng.SetNewState(p_invGroupNum);
break;
case EnumBusinessType.ZhiGongJianHBPO:
await _pubMng.SetNewState(input.InvGroupNum);
await _pubMng.SetNewState(p_invGroupNum);
break;
case EnumBusinessType.YinDuJian:
await _pubMng.SetNewState(input.InvGroupNum);
await _pubMng.SetNewState(p_invGroupNum);
break;
case EnumBusinessType.JisBBAC:
await _bbacMng.SetNewState(input.InvGroupNum);
await _bbacMng.SetNewState(p_invGroupNum);
break;
case EnumBusinessType.JisHBPO:
await _hbpoMng.SetNewState(input.InvGroupNum);
await _hbpoMng.SetNewState(p_invGroupNum);
break;
}
}

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

@ -45,9 +45,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
private readonly INormalEfCoreRepository<PriceList, Guid> _priceRepository;
private readonly INormalEfCoreRepository<PriceListBJ, Guid> _pricebjRepository;
public PUB_CAN_SA_SERVICE
(IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
@ -68,14 +65,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[HttpPost]
public async override Task<string> GenerateInvoice(PUB_CAN_SA_REQ_DTO input)
public async override Task<string> GenerateInvoice(string billnum)
{
var main = await _pubMng.GetMainAsync(input.BillNum);
var main = await _pubMng.GetMainAsync(billnum);
if (main != null)
{
if (await _pubMng.SetForwardState(main, SettleBillState.))
{
var entitys = await _pubMng.GetDetalListAsync(input.BillNum);
var entitys = await _pubMng.GetDetalListAsync(billnum);
var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
List<PriceList> priceList = new List<PriceList>();
if (main.BusinessType == EnumBusinessType.BeiJian)
@ -124,7 +121,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var dtos = q.ToList();
if (dtos != null && dtos.Count > 0)
{
if (input.BillNum.Substring(0, 1) == "C")//一次开票
if (billnum.Substring(0, 1) == "C")//一次开票
{
await FirstInvoice(entitys, new List<PUB_ADJ_DETAIL>(), dtos, new List<TEMP_NOT_SA_DETAIL>(), main.Version, main.InvGroupNum, string.Empty, main.BusinessType);

3
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs

@ -26,9 +26,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
PUB_PD_DETAIL, PUB_PD_DETAIL_DTO, PUB_PD_REQ_DTO,
PUB_PD_DETAIL_REQ_DTO, PUB_PD_DETAIL_EXP_DTO>
{
public PUB_PD_SERVICE(IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<PUB_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<PUB_PD_DETAIL, Guid> detailRepository) : base(excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
public PUB_PD_SERVICE(INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository, INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository, INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<PUB_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<PUB_PD_DETAIL, Guid> detailRepository) : base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{
}
public override async Task<string> ApprovalPassed(List<string> p_list)
{
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();

42
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Channels;
using System.Text;
using System.Threading.Tasks;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.DependencyInjection;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
public class PendingDeductionService : ITransientDependency, IExportJob
{
protected readonly VmiAppService _vimservice;
protected readonly INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> _bbacSecRepository;
protected readonly INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> _hbpoSecRepository;
protected readonly INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> _pubSecRepository;
public PendingDeductionService(
INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository,
INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository,
INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository,
VmiAppService vimservice
)
{
_bbacSecRepository = bbacSecRepository;
_hbpoSecRepository= hbpoSecRepository;
_pubSecRepository= pubSecRepository;
_vimservice =vimservice;
}
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> condition)
{
return id.ToString();
}
}

3
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/PD_SERVICE.cs

@ -58,6 +58,9 @@ namespace SettleAccount.Job.Services
/// <returns></returns>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> customConditions)
{
var invgroup = customConditions.Where(p => p.Name == "InvGroupNum").FirstOrDefault().Value;//获取发票分
var ls = _dapper.GetInvoiceList(invgroup);
if (ls != null && ls.Count>0)

4
code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccount.Job.csproj

@ -29,4 +29,8 @@
<ProjectReference Include="..\SettleAccount.EntityFrameworkCore\SettleAccount.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Services\新文件夹\" />
</ItemGroup>
</Project>

Loading…
Cancel
Save