diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Program.cs b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Program.cs
index 55acc2bc..90ac0bf8 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Program.cs
+++ b/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();
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
index d4ee4f4b..269d3996 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
+++ b/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
///业务类别
///
[Display(Name = "业务类别")]
- public string BusinessType { get; set; }
+ public EnumBusinessType BusinessType { get; set; }
///
/// 发票状态
///
@@ -103,7 +103,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///业务类别
///
[ExporterHeader(DisplayName = "业务类别")]
- public string BusinessType { get; set; }
+ public EnumBusinessType BusinessType { get; set; }
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_CAN_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_CAN_SA_DTO.cs
index 5f675910..6d7a28e4 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_CAN_SA_DTO.cs
+++ b/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
///业务分类
///
[Display(Name = "业务分类")]
- public string BusinessType { get; set; }
+ public EnumBusinessType BusinessType { get; set; }
///
///明细记录行数
///
@@ -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
///业务类别
///
[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
///业务类别
///
[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
///业务类别
///
[Display(Name = "业务类别")]
- public string BusinessType { get; set; }
+ public EnumBusinessType BusinessType { get; set; }
///
///
///
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_NOT_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_NOT_SA_DTO.cs
index 29988b1e..28fabf13 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_NOT_SA_DTO.cs
+++ b/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
///业务类别
///
[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
///业务类别
///
[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; }
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs
index 59ddc9f1..c5e80aca 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs
+++ b/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
///
/// 零件号
///
+ [Display(Name = "零件号")]
+ [Required(ErrorMessage = "{0}不能为空")]
[ImporterHeader(Name = "Material")]
public string LU { get; set; }
@@ -97,9 +99,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///
/// 导出
///
- public class PUB_SA_EXPORT_DTO
+ public class PUB_SA_EXPORT_DTO
{
-
+
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/TB_RePartsRelationship_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/TB_RePartsRelationship_DTO.cs
index 20fa4d43..6b7c4e21 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/TB_RePartsRelationship_DTO.cs
+++ b/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
/// 业务类型
///
[Display(Name = "业务类型")]
- public string BusinessType { set; get; }
+ public EnumBusinessType BusinessType { get; set; }
}
///
@@ -66,7 +66,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///
[Display(Name = "业务类型")]
[ImporterHeader(Name = "业务类型")]
- public string BusinessType { set; get; }
+ public EnumBusinessType BusinessType { get; set; }
}
///
@@ -100,7 +100,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///
[Display(Name = "业务类型")]
[ExporterHeader(DisplayName = "业务类型")]
- public string BusinessType { set; get; }
+ public EnumBusinessType BusinessType { get; set; }
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Controls/CentralizedControlDtoBase.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Controls/CentralizedControlDtoBase.cs
index ec330e85..6d1c055d 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Controls/CentralizedControlDtoBase.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Controls/CentralizedControlDtoBase.cs
@@ -31,7 +31,7 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
///
/// 是否开放状态
///
- public int State { set; get; }
+ public bool State { set; get; }
}
@@ -70,7 +70,7 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
///
/// 是否开放状态
///
- 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
///
/// 是否开放状态
///
- public int State { set; get; }
+ public bool State { set; get; }
}
@@ -124,7 +124,7 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
/// 是否开放状态
///
[ExporterHeader(DisplayName = "是否开放状态")]
- public int State { set; get; }
+ public bool State { set; get; }
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs
index 0a1c64b5..d9c012d3 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs
@@ -417,7 +417,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// 业务类别
///
[Display(Name = "业务类别")]
- public string BusinessType { get; set; }
+ public EnumBusinessType BusinessType { get; set; }
///
/// 版本
@@ -465,7 +465,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// 业务类别
///
[Display(Name = "业务类别")]
- public string BusinessType { get; set; }
+ public EnumBusinessType BusinessType { get; set; }
///
/// 版本
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
index 238b4ed8..2527a759 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
+++ b/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
///
private readonly INormalEfCoreRepository _pubSaDetailRepository;
+ ///
+ /// PUB可结算仓储
+ ///
+ private readonly INormalEfCoreRepository _pubCanSaRepository;
+
+ ///
+ /// PUB可结算明细仓储
+ ///
+ private readonly INormalEfCoreRepository _pubCanSaDetailRepository;
+
+ ///
+ /// PUB不可结算明细仓储
+ ///
+ private readonly INormalEfCoreRepository _pubNotSaDetailRepository;
+
+ ///
+ /// 销售价格仓储
+ ///
+ private readonly INormalEfCoreRepository _priceListRepository;
+
///
/// 构造
///
public PUB_SA_SERVICE(INormalEfCoreRepository repository,
INormalEfCoreRepository pubSaDetailRepository,
+ INormalEfCoreRepository priceListRepository,
IDistributedCache 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(files, _excelImportService);
var _ls = ObjectMapper.Map, List>(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 =>
+ _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 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>(pubSaDetailsCanSe);
+ //不可结算
+ var pubNotSaDetails = ObjectMapper.Map, List>(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 pubSaDetailDelEntitys = default;
+ //可结算主表
+ IEnumerable pubCanSaDelEntitys = default;
+ //可结算明细
+ IEnumerable pubCanSaDetailDelEntitys = default;
+ //不可结算
+ IEnumerable 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
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs
index 9efa0c95..5bcff4f4 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Controls/CentralizedControlAppService.cs
+++ b/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>(entities);
return new PagedResultDto(totalCount, dtos);
}
+
+ ///
+ /// 添加
+ ///
+ [HttpPost]
+ public async Task 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(entity);
+ return dto;
+
+ }
+
+ ///
+ /// 删除实体
+ ///
+ /// ID
+ /// 无
+ [HttpDelete]
+ public async Task DeleteAsync(Guid id)
+ {
+ var entity = await _repository.GetAsync(id);
+ await _repository.DeleteAsync(id);
+ }
+
+ ///
+ /// 按IDs删除实体列表
+ ///
+ [HttpPost]
+ public async Task DeleteListAsync(List ids)
+ {
+ var _query = _repository.Where(p => ids.Contains(p.Id));
+ int i = await _query.BatchDeleteAsync();
+
+ return i == 0;
+ }
#endregion
#region 开启、关闭
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs
index 8dca5bdc..bbc31cf2 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs
@@ -25,6 +25,12 @@ public class BBAC_SA:FullAuditedAggregateRoot
[Display(Name = "状态")]
public string State { get; set; } = null!;
+ ///
+ /// 选择工厂导入
+ ///
+ [Display(Name = "工厂地点")]
+ public string Site { get; set; } = null!;
+
public BBAC_SA(Guid guid, int version, string billNum, string dNBillNum, string state)
{
Id = guid;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_CAN_SA.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_CAN_SA.cs
index 12c402be..6895afcc 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_CAN_SA.cs
+++ b/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!;
+ ///
+ /// 工厂地点
+ ///
+ [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;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs
index 8ff81430..7ae1443f 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs
@@ -29,6 +29,12 @@ public class HBPO_SA :FullAuditedAggregateRoot
[Display(Name = "明细记录行数")]
public string RecordCount { get; set; } = null!;
+ ///
+ /// 工厂地点
+ ///
+ [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;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_GRP.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_GRP.cs
index 66113aa0..ae79fb06 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_GRP.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_GRP.cs
@@ -29,13 +29,13 @@ public class INVOICE_GRP : FullAuditedAggregateRoot
/// 1-HBPO 2-BBAC(和买单件一起开票,扣减库存时要注意分开) 3-JIT 4-备件、5-印度件
///
[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;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_CAN_SA.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_CAN_SA.cs
index f1ada17f..58c1ff96 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_CAN_SA.cs
+++ b/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、印度件
/////
[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、印度件
///
[Display(Name = "业务类别")]
- public string BusinessType { get; set; } = null!;
+ public EnumBusinessType BusinessType { get; set; }
///
/// 对应字段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;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_NOT_SA_DETAIL.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_NOT_SA_DETAIL.cs
index b844def0..3317e6b4 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_NOT_SA_DETAIL.cs
+++ b/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;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_PD_DETAIL.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_PD_DETAIL.cs
index eae34c5a..e804b30e 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_PD_DETAIL.cs
+++ b/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、印度件
///
[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;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SE_DETAIL.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SE_DETAIL.cs
index 7e34769d..47e9761f 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SE_DETAIL.cs
+++ b/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、印度件
///
[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;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/TB_RePartsRelationship.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/TB_RePartsRelationship.cs
index 42388ae4..e2ad8e38 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/TB_RePartsRelationship.cs
+++ b/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
[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
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;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Controls/CentralizedControl.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Controls/CentralizedControl.cs
index 27dc7461..cec06bd0 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Controls/CentralizedControl.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Controls/CentralizedControl.cs
@@ -29,7 +29,7 @@ namespace Win.Sfs.SettleAccount.Entities.Controls
///
/// 是否开放状态
///
- 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;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceList.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceList.cs
index b41079b9..1c8fa9f8 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceList.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceList.cs
@@ -85,7 +85,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// 业务类别
///
[Display(Name = "业务类别")]
- public string BusinessType { get; set; }
+ public EnumBusinessType BusinessType { get; set; }
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBusinessType.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBusinessType.cs
new file mode 100644
index 00000000..f7115879
--- /dev/null
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/EnumBusinessType.cs
@@ -0,0 +1,40 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace Win.Sfs.SettleAccount
+{
+ ///
+ /// 业务类别
+ ///
+ public enum EnumBusinessType
+ {
+ ///
+ ///未定义
+ ///
+ [Display(Name = "未定义")]
+ None = 0,
+
+ ///
+ ///直供件
+ ///
+ [Display(Name = "直供件")]
+ ZhiGongJian = 1,
+
+ ///
+ ///买单件
+ ///
+ [Display(Name = "买单件")]
+ MaiDanJian = 2,
+
+ ///
+ ///备件
+ ///
+ [Display(Name = "备件")]
+ BeiJian = 3,
+
+ ///
+ ///印度件
+ ///
+ [Display(Name = "印度件")]
+ YingDuJian = 4
+ }
+}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714030100_20230714-1.Designer.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714030100_20230714-1.Designer.cs
new file mode 100644
index 00000000..7824314e
--- /dev/null
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230714030100_20230714-1.Designer.cs
@@ -0,0 +1,3992 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+using Win.Sfs.SettleAccount;
+
+namespace Win.Sfs.SettleAccount.Migrations
+{
+ [DbContext(typeof(SettleAccountDbContext))]
+ [Migration("20230714030100_20230714-1")]
+ partial class _202307141
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("ProductVersion", "5.0.8")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_CAN_SA", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("InvGroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("SettleBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Site")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("State")
+ .HasMaxLength(50)
+ .HasColumnType("int");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_CAN_SA");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_CAN_SA_DETAIL", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Category")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("GroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("InvGroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsReturn")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("KeyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Price")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("Qty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("SettleBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("SettleDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Site")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_CAN_SA_DETAIL");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_NOT_SA_DETAIL", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Category")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("GroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("InvGroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsReturn")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("KeyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Price")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("Qty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("SettleBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("SettleDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Site")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_NOT_SA_DETAIL");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_PD_DETAIL", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("GroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("InvGroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("KeyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Price")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("Qty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("RELU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("REPN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("SettleDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Site")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_PD_DETAIL");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SA", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DNBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Site")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("State")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_SA");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SA_DETAIL", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Category")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("GroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsReturn")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("KeyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Price")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("Qty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("SettleDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Site")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_SA_DETAIL");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_DETAIL", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AssemblyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("BeginDate")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("InjectionCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("KeyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Qty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("SeqNumber")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ShippingDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.Property("WmsBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_SE_DETAIL");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_EDI", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AssemblyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("BeginDate")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Extend1")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Extend2")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Extend3")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Extend4")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("InjectionCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("KeyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Qty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("SeqNumber")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Site")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_SE_EDI");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_REPORT", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AssemblyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("BeginDate")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("EDIQty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("InjectionCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("KeyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Qty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("SeqNumber")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ShippingDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.Property("WmsBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_SE_REPORT");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_SA_REPORT", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AssemblyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Category")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("CustomerOfflineTime")
+ .HasColumnType("datetime2");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("EDIQty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("FixPrice")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("InjectionCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("KeyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("MateType")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("MaterialDes")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("MaterialNumber")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PJISSeqNumber")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("SEQty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("SeqNumber")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ShippingDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.Property("WMSQty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("WmsBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_SE_SA_REPORT");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.HBPO_CAN_SA", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property