Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
9a296591bf
  1. 10
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Program.cs
  2. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  3. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_CAN_SA_DTO.cs
  4. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_NOT_SA_DTO.cs
  5. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs
  6. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/TB_RePartsRelationship_DTO.cs
  7. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Controls/CentralizedControlDtoBase.cs
  8. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs
  9. 142
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
  10. 58
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs
  11. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs
  12. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_CAN_SA.cs
  13. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs
  14. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_GRP.cs
  15. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_CAN_SA.cs
  16. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_NOT_SA_DETAIL.cs
  17. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_PD_DETAIL.cs
  18. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SE_DETAIL.cs
  19. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/TB_RePartsRelationship.cs
  20. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Controls/CentralizedControl.cs
  21. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceList.cs
  22. 40
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBusinessType.cs
  23. 3992
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714030100_20230714-1.Designer.cs
  24. 53
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714030100_20230714-1.cs
  25. 3992
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714033202_20230714-2.Designer.cs
  26. 29
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714033202_20230714-2.cs
  27. 3992
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714063941_20230714-3.Designer.cs
  28. 181
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714063941_20230714-3.cs
  29. 48
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

10
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Program.cs

@ -29,11 +29,11 @@ namespace Win.Sfs.SettleAccount
var configuration = new ConfigurationBuilder()
#if DEBUG
.AddJsonFile("appsettings.Development.json")
#else
.AddJsonFile("appsettings.json")
#endif
//#if DEBUG
// .AddJsonFile("appsettings.Development.json")
//#else
// .AddJsonFile("appsettings.json")
//#endif
.Build();

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

@ -55,7 +55,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///业务类别
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }
/// <summary>
/// 发票状态
/// </summary>
@ -103,7 +103,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///业务类别
/// </summary>
[ExporterHeader(DisplayName = "业务类别")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }
}

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

@ -38,7 +38,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///业务分类
/// </summary>
[Display(Name = "业务分类")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }
/// <summary>
///明细记录行数
/// </summary>
@ -58,7 +58,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "状态")]
public int State { get; set; }
[Display(Name = "业务分类")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
@ -81,7 +81,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///业务类别
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }
[Display(Name ="期间")]
public int Version { get; set; }
[Display(Name = "价格")]
@ -126,7 +126,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///业务类别
/// </summary>
[ExporterHeader(DisplayName = "业务类别")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }
[ExporterHeader(DisplayName = "单价")]
public decimal Price { get; set; }
@ -173,7 +173,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///业务类别
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }
/// <summary>
///
/// </summary>

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

@ -28,7 +28,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///业务类别
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }
[Display(Name = "期间")]
public int Version { get; set; }
[Display(Name = "价格")]
@ -91,7 +91,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///业务类别
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }
[Display(Name = "期间")]
public int Version { get; set; }
[Display(Name = "价格")]
@ -145,7 +145,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public string Site { get; set; }
[Display(Name = "业务分类")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }
public int Version { get; set; }
public string SettleBillNum { get; set; }

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

@ -58,6 +58,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
[Required(ErrorMessage = "{0}不能为空")]
[ImporterHeader(Name = "Material")]
public string LU { get; set; }

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

@ -32,7 +32,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 业务类型
/// </summary>
[Display(Name = "业务类型")]
public string BusinessType { set; get; }
public EnumBusinessType BusinessType { get; set; }
}
/// <summary>
@ -66,7 +66,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "业务类型")]
[ImporterHeader(Name = "业务类型")]
public string BusinessType { set; get; }
public EnumBusinessType BusinessType { get; set; }
}
/// <summary>
@ -100,7 +100,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
[Display(Name = "业务类型")]
[ExporterHeader(DisplayName = "业务类型")]
public string BusinessType { set; get; }
public EnumBusinessType BusinessType { get; set; }
}
}

8
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Controls/CentralizedControlDtoBase.cs

@ -31,7 +31,7 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
/// <summary>
/// 是否开放状态
/// </summary>
public int State { set; get; }
public bool State { set; get; }
}
@ -70,7 +70,7 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
/// <summary>
/// 是否开放状态
/// </summary>
public int State { set; get; }
public bool State { set; get; }
public Guid BranchId { get ; set ; }
}
public class CentralizedControlImportDto
@ -93,7 +93,7 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
/// <summary>
/// 是否开放状态
/// </summary>
public int State { set; get; }
public bool State { set; get; }
}
@ -124,7 +124,7 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
/// 是否开放状态
/// </summary>
[ExporterHeader(DisplayName = "是否开放状态")]
public int State { set; get; }
public bool State { set; get; }
}

4
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs

@ -417,7 +417,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// 业务类别
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }
/// <summary>
/// 版本
@ -465,7 +465,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// 业务类别
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }
/// <summary>
/// 版本

142
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs

@ -2,19 +2,23 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using NPOI.Util;
using SettleAccount.Bases;
using SettleAccount.Domain.BQ;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.RepositoryBase;
@ -37,11 +41,32 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// </summary>
private readonly INormalEfCoreRepository<PUB_SA_DETAIL, Guid> _pubSaDetailRepository;
/// <summary>
/// PUB可结算仓储
/// </summary>
private readonly INormalEfCoreRepository<PUB_CAN_SA, Guid> _pubCanSaRepository;
/// <summary>
/// PUB可结算明细仓储
/// </summary>
private readonly INormalEfCoreRepository<PUB_CAN_SA_DETAIL, Guid> _pubCanSaDetailRepository;
/// <summary>
/// PUB不可结算明细仓储
/// </summary>
private readonly INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> _pubNotSaDetailRepository;
/// <summary>
/// 销售价格仓储
/// </summary>
private readonly INormalEfCoreRepository<PriceList, Guid> _priceListRepository;
/// <summary>
/// 构造
/// </summary>
public PUB_SA_SERVICE(INormalEfCoreRepository<PUB_SA, Guid> repository,
INormalEfCoreRepository<PUB_SA_DETAIL, Guid> pubSaDetailRepository,
INormalEfCoreRepository<PriceList, Guid> priceListRepository,
IDistributedCache<PUB_SA> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
@ -50,6 +75,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
{
_repository = repository;
_pubSaDetailRepository = pubSaDetailRepository;
_priceListRepository = priceListRepository;
}
#region 直供件
@ -67,27 +93,75 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var result = await _exportImporter.UploadExcelImport<ZGJ_PUB_SA_DETAIL_IMPORT_DTO>(files, _excelImportService);
var _ls = ObjectMapper.Map<List<ZGJ_PUB_SA_DETAIL_IMPORT_DTO>, List<PUB_SA_DETAIL>>(result);
var billNum = GuidGenerator.Create().ToString();
//销售价格
var priceListEntitys = await _priceListRepository.GetAllAsync();
var pubSaBillNum = OrderNumberGenerator.GenerateOrderNumber("SA");
var pubSa = new PUB_SA()
{
BillNum = billNum,
BillNum = pubSaBillNum,
State = "1"
};
_ls.ForEach(s =>
{
string[] luArr = s.LU.Split(" ");
var lus = luArr.Reverse();
var result = lus.Aggregate(" ", (current, index) => current + index);
if (s.LU != null)
{
List<string> luList = s.LU.Split(" ").ToList();
s.LU = luList[0].Replace(" ", "");
if (luList.Count > 1)
{
luList.RemoveAt(0);
luList.Reverse();
var luAssemble = luList.Select(t => t.Replace(" ", ""));
s.LU += luAssemble.Aggregate(" ", (current, index) => current + index);
}
}
//s.LU = s.LU.Replace(" ", "").Replace(" ", " ");
s.BillNum = billNum;
s.Site = "直供件";
s.LU = s.LU;
s.BillNum = pubSaBillNum;
s.Site = "XX工厂";
s.KeyCode = s.LU + s.PN;
//根据物料号、结算日期获取价格
var priceListEntity = priceListEntitys.Find(t => t.LU == s.LU && s.SettleDate > t.BeginTime && s.SettleDate < t.EndTime);
s.Price = priceListEntity?.Price ?? 0;
});
//await _repository.InsertAsync(pubSa);
//await _pubSaDetailRepository.InsertManyAsync(_ls);
//可结算
var pubCanSaBillNum = OrderNumberGenerator.GenerateOrderNumber("INV");
var pubCanSa = new PUB_CAN_SA()
{
BillNum = pubCanSaBillNum,
SettleBillNum = pubSaBillNum,
State = SettleBillState.,
BusinessType = EnumBusinessType.ZhiGongJian
};
//不可结算 结算分组号码(根据价格区分结算、不可结算)
var pubNotSaGroupNum = _ls.FindAll(t => t.Price != 0).Select(t => t.GroupNum).Distinct();
var pubSaDetailsCanSe = _ls.FindAll(t => pubNotSaGroupNum.Contains(t.GroupNum) == false);
var pubSaDetailsNotCanSe = _ls.FindAll(t => pubNotSaGroupNum.Contains(t.GroupNum) == true);
//可结算
var pubCanSaDetails = ObjectMapper.Map<List<PUB_SA_DETAIL>, List<PUB_CAN_SA_DETAIL>>(pubSaDetailsCanSe);
//不可结算
var pubNotSaDetails = ObjectMapper.Map<List<PUB_SA_DETAIL>, List<PUB_NOT_SA_DETAIL>>(pubSaDetailsNotCanSe);
//添加入库
await _repository.InsertAsync(pubSa);
await _pubSaDetailRepository.InsertManyAsync(_ls);
if (pubCanSaDetails.Count > 0)
{
pubCanSa.InvGroupNum = pubCanSaDetails.Count.ToString();
await _pubCanSaRepository.InsertAsync(pubCanSa);
await _pubCanSaDetailRepository.InsertManyAsync(pubCanSaDetails);
}
if (pubNotSaDetails.Count > 0)
{
await _pubNotSaDetailRepository.InsertManyAsync(pubNotSaDetails);
}
return ApplicationConsts.SuccessStr;
}
@ -129,7 +203,53 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[HttpPost]
public async Task DeleteAsync(Guid id)
{
await _repository.DeleteAsync(id);
//结算主表
PUB_SA pubSaDelEntity;
//结算明细
IEnumerable<PUB_SA_DETAIL> pubSaDetailDelEntitys = default;
//可结算主表
IEnumerable<PUB_CAN_SA> pubCanSaDelEntitys = default;
//可结算明细
IEnumerable<PUB_CAN_SA_DETAIL> pubCanSaDetailDelEntitys = default;
//不可结算
IEnumerable<PUB_NOT_SA_DETAIL> pubNotSaDetailDelEntitys = default;
pubSaDelEntity = await _repository.FindAsync(id);
if (pubSaDelEntity != null) return;
//结算单据
string pubSaBillNum = pubSaDelEntity.BillNum;
pubCanSaDelEntitys = _pubCanSaRepository.Where(t => t.SettleBillNum == pubSaBillNum);
//验证可结算主表状态
if (pubCanSaDelEntitys.Any(t => t.State != SettleBillState.))
{
throw new UserFriendlyException($"该单据可结算单状态无法删除!");
}
pubCanSaDetailDelEntitys = _pubCanSaDetailRepository.Where(t => t.SettleBillNum == pubSaBillNum);
pubNotSaDetailDelEntitys = _pubNotSaDetailRepository.Where(t => t.SettleBillNum == pubSaBillNum);
//删除
await _repository.DeleteAsync(pubSaDelEntity);
if (pubSaDetailDelEntitys != null)
{
await _pubSaDetailRepository.DeleteManyAsync(pubSaDetailDelEntitys);
}
if (pubCanSaDelEntitys != null)
{
await _pubCanSaRepository.DeleteManyAsync(pubCanSaDelEntitys);
}
if (pubCanSaDetailDelEntitys != null)
{
await _pubCanSaDetailRepository.DeleteManyAsync(pubCanSaDetailDelEntitys);
}
if (pubNotSaDetailDelEntitys != null)
{
await _pubNotSaDetailRepository.DeleteManyAsync(pubNotSaDetailDelEntitys);
}
}
#endregion

58
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs

@ -1,9 +1,12 @@
using Microsoft.AspNetCore.Authorization;
using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Win.Abp.Snowflakes;
@ -72,6 +75,59 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
var dtos = ObjectMapper.Map<List<CentralizedControl>, List<CentralizedControlDto>>(entities);
return new PagedResultDto<CentralizedControlDto>(totalCount, dtos);
}
/// <summary>
/// 添加
/// </summary>
[HttpPost]
public async Task<CentralizedControlDto> CreateAsync(CentralizedControlCreateDto input)
{
var _first = _repository.Where(p => p.Version == input.Version).FirstOrDefault();
if (_first != null)
{
throw new BusinessException("001", "已经存在该期间,不能重复添加!");
}
var entity = new CentralizedControl(
GuidGenerator.Create(),
input.BranchId,
input.Year,
input.Period,
input.Year + input.Period,
input.State
);
await _repository.InsertAsync(entity);
var dto = ObjectMapper.Map<CentralizedControl, CentralizedControlDto>(entity);
return dto;
}
/// <summary>
/// 删除实体
/// </summary>
/// <param name="id">ID</param>
/// <returns>无</returns>
[HttpDelete]
public async Task DeleteAsync(Guid id)
{
var entity = await _repository.GetAsync(id);
await _repository.DeleteAsync(id);
}
/// <summary>
/// 按IDs删除实体列表
/// </summary>
[HttpPost]
public async Task<bool> DeleteListAsync(List<Guid> ids)
{
var _query = _repository.Where(p => ids.Contains(p.Id));
int i = await _query.BatchDeleteAsync();
return i == 0;
}
#endregion
#region 开启、关闭

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs

@ -25,6 +25,12 @@ public class BBAC_SA:FullAuditedAggregateRoot<Guid>
[Display(Name = "状态")]
public string State { get; set; } = null!;
/// <summary>
/// 选择工厂导入
/// </summary>
[Display(Name = "工厂地点")]
public string Site { get; set; } = null!;
public BBAC_SA(Guid guid, int version, string billNum, string dNBillNum, string state)
{
Id = guid;

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

@ -28,6 +28,12 @@ public class HBPO_CAN_SA : SA_CAN_BASE_MAIN
//[Display(Name = "明细记录行数")]
//public string InvGroupNum { get; set; } = null!;
/// <summary>
/// 工厂地点
/// </summary>
[Display(Name = "工厂地点")]
public string Site { get; set; } = null!;
public HBPO_CAN_SA(Guid guid, int version, string settleBillNum, string billNum, SettleBillState state, string invGroupNum)
{
Version = version;

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs

@ -29,6 +29,12 @@ public class HBPO_SA :FullAuditedAggregateRoot<Guid>
[Display(Name = "明细记录行数")]
public string RecordCount { get; set; } = null!;
/// <summary>
/// 工厂地点
/// </summary>
[Display(Name = "工厂地点")]
public string Site { get; set; } = null!;
public HBPO_SA(Guid guid, int version, string billNum, string dNBillNum, string state, string recordCount)
{
this.Id= guid;

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

@ -29,13 +29,13 @@ public class INVOICE_GRP : FullAuditedAggregateRoot<Guid>
/// 1-HBPO 2-BBAC(和买单件一起开票,扣减库存时要注意分开) 3-JIT 4-备件、5-印度件
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; } = null!;
public EnumBusinessType BusinessType { get; set; }
[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)
public INVOICE_GRP(Guid guid, string realnvBillNum, string invbillNum, decimal amt, decimal taxAmt, string invGroupNum, string fileName, EnumBusinessType businessType, InvoiceBillState state)
{
Id= guid;
RealnvBillNum = realnvBillNum;

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

@ -26,12 +26,12 @@ public class PUB_CAN_SA : SA_CAN_BASE_MAIN
///// 1、JIT 2、买单件 3、备件 3、印度件
///// </summary>
[Display(Name = "业务分类")]
public string BusinessType { get; set; } = null!;
public EnumBusinessType BusinessType { get; set; }
//[Display(Name = "明细记录行数")]
//public string InvGroupNum { get; set; } = null!;
public PUB_CAN_SA(int version, string settleBillNum, string billNum, SettleBillState state, string businessType, string invGroupNum)
public PUB_CAN_SA(int version, string settleBillNum, string billNum, SettleBillState state, EnumBusinessType businessType, string invGroupNum)
{
Version = version;
SettleBillNum = settleBillNum;
@ -109,7 +109,7 @@ public class PUB_CAN_SA_DETAIL : SA_CAN_BASE
/// 1、JIT 2、买单件 3、备件 3、印度件
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; } = null!;
public EnumBusinessType BusinessType { get; set; }
/// <summary>
/// 对应字段DeliveryNode
@ -117,7 +117,7 @@ public class PUB_CAN_SA_DETAIL : SA_CAN_BASE
//[Display(Name = "结算分组")]
//public string GroupNum { get; set; } = null!;
public PUB_CAN_SA_DETAIL(string keyCode, int version, string billNum, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, string invGroupNum, DateTime settleDate, string businessType, string groupNum)
public PUB_CAN_SA_DETAIL(string keyCode, int version, string billNum, string settleBillNum, string lU, string pN, string site, decimal qty, decimal price, string invGroupNum, DateTime settleDate, EnumBusinessType businessType, string groupNum)
{
KeyCode = keyCode;
Version = version;

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_NOT_SA_DETAIL.cs

@ -1,6 +1,8 @@
using SettleAccount.Bases;
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "PUB不可结算导入明细")]
@ -64,11 +66,11 @@ public class PUB_NOT_SA_DETAIL : SA_NOT_BASE
//[Display(Name = "结算日期(收货日期)")]
//public DateTime SettleDate { get; set; }
[Display(Name = "业务分类")]
public string BusinessType { get; set; } = null!;
public EnumBusinessType BusinessType { get; set; }
//[Display(Name = "结算分组")]
//public string GroupNum { get; set; } = null!;
public PUB_NOT_SA_DETAIL(string keyCode, int version, string settleBillNum, string lU, string pN, string site, decimal qty, string extend1, string extend2, string extend3, decimal price, string invGroupNum, DateTime settleDate, string businessType, string groupNum)
public PUB_NOT_SA_DETAIL(string keyCode, int version, string settleBillNum, string lU, string pN, string site, decimal qty, string extend1, string extend2, string extend3, decimal price, string invGroupNum, DateTime settleDate, EnumBusinessType businessType, string groupNum)
{
KeyCode = keyCode;
Version = version;

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

@ -1,8 +1,7 @@
using SettleAccount.Bases;
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "PUB待扣减实体")]
@ -42,7 +41,7 @@ public class PUB_PD_DETAIL :PD_BASE
/// 1、JIT 2、买单件 3、备件 3、印度件
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; } = null!;
public EnumBusinessType BusinessType { get; set; }
//[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; } = null!;
@ -53,7 +52,7 @@ public class PUB_PD_DETAIL :PD_BASE
//[Display(Name = "结算分组")]
//public string GroupNum { get; set; } = null!;
public PUB_PD_DETAIL(Guid guid, string keyCode, int version, string billNum, string lU, string rELU, string pN, string rEPN, string site, decimal qty, decimal price, string businessType, string invGroupNum, DateTime settleDate, string groupNum)
public PUB_PD_DETAIL(Guid guid, string keyCode, int version, string billNum, string lU, string rELU, string pN, string rEPN, string site, decimal qty, decimal price, EnumBusinessType businessType, string invGroupNum, DateTime settleDate, string groupNum)
{
Id = guid;
KeyCode = keyCode;

8
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SE_DETAIL.cs

@ -1,9 +1,7 @@
using SettleAccount.Bases;
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "PUB发运数据")]
@ -37,7 +35,7 @@ public class PUB_SE_DETAIL :SE_BASE
/// 1、JIT 2、买单件 3、备件 3、印度件
/// </summary>
[Display(Name = "业务分类")]
public string BusinessType { get; set; } = null!;
public EnumBusinessType BusinessType { get; set; }
[Display(Name = "订单时间")]
public DateTime BeginDate { get; set; }
@ -48,7 +46,7 @@ public class PUB_SE_DETAIL :SE_BASE
//[Display(Name = "Wms发货单号")]
//public string WmsBillNum { get; set; } = null!;
public PUB_SE_DETAIL(Guid guid, string keyCode, int version, string lU, string pN, decimal qty, string extend1, string extend2, string extend3, string businessType, DateTime beginDate, DateTime shippingDate, string wmsBillNum)
public PUB_SE_DETAIL(Guid guid, string keyCode, int version, string lU, string pN, decimal qty, string extend1, string extend2, string extend3, EnumBusinessType businessType, DateTime beginDate, DateTime shippingDate, string wmsBillNum)
{
Id=guid;
KeyCode = keyCode;

7
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/TB_RePartsRelationship.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;
@ -23,9 +24,9 @@ public class TB_RePartsRelationship : FullAuditedAggregateRoot<Guid>
[Display(Name = "客户编码")]
public string ClientCode { set; get; } = null!;
[Display(Name = "业务类型")]
public string BusinessType { set; get; } = null!;
public EnumBusinessType BusinessType { get; set; }
public TB_RePartsRelationship(string lU, string repLU, string clientCode, string businessType)
public TB_RePartsRelationship(string lU, string repLU, string clientCode, EnumBusinessType businessType)
{
LU = lU;
RepLU = repLU;
@ -33,7 +34,7 @@ public class TB_RePartsRelationship : FullAuditedAggregateRoot<Guid>
BusinessType = businessType;
}
public void Update(string lU, string repLU, string clientCode, string businessType)
public void Update(string lU, string repLU, string clientCode, EnumBusinessType businessType)
{
LU = lU;
RepLU = repLU;

8
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Controls/CentralizedControl.cs

@ -29,7 +29,7 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
/// <summary>
/// 是否开放状态
/// </summary>
public int State { set; get; }
public bool State { set; get; }
public void SetValue(Guid id,Guid branchId)
@ -41,11 +41,11 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
public void OpenVersion()
{
State = 0;
State = true;
}
public void ClosedVersion()
{
State = 1;
State = false;
}
@ -60,7 +60,7 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
public CentralizedControl(
Guid id,
Guid branchId,
string year, string period, string version, int state):base(id)
string year, string period, string version, bool state):base(id)
{
BranchId = branchId;
Year = year;

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceList.cs

@ -85,7 +85,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// 业务类别
/// </summary>
[Display(Name = "业务类别")]
public string BusinessType { get; set; }
public EnumBusinessType BusinessType { get; set; }

40
code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBusinessType.cs

@ -0,0 +1,40 @@
using System.ComponentModel.DataAnnotations;
namespace Win.Sfs.SettleAccount
{
/// <summary>
/// 业务类别
/// </summary>
public enum EnumBusinessType
{
/// <summary>
///未定义
/// </summary>
[Display(Name = "未定义")]
None = 0,
/// <summary>
///直供件
/// </summary>
[Display(Name = "直供件")]
ZhiGongJian = 1,
/// <summary>
///买单件
/// </summary>
[Display(Name = "买单件")]
MaiDanJian = 2,
/// <summary>
///备件
/// </summary>
[Display(Name = "备件")]
BeiJian = 3,
/// <summary>
///印度件
/// </summary>
[Display(Name = "印度件")]
YingDuJian = 4
}
}

3992
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714030100_20230714-1.Designer.cs

File diff suppressed because it is too large

53
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714030100_20230714-1.cs

@ -0,0 +1,53 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202307141 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "Site",
table: "Set_HBPO_SA",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Site",
table: "Set_HBPO_CAN_SA",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Site",
table: "Set_BBAC_SA",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Site",
table: "Set_BBAC_CAN_SA",
type: "nvarchar(max)",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Site",
table: "Set_HBPO_SA");
migrationBuilder.DropColumn(
name: "Site",
table: "Set_HBPO_CAN_SA");
migrationBuilder.DropColumn(
name: "Site",
table: "Set_BBAC_SA");
migrationBuilder.DropColumn(
name: "Site",
table: "Set_BBAC_CAN_SA");
}
}
}

3992
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714033202_20230714-2.Designer.cs

File diff suppressed because it is too large

29
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714033202_20230714-2.cs

@ -0,0 +1,29 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202307142 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<bool>(
name: "State",
table: "Set_control",
type: "bit",
nullable: false,
oldClrType: typeof(int),
oldType: "int");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "State",
table: "Set_control",
type: "int",
nullable: false,
oldClrType: typeof(bool),
oldType: "bit");
}
}
}

3992
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714063941_20230714-3.Designer.cs

File diff suppressed because it is too large

181
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714063941_20230714-3.cs

@ -0,0 +1,181 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202307143 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "BusinessType",
table: "Set_TB_RePartsRelationship",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "BusinessType",
table: "Set_PUB_SE_DETAIL",
type: "int",
maxLength: 50,
nullable: false,
defaultValue: 0,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "BusinessType",
table: "Set_PUB_PD_DETAIL",
type: "int",
maxLength: 50,
nullable: false,
defaultValue: 0,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "BusinessType",
table: "Set_PUB_NOT_SA_DETAIL",
type: "int",
maxLength: 50,
nullable: false,
defaultValue: 0,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "BusinessType",
table: "Set_PUB_CAN_SA_DETAIL",
type: "int",
maxLength: 50,
nullable: false,
defaultValue: 0,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "BusinessType",
table: "Set_PUB_CAN_SA",
type: "int",
maxLength: 50,
nullable: false,
defaultValue: 0,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "BusinessType",
table: "Set_PriceList",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<int>(
name: "BusinessType",
table: "Set_INVOICE_GRP",
type: "int",
maxLength: 50,
nullable: false,
defaultValue: 0,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "BusinessType",
table: "Set_TB_RePartsRelationship",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<string>(
name: "BusinessType",
table: "Set_PUB_SE_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(int),
oldType: "int",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "BusinessType",
table: "Set_PUB_PD_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(int),
oldType: "int",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "BusinessType",
table: "Set_PUB_NOT_SA_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(int),
oldType: "int",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "BusinessType",
table: "Set_PUB_CAN_SA_DETAIL",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(int),
oldType: "int",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "BusinessType",
table: "Set_PUB_CAN_SA",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(int),
oldType: "int",
oldMaxLength: 50);
migrationBuilder.AlterColumn<string>(
name: "BusinessType",
table: "Set_PriceList",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<string>(
name: "BusinessType",
table: "Set_INVOICE_GRP",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(int),
oldType: "int",
oldMaxLength: 50);
}
}
}

48
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

@ -79,6 +79,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Site")
.HasColumnType("nvarchar(max)");
b.Property<int>("State")
.HasMaxLength(50)
.HasColumnType("int");
@ -446,6 +449,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Site")
.HasColumnType("nvarchar(max)");
b.Property<string>("State")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@ -1019,6 +1025,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Site")
.HasColumnType("nvarchar(max)");
b.Property<int>("State")
.HasMaxLength(50)
.HasColumnType("int");
@ -1374,6 +1383,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Site")
.HasColumnType("nvarchar(max)");
b.Property<string>("State")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@ -1897,9 +1909,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<decimal>("Amt")
.HasColumnType("decimal(18,2)");
b.Property<string>("BusinessType")
b.Property<int>("BusinessType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
@ -2351,9 +2363,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("BusinessType")
b.Property<int>("BusinessType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
@ -2424,9 +2436,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("BusinessType")
b.Property<int>("BusinessType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
@ -2519,9 +2531,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("BusinessType")
b.Property<int>("BusinessType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
@ -2630,9 +2642,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("BusinessType")
b.Property<int>("BusinessType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
@ -2893,9 +2905,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<DateTime>("BeginDate")
.HasColumnType("datetime2");
b.Property<string>("BusinessType")
b.Property<int>("BusinessType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
@ -3042,8 +3054,8 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("BusinessType")
.HasColumnType("nvarchar(max)");
b.Property<int>("BusinessType")
.HasColumnType("int");
b.Property<string>("ClientCode")
.HasColumnType("nvarchar(max)");
@ -3437,8 +3449,8 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("Remark")
.HasColumnType("nvarchar(max)");
b.Property<int>("State")
.HasColumnType("int");
b.Property<bool>("State")
.HasColumnType("bit");
b.Property<string>("Version")
.HasColumnType("nvarchar(max)");
@ -3560,8 +3572,8 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<Guid>("BranchId")
.HasColumnType("uniqueidentifier");
b.Property<string>("BusinessType")
.HasColumnType("nvarchar(max)");
b.Property<int>("BusinessType")
.HasColumnType("int");
b.Property<string>("ClientCode")
.HasColumnType("nvarchar(max)");

Loading…
Cancel
Save