mahao 1 year ago
parent
commit
160b1ec6b2
  1. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_CAN_SA_DTO.cs
  2. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_NOT_SA_DTO.cs
  3. 262
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_PD_DTO.cs
  4. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs
  5. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_EDI_DTO.cs
  6. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_CAN_SA_DTO.cs
  7. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_NOT_SA_DTO.cs
  8. 263
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_PD_DTO.cs
  9. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_CAN_SA_DTO.cs
  10. 264
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_PD_DTO.cs
  11. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/BA_SERVICE.cs
  12. 129
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
  13. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
  14. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs
  15. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs

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

@ -74,6 +74,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 零件号
/// </summary>
public string LU { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 生产号
/// </summary>
@ -124,6 +132,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ExporterHeader(DisplayName = "LU")]
public string LU { get; set; }
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; }
public string KeyCode { get; set; }

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

@ -99,6 +99,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public string InvGroupNum { get; set; }
[ExporterHeader(DisplayName = "LU")]
public string LU { get; set; }
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; }

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

@ -0,0 +1,262 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.Shared.Filter;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
namespace SettleAccount.Domain.BQ
{
public class BBAC_PD_DTO : EntityDto<Guid>
{
/// <summary>
///期间
/// </summary>
[Display(Name = "期间")]
public int Version { get; set; }
/// <summary>
///结算单据
/// </summary>
[Display(Name = "发票分组号")]
public string BillNum { get; set; }
/// <summary>
///关联结算单号
/// </summary>
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
/// <summary>
///发票分组号
/// </summary>
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
///地点
/// </summary>
[Display(Name = "地点")]
public string Site { get; set; }
}
public class BBAC_PD_EXPORT
{
/// <summary>
///期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public int Version { get; set; }
/// <summary>
///结算单据
/// </summary>
[ExporterHeader(DisplayName = "结算单据")]
public string BillNum { get; set; }
/// <summary>
///关联结算单号
/// </summary>
[ExporterHeader(DisplayName = "关联结算单号")]
public string SettleBillNum { get; set; }
/// <summary>
///发票分组号
/// </summary>
[ExporterHeader(DisplayName = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
///地点
/// </summary>
[ExporterHeader(DisplayName = "地点")]
public string Site { get; set; }
}
public class BBAC_PD_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 InvGroupNum { get; set; }
[Display(Name = "地点")]
public string Site { get; set; }
}
public class BBAC_PD_DETAIL_DTO : EntityDto<Guid>
{
/// <summary>
///工厂地点
/// </summary>
[Display(Name = "工厂地点")]
public string Site { get; set; }
/// <summary>
/// 版本
/// </summary>
public int Version { get; set; }
/// <summary>
/// 发票分组号
/// </summary>
public string BillNum { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { get; set; }
/// <summary>
/// 价格
/// </summary>
public decimal Price { get; set; }
/// <summary>
/// 发票分组号
/// </summary>
public string InvGroupNum { get; set; }
/// <summary>
/// 下线日期
/// </summary>
public DateTime SettleDate { get; set; }
/// <summary>
/// 结算分组号
/// </summary>
public string GroupNum { get; set; }
/// <summary>
/// 零件LU
/// </summary>
public string LU { get; set; }
/// <summary>
/// 生产码
/// </summary>
public string PN { get; set; }
/// <summary>
/// 替换零件号
/// </summary>
public string RELU { get; set; }
/// <summary>
/// 替换生产码
/// </summary>
public string REPN { get; set; }
/// <summary>
/// 键值
/// </summary>
public string KeyCode { get; set; }
/// <summary>
/// 扩展字段1
/// </summary>
public string Extend1 { get; set; }
/// <summary>
/// 扩展字段2
/// </summary>
public string Extend2 { get; set; }
/// <summary>
/// 扩展字段3
/// </summary>
public string Extend3 { get; set; }
/// <summary>
/// 扩展字段4
/// </summary>
public string Extend4 { get; set; }
}
public class BBAC_PD_DETAIL_EXP_DTO
{
/// <summary>
///工厂地点
/// </summary>
[ExporterHeader(DisplayName = "工厂地点")]
public string Site { get; set; }
/// <summary>
/// 版本
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public int Version { get; set; }
/// <summary>
/// 发票分组号
/// </summary>
[ExporterHeader(DisplayName = "发票分组号")]
public string BillNum { get; set; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "数量")]
public decimal Qty { get; set; }
/// <summary>
/// 价格
/// </summary>
[ExporterHeader(DisplayName = "单价")]
public decimal Price { get; set; }
/// <summary>
/// 发票分组号
/// </summary>
[ExporterHeader(DisplayName = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
/// 下线日期
/// </summary>
[ExporterHeader(DisplayName = "下线日期")]
public DateTime SettleDate { get; set; }
/// <summary>
/// 结算分组号
/// </summary>
[ExporterHeader(DisplayName = "结算分组号")]
public string GroupNum { get; set; }
/// <summary>
/// 零件LU
/// </summary>
[ExporterHeader(DisplayName = "LU")]
public string LU { get; set; }
/// <summary>
/// 生产码
/// </summary>
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; }
/// <summary>
/// 替换零件号
/// </summary>
[ExporterHeader(DisplayName = "替换LU")]
public string RELU { get; set; }
/// <summary>
/// 替换生产码
/// </summary>
[ExporterHeader(DisplayName = "替换生产码")]
public string REPN { get; set; }
/// <summary>
/// 键值
/// </summary>
//public string KeyCode { get; set; }
///// <summary>
///// 扩展字段1
///// </summary>
//public string Extend1 { get; set; }
///// <summary>
///// 扩展字段2
///// </summary>
//public string Extend2 { get; set; }
///// <summary>
///// 扩展字段3
///// </summary>
//public string Extend3 { get; set; }
///// <summary>
///// 扩展字段4
///// </summary>
//public string Extend4 { get; set; }
}
public class BBAC_PD_DETAIL_REQ_DTO : RequestInputBase
{
/// <summary>
/// 发票分组号
/// </summary>
public string BillNum { get; set; }
}
}
}

3
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs

@ -33,6 +33,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; }
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { get; set; }
/// <summary>
/// 生产号

3
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_EDI_DTO.cs

@ -34,6 +34,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "生产码")]
public string PN { get; set; }
/// <summary>
/// 日顺序号
/// </summary>

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

@ -74,6 +74,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 零件号
/// </summary>
public string LU { get; set; }
public string MaterialDesc { get; set; }
/// <summary>
/// 生产号
/// </summary>
@ -124,6 +129,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ExporterHeader(DisplayName = "LU")]
public string LU { get; set; }
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; }
public string KeyCode { get; set; }

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

@ -48,6 +48,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
public string LU { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 生产号
/// </summary>
public string PN { get; set; }
@ -97,6 +101,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ExporterHeader(DisplayName = "LU")]
public string LU { get; set; }
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc { get; set; }
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; }
public string KeyCode { get; set; }

263
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_PD_DTO.cs

@ -0,0 +1,263 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
using Win.Sfs.SettleAccount.Bases;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
public class HBPO_PD_DTO : EntityDto<Guid>
{
/// <summary>
///期间
/// </summary>
[Display(Name = "期间")]
public int Version { get; set; }
/// <summary>
///结算单据
/// </summary>
[Display(Name = "发票分组号")]
public string BillNum { get; set; }
/// <summary>
///关联结算单号
/// </summary>
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
/// <summary>
///发票分组号
/// </summary>
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
///地点
/// </summary>
[Display(Name = "地点")]
public string Site { get; set; }
}
public class HBPO_PD_EXPORT
{
/// <summary>
///期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public int Version { get; set; }
/// <summary>
///结算单据
/// </summary>
[ExporterHeader(DisplayName = "结算单据")]
public string BillNum { get; set; }
/// <summary>
///关联结算单号
/// </summary>
[ExporterHeader(DisplayName = "关联结算单号")]
public string SettleBillNum { get; set; }
/// <summary>
///发票分组号
/// </summary>
[ExporterHeader(DisplayName = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
///地点
/// </summary>
[ExporterHeader(DisplayName = "地点")]
public string Site { get; set; }
}
public class HBPO_PD_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 InvGroupNum { get; set; }
[Display(Name = "地点")]
public string Site { get; set; }
}
public class HBPO_PD_DETAIL_DTO : EntityDto<Guid>
{
/// <summary>
///工厂地点
/// </summary>
[Display(Name = "工厂地点")]
public string Site { get; set; }
/// <summary>
/// 版本
/// </summary>
public int Version { get; set; }
/// <summary>
/// 发票分组号
/// </summary>
public string BillNum { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { get; set; }
/// <summary>
/// 价格
/// </summary>
public decimal Price { get; set; }
/// <summary>
/// 发票分组号
/// </summary>
public string InvGroupNum { get; set; }
/// <summary>
/// 下线日期
/// </summary>
public DateTime SettleDate { get; set; }
/// <summary>
/// 结算分组号
/// </summary>
public string GroupNum { get; set; }
/// <summary>
/// 零件LU
/// </summary>
public string LU { get; set; }
/// <summary>
/// 物料描述
/// </summary>
public string MaterialDesc { get; set; }
/// <summary>
/// 生产码
/// </summary>
public string PN { get; set; }
/// <summary>
/// 替换零件号
/// </summary>
public string RELU { get; set; }
/// <summary>
/// 替换生产码
/// </summary>
public string REPN { get; set; }
/// <summary>
/// 键值
/// </summary>
public string KeyCode { get; set; }
/// <summary>
/// 扩展字段1
/// </summary>
public string Extend1 { get; set; }
/// <summary>
/// 扩展字段2
/// </summary>
public string Extend2 { get; set; }
/// <summary>
/// 扩展字段3
/// </summary>
public string Extend3 { get; set; }
/// <summary>
/// 扩展字段4
/// </summary>
public string Extend4 { get; set; }
}
public class HBPO_PD_DETAIL_EXP_DTO
{
/// <summary>
///工厂地点
/// </summary>
[ExporterHeader(DisplayName = "工厂地点")]
public string Site { get; set; }
/// <summary>
/// 版本
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public int Version { get; set; }
/// <summary>
/// 发票分组号
/// </summary>
[ExporterHeader(DisplayName = "发票分组号")]
public string BillNum { get; set; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "数量")]
public decimal Qty { get; set; }
/// <summary>
/// 价格
/// </summary>
[ExporterHeader(DisplayName = "单价")]
public decimal Price { get; set; }
/// <summary>
/// 发票分组号
/// </summary>
[ExporterHeader(DisplayName = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
/// 下线日期
/// </summary>
[ExporterHeader(DisplayName = "下线日期")]
public DateTime SettleDate { get; set; }
/// <summary>
/// 结算分组号
/// </summary>
[ExporterHeader(DisplayName = "结算分组号")]
public string GroupNum { get; set; }
/// <summary>
/// 零件LU
/// </summary>
[ExporterHeader(DisplayName = "LU")]
public string LU { get; set; }
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDesc{ get; set; }
/// <summary>
/// 生产码
/// </summary>
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; }
/// <summary>
/// 替换零件号
/// </summary>
[ExporterHeader(DisplayName = "替换LU")]
public string RELU { get; set; }
/// <summary>
/// 替换生产码
/// </summary>
[ExporterHeader(DisplayName = "替换生产码")]
public string REPN { get; set; }
/// <summary>
/// 键值
/// </summary>
//public string KeyCode { get; set; }
///// <summary>
///// 扩展字段1
///// </summary>
//public string Extend1 { get; set; }
///// <summary>
///// 扩展字段2
///// </summary>
//public string Extend2 { get; set; }
///// <summary>
///// 扩展字段3
///// </summary>
//public string Extend3 { get; set; }
///// <summary>
///// 扩展字段4
///// </summary>
//public string Extend4 { get; set; }
}
public class HBPO_PD_DETAIL_REQ_DTO : RequestInputBase
{
/// <summary>
/// 发票分组号
/// </summary>
public string BillNum { get; set; }
}
}

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

@ -94,7 +94,7 @@ 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; }

264
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_PD_DTO.cs

@ -0,0 +1,264 @@
using Magicodes.ExporterAndImporter.Core;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
using Win.Sfs.SettleAccount.Bases;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
public class PUB_PD_DTO : EntityDto<Guid>
{
/// <summary>
///期间
/// </summary>
[Display(Name = "期间")]
public int Version { get; set; }
/// <summary>
///结算单据
/// </summary>
[Display(Name = "发票分组号")]
public string BillNum { get; set; }
/// <summary>
///关联结算单号
/// </summary>
[Display(Name = "关联结算单号")]
public string SettleBillNum { get; set; }
/// <summary>
///发票分组号
/// </summary>
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
///地点
/// </summary>
[Display(Name = "地点")]
public string Site { get; set; }
[Display(Name = "业务类型")]
public EnumBusinessType BusinessType { get; set; }
}
public class PUB_PD_EXPORT
{
/// <summary>
///期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public int Version { get; set; }
/// <summary>
///结算单据
/// </summary>
[ExporterHeader(DisplayName = "结算单据")]
public string BillNum { get; set; }
/// <summary>
///关联结算单号
/// </summary>
[ExporterHeader(DisplayName = "关联结算单号")]
public string SettleBillNum { get; set; }
/// <summary>
///发票分组号
/// </summary>
[ExporterHeader(DisplayName = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
///地点
/// </summary>
[ExporterHeader(DisplayName = "地点")]
public string Site { get; set; }
}
public class PUB_PD_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 InvGroupNum { get; set; }
[Display(Name = "地点")]
public string Site { get; set; }
[Display(Name = "业务类型")]
public EnumBusinessType BusinessType { get; set; }
}
public class PUB_PD_DETAIL_DTO : EntityDto<Guid>
{
/// <summary>
///工厂地点
/// </summary>
[Display(Name = "工厂地点")]
public string Site { get; set; }
/// <summary>
/// 版本
/// </summary>
public int Version { get; set; }
/// <summary>
/// 发票分组号
/// </summary>
public string BillNum { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal Qty { get; set; }
/// <summary>
/// 价格
/// </summary>
public decimal Price { get; set; }
/// <summary>
/// 发票分组号
/// </summary>
public string InvGroupNum { get; set; }
/// <summary>
/// 下线日期
/// </summary>
public DateTime SettleDate { get; set; }
/// <summary>
/// 结算分组号
/// </summary>
public string GroupNum { get; set; }
/// <summary>
/// 零件LU
/// </summary>
public string LU { get; set; }
/// <summary>
/// 生产码
/// </summary>
public string PN { get; set; }
/// <summary>
/// 替换零件号
/// </summary>
public string RELU { get; set; }
/// <summary>
/// 替换生产码
/// </summary>
public string REPN { get; set; }
/// <summary>
/// 键值
/// </summary>
public string KeyCode { get; set; }
/// <summary>
/// 扩展字段1
/// </summary>
public string Extend1 { get; set; }
/// <summary>
/// 扩展字段2
/// </summary>
public string Extend2 { get; set; }
/// <summary>
/// 扩展字段3
/// </summary>
public string Extend3 { get; set; }
/// <summary>
/// 扩展字段4
/// </summary>
public string Extend4 { get; set; }
}
public class PUB_PD_DETAIL_EXP_DTO
{
/// <summary>
///工厂地点
/// </summary>
[ExporterHeader(DisplayName = "工厂地点")]
public string Site { get; set; }
/// <summary>
/// 版本
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public int Version { get; set; }
/// <summary>
/// 发票分组号
/// </summary>
[ExporterHeader(DisplayName = "发票分组号")]
public string BillNum { get; set; }
/// <summary>
/// 数量
/// </summary>
[ExporterHeader(DisplayName = "数量")]
public decimal Qty { get; set; }
/// <summary>
/// 价格
/// </summary>
[ExporterHeader(DisplayName = "单价")]
public decimal Price { get; set; }
/// <summary>
/// 发票分组号
/// </summary>
[ExporterHeader(DisplayName = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
/// 下线日期
/// </summary>
[ExporterHeader(DisplayName = "下线日期")]
public DateTime SettleDate { get; set; }
/// <summary>
/// 结算分组号
/// </summary>
[ExporterHeader(DisplayName = "结算分组号")]
public string GroupNum { get; set; }
/// <summary>
/// 零件LU
/// </summary>
[ExporterHeader(DisplayName = "LU")]
public string LU { get; set; }
/// <summary>
/// 生产码
/// </summary>
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; }
/// <summary>
/// 替换零件号
/// </summary>
[ExporterHeader(DisplayName = "替换LU")]
public string RELU { get; set; }
/// <summary>
/// 替换生产码
/// </summary>
[ExporterHeader(DisplayName = "替换生产码")]
public string REPN { get; set; }
/// <summary>
/// 键值
/// </summary>
//public string KeyCode { get; set; }
///// <summary>
///// 扩展字段1
///// </summary>
//public string Extend1 { get; set; }
///// <summary>
///// 扩展字段2
///// </summary>
//public string Extend2 { get; set; }
///// <summary>
///// 扩展字段3
///// </summary>
//public string Extend3 { get; set; }
///// <summary>
///// 扩展字段4
///// </summary>
//public string Extend4 { get; set; }
}
public class PUB_PD_DETAIL_REQ_DTO : RequestInputBase
{
/// <summary>
/// 发票分组号
/// </summary>
public string BillNum { get; set; }
}
}

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

@ -85,10 +85,8 @@ namespace Win.Sfs.SettleAccount.Bases
{
IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter();
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtoDetails = ObjectMapper.Map<List<INVOICE_GRP>, List<INVOICE_GRP_EXP_DTO>>(entities);
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(INVOICE_GRP_DTO).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
byte[] result = null;

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

@ -1,12 +1,137 @@
using System;
using AutoMapper;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Bases;
using Shouldly;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Entities;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Bases
{
internal class PD_SERVICE
public class PD_SERVICE<TEntity, TEntityDto, TEntityDetail, TEntityDetailDto, TRequestMainInput, TRequestDetailInput, TEntityDetailExportDto> : ApplicationService
where TEntity : PD_BASE_MAIN
where TEntityDetail : PD_BASE
where TEntityDto : class, IEntityDto<Guid>, new()
where TEntityDetailDto : class, IEntityDto<Guid>, new()
where TRequestMainInput : RequestInputBase
where TRequestDetailInput : RequestInputBase
where TEntityDetailExportDto : class, new()
{
private readonly INormalEfCoreRepository<TEntity, Guid> _repository;
private readonly INormalEfCoreRepository<TEntityDetail, Guid> _detailRepository;
private readonly IExcelImportAppService _excelImportService;
protected PD_SERVICE(
INormalEfCoreRepository<TEntity, Guid> repository,
IExcelImportAppService excelImportService,
INormalEfCoreRepository<TEntityDetail, Guid> detailRepository
)
{
_excelImportService = excelImportService;
_repository = repository;
_detailRepository = detailRepository;
}
[HttpPost]
//[Route("detailquery")]
public virtual async Task<PagedResultDto<TEntityDetailDto>> DetailQueryAsync(TRequestDetailInput input)
{
var entitys = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount);
var totalCount = await _detailRepository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<TEntityDetail>, List<TEntityDetailDto>>(entitys);
return new PagedResultDto<TEntityDetailDto>(totalCount, dtos);
}
[HttpPost]
//[Route("export")]
public virtual async Task<string> ExportAsync(TRequestDetailInput input)
{
IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter();
var entities = await _detailRepository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
var dtoDetails = ObjectMapper.Map<List<TEntityDetail>, List<TEntityDetailExportDto>>(entities);
var classDisplayName = typeof(TEntityDetailExportDto).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(TEntityDetailExportDto).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
byte[] result = null;
switch (input.FileType)
{
case 0:
result = await _csv.ExportAsByteArray(dtoDetails);
break;
case 1:
result = await _excel.ExportAsByteArray(dtoDetails);
break;
}
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
Name = _fileName,
Content = result
}
);
return _fileName;
}
[HttpPost]
//[Route("generateinvoice")]
public virtual async Task<string> ApprovalPassed(TRequestMainInput input)
{
return ApplicationConsts.SuccessStr;
}
[HttpPost]
//[Route("mainquery")]
public virtual async Task<PagedResultDto<TEntityDto>> MainQueryAsync(TRequestMainInput 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<TEntity>, List<TEntityDto>>(entitys);
return new PagedResultDto<TEntityDto>(totalCount, dtos);
}
[HttpPost]
public virtual async Task<string> RejectAsync(TRequestMainInput input)
{
return ApplicationConsts.SuccessStr;
}
}
}

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

@ -1,17 +1,27 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components;
using SettleAccount.Domain.BQ;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
[AllowAnonymous]
[Route("api/settleaccount/bbac_pd_service")]
public class BBAC_PD_SERVICE : ApplicationService
public class BBAC_PD_SERVICE : PD_SERVICE<BBAC_PD, BBAC_PD_DTO,
BBAC_PD_DETAIL, BBAC_PD_DETAIL_DTO, BBAC_PD_REQ_DTO,
BBAC_PD_DETAIL_REQ_DTO, BBAC_PD_DETAIL_EXP_DTO>
{
protected BBAC_PD_SERVICE(INormalEfCoreRepository<BBAC_PD, Guid> repository, IExcelImportAppService excelImportService, INormalEfCoreRepository<BBAC_PD_DETAIL, Guid> detailRepository) : base(repository, excelImportService, detailRepository)
{
}
}
}

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

@ -1,17 +1,28 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components;
using SettleAccount.Domain.BQ;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
[AllowAnonymous]
[Route("api/settleaccount/hbpo_pd_service")]
public class HBPO_PD_SERVICE : ApplicationService
public class HBPO_PD_SERVICE : PD_SERVICE<HBPO_PD, HBPO_PD_DTO,
HBPO_PD_DETAIL, HBPO_PD_DETAIL_DTO, HBPO_PD_REQ_DTO,
HBPO_PD_DETAIL_REQ_DTO, HBPO_PD_DETAIL_EXP_DTO>
{
protected HBPO_PD_SERVICE(INormalEfCoreRepository<HBPO_PD, Guid> repository, IExcelImportAppService excelImportService, INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> detailRepository) : base(repository, excelImportService, detailRepository)
{
}
}
}

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

@ -1,17 +1,28 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components;
using SettleAccount.Domain.BQ;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
[AllowAnonymous]
[Route("api/settleaccount/pub_pd_service")]
public class PUB_PD_SERVICE : ApplicationService
public class PUB_PD_SERVICE : PD_SERVICE<PUB_PD, PUB_PD_DTO,
PUB_PD_DETAIL, PUB_PD_DETAIL_DTO, PUB_PD_REQ_DTO,
PUB_PD_DETAIL_REQ_DTO, PUB_PD_DETAIL_EXP_DTO>
{
protected PUB_PD_SERVICE(INormalEfCoreRepository<PUB_PD, Guid> repository, IExcelImportAppService excelImportService, INormalEfCoreRepository<PUB_PD_DETAIL, Guid> detailRepository) : base(repository, excelImportService, detailRepository)
{
}
}
}

Loading…
Cancel
Save