Browse Source

更新DTO

master
学 赵 1 year ago
parent
commit
4357eea534
  1. 32
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_CAN_SA_DTO.cs
  2. 197
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  3. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_CAN_SA_DTO.cs
  4. 27
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/IINVOICE_SERVICE.cs
  5. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/IPUB_BA_SERVICE.cs
  6. 49
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
  7. 82
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs
  8. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  9. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_CAN_SA.cs
  10. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs
  11. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_CAN_SA.cs
  12. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_EDI.cs
  13. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_GRP.cs
  14. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_CAN_SA.cs
  15. 37
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBillState.cs
  16. 11
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  17. 6
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountBQEfCoreRepository.cs

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

@ -40,17 +40,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
}
public class HBPO_CAN_SA_DETAIL_DTO : EntityDto<Guid>
{
/// <summary>
///关联结算单号
/// </summary>
@ -97,27 +86,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
public string GroupNum { get; set; }
}
public class HBPO_CAN_SA_DETAIL_EXP_DTO
{

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

@ -54,6 +54,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; }
/// <summary>
/// 发票状态
/// </summary>
public int State { set; get; }
}
@ -118,17 +122,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
}
public class INVOICE_GRP_REQ_DTO : PagedAndSortedResultRequestDto
{
[Display(Name = "实际纸质发票号")]
@ -137,17 +131,20 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public decimal TaxAmt { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
public virtual List<FilterCondition> Filters { get; set; } = new List<FilterCondition>();
}
namespace SettleAccount.Domain.BQ
public class INVOICE_GRP_DETAIL_DTO : EntityDto<Guid>
{
public class INVOICE_WAIT_DETAIL_DTO : EntityDto<Guid>
public List<INVOICE_WAIT_DETAIL_DTO> INVOICE_WAIT_DETAIL { get; set; }
public List<INVOICE_MAP_GROUP_DTO> INVOICE_MAP_GROUP { get; set; }
public List<INVOICE_NOT_SETTLE_DTO> INVOICE_NOT_SETTLE_DTO { get; set; }
}
public class INVOICE_WAIT_DETAIL_DTO : EntityDto<Guid>
{
@ -227,6 +224,172 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public class INVOICE_MAP_GROUP_DTO : EntityDto<Guid>
{
/// <summary>
///期间
/// </summary>
[Display(Name = "期间")]
public int Version { get; set; }
/// <summary>
///发票号
/// </summary>
[Display(Name = "发票号")]
public string InvbillNum { get; set; }
/// <summary>
///发票分组号
/// </summary>
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
///结算分组号
/// </summary>
[Display(Name = "结算分组号")]
public string SettleGroupNum { get; set; }
/// <summary>
///金额
/// </summary>
[Display(Name = "金额")]
public decimal Amt { get; set; }
/// <summary>
///扩展字段1
/// </summary>
[Display(Name = "扩展字段1")]
public string Extend1 { get; set; }
/// <summary>
///扩展字段2
/// </summary>
[Display(Name = "扩展字段2")]
public string Extend2 { get; set; }
public bool IsDeleted { get; set; }
}
public class INVOICE_MAP_GROUP_EXP_DTO
{
/// <summary>
///期间
/// </summary>
[ExporterHeader(DisplayName = "期间")]
public int Version { get; set; }
/// <summary>
///发票号
/// </summary>
[ExporterHeader(DisplayName = "发票号")]
public string InvbillNum { get; set; }
/// <summary>
///发票分组号
/// </summary>
[ExporterHeader(DisplayName = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
///结算分组号
/// </summary>
[ExporterHeader(DisplayName = "结算分组号")]
public string SettleGroupNum { get; set; }
/// <summary>
///金额
/// </summary>
[ExporterHeader(DisplayName = "金额")]
public decimal Amt { get; set; }
/// <summary>
///扩展字段1
/// </summary>
[ExporterHeader(DisplayName = "扩展字段1")]
public string Extend1 { get; set; }
/// <summary>
///扩展字段2
/// </summary>
[ExporterHeader(DisplayName = "扩展字段2")]
public string Extend2 { get; set; }
}
public class INVOICE_MAP_GROUPRequestDto : PagedAndSortedResultRequestDto
{
public int Version { get; set; }
[Display(Name = "发票号")]
public string InvbillNum { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
}
public class INVOICE_NOT_SETTLE_DTO : EntityDto<Guid>
{
/// <summary>
///期间
/// </summary>
[Display(Name = "期间")]
public int Version { get; set; }
/// <summary>
///发票分组号
/// </summary>
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
/// <summary>
///结算分组号
/// </summary>
[Display(Name = "结算分组号")]
public string SettleGroupNum { get; set; }
/// <summary>
///可结算零件号
/// </summary>
[Display(Name = "可结算零件号")]
public string LU { get; set; }
/// <summary>
///不可结算零件号
/// </summary>
[Display(Name = "不可结算零件号")]
public string LU1 { get; set; }
/// <summary>
///扩展字段1
/// </summary>
[Display(Name = "扩展字段1")]
public string Extend1 { get; set; }
/// <summary>
///扩展字段2
/// </summary>
[Display(Name = "扩展字段2")]
public string Extend2 { get; set; }
}
public class INVOICE_NOT_SETTLE_REQ_DTO : PagedAndSortedResultRequestDto
{
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
[Display(Name = "结算分组号")]
public string SettleGroupNum { get; set; }
public virtual List<FilterCondition> Filters { get; set; } = new List<FilterCondition>();
}
}
@ -247,7 +410,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
}

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

@ -46,7 +46,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
}
public class PUB_CAN_SA_REQ_DTO : PagedAndSortedResultRequestDto
{
[Display(Name = "期间")]
@ -174,6 +173,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; }
/// <summary>
///
/// </summary>
[Display(Name = "发票分组号")]
public string BillNum { get; set; }

27
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/IINVOICE_SERVICE.cs

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
public interface IINVOICE_SERVICE
{
//Import
//ApprovalPassed
//Reject
//MainQuery
//DetailQuery
//Sync_QAD
Task<bool> ApprovalPassed(INVOICE_GRP_REQ_DTO input);
Task<PagedResultDto<INVOICE_GRP_DTO>> MainQueryAsync(INVOICE_GRP_REQ_DTO input);
Task<INVOICE_GRP_DETAIL_DTO> DetailQueryAsync(INVOICE_GRP_REQ_DTO input);
Task<string> ExportAsync(INVOICE_GRP_REQ_DTO input);
}
}

1
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/IPUB_BA_SERVICE.cs

@ -8,5 +8,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
public interface IPUB_BA_SERVICE
{
}
}

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

@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Linq;
@ -34,7 +35,55 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[Route("generateinvoice")]
public Task<bool> GenerateInvoice(BBAC_CAN_SA_REQ_DTO input)
{
List<BBAC_CAN_SA_DETAIL_DTO> _ls = new List<BBAC_CAN_SA_DETAIL_DTO>();
var _query= _ls.GroupBy(p => new { p.GroupNum }).Select(p =>new {GroupNum=p.Key.GroupNum, Qty=p.Sum(itm=>itm.Price)});
Dictionary<string, decimal> _dic = new Dictionary<string, decimal>();
Dictionary<string, decimal> _dic1 = new Dictionary<string, decimal>();
foreach (var itm in _query.ToList())
{
_dic.Add(itm.GroupNum, itm.Qty);
_dic1.Add(itm.GroupNum, itm.Qty);
}
Dictionary<string, List<string>> _invoice=new Dictionary<string,List<string>>();
foreach (var _itm in _dic)
{
string invoiceBillNum = Guid.NewGuid().ToString();
List<string> invoiceGroupNumList = new List<string>();
List<string> List = new List<string>();
decimal sum = _itm.Value;//初始价格
List<string> luList= _ls.Where(p => p.GroupNum == _itm.Key).Select(p => p.LU).Distinct().ToList(); //初始LU种类
foreach (var _itm1 in _dic1)
{
if (_itm.Key == _itm1.Key)
{
continue;
}
var grouplist=_ls.Where(p => p.GroupNum == _itm1.Key).Select(p => p.LU).Distinct().ToList();//每项LU种类
luList.AddRange(grouplist);
luList = luList.Distinct().ToList();
if (luList.Count > 20)//累加零件不超过20种
{
continue;
}
sum += _itm1.Value;
if (sum > 10000000)
{
continue;
}
invoiceGroupNumList.Add(_itm1.Key);//所有条件都满足添加发票和结算分组对应关系
}
}
throw new NotImplementedException();
// return true;
}
[HttpPost]
[Route("mainquery")]

82
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
@ -48,7 +48,7 @@ namespace Win.Sfs.SettleAccount.Boms
public class BomAppService : SettleAccountApplicationBase<Bom>
{
/// <summary>
/// BOM仓储
/// BOM�ִ�
/// </summary>
private readonly INormalEfCoreRepository<Bom, Guid> _repository;
@ -65,7 +65,7 @@ namespace Win.Sfs.SettleAccount.Boms
private readonly ISettleAccountBranchEfCoreRepository<BomVersion, Guid> _versionRepository;
/// <summary>
/// 构造方法
/// ���췽��
/// </summary>
public BomAppService(
INormalEfCoreRepository<Bom, Guid> repository,
@ -91,9 +91,9 @@ namespace Win.Sfs.SettleAccount.Boms
_importColumnMapRepository = importColumnMapRepository;
}
#region 导入、导出
#region ���롢����
/// <summary>
/// 导出
/// ����
/// </summary>
[HttpPost]
[Route("Export")]
@ -104,14 +104,14 @@ namespace Win.Sfs.SettleAccount.Boms
0, true);
var dtoDetails = ObjectMapper.Map<List<Bom>, List<BomExportDto> >(entities);
//声明导出容器
//������������
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtoDetails);
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
//���浼���ļ�����������ɶ�����
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
@ -125,7 +125,7 @@ namespace Win.Sfs.SettleAccount.Boms
#region CURD
/// <summary>
/// 获取列表
/// ��ȡ�б�
/// </summary>
[HttpPost]
[Route("list")]
@ -138,13 +138,13 @@ namespace Win.Sfs.SettleAccount.Boms
}
#endregion
#region 原方法(废弃)
// #region 导入导出功能
#region ԭ������������
// #region ���뵼������
// /// <summary>
// /// 导入功能
// /// ���빦��
// /// </summary>
// /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
// /// <param name="files">�ϴ����ļ�(ǰ���Ѿ�����ֻ���ϴ�һ������)</param>
// /// <returns></returns>
// [HttpPost]
// [Route("ExcelImport-Map")]
@ -169,7 +169,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// if (itm.Count > 1)
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("不能导入父编码{0},子编码{1}有重复数据", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("���ܵ��븸����{0},�ӱ���{1}���ظ�����", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// }
// }
// var _id = GuidGenerator.Create();
@ -179,7 +179,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// if (!_matList.Any(p => p.MaterialCode == itm.ParentItemCode))
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("物料主数据不存在物料号{0}!", itm.ParentItemCode), string.Empty));
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("���������ݲ��������Ϻ�{0}��", itm.ParentItemCode), string.Empty));
// continue;
// }
// itm.SetValue(GuidGenerator.Create(), branchId, year, period, version, _id, factory);
@ -198,9 +198,9 @@ namespace Win.Sfs.SettleAccount.Boms
// /// <summary>
// /// 导入功能
// /// ���빦��
// /// </summary>
// /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
// /// <param name="files">�ϴ����ļ�(ǰ���Ѿ�����ֻ���ϴ�һ������)</param>
// /// <returns></returns>
// [HttpPost]
// [Route("ExcelImport")]
@ -224,7 +224,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// if (itm.Count > 1)
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("不能导入父编码{0},子编码{1}有重复数据", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("���ܵ��븸����{0},�ӱ���{1}���ظ�����", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// }
// }
// var _id = GuidGenerator.Create();
@ -234,7 +234,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// if (!_matList.Any(p => p.MaterialCode == itm.ParentItemCode))
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("物料主数据不存在物料号{0}!", itm.ParentItemCode), string.Empty));
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("���������ݲ��������Ϻ�{0}��", itm.ParentItemCode), string.Empty));
// continue;
// }
// itm.SetValue(GuidGenerator.Create(),branchId,year,period,version,_id,factory);
@ -249,7 +249,7 @@ namespace Win.Sfs.SettleAccount.Boms
// return ApplicationConsts.SuccessStr;
// }
// /// <summary>
// /// 导出文件
// /// �����ļ�
// /// </summary>
// /// <param name="input"></param>
// /// <returns></returns>
@ -260,7 +260,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// IExporter _csv = new CsvExporter();
// IExporter _excel = new ExcelExporter();
// //导出加上版本过滤条件,不能全导出
// //�������ϰ汾��������������ȫ����
// if (input.ParentId != Guid.Empty)
// {
// input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() });
@ -273,23 +273,23 @@ namespace Win.Sfs.SettleAccount.Boms
// 0, true);
// var dtoDetails = ObjectMapper.Map<List<Bom>, List<BomExportDto>>(entities);
// string _fileName = string.Empty;
// //声明导出容器
// //������������
// byte[] result = null;
// switch (input.FileType)
// {
// case 0:
// _fileName = string.Format("产品结构_{0}.csv", input.UserId.ToString());
// _fileName = string.Format("��Ʒ�ṹ_{0}.csv", input.UserId.ToString());
// result = await _csv.ExportAsByteArray(dtoDetails);
// break;
// case 1:
// _fileName = string.Format("产品结构_{0}.xlsx", input.UserId.ToString());
// _fileName = string.Format("��Ʒ�ṹ_{0}.xlsx", input.UserId.ToString());
// result = await _excel.ExportAsByteArray(dtoDetails);
// break;
// }
// result.ShouldNotBeNull();
// //保存导出文件到服务器存成二进制
// //���浼���ļ�����������ɶ�����
// await _excelImportService.SaveBlobAsync(
// new SaveExcelImportInputDto
// {
@ -302,13 +302,13 @@ namespace Win.Sfs.SettleAccount.Boms
// #endregion
// /// <summary>
// /// 按ID获取唯一实体
// /// ��ID��ȡΨһʵ��
// /// </summary>
// /// <remarks>
// /// 返回实体全部属性
// /// ����ʵ��ȫ������
// /// </remarks>
// /// <param name="id">ID</param>
// /// <returns>实体DTO</returns>
// /// <returns>ʵ��DTO</returns>
// [HttpGet]
// [Route("{id}")]
//[Authorize(SettleAccountPermissions.Boms.Default)]
@ -339,9 +339,9 @@ namespace Win.Sfs.SettleAccount.Boms
// }
// /// <summary>
// /// 获取实体总数
// /// ��ȡʵ������
// /// </summary>
// /// <returns>实体总数</returns>
// /// <returns>ʵ������</returns>
// [HttpGet]
// [Route("count")]
//[Authorize(SettleAccountPermissions.Boms.Default)]
@ -353,10 +353,10 @@ namespace Win.Sfs.SettleAccount.Boms
// /// <summary>
// /// 删除实体
// /// ɾ��ʵ��
// /// </summary>
// /// <param name="id">ID</param>
// /// <returns></returns>
// /// <returns>��</returns>
// [HttpDelete]
// [Route("{id}")]
//[Authorize(SettleAccountPermissions.Boms.Delete)]
@ -368,10 +368,10 @@ namespace Win.Sfs.SettleAccount.Boms
// }
// /// <summary>
// /// 按IDs删除实体列表
// /// ��IDsɾ��ʵ���б�
// /// </summary>
// /// <param name="ids">IDs</param>
// /// <returns>是否执行成功</returns>
// /// <returns>�Ƿ�ִ�гɹ�</returns>
// [HttpPost]
// [Route("delete")]
//[Authorize(SettleAccountPermissions.Boms.Delete)]
@ -390,13 +390,13 @@ namespace Win.Sfs.SettleAccount.Boms
// ///// <summary>
// /// <summary>
// /// 根据筛选条件获取实体列表
// /// ����ɸѡ������ȡʵ���б�
// /// </summary>
// /// <remarks>
// /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
// /// ������������:ɸѡ�����б�,��������,��������,ҳ��
// /// </remarks>
// /// <param name="input">请求条件</param>
// /// <returns>实体DTO列表</returns>
// /// <param name="input">��������</param>
// /// <returns>ʵ��DTO�б�</returns>
// [HttpPost]
// [Route("list")]
// [Authorize(SettleAccountPermissions.Boms.Default)]
@ -420,13 +420,13 @@ namespace Win.Sfs.SettleAccount.Boms
// ///// <summary>
// /// <summary>
// /// 根据筛选条件获取实体列表
// /// ����ɸѡ������ȡʵ���б�
// /// </summary>
// /// <remarks>
// /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
// /// ������������:ɸѡ�����б�,��������,��������,ҳ��
// /// </remarks>
// /// <param name="input">请求条件</param>
// /// <returns>实体DTO列表</returns>
// /// <param name="input">��������</param>
// /// <returns>ʵ��DTO�б�</returns>
// [HttpPost]
// [Route("listVersion")]
// [Authorize(SettleAccountPermissions.Boms.Default)]

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -133,7 +133,9 @@ namespace Win.Sfs.SettleAccount
#endregion
}
#region 北汽
#region BQ

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

@ -2,6 +2,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "BBAC可结算导入")]
@ -20,7 +21,7 @@ public class BBAC_CAN_SA:FullAuditedAggregateRoot<Guid>
/// 1、新建 2、已有出库3、已有扣减寄售库
/// </summary>
[Display(Name = "状态")]
public string State { get; set; } = null!;
public SettleBillState State { get; set; }
/// <summary>
/// 明细记录行数
@ -34,7 +35,7 @@ public class BBAC_CAN_SA:FullAuditedAggregateRoot<Guid>
public BBAC_CAN_SA(Guid guid, int version, string billNum, string settleBillNum, string state, string invGroupNum)
public BBAC_CAN_SA(Guid guid, int version, string billNum, string settleBillNum, SettleBillState state, string invGroupNum)
{
Id = guid;
Version = version;

7
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs

@ -36,6 +36,13 @@ public class BBAC_SE_EDI:FullAuditedAggregateRoot<Guid>
[Display(Name = "订货时间")]
public DateTime BeginDate { get; set; }
public string Extend1 { set; get; }
public string Extend2 { set; get; }
public string Extend3 { set; get; }
public string Extend4 { set; get; }
public BBAC_SE_EDI()
{ }
public BBAC_SE_EDI(Guid guid, string keyCode, int version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate)

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

@ -2,6 +2,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "HBPO可结算导入")]
@ -19,7 +20,7 @@ public class HBPO_CAN_SA :FullAuditedAggregateRoot<Guid>
/// 1、新建 2、已有出库3、已有扣减寄售库
/// </summary>
[Display(Name = "状态")]
public string State { get; set; } = null!;
public SettleBillState State { get; set; }
/// <summary>
/// 明细记录行数
@ -27,7 +28,7 @@ public class HBPO_CAN_SA :FullAuditedAggregateRoot<Guid>
[Display(Name = "明细记录行数")]
public string InvGroupNum { get; set; } = null!;
public HBPO_CAN_SA(Guid guid, int version, string settleBillNum, string billNum, string state, string invGroupNum)
public HBPO_CAN_SA(Guid guid, int version, string settleBillNum, string billNum, SettleBillState state, string invGroupNum)
{
Version = version;
SettleBillNum = settleBillNum;

7
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_EDI.cs

@ -36,6 +36,13 @@ public class HBPO_SE_EDI :FullAuditedAggregateRoot<Guid>
[Display(Name = "订货时间")]
public DateTime BeginDate { get; set; }
public string Extend1 { set; get; }
public string Extend2 { set; get; }
public string Extend3 { set; get; }
public string Extend4 { set; get; }
public HBPO_SE_EDI(Guid guid, string keyCode, int version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate)
{
Id=guid;

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

@ -1,6 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "发票分组")]
@ -30,7 +31,11 @@ public class INVOICE_GRP : FullAuditedAggregateRoot<Guid>
[Display(Name = "业务类别")]
public string BusinessType { get; set; } = null!;
public INVOICE_GRP(Guid guid, string realnvBillNum, string invbillNum, decimal amt, decimal taxAmt, string invGroupNum, string fileName, string businessType)
[Display(Name = "业务类别")]
public InvoiceBillState State { get; set; }
public INVOICE_GRP(Guid guid, string realnvBillNum, string invbillNum, decimal amt, decimal taxAmt, string invGroupNum, string fileName, string businessType, InvoiceBillState state)
{
Id= guid;
RealnvBillNum = realnvBillNum;
@ -40,8 +45,11 @@ public class INVOICE_GRP : FullAuditedAggregateRoot<Guid>
InvGroupNum = invGroupNum;
FileName = fileName;
BusinessType = businessType;
State = state;
}
public INVOICE_GRP()
{
}

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

@ -2,6 +2,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "PUB可结算导入")]
@ -20,7 +21,7 @@ public class PUB_CAN_SA :FullAuditedAggregateRoot<Guid>
/// 1、新建 2、已有出库3、已有扣减寄售库
/// </summary>
[Display(Name = "状态")]
public int State { get; set; }
public SettleBillState State { get; set; }
/// <summary>
/// 1、JIT 2、买单件 3、备件 3、印度件
/// </summary>
@ -30,7 +31,7 @@ public class PUB_CAN_SA :FullAuditedAggregateRoot<Guid>
[Display(Name = "明细记录行数")]
public string InvGroupNum { get; set; } = null!;
public PUB_CAN_SA(int version, string settleBillNum, string billNum, int state, string businessType, string invGroupNum)
public PUB_CAN_SA(int version, string settleBillNum, string billNum, SettleBillState state, string businessType, string invGroupNum)
{
Version = version;
SettleBillNum = settleBillNum;

37
code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBillState.cs

@ -16,4 +16,41 @@ namespace Win.Sfs.SettleAccount
[Description("完成")]
= 2,
}
public enum SettleBillState
{
[Description("未结状态")]
= 0,
[Description("已开票")]
= 1,
[Description("商务已审核")]
= 2,
[Description("财务已审核")]
= 3,
[Description("已扣减")]
= 4,
}
public enum InvoiceBillState
{
[Description("未结状态")]
= 0,
[Description("商务已审核")]
= 2,
[Description("财务已审核")]
= 3,
[Description("已扣减")]
= 4,
}
}

11
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -694,6 +694,11 @@ namespace Win.Sfs.SettleAccount
b.Property(x => x.AssemblyCode).HasMaxLength(50);
b.Property(x => x.InjectionCode).HasMaxLength(50);
b.Property(x => x.ConcurrencyStamp).HasMaxLength(50);
b.Property(x => x.Extend1).HasMaxLength(50);
b.Property(x => x.Extend2).HasMaxLength(50);
b.Property(x => x.Extend3).HasMaxLength(50);
b.Property(x => x.Extend4).HasMaxLength(50);
});
}
@ -889,6 +894,12 @@ namespace Win.Sfs.SettleAccount
b.Property(x => x.AssemblyCode).HasMaxLength(50);
b.Property(x => x.InjectionCode).HasMaxLength(50);
b.Property(x => x.ConcurrencyStamp).HasMaxLength(50);
b.Property(x => x.Extend1).HasMaxLength(50);
b.Property(x => x.Extend2).HasMaxLength(50);
b.Property(x => x.Extend3).HasMaxLength(50);
b.Property(x => x.Extend4).HasMaxLength(50);
});
}

6
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountBQEfCoreRepository.cs

@ -22,7 +22,7 @@ namespace Win.Sfs.SettleAccount.Repository
SettleAccountEfCoreRepository<TEntity, TKey>,
ISettleAccountBQEfCoreRepository<TEntity, TKey>,
ITransientDependency
where TEntity : class, IBranch<TKey>, IEntity<TKey>
where TEntity : class, IEntity<TKey>
{
private readonly IDbContextProvider<SettleAccountDbContext> _dbContextProvider;
@ -79,7 +79,7 @@ namespace Win.Sfs.SettleAccount.Repository
public virtual async Task<long> GetCountAsync(CancellationToken cancellationToken = default)
{
return await this.GetQueryable()
//.Where(p => p.BranchId.Equals(branchId))
.LongCountAsync(GetCancellationToken(cancellationToken));
}
@ -88,7 +88,7 @@ namespace Win.Sfs.SettleAccount.Repository
CancellationToken cancellationToken = default)
{
return await this.GetQueryable()
//.Where(p => p.BranchId.Equals(branchId))
.WhereIf(filters?.Count != 0, filters.ToLambda<TEntity>())
.LongCountAsync(GetCancellationToken(cancellationToken));
}

Loading…
Cancel
Save