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> 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; } public string Site { get; set; }
[ExporterHeader(DisplayName = "是否退货")] //BBAC-JIS显示 其他没有这个字段
public string IsReturn { get; set; }
/// <summary> /// <summary>
/// 版本 /// 版本
/// </summary> /// </summary>
@ -61,36 +78,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary> /// <summary>
/// 结算单号(发票分组号) /// 结算单号(发票分组号)
/// </summary> /// </summary>
public string BillNum { get; set; }
/// <summary>
/// 结算日期
/// </summary>
public DateTime SettleDate { get; set; }
/// <summary>
///发票组号
/// </summary>
public string InvGroupNum { get; set; } public string InvGroupNum { get; set; }
/// <summary> /// <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> /// </summary>
public decimal Amt { get; set; } public decimal Amt { get; set; }
@ -98,63 +88,47 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 合同号 /// 合同号
/// </summary> /// </summary>
public string ContractDocID { set; get; } public string ContractDocID { set; get; }
/// <summary>
/// 客户零件号
/// </summary>
public string PartCode { get; set; }
} }
public class BBAC_CAN_SA_DETAIL_EXP_DTO public class BBAC_CAN_SA_DETAIL_EXP_DTO
{ {
/// <summary>
///关联结算单号 [ExporterHeader(DisplayName = "关联结算单号")] //全部业务都有显示
/// </summary>
[ExporterHeader(DisplayName = "关联结算单号")]
public string SettleBillNum { get; set; } public string SettleBillNum { get; set; }
/// <summary> [ExporterHeader(DisplayName = "发票分组号")] //全部业务都显示 (默认)
///工厂地点
/// </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 = "发票分组号")]
public string BillNum { get; set; } public string BillNum { get; set; }
[ExporterHeader(DisplayName = "下线日期")] [ExporterHeader(DisplayName = "下线日期")] //全部业务都显示
public DateTime SettleDate { get; set; } public DateTime SettleDate { get; set; }
[ExporterHeader(DisplayName = "发票分组号")] [ExporterHeader(DisplayName = "发票号")] //全部业务都显示
public string InvGroupNum { get; set; } public string InvBillNum { get; set; }
[ExporterHeader(DisplayName = "LU")] [ExporterHeader(DisplayName = "厂内零件号")] //全部业务都显示
public string LU { get; set; } public string LU { get; set; }
[ExporterHeader(DisplayName = "客户零件号")] //全部业务都显示 (查询条件)
[ExporterHeader(DisplayName = "物料描述")] public string PartCode { get; set; }
[ExporterHeader(DisplayName = "零件描述")] //全部业务都显示
public string MaterialDesc { get; set; } public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "生产码")] //全部业务都显示 JIS业务叫生产码,其他业务叫标识号 (查询条件)
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; } public string PN { get; set; }
public string KeyCode { get; set; } [ExporterHeader(DisplayName = "结算数量")] //全部业务都显示
[ExporterHeader(DisplayName = "结算数量")]
public decimal Qty { get; set; } public decimal Qty { get; set; }
[ExporterHeader(DisplayName = "结算分组号")] [ExporterHeader(DisplayName = "结算分组号")] //全部业务都显示 (查询条件)
public string GroupNum { get; set; } 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>
/// 客户零件号 ///业务类别
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "客户零件号")] [ExporterHeader(DisplayName = "业务类别")]
public string PartCode { get; set; } public EnumBusinessType Category { get; set; }
/// <summary>
///是否退货
/// </summary>
[ExporterHeader(DisplayName = "版本号")]
public int Version { get; set; }
} }
//public class BBAC_CAN_SA_EXP_DTO //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 public class BBAC_CAN_SA_REQ_DTO : RequestInputBase
{ {
[Display(Name = "期间")] //[Display(Name = "期间")]
public int Version { get; set; } //public int Version { get; set; }
[Display(Name = "结算单据")] //[Display(Name = "结算单据")]
public string BillNum { get; set; } //public string BillNum { get; set; }
[Display(Name = "关联结算单号")] //[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; } //public string SettleBillNum { get; set; }
[Display(Name = "状态")] //[Display(Name = "状态")]
public string State { get; set; } //public string State { get; set; }
[Display(Name = "发票分组号")] //[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; } //public string InvGroupNum { get; set; }
} }
public class BBAC_CAN_SA_DETAIL_REQ_DTO : RequestInputBase public class BBAC_CAN_SA_DETAIL_REQ_DTO : RequestInputBase
{ {
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
//[Display(Name = "业务类别")] //[Display(Name = "发票分组号")]
//public string Category { get; set; } //public string BillNum { 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 = "发票分组号")]
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 = "结算分组号")] //[Display(Name = "LU")]
public string GroupNum { get; set; } //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 public class BBAC_NOT_SA_DETAIL_REQ_DTO : RequestInputBase
{ {
[Display(Name = "关联结算单号")] //[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; } //public string SettleBillNum { get; set; }
//[Display(Name = "业务类别")] ////[Display(Name = "业务类别")]
//public string Category { get; set; } ////public string Category { get; set; }
//[Display(Name = "是否退货")] ////[Display(Name = "是否退货")]
//public string IsReturn { get; set; } ////public string IsReturn { get; set; }
[Display(Name = "版本号")] //[Display(Name = "版本号")]
public int Version { get; set; } //public int Version { get; set; }
//[Display(Name = "单价")] ////[Display(Name = "单价")]
//public decimal Price { get; set; } ////public decimal Price { get; set; }
[Display(Name = "发票分组号")] //[Display(Name = "发票分组号")]
/// <summary> ///// <summary>
/// /////
/// </summary> ///// </summary>
public string BillNum { get; set; } //public string BillNum { get; set; }
[Display(Name = "下线日期")] //[Display(Name = "下线日期")]
public DateTime SettleDate { get; set; } //public DateTime SettleDate { get; set; }
[Display(Name = "发票分组号")] //[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; } //public string InvGroupNum { get; set; }
[Display(Name = "LU")] //[Display(Name = "LU")]
public string LU { get; set; } //public string LU { get; set; }
[Display(Name = "生产码")] //[Display(Name = "生产码")]
public string PN { get; set; } //public string PN { get; set; }
//[Display(Name = "键值")] ////[Display(Name = "键值")]
//public string KeyCode { get; set; } ////public string KeyCode { get; set; }
[Display(Name = "结算数量")] //[Display(Name = "结算数量")]
public decimal Qty { get; set; } //public decimal Qty { get; set; }
[Display(Name = "结算分组号")] //[Display(Name = "结算分组号")]
public string GroupNum { get; set; } //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> /// </summary>
public string MaterialDesc { get; set; } public string MaterialDesc { get; set; }
/// <summary> /// <summary>
/// 生产号 /// 生产号
/// </summary> /// </summary>
@ -97,7 +96,20 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public decimal Amt { get; set; } public decimal Amt { get; set; }
public string InvBillNum { get; set; }
public string PartCode { get; set; } public string PartCode { get; set; }
} }
public class HBPO_CAN_SA_DETAIL_EXP_DTO 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 public class HBPO_CAN_SA_REQ_DTO : RequestInputBase
{ {
[Display(Name = "期间")] //[Display(Name = "期间")]
public int Version { get; set; } //public int Version { get; set; }
[Display(Name = "结算单据")] //[Display(Name = "结算单据")]
public string BillNum { get; set; } //public string BillNum { get; set; }
[Display(Name = "关联结算单号")] //[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; } //public string SettleBillNum { get; set; }
[Display(Name = "状态")] //[Display(Name = "状态")]
public string State { get; set; } //public string State { get; set; }
} }
public class HBPO_CAN_SA_DETAIL_REQ_DTO : RequestInputBase public class HBPO_CAN_SA_DETAIL_REQ_DTO : RequestInputBase
{ {
[Display(Name = "关联结算单号")] //[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; } //public string SettleBillNum { get; set; }
//[Display(Name = "业务类别")] ////[Display(Name = "业务类别")]
//public string Category { get; set; } ////public string Category { get; set; }
//[Display(Name = "是否退货")] ////[Display(Name = "是否退货")]
//public string IsReturn { get; set; } ////public string IsReturn { get; set; }
[Display(Name = "版本号")] //[Display(Name = "版本号")]
public int Version { get; set; } //public int Version { get; set; }
//[Display(Name = "单价")] ////[Display(Name = "单价")]
//public decimal Price { get; set; } ////public decimal Price { get; set; }
[Display(Name = "发票分组号")] //[Display(Name = "发票分组号")]
/// <summary> ///// <summary>
/// /////
/// </summary> ///// </summary>
public string BillNum { get; set; } //public string BillNum { get; set; }
[Display(Name = "下线日期")] //[Display(Name = "下线日期")]
public DateTime SettleDate { get; set; } //public DateTime SettleDate { get; set; }
[Display(Name = "发票分组号")] //[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; } //public string InvGroupNum { get; set; }
[Display(Name = "LU")] //[Display(Name = "LU")]
public string LU { get; set; } //public string LU { get; set; }
[Display(Name = "生产码")] //[Display(Name = "生产码")]
public string PN { get; set; } //public string PN { get; set; }
//[Display(Name = "键值")] ////[Display(Name = "键值")]
//public string KeyCode { get; set; } ////public string KeyCode { get; set; }
[Display(Name = "结算数量")] //[Display(Name = "结算数量")]
public decimal Qty { get; set; } //public decimal Qty { get; set; }
[Display(Name = "结算分组号")] //[Display(Name = "结算分组号")]
public string GroupNum { get; set; } //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 public class HBPO_NOT_SA_DETAIL_REQ_DTO : RequestInputBase
{ {
[Display(Name = "关联结算单号")] //[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; } //public string SettleBillNum { get; set; }
//[Display(Name = "业务类别")] ////[Display(Name = "业务类别")]
//public string Category { get; set; } ////public string Category { get; set; }
//[Display(Name = "是否退货")] ////[Display(Name = "是否退货")]
//public string IsReturn { get; set; } ////public string IsReturn { get; set; }
[Display(Name = "版本号")] //[Display(Name = "版本号")]
public int Version { get; set; } //public int Version { get; set; }
//[Display(Name = "单价")] ////[Display(Name = "单价")]
//public decimal Price { get; set; } ////public decimal Price { get; set; }
[Display(Name = "发票分组号")] //[Display(Name = "发票分组号")]
/// <summary> ///// <summary>
/// /////
/// </summary> ///// </summary>
public string BillNum { get; set; } //public string BillNum { get; set; }
[Display(Name = "下线日期")] //[Display(Name = "下线日期")]
public DateTime SettleDate { get; set; } //public DateTime SettleDate { get; set; }
[Display(Name = "发票分组号")] //[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; } //public string InvGroupNum { get; set; }
[Display(Name = "LU")] //[Display(Name = "LU")]
public string LU { get; set; } //public string LU { get; set; }
[Display(Name = "生产码")] //[Display(Name = "生产码")]
public string PN { get; set; } //public string PN { get; set; }
//[Display(Name = "键值")] ////[Display(Name = "键值")]
//public string KeyCode { get; set; } ////public string KeyCode { get; set; }
[Display(Name = "结算数量")] //[Display(Name = "结算数量")]
public decimal Qty { get; set; } //public decimal Qty { get; set; }
[Display(Name = "结算分组号")] //[Display(Name = "结算分组号")]
public string GroupNum { get; set; } //public string GroupNum { get; set; }
public string PartCode { 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 public class INVOICE_GRP_REQ_DTO : RequestInputBase
{ {
[Display(Name = "实际纸质发票号")] //[Display(Name = "实际纸质发票号")]
public string RealnvBillNum { get; set; } //public string RealnvBillNum { get; set; }
[Display(Name = "未税金额")] //[Display(Name = "未税金额")]
public decimal Amt { get; set; } //public decimal Amt { get; set; }
[Display(Name = "税后金额")] //[Display(Name = "税后金额")]
public decimal TaxAmt { get; set; } //public decimal TaxAmt { get; set; }
[Display(Name = "发票分组号")] //[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; } //public string InvGroupNum { get; set; }
[Display(Name = "发票号")] //[Display(Name = "发票号")]
public string InvbillNum { get; set; } //public string InvbillNum { get; set; }
[Display(Name = "发票分组状态")] //[Display(Name = "发票分组状态")]
public int State { set; get; } //public int State { set; get; }
[Display(Name = "业务类别")] //[Display(Name = "业务类别")]
public EnumBusinessType BusinessType { get; set; } //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; } public string InvGroupNum { get; set; }
[Display(Name = "零件号")] [Display(Name = "零件号")]
public string LU { get; set; } public string LU { get; set; }
[Display(Name = "")] [Display(Name = "标识号")]
public string PN { get; set; } public string PN { get; set; }
[Display(Name = "键值")] //[Display(Name = "键值")]
public string KeyCode { get; set; } //public string KeyCode { get; set; }
[Display(Name = "结算数量")] [Display(Name = "结算数量")]
public decimal Qty { get; set; } public decimal Qty { get; set; }
[Display(Name = "结算分组号")] [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 = "工厂地点")] //[Display(Name = "工厂地点")]
public string Site { get; set; } //public string Site { get; set; }
[Display(Name = "业务分类")] //[Display(Name = "业务分类")]
public EnumBusinessType BusinessType { get; set; } //public EnumBusinessType BusinessType { get; set; }
public int Version { get; set; } //public int Version { get; set; }
public string SettleBillNum { get; set; } //public string SettleBillNum { get; set; }
public string InvGroupNum { get; set; } //public string InvGroupNum { get; set; }
public string LU { get; set; } //public string LU { get; set; }
public string PN { 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> /// <param name="input">主表查询条件</param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [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; 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> /// <returns></returns>
[HttpPost] [HttpPost]
//[Route("generateinvoice")] //[Route("generateinvoice")]
public virtual async Task<string> GenerateInvoice(TRequestMainInput input) public virtual async Task<string> GenerateInvoice(string input)
{ {
return ApplicationConsts.SuccessStr; 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); //var ls= await _invmng.SecInvoice(p_list,p_adjlist,p_tmplist,p_version, p_InvGroupNum, p_parentInvBillNum, businessType);
if (invlist.Count > 0) if (invlist.Count > 0)
{ {
@ -255,10 +246,7 @@ namespace Win.Sfs.SettleAccount.Bases
case EnumBusinessType.YinDuJian: 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);//重开可以变多张发票 invlist = await _invmng.JITInvoice(p_list, p_adjlist, dtos, new List<TEMP_NOT_SA_DETAIL>(), p_version, p_invGroupNum, string.Empty, businessType, true);//重开可以变多张发票
break; break;
} }
if (invlist.Count > 0) if (invlist.Count > 0)
{ {
return true; 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<TEntity, Guid> _repository;
protected readonly INormalEfCoreRepository<TEntityDetail, Guid> _detailRepository; 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, IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator, ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager, ICommonManager commonManager,
@ -65,6 +74,9 @@ namespace Win.Sfs.SettleAccount.Bases
_vimservice = vimservice; _vimservice = vimservice;
_repository = repository; _repository = repository;
_detailRepository = detailRepository; _detailRepository = detailRepository;
_bbacSecRepository=bbacSecRepository;
_pubSecRepository=pubSecRepository;
_hbpoSecRepository=hbpoSecRepository;
} }
/// <summary> /// <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> /// <returns></returns>
[HttpPost] [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 (main != null)
{ {
if (await _bbacMng.SetForwardState(main, SettleBillState.)) 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 => p.GroupNum).Distinct().ToList();
//var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList(); //var groupNumList = entitys.Select(p => new { p.GroupNum).Distinct().ToList();
var notQuery = _notRepository.Where(p => groupNumList.Contains(p.InvGroupNum)).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 (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 var notlist = notQuery.Select(p => new TEMP_NOT_SA_DETAIL
{ {
@ -159,7 +159,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
} }
else else
{ {
throw new UserFriendlyException(string.Format("{0}不存在该可结算单号", input.BillNum)); throw new UserFriendlyException(string.Format("{0}不存在该可结算单号", invbillNum));
} }
return ApplicationConsts.SuccessStr; 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, BBAC_PD_DETAIL_DTO, BBAC_PD_REQ_DTO,
BBAC_PD_DETAIL_REQ_DTO, BBAC_PD_DETAIL_EXP_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) public override async Task<string> ApprovalPassed(List<string> p_list)
{ {
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList(); var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
// _bbacSecRepository.Where(p=>)
if (detailist != null && detailist.Count > 0) if (detailist != null && detailist.Count > 0)
{ {
foreach (var itm in detailist) 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> /// <returns></returns>
[HttpPost] [HttpPost]
//[Route("generateinvoice")] //[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 (main != null)
{ {
if (await _hbpoMng.SetForwardState(main, SettleBillState.)) 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 groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
var notQuery = _notRepository.Where(p => groupNumList.Contains(p.InvGroupNum)).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(); var dtos = q.ToList();
if (dtos != null && dtos.Count > 0) 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 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, HBPO_PD_DETAIL_DTO, HBPO_PD_REQ_DTO,
HBPO_PD_DETAIL_REQ_DTO, HBPO_PD_DETAIL_EXP_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) //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) 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.Bibliography;
using DocumentFormat.OpenXml.Drawing.Diagrams; using DocumentFormat.OpenXml.Drawing.Diagrams;
using EFCore.BulkExtensions; using EFCore.BulkExtensions;
@ -203,30 +204,33 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
} }
[HttpPost] [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) if (state == true)
{ {
switch (input.BusinessType) switch (entity.BusinessType)
{ {
case EnumBusinessType.BeiJian: case EnumBusinessType.BeiJian:
await _pubMng.SetNewState(input.InvGroupNum); await _pubMng.SetNewState(p_invGroupNum);
break; break;
case EnumBusinessType.ZhiGongJianBBAC: case EnumBusinessType.ZhiGongJianBBAC:
await _pubMng.SetNewState(input.InvGroupNum); await _pubMng.SetNewState(p_invGroupNum);
break; break;
case EnumBusinessType.ZhiGongJianHBPO: case EnumBusinessType.ZhiGongJianHBPO:
await _pubMng.SetNewState(input.InvGroupNum); await _pubMng.SetNewState(p_invGroupNum);
break; break;
case EnumBusinessType.YinDuJian: case EnumBusinessType.YinDuJian:
await _pubMng.SetNewState(input.InvGroupNum); await _pubMng.SetNewState(p_invGroupNum);
break; break;
case EnumBusinessType.JisBBAC: case EnumBusinessType.JisBBAC:
await _bbacMng.SetNewState(input.InvGroupNum); await _bbacMng.SetNewState(p_invGroupNum);
break; break;
case EnumBusinessType.JisHBPO: case EnumBusinessType.JisHBPO:
await _hbpoMng.SetNewState(input.InvGroupNum); await _hbpoMng.SetNewState(p_invGroupNum);
break; 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<PriceList, Guid> _priceRepository;
private readonly INormalEfCoreRepository<PriceListBJ, Guid> _pricebjRepository; private readonly INormalEfCoreRepository<PriceListBJ, Guid> _pricebjRepository;
public PUB_CAN_SA_SERVICE public PUB_CAN_SA_SERVICE
(IExcelImportAppService excelImportService, (IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator, ISnowflakeIdGenerator snowflakeIdGenerator,
@ -68,14 +65,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[HttpPost] [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 (main != null)
{ {
if (await _pubMng.SetForwardState(main, SettleBillState.)) 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(); var groupNumList = entitys.Select(p => p.GroupNum).Distinct().ToList();
List<PriceList> priceList = new List<PriceList>(); List<PriceList> priceList = new List<PriceList>();
if (main.BusinessType == EnumBusinessType.BeiJian) if (main.BusinessType == EnumBusinessType.BeiJian)
@ -124,7 +121,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var dtos = q.ToList(); var dtos = q.ToList();
if (dtos != null && dtos.Count > 0) 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); 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, PUB_PD_DETAIL_DTO, PUB_PD_REQ_DTO,
PUB_PD_DETAIL_REQ_DTO, PUB_PD_DETAIL_EXP_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) public override async Task<string> ApprovalPassed(List<string> p_list)
{ {
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList(); 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> /// <returns></returns>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> customConditions) public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> customConditions)
{ {
var invgroup = customConditions.Where(p => p.Name == "InvGroupNum").FirstOrDefault().Value;//获取发票分 var invgroup = customConditions.Where(p => p.Name == "InvGroupNum").FirstOrDefault().Value;//获取发票分
var ls = _dapper.GetInvoiceList(invgroup); var ls = _dapper.GetInvoiceList(invgroup);
if (ls != null && ls.Count>0) 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" /> <ProjectReference Include="..\SettleAccount.EntityFrameworkCore\SettleAccount.EntityFrameworkCore.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Services\新文件夹\" />
</ItemGroup>
</Project> </Project>

Loading…
Cancel
Save