diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
index ec00c4e8..071830a8 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
@@ -3,13 +3,8 @@
"CorsOrigins": "https://*.abc.com,http://localhost:9528,http://149.223.116.5:8088"
},
"ConnectionStrings": {
- "Default": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True",
+ "Default": "Server=dev.ccwin-in.com,13319;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True",
"SettleAccountService": "Server=dev.ccwin-in.com,13319;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;"
-
-
-
-
-
},
"Serilog": {
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Bases/RequestInputBase.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Bases/RequestInputBase.cs
new file mode 100644
index 00000000..9e1496a0
--- /dev/null
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Bases/RequestInputBase.cs
@@ -0,0 +1,21 @@
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using Volo.Abp.Application.Dtos;
+using Win.Sfs.Shared.Filter;
+
+namespace Win.Sfs.SettleAccount.Bases
+{
+ public class RequestInputBase: PagedAndSortedResultRequestDto
+ {
+ ///
+ /// 导出文件类型
+ ///
+ public int FileType { get; set; }
+
+ ///
+ /// 高级检索
+ ///
+ [Display(Name = "高级检索")]
+ public virtual List Filters { get; set; } = new List();
+ }
+}
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 4593c59b..0a1c64b5 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
@@ -2,10 +2,8 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
+using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.Shared.Filter;
namespace Win.Sfs.SettleAccount.Entities.Prices
@@ -50,81 +48,221 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
}
-
+ ///
+ /// 销售价格单导出
+ ///
public class PriceListExportDto
{
///
- /// 版本
+ /// 零件号
///
- [Display(Name = "版本")]
- [ExporterHeader(DisplayName = "版本",IsIgnore =true)]
- public string Version { set; get; }
- [ExporterHeader(DisplayName = "有效从")]
- public DateTime BeginDate { get; set; }
+ [Display(Name = "零件号")]
+ [ExporterHeader(DisplayName = "零件号")]
+ public string LU { get; set; }
+
///
- ///结算时间
+ /// 价格
///
- [ExporterHeader(DisplayName = "有效到")]
- public DateTime EndDate { get; set; }
+ [Display(Name = "价格")]
+ [ExporterHeader(DisplayName = "价格")]
+ public Decimal Price { set; get; }
+
///
- ///价格
+ /// 开始时间
///
- [ExporterHeader(DisplayName = "*金额")]
- public decimal Price { get; set; }
+ [Display(Name = "开始时间")]
+ [ExporterHeader(DisplayName = "开始时间")]
+ public DateTime BeginTime { set; get; }
+
///
- ///物料编号
+ /// 结束时间
///
- [ExporterHeader(DisplayName = "*物料编码")]
- public string MaterialCode { get; set; }
+ [Display(Name = "结束时间")]
+ [ExporterHeader(DisplayName = "结束时间")]
+ public DateTime EndTime { set; get; }
+
///
- ///价格类型
+ /// 客户编码
///
- [ExporterHeader(DisplayName = "*分销渠道",IsIgnore =true)]
- public int Type { get; set; }
- [ExporterHeader(DisplayName = "*客户")]
- public string CustomerCode { get; set; }
-
+ [Display(Name = "客户编码")]
+ [ExporterHeader(DisplayName = "客户编码")]
+ public string ClientCode { get; set; }
}
-
+ ///
+ /// 销售价格导入
+ ///
[ImportProject(Name = SettleAccountModuleName.PriceList)]
public class PriceListImportDto
{
/////
- ///// 版本
+ ///// ItemNo
/////
- //[Display(Name = "版本")]
- //public string Version { set; get; }
+ //[ImporterHeader(Name = "ItemNo")]
+ //public string ItemNo { get; set; }
+
///
- ///开始时间
+ /// 零件号
///
- [ImporterHeader(Name = "有效从")]
- public DateTime BeginDate { get; set; }
+ [ImporterHeader(Name = "Part No.")]
+ public string PartNo { get; set; }
+
+ /////
+ ///// PartDescription
+ /////
+ //[ImporterHeader(Name = "PartDescription")]
+ //public string PartDescription { get; set; }
+
+ /////
+ ///// ES1
+ /////
+ //[ImporterHeader(Name = "ES1")]
+ //public string ES1 { get; set; }
+
+ /////
+ ///// ES2
+ /////
+ //[ImporterHeader(Name = "ES2")]
+ //public string ES2 { get; set; }
+
+ /////
+ ///// ZGS
+ /////
+ //[ImporterHeader(Name = "ZGS")]
+ //public string ZGS { get; set; }
+
+ /////
+ ///// UnitOfMeasure
+ /////
+ //[ImporterHeader(Name = "UnitOfMeasure")]
+ //public string UnitOfMeasure { get; set; }
+
+ /////
+ ///// Currency
+ /////
+ //[ImporterHeader(Name = "Currency")]
+ //public string Currency { get; set; }
+
+ /////
+ ///// PriceType
+ /////
+ //[ImporterHeader(Name = "PriceType")]
+ //public string PriceType { get; set; }
+
///
- ///结算时间
+ /// 价格
///
- [ImporterHeader(Name = "有效到")]
- public DateTime EndDate { get; set; }
+ [ImporterHeader(Name = "Total Price")]
+ public string TotalPrice { get; set; }
+
+ /////
+ ///// Base Price(Old)
+ /////
+ //[ImporterHeader(Name = "Base Price(Old)")]
+ //public string BasePriceOld { get; set; }
+
+ /////
+ ///// UnitOfOrder
+ /////
+ //[ImporterHeader(Name = "Unit of Order")]
+ //public string UnitOfOrder { get; set; }
+
+ /////
+ ///// 11000 - BBAC JIS
+ /////
+ //[ImporterHeader(Name = "11000 - BBAC JIS")]
+ //public string BBACJIS { get; set; }
+
///
- ///价格
+ /// 开始时间
///
- [ImporterHeader(Name = "*金额")]
- public decimal Price { get; set; }
+ [ImporterHeader(Name = "Valid From")]
+ public string ValidFrom { get; set; }
+
///
- ///物料编号
+ /// 结束时间
///
- [ImporterHeader(Name = "*物料编码")]
- public string MaterialCode { get; set; }
+ [ImporterHeader(Name = "Valid To")]
+ public string ValidTo { get; set; }
+
+ /////
+ ///// ProductionCountry
+ /////
+ //[ImporterHeader(Name = "Production Country")]
+ //public string ProductionCountry { get; set; }
+
///
- ///价格类型
+ /// 客户编码
///
- [ImporterHeader(Name = "*分销渠道")]
- public int Type { get; set; }
- [ImporterHeader(Name = "*客户")]
- public string CustomerCode { get; set; }
+ [ImporterHeader(Name = "Plant")]
+ public string Plant { get; set; }
- }
+ /////
+ ///// Transport Term
+ /////
+ //[ImporterHeader(Name = "Transport Term")]
+ //public string TransportTerm { get; set; }
+
+ /////
+ ///// Transport Term City
+ /////
+ //[ImporterHeader(Name = "Transport Term City")]
+ //public string TransportTermCity { get; set; }
+
+ /////
+ ///// Transport Term Country
+ /////
+ //[ImporterHeader(Name = "Transport Term Country")]
+ //public string TransportTermCountry { get; set; }
+
+ /////
+ ///// Shipping Location
+ /////
+ //[ImporterHeader(Name = "Shipping Location")]
+ //public string ShippingLocation { get; set; }
+
+ /////
+ ///// Production Location
+ /////
+ //[ImporterHeader(Name = "Production Location")]
+ //public string ProductionLocation { get; set; }
+
+ /////
+ ///// VAT Shipping Country
+ /////
+ //[ImporterHeader(Name = "VAT Shipping Country")]
+ //public string VATShippingCountry { get; set; }
+ /////
+ ///// Minimum Order Quantity
+ /////
+ //[ImporterHeader(Name = "Minimum Order Quantity")]
+ //public string MinimumOrderQuantity { get; set; }
+
+ /////
+ ///// Payment
+ /////
+ //[ImporterHeader(Name = "Payment")]
+ //public string Payment { get; set; }
+
+ /////
+ ///// Packaging
+ /////
+ //[ImporterHeader(Name = "Packaging")]
+ //public string Packaging { get; set; }
+
+ /////
+ ///// Return
+ /////
+ //[ImporterHeader(Name = "Return")]
+ //public string Return { get; set; }
+
+ /////
+ ///// 3YP
+ /////
+ //[ImporterHeader(Name = "3YP")]
+ //public string YP3 { get; set; }
+ }
public class PriceListRequestDto : PagedAndSortedResultRequestDto
{
@@ -149,126 +287,76 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
public virtual List Filters { get; set; } = new List();
}
-
-
+ #region 备件价格
public class PriceListBJDto : EntityDto
{
///
- /// 版本
- ///
- [Display(Name = "版本")]
- public string Version { set; get; }
- ///
- ///开始时间
+ /// 零件号
///
- [Display(Name = "开始时间")]
- public DateTime BeginDate { get; set; }
- ///
- ///结算时间
- ///
- [Display(Name = "结算时间")]
- public DateTime EndDate { get; set; }
+ [Display(Name = "零件号")]
+ public string LU { get; set; }
+
///
- ///价格
+ /// 价格
///
[Display(Name = "价格")]
- public decimal Price { get; set; }
- ///
- ///物料编号
- ///
- [Display(Name = "物料编号")]
- public string MaterialCode { get; set; }
+ public Decimal Price { set; get; }
+
///
- ///价格类型
+ /// 客户编码
///
- [Display(Name = "价格类型")]
- public int Type { get; set; }
-
- public Guid ParentId { set; get; }
- [Display(Name = "客户")]
- public string CustomerCode { get; set; }
+ [Display(Name = "客户编码")]
+ public string ClientCode { get; set; }
}
-
-
+ [Display(Name = "备件价格")]
public class PriceListBJExportDto
{
///
- /// 版本
+ /// 零件号
///
- [Display(Name = "版本")]
- [ExporterHeader(DisplayName = "版本")]
- public string Version { set; get; }
- [ImporterHeader(Name = "有效从")]
- public DateTime BeginDate { get; set; }
- ///
- ///结算时间
- ///
- [ImporterHeader(Name = "有效到")]
- public DateTime EndDate { get; set; }
+ [ExporterHeader(DisplayName = "零件号")]
+ public string LU { get; set; }
+
///
- ///价格
+ /// 价格
///
- [ImporterHeader(Name = "*金额")]
+ [ExporterHeader(DisplayName = "价格")]
public decimal Price { get; set; }
+
///
- ///物料编号
- ///
- [ImporterHeader(Name = "*物料编码")]
- public string MaterialCode { get; set; }
- ///
- ///价格类型
+ ///客户编码
///
- [ImporterHeader(Name = "*分销渠道")]
- public int Type { get; set; }
- [ImporterHeader(Name = "*客户")]
- public string CustomerCode { get; set; }
+ [ExporterHeader(DisplayName = "客户编码")]
+ public string ClientCode { get; set; }
}
-
public class PriceListBJImportDto
{
- /////
- ///// 版本
- /////
- //[Display(Name = "版本")]
- //public string Version { set; get; }
///
- ///开始时间
- ///
- [ImporterHeader(Name = "有效从")]
- public DateTime BeginDate { get; set; }
- ///
- ///结算时间
+ /// 零件号
///
- [ImporterHeader(Name = "有效到")]
- public DateTime EndDate { get; set; }
+ [ImporterHeader(Name = "零件号")]
+ public string LU { get; set; }
+
///
- ///价格
+ /// 价格
///
- [ImporterHeader(Name = "*金额")]
+ [ImporterHeader(Name = "价格")]
public decimal Price { get; set; }
+
///
- ///物料编号
- ///
- [ImporterHeader(Name = "*物料编码")]
- public string MaterialCode { get; set; }
- ///
- ///价格类型
+ ///客户编码
///
- [ImporterHeader(Name = "*分销渠道")]
- public int Type { get; set; }
- [ImporterHeader(Name = "*客户")]
- public string CustomerCode { get; set; }
+ [ImporterHeader(Name = "客户编码")]
+ public string ClientCode { get; set; }
}
- public class PriceListBJRequestDto : PagedAndSortedResultRequestDto
+ public class PriceListBJRequestDto : RequestInputBase
{
-
-
[Display(Name = "开始时间")]
public DateTime BeginDate { get; set; }
[Display(Name = "结算时间")]
@@ -287,10 +375,115 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
public string Version { set; get; }
public virtual List Filters { get; set; } = new List();
+ }
+ #endregion
+
+ ///
+ /// 列表
+ ///
+ public class TB_PRICE_LISTDto : AuditedEntityDto
+ {
+ ///
+ /// 零件号
+ ///
+ [Display(Name = "零件号")]
+ public string LU { get; set; }
+
+ ///
+ /// 价格
+ ///
+ [Display(Name = "价格")]
+ public Decimal Price { set; get; }
+
+ ///
+ /// 开始时间
+ ///
+ [Display(Name = "开始时间")]
+ public DateTime BeginTime { set; get; }
+
+ ///
+ /// 结束时间
+ ///
+ [Display(Name = "结束时间")]
+ public DateTime EndTime { set; get; }
+
+ ///
+ /// 客户编码
+ ///
+ [Display(Name = "客户编码")]
+ public string ClientCode { get; set; }
+
+ ///
+ /// 业务类别
+ ///
+ [Display(Name = "业务类别")]
+ public string BusinessType { get; set; }
+
+ ///
+ /// 版本
+ ///
+ [Display(Name = "版本")]
+ public string Version { set; get; }
}
+ ///
+ /// 列表请求
+ ///
+ public class TB_PRICE_LIST_RequestDto : PagedAndSortedResultRequestDto
+ {
+ ///
+ /// 零件号
+ ///
+ [Display(Name = "零件号")]
+ public string LU { get; set; }
+ ///
+ /// 价格
+ ///
+ [Display(Name = "价格")]
+ public Decimal Price { set; get; }
+
+ ///
+ /// 开始时间
+ ///
+ [Display(Name = "开始时间")]
+ public DateTime BeginTime { set; get; }
+
+ ///
+ /// 结束时间
+ ///
+ [Display(Name = "结束时间")]
+ public DateTime EndTime { set; get; }
+
+ ///
+ /// 客户编码
+ ///
+ [Display(Name = "客户编码")]
+ public string ClientCode { get; set; }
+
+ ///
+ /// 业务类别
+ ///
+ [Display(Name = "业务类别")]
+ public string BusinessType { get; set; }
+ ///
+ /// 版本
+ ///
+ [Display(Name = "版本")]
+ public string Version { set; get; }
+
+ ///
+ /// 高级检索
+ ///
+ [Display(Name = "高级检索")]
+ public virtual List Filters { get; set; } = new List();
+
+ ///
+ /// 导出文件类型
+ ///
+ public int FileType { set; get; }
+ }
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CurdBaseAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CurdBaseAppService.cs
new file mode 100644
index 00000000..32881e7f
--- /dev/null
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CurdBaseAppService.cs
@@ -0,0 +1,150 @@
+using Castle.Core.Internal;
+using Magicodes.ExporterAndImporter.Core;
+using Magicodes.ExporterAndImporter.Csv;
+using Magicodes.ExporterAndImporter.Excel;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Shouldly;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Reflection;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Dtos;
+using Volo.Abp.Application.Services;
+using Volo.Abp.Domain.Entities;
+using Win.Sfs.BaseData.ImportExcelCommon;
+using Win.Sfs.SettleAccount.Constant;
+using Win.Sfs.SettleAccount.Entities.Prices;
+using Win.Sfs.SettleAccount.ExcelImporter;
+using Win.Sfs.Shared.RepositoryBase;
+
+namespace Win.Sfs.SettleAccount.Bases
+{
+ public abstract class CurdBaseAppService : ApplicationService
+ where TEntity : class, IEntity
+ where TEntityDto : class, IEntityDto, new()
+ where TRequestInput : RequestInputBase
+ where TImportInput : class, new()
+ where TExportDto : class, new()
+ {
+ private readonly INormalEfCoreRepository _repository;
+ private readonly IExcelImportAppService _excelImportService;
+
+ protected CurdBaseAppService(INormalEfCoreRepository repository, IExcelImportAppService excelImportService)
+ {
+ _repository = repository;
+ _excelImportService = excelImportService;
+ }
+
+ #region 导入、导出
+ ///
+ /// 获取导入模板
+ ///
+ [HttpPost("import-template")]
+ public virtual async Task ImportTemplateAsync()
+ {
+ await Task.CompletedTask;
+ return new Microsoft.AspNetCore.Mvc.OkResult();
+ }
+
+ ///
+ /// 导入
+ ///
+ [HttpPost]
+ [Route("Import")]
+ public virtual async Task ImportAsync([FromForm] IFormFileCollection files, string version)
+ {
+ await Task.CompletedTask;
+ return ApplicationConsts.SuccessStr;
+ }
+
+ ///
+ /// 导出
+ ///
+ [HttpPost]
+ [Route("Export")]
+ public virtual async Task ExportAsync(TRequestInput input)
+ {
+ IExporter _csv = new CsvExporter();
+ IExporter _excel = new ExcelExporter();
+
+ var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
+ var dtoDetails = ObjectMapper.Map, List>(entities);
+
+ var classDisplayName = typeof(TExportDto).GetCustomAttribute()?.Name ?? typeof(TExportDto).Name;
+ string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
+ byte[] result = null;
+
+ switch (input.FileType)
+ {
+ case 0:
+ result = await _csv.ExportAsByteArray(dtoDetails);
+ break;
+ case 1:
+ result = await _excel.ExportAsByteArray(dtoDetails);
+ break;
+ }
+ result.ShouldNotBeNull();
+
+ //保存导出文件到服务器存成二进制
+ await _excelImportService.SaveBlobAsync(
+ new SaveExcelImportInputDto
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+ }
+ #endregion
+
+ #region CURD
+ ///
+ /// 新增
+ ///
+ [HttpPost("")]
+ public virtual async Task CreateAsync(TCreateInput input)
+ {
+ var entity = ObjectMapper.Map(input);
+ await _repository.InsertAsync(entity, autoSave: true).ConfigureAwait(continueOnCapturedContext: false);
+ return ObjectMapper.Map (entity);
+ }
+
+ ///
+ /// 获取列表
+ ///
+ [HttpPost]
+ [Route("list")]
+ public virtual async Task> GetListAsync(TRequestInput input)
+ {
+ var entitys = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount);
+ var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
+ var dtos = ObjectMapper.Map, List>(entitys);
+ return new PagedResultDto(totalCount, dtos);
+ }
+
+ ///
+ /// 删除
+ ///
+ [HttpDelete]
+ [Route("{id}")]
+ virtual public async Task DeleteAsync(Guid id)
+ {
+ await _repository.DeleteAsync(id);
+ }
+
+ ///
+ /// 批量删除
+ ///
+ [HttpPost]
+ [Route("delete")]
+ virtual public async Task DeleteListAsync(List ids)
+ {
+ return await _repository.DeleteListAsync(ids);
+ }
+ #endregion
+
+ }
+}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
index c33ba1f8..2f8c4a80 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppService.cs
@@ -4,11 +4,16 @@ using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
+using Microsoft.OpenApi.Extensions;
+using NPOI.SS.UserModel;
using SettleAccount.Job.Services.Report;
using Shouldly;
using System;
using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.IO;
using System.Linq;
+using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using TaskJob.EventArgs;
@@ -27,29 +32,183 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
///
/// 标准价格单-相关应用服务
///
- [Authorize(SettleAccountPermissions.PriceLists.Default)]
+ //[Authorize(SettleAccountPermissions.PriceLists.Default)]
[Route("api/SettleAccount/PriceList")]
- //[AllowAnonymous]
+ [AllowAnonymous]
public class PriceListAppService : ApplicationService
/*, IPriceListAppService*/
{
- private readonly PriceListManager _mng;
+ private readonly PriceListManager _priceListManager;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository _mapRepository;
private readonly TaskJobService _service;
public PriceListAppService(
IExcelImportAppService excelImportService,
ISettleAccountBranchEfCoreRepository mapRepository,
- PriceListManager mng,
+ PriceListManager priceListManager,
TaskJobService service
)
{
_mapRepository = mapRepository;
_excelImportService = excelImportService;
- _mng = mng;
+ _priceListManager = priceListManager;
_service = service;
}
+ #region 导入、导出
+ ///
+ /// 获取导入模板
+ ///
+ [HttpPost("import-template")]
+ public virtual async Task ImportTemplateAsync()
+ {
+ await Task.CompletedTask;
+ return new Microsoft.AspNetCore.Mvc.OkResult();
+ }
+
+ ///
+ /// 导入
+ ///
+ [HttpPost]
+ [Route("Import")]
+ //[Authorize(SettleAccountPermissions.PriceLists.Create)]
+ public virtual async Task ImportAsync([FromForm] IFormFileCollection files, string version)
+ {
+ ExportImporter _exportImporter = new ExportImporter();
+
+ var result = await _exportImporter.UploadExcelImport(files, _excelImportService);
+
+ List _checkls = new List();
+ _checkls.Add("1040");
+ _checkls.Add("1046");
+ _checkls.Add("104T");
+
+ result = result.Where(p => _checkls.Contains(p.Plant)).ToList();
+
+ var entityList = ObjectMapper.Map, List>(result);
+ var _ls = entityList.OrderByDescending(p => p.BeginTime).GroupBy(p => new { p.LU, p.ClientCode }).Select(p => p.FirstOrDefault());
+
+
+ foreach (var itm in _ls)
+ {
+ itm.Update(GuidGenerator.Create(), version);
+ }
+ await _priceListManager.ImportAsync(_ls.ToList(), version);
+ return ApplicationConsts.SuccessStr;
+ }
+
+ ///
+ /// 导出
+ ///
+ [HttpPost]
+ [Route("Export")]
+ //[Authorize(SettleAccountPermissions.PriceLists.Default)]
+ public virtual async Task ExportAsync(TB_PRICE_LIST_RequestDto input)
+ {
+ IExporter _csv = new CsvExporter();
+
+ IExporter _excel = new ExcelExporter();
+
+
+ var entities = await _priceListManager.GetListAsync(input.Filters, input.Sorting, int.MaxValue,
+ 0, true);
+
+ var dtoDetails = ObjectMapper.Map, List>(entities);
+
+ string _fileName = string.Empty;
+ //声明导出容器
+
+ byte[] result = null;
+ switch (input.FileType)
+ {
+ case 0:
+ _fileName = string.Format("销售价格单_{0}.xlsx", Guid.NewGuid().ToString());
+ result = await _csv.ExportAsByteArray(dtoDetails);
+ break;
+ case 1:
+ _fileName = string.Format("销售价格单_{0}.xlsx", Guid.NewGuid().ToString());
+ result = await _excel.ExportAsByteArray(dtoDetails);
+ break;
+ }
+ result.ShouldNotBeNull();
+
+ //保存导出文件到服务器存成二进制
+ await _excelImportService.SaveBlobAsync(
+ new SaveExcelImportInputDto
+ {
+ Name = _fileName,
+ Content = result
+ }
+ );
+ return _fileName;
+ }
+ #endregion
+
+ #region CURD
+ ///
+ /// 获取列表
+ ///
+ [HttpPost]
+ [Route("list")]
+ //[Authorize(SettleAccountPermissions.PriceLists.Default)]
+ public virtual async Task> GetListAsync(TB_PRICE_LIST_RequestDto input)
+ {
+ if (!string.IsNullOrEmpty(input.Version))
+ {
+ input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
+ }
+ var entitys = await _priceListManager.GetListAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount);
+ var totalCount = await GetCountAsync(input);
+ var dtos = ObjectMapper.Map, List>(entitys);
+ return new PagedResultDto(totalCount, dtos);
+ }
+
+ ///
+ /// 删除
+ ///
+ [HttpDelete]
+ [Route("{id}")]
+ //[Authorize(SettleAccountPermissions.PriceLists.Delete)]
+ virtual public async Task DeleteAsync(Guid id)
+ {
+ await _priceListManager.DeleteAsync(id);
+ }
+
+ ///
+ /// 批量删除
+ ///
+ [HttpPost]
+ [Route("delete")]
+ //[Authorize(SettleAccountPermissions.PriceLists.Delete)]
+ virtual public async Task DeleteListAsync(List ids)
+ {
+ return await _priceListManager.DeleteListAsync(ids);
+ }
+ #endregion
+
+ #region 私有方法
+ ///
+ /// 获取总数
+ ///
+ private async Task GetCountAsync(TB_PRICE_LIST_RequestDto input)
+ {
+ return await _priceListManager.GetCountAsync(input.Filters, GuidGenerator.Create());
+ }
+ #endregion
+
+
+
+
+
+ ///
+ /// 获取总数
+ ///
+ private async Task GetCountAsync(PriceListRequestDto input)
+ {
+ return await _priceListManager.GetCountAsync(input.Filters, GuidGenerator.Create());
+ }
+
+
///
/// 结算总成和ERP总成价格对比
///
@@ -99,7 +258,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
/// [Authorize(SettleAccountPermissions.PriceLists.Default)]
virtual public async Task GetAsync(Guid id)
{
- var result = await _mng.GetAsync(id); ;
+ var result = await _priceListManager.GetAsync(id); ;
var dto = ObjectMapper.Map(result);
return dto;
@@ -107,30 +266,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
- ///
- /// 根据筛选条件获取实体列表
- ///
- ///
- /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
- ///
- /// 请求条件
- /// 实体DTO列表
- [HttpPost]
- [Route("list")]
- //[Authorize(SettleAccountPermissions.PriceLists.Default)]
- virtual public async Task> GetListAsync(PriceListRequestDto input)
- {
- if (!string.IsNullOrEmpty(input.Version))
- {
- input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
- }
- var entities = await _mng.GetListAsync(input.Filters, input.Sorting, input.MaxResultCount,
- input.SkipCount);
- var totalCount = await GetCountAsync(input);
- var dtos = ObjectMapper.Map, List>(entities);
- return new PagedResultDto(totalCount, dtos);
- }
///
/// 根据筛选条件获取实体列表
@@ -147,7 +283,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
{
- var entities = await _mng.GetVersionListAsync(input.Filters, input.Sorting, input.MaxResultCount,input.SkipCount);
+ var entities = await _priceListManager.GetVersionListAsync(input.Filters, input.Sorting, input.MaxResultCount,input.SkipCount);
var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map, List>(entities);
return new PagedResultDto(totalCount, dtos);
@@ -158,11 +294,6 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
- private async Task GetCountAsync(PriceListRequestDto input)
- {
- return await _mng.GetCountAsync(input.Filters, GuidGenerator.Create());
- }
-
///
/// 获取实体总数
///
@@ -172,7 +303,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
//[Authorize(SettleAccountPermissions.PriceLists.Default)]
virtual public async Task GetTotalCountAsync(Guid branchId)
{
- return await _mng.GetCountAsync(new List(), branchId);
+ return await _priceListManager.GetCountAsync(new List(), branchId);
}
///
@@ -184,50 +315,11 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
//[Authorize(SettleAccountPermissions.PriceLists.Default)]
virtual public async Task> GetAllAsync(Guid branchId)
{
- var entities = await _mng.GetAllAsync(branchId);
+ var entities = await _priceListManager.GetAllAsync(branchId);
var dtos = ObjectMapper.Map, List>(entities);
return new ListResultDto(dtos);
}
- ///
- /// 批量导入实体列表
- ///
- ///
- /// 以ID为依据,数据库中找不到ID的实体会新增,已有ID的实体会修改
- ///
- /// 实体列表
- /// 是否导入成功
- [HttpPost]
- [Route("ExcelImport-Map")]
- //[Authorize(SettleAccountPermissions.PriceLists.Create)]
- virtual public async Task ImportAsync([FromForm] IFormFileCollection files,string version)
- {
- ExportImporter _exportImporter = new ExportImporter();
-
- var result = await _exportImporter.UploadExcelImport(files, _excelImportService);
-
- List _checkls = new List();
- _checkls.Add("100001");
- _checkls.Add("100053");
- _checkls.Add("100113");
-
- result = result.Where(p => _checkls.Contains(p.CustomerCode)).ToList();
-
-
- var entityList = ObjectMapper.Map, List>(result);
- var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).OrderByDescending(p => p.BeginDate).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault());
-
-
- foreach (var itm in _ls)
- {
- itm.Update(GuidGenerator.Create(),version);
- }
- await _mng.ImportAsync(_ls.ToList(), version);
- return ApplicationConsts.SuccessStr;
- }
-
-
-
///
/// 修改实体
@@ -244,92 +336,13 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
);
- var _ent = await _mng.UpdateAsync(id, entity);
+ var _ent = await _priceListManager.UpdateAsync(id, entity);
var dto = ObjectMapper.Map(_ent);
return dto;
}
- ///
- /// 删除实体
- ///
- /// ID
- /// 无
- [HttpDelete]
- [Route("{id}")]
- //[Authorize(SettleAccountPermissions.PriceLists.Delete)]
- virtual public async Task DeleteAsync(Guid id)
- {
-
- await _mng.DeleteAsync(id);
- }
-
- ///
- /// 按IDs删除实体列表
- ///
- /// ID列表
- /// 是否执行成功
- [HttpPost]
- [Route("delete")]
- //[Authorize(SettleAccountPermissions.PriceLists.Delete)]
- virtual public async Task DeleteListAsync(List ids)
- {
-
- return await _mng.DeleteListAsync(ids);
- }
-
- ///
- /// 导出文件
- ///
- ///
- ///
- [HttpPost]
- [Route("Export")]
- //[Authorize(SettleAccountPermissions.PriceLists.Default)]
- virtual public async Task ExportAsync(PriceListRequestDto input)
- {
-
- IExporter _csv = new CsvExporter();
-
- IExporter _excel = new ExcelExporter();
-
-
- var entities = await _mng.GetListAsync(input.Filters, input.Sorting, int.MaxValue,
- 0, true);
-
- var dtoDetails = ObjectMapper.Map, List>(entities);
-
- string _fileName = string.Empty;
- //声明导出容器
-
- byte[] result = null;
- switch (input.FileType)
- {
- case 0:
- _fileName = string.Format("标准价格单_{0}.xlsx", Guid.NewGuid().ToString());
- result = await _csv.ExportAsByteArray(dtoDetails);
- break;
- case 1:
- _fileName = string.Format("标准价格单_{0}.xlsx", Guid.NewGuid().ToString());
- result = await _excel.ExportAsByteArray(dtoDetails);
- break;
- }
- result.ShouldNotBeNull();
-
- //保存导出文件到服务器存成二进制
- await _excelImportService.SaveBlobAsync(
- new SaveExcelImportInputDto
- {
- Name = _fileName,
- Content = result
- }
- );
- return _fileName;
- }
-
-
-
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs
index 1c0cfe76..005bbb76 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Prices/PriceListAppServiceBJ.cs
@@ -13,277 +13,313 @@ using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Win.Sfs.BaseData.ImportExcelCommon;
+using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.ExcelImporter;
+using Win.Sfs.SettleAccount.Repository;
using Win.Sfs.Shared.Filter;
+using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.Prices
{
///
- /// 标准价格单-相关应用服务
+ /// 备件价格
///
//[Authorize(SettleAccountPermissions.PriceLists.Default)]
[AllowAnonymous]
[Route("api/SettleAccount/PriceListBJ")]
- public class PriceListAppServiceBJ : ApplicationService
- /*, IPriceListAppService*/
+ public class PriceListAppServiceBJ : CurdBaseAppService
{
- private readonly PriceListManagerBJ _mng;
+ private readonly INormalEfCoreRepository _repository;
+ private readonly PriceListManagerBJ _priceListManagerBJ;
private readonly IExcelImportAppService _excelImportService;
private readonly ISettleAccountBranchEfCoreRepository _mapRepository;
- public PriceListAppServiceBJ(
- IExcelImportAppService excelImportService,
- ISettleAccountBranchEfCoreRepository mapRepository,
- PriceListManagerBJ mng
- )
- {
- _mapRepository = mapRepository;
- _excelImportService = excelImportService;
- _mng = mng;
- }
-
- ///
- /// 按ID获取唯一实体
- ///
- ///
- /// 返回实体全部属性
- ///
- /// ID
- /// 实体DTO
-
- [HttpGet]
- [Route("{id}")]
- /// [Authorize(SettleAccountPermissions.PriceLists.Default)]
- virtual public async Task GetAsync(Guid id)
- {
- var result = await _mng.GetAsync(id); ;
- var dto = ObjectMapper.Map(result);
- return dto;
-
- }
-
-
-
- ///
- /// 根据筛选条件获取实体列表
- ///
- ///
- /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
- ///
- /// 请求条件
- /// 实体DTO列表
- [HttpPost]
- [Route("list")]
- //[Authorize(SettleAccountPermissions.PriceLists.Default)]
- virtual public async Task> GetListAsync(PriceListRequestDto input)
- {
-
- if (!string.IsNullOrEmpty(input.Version))
- {
- input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
- }
- var entities = await _mng.GetListAsync(input.Filters, input.Sorting, input.MaxResultCount,
- input.SkipCount);
- var totalCount = await GetCountAsync(input);
- var dtos = ObjectMapper.Map, List>(entities);
- return new PagedResultDto(totalCount, dtos);
- }
- ///
- /// 根据筛选条件获取实体列表
- ///
- ///
- /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
- ///
- /// 请求条件
- /// 实体DTO列表
- [HttpPost]
- [Route("versionlist")]
- // [Authorize(SettleAccountPermissions.PriceLists.Default)]
- virtual public async Task> GetVersionListAsync(PriceListRequestDto input)
- {
- var entities = await _mng.GetVersionListAsync(input.Filters, input.Sorting, input.MaxResultCount,input.SkipCount);
- var totalCount = await GetCountAsync(input);
- var dtos = ObjectMapper.Map, List>(entities);
- return new PagedResultDto(totalCount, dtos);
- }
-
-
-
-
-
-
- private async Task GetCountAsync(PriceListRequestDto input)
- {
- return await _mng.GetCountAsync(input.Filters, GuidGenerator.Create());
- }
+ public PriceListAppServiceBJ(
+ INormalEfCoreRepository repository,
+ PriceListManagerBJ priceListManagerBJ,
+ IExcelImportAppService excelImportService,
+ ISettleAccountBranchEfCoreRepository mapRepository
- ///
- /// 获取实体总数
- ///
- /// 实体总数
- [HttpGet]
- [Route("count")]
- //[Authorize(SettleAccountPermissions.PriceLists.Default)]
- virtual public async Task GetTotalCountAsync(Guid branchId)
+ ) :base(repository: repository, excelImportService: excelImportService)
{
- return await _mng.GetCountAsync(new List(), branchId);
- }
+ _repository = repository;
+ _priceListManagerBJ = priceListManagerBJ;
+ _excelImportService = excelImportService;
- ///
- /// 获取全部实体列表
- ///
- /// 实体DTO列表
- [HttpGet]
- [Route("all")]
- //[Authorize(SettleAccountPermissions.PriceLists.Default)]
- virtual public async Task> GetAllAsync(Guid branchId)
- {
- var entities = await _mng.GetAllAsync(branchId);
- var dtos = ObjectMapper.Map, List>(entities);
- return new ListResultDto(dtos);
+ _mapRepository = mapRepository;
}
+ #region 导入、导出
///
- /// 批量导入实体列表
+ /// 导入
///
- ///
- /// 以ID为依据,数据库中找不到ID的实体会新增,已有ID的实体会修改
- ///
- /// 实体列表
- /// 是否导入成功
[HttpPost]
- [Route("ExcelImport-Map")]
- //[Authorize(SettleAccountPermissions.PriceLists.Create)]
- virtual public async Task ImportAsync([FromForm] IFormFileCollection files,string version)
+ [Route("Import")]
+ public override async Task ImportAsync([FromForm] IFormFileCollection files, string version)
{
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport(files, _excelImportService);
-
List _checkls = new List();
- _checkls.Add("100001");
- _checkls.Add("100053");
- _checkls.Add("100113");
- // _checkls.Add("200067");
- result = result.Where(p => _checkls.Contains(p.CustomerCode)).ToList();
+ _checkls.Add("1040");
+ _checkls.Add("1046");
+ _checkls.Add("104T");
+ result = result.Where(p => _checkls.Contains(p.ClientCode)).ToList();
var entityList = ObjectMapper.Map, List>(result);
- var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).OrderByDescending(p => p.BeginDate).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault());
-
+ var _ls = entityList.GroupBy(p => new { p.LU, p.ClientCode }).Select(p => p.FirstOrDefault());
foreach (var itm in _ls)
{
- itm.Update(GuidGenerator.Create(),version);
+ itm.Update(GuidGenerator.Create(), version);
}
- _ls=_ls.Where(p => p.Type == 20).ToList();
-
-
-
-
- await _mng.ImportAsync(_ls.ToList(), version);
+ await _priceListManagerBJ.ImportAsync(_ls.ToList(), version);
return ApplicationConsts.SuccessStr;
}
-
-
-
-
- ///
- /// 修改实体
- ///
- /// ID
- /// 修改实体DTO
- /// 实体DTO
- [HttpPut]
- [Route("{id}")]
- [Authorize(SettleAccountPermissions.PriceLists.Update)]
- virtual public async Task UpdateAsync(Guid id, PriceListBJDto input)
- {
- var entity = new PriceListBJ(
-
- );
-
- var _ent = await _mng.UpdateAsync(id, entity);
-
-
- var dto = ObjectMapper.Map(_ent);
- return dto;
- }
-
- ///
- /// 删除实体
- ///
- /// ID
- /// 无
- [HttpDelete]
- [Route("{id}")]
- //[Authorize(SettleAccountPermissions.PriceLists.Delete)]
- virtual public async Task DeleteAsync(Guid id)
- {
-
- await _mng.DeleteAsync(id);
- }
-
- ///
- /// 按IDs删除实体列表
- ///
- /// ID列表
- /// 是否执行成功
- [HttpPost]
- [Route("delete")]
- //[Authorize(SettleAccountPermissions.PriceLists.Delete)]
- virtual public async Task DeleteListAsync(List ids)
- {
-
- return await _mng.DeleteListAsync(ids);
- }
-
- ///
- /// 导出文件
- ///
- ///
- ///
- [HttpPost]
- [Route("Export")]
- //[Authorize(SettleAccountPermissions.PriceLists.Default)]
- virtual public async Task ExportAsync(PriceListRequestDto input)
- {
-
- IExporter _csv = new CsvExporter();
- IExporter _excel = new ExcelExporter();
- var entities = await _mng.GetListAsync(input.Filters, input.Sorting, int.MaxValue,
- 0, true);
- var dtoDetails = ObjectMapper.Map, List>(entities);
-
- string _fileName = string.Empty;
- //声明导出容器
-
- byte[] result = null;
- switch (input.FileType)
- {
- case 0:
- _fileName = string.Format("备件标准价格单_{0}.xlsx", Guid.NewGuid().ToString());
- result = await _csv.ExportAsByteArray(dtoDetails);
- break;
- case 1:
- _fileName = string.Format("备件标准价格单_{0}.xlsx", Guid.NewGuid().ToString());
- result = await _excel.ExportAsByteArray(dtoDetails);
- break;
- }
- result.ShouldNotBeNull();
-
- //保存导出文件到服务器存成二进制
- await _excelImportService.SaveBlobAsync(
- new SaveExcelImportInputDto
- {
- Name = _fileName,
- Content = result
- }
- );
- return _fileName;
- }
-
-
+ #endregion
+
+ #region 原有的方法之后废弃删除
+ // ///
+ // /// 按ID获取唯一实体
+ // ///
+ // ///
+ // /// 返回实体全部属性
+ // ///
+ // /// ID
+ // /// 实体DTO
+
+ // [HttpGet]
+ // [Route("{id}")]
+ // /// [Authorize(SettleAccountPermissions.PriceLists.Default)]
+ // virtual public async Task GetAsync(Guid id)
+ // {
+ // var result = await _mng.GetAsync(id); ;
+ // var dto = ObjectMapper.Map(result);
+ // return dto;
+
+ // }
+
+
+
+ // ///
+ // /// 根据筛选条件获取实体列表
+ // ///
+ // ///
+ // /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
+ // ///
+ // /// 请求条件
+ // /// 实体DTO列表
+ // [HttpPost]
+ // [Route("list")]
+ // //[Authorize(SettleAccountPermissions.PriceLists.Default)]
+ // virtual public async Task> GetListAsync(PriceListRequestDto input)
+ // {
+
+ // if (!string.IsNullOrEmpty(input.Version))
+ // {
+ // input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "Version", Logic = EnumFilterLogic.And, Value = input.Version });
+ // }
+ // var entities = await _mng.GetListAsync(input.Filters, input.Sorting, input.MaxResultCount,
+ //input.SkipCount);
+ // var totalCount = await GetCountAsync(input);
+ // var dtos = ObjectMapper.Map, List>(entities);
+ // return new PagedResultDto(totalCount, dtos);
+ // }
+
+ // ///
+ // /// 根据筛选条件获取实体列表
+ // ///
+ // ///
+ // /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
+ // ///
+ // /// 请求条件
+ // /// 实体DTO列表
+ // [HttpPost]
+ // [Route("versionlist")]
+ // // [Authorize(SettleAccountPermissions.PriceLists.Default)]
+ // virtual public async Task> GetVersionListAsync(PriceListRequestDto input)
+ // {
+ // var entities = await _mng.GetVersionListAsync(input.Filters, input.Sorting, input.MaxResultCount,input.SkipCount);
+ // var totalCount = await GetCountAsync(input);
+ // var dtos = ObjectMapper.Map, List>(entities);
+ // return new PagedResultDto(totalCount, dtos);
+ // }
+
+
+
+
+
+
+ // private async Task GetCountAsync(PriceListRequestDto input)
+ // {
+ // return await _mng.GetCountAsync(input.Filters, GuidGenerator.Create());
+ // }
+
+ // ///
+ // /// 获取实体总数
+ // ///
+ // /// 实体总数
+ // [HttpGet]
+ // [Route("count")]
+ // //[Authorize(SettleAccountPermissions.PriceLists.Default)]
+ // virtual public async Task GetTotalCountAsync(Guid branchId)
+ // {
+ // return await _mng.GetCountAsync(new List(), branchId);
+ // }
+
+ // ///
+ // /// 获取全部实体列表
+ // ///
+ // /// 实体DTO列表
+ // [HttpGet]
+ // [Route("all")]
+ // //[Authorize(SettleAccountPermissions.PriceLists.Default)]
+ // virtual public async Task> GetAllAsync(Guid branchId)
+ // {
+ // var entities = await _mng.GetAllAsync(branchId);
+ // var dtos = ObjectMapper.Map, List>(entities);
+ // return new ListResultDto(dtos);
+ // }
+
+ // ///
+ // /// 批量导入实体列表
+ // ///
+ // ///
+ // /// 以ID为依据,数据库中找不到ID的实体会新增,已有ID的实体会修改
+ // ///
+ // /// 实体列表
+ // /// 是否导入成功
+ // [HttpPost]
+ // [Route("ExcelImport-Map")]
+ // //[Authorize(SettleAccountPermissions.PriceLists.Create)]
+ // virtual public async Task ImportAsync([FromForm] IFormFileCollection files,string version)
+ // {
+ // ExportImporter _exportImporter = new ExportImporter();
+ // var result = await _exportImporter.UploadExcelImport(files, _excelImportService);
+
+ // List _checkls = new List();
+ // _checkls.Add("100001");
+ // _checkls.Add("100053");
+ // _checkls.Add("100113");
+ // // _checkls.Add("200067");
+ // result = result.Where(p => _checkls.Contains(p.CustomerCode)).ToList();
+
+ // var entityList = ObjectMapper.Map, List>(result);
+ // var _ls = entityList.Where(p=>p.EndDate.ToString().Contains("9999")).OrderByDescending(p => p.BeginDate).GroupBy(p => new { p.MaterialCode, p.CustomerCode,p.Type }).Select(p=>p.FirstOrDefault());
+
+ // foreach (var itm in _ls)
+ // {
+ // itm.Update(GuidGenerator.Create(),version);
+ // }
+ // _ls=_ls.Where(p => p.Type == 20).ToList();
+
+
+
+
+
+ // await _mng.ImportAsync(_ls.ToList(), version);
+ // return ApplicationConsts.SuccessStr;
+ // }
+
+
+
+
+ // ///
+ // /// 修改实体
+ // ///
+ // /// ID
+ // /// 修改实体DTO
+ // /// 实体DTO
+ // [HttpPut]
+ // [Route("{id}")]
+ // [Authorize(SettleAccountPermissions.PriceLists.Update)]
+ // virtual public async Task UpdateAsync(Guid id, PriceListBJDto input)
+ // {
+ // var entity = new PriceListBJ(
+
+ // );
+
+ // var _ent = await _mng.UpdateAsync(id, entity);
+
+
+ // var dto = ObjectMapper.Map(_ent);
+ // return dto;
+ // }
+
+ // ///
+ // /// 删除实体
+ // ///
+ // /// ID
+ // /// 无
+ // [HttpDelete]
+ // [Route("{id}")]
+ // //[Authorize(SettleAccountPermissions.PriceLists.Delete)]
+ // virtual public async Task DeleteAsync(Guid id)
+ // {
+
+ // await _mng.DeleteAsync(id);
+ // }
+
+ // ///
+ // /// 按IDs删除实体列表
+ // ///
+ // /// ID列表
+ // /// 是否执行成功
+ // [HttpPost]
+ // [Route("delete")]
+ // //[Authorize(SettleAccountPermissions.PriceLists.Delete)]
+ // virtual public async Task DeleteListAsync(List ids)
+ // {
+
+ // return await _mng.DeleteListAsync(ids);
+ // }
+
+ // ///
+ // /// 导出文件
+ // ///
+ // ///
+ // ///
+ // [HttpPost]
+ // [Route("Export")]
+ // //[Authorize(SettleAccountPermissions.PriceLists.Default)]
+ // virtual public async Task ExportAsync(PriceListRequestDto input)
+ // {
+
+ // IExporter _csv = new CsvExporter();
+ // IExporter _excel = new ExcelExporter();
+ // var entities = await _mng.GetListAsync(input.Filters, input.Sorting, int.MaxValue,
+ // 0, true);
+ // var dtoDetails = ObjectMapper.Map, List>(entities);
+
+ // string _fileName = string.Empty;
+ // //声明导出容器
+
+ // byte[] result = null;
+ // switch (input.FileType)
+ // {
+ // case 0:
+ // _fileName = string.Format("备件标准价格单_{0}.xlsx", Guid.NewGuid().ToString());
+ // result = await _csv.ExportAsByteArray(dtoDetails);
+ // break;
+ // case 1:
+ // _fileName = string.Format("备件标准价格单_{0}.xlsx", Guid.NewGuid().ToString());
+ // result = await _excel.ExportAsByteArray(dtoDetails);
+ // break;
+ // }
+ // result.ShouldNotBeNull();
+
+ // //保存导出文件到服务器存成二进制
+ // await _excelImportService.SaveBlobAsync(
+ // new SaveExcelImportInputDto
+ // {
+ // Name = _fileName,
+ // Content = result
+ // }
+ // );
+ // return _fileName;
+ // }
+ #endregion
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj
index 13de6698..a6f6d937 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj
@@ -125,6 +125,7 @@
+
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
index 53d54fdf..c314a15f 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
@@ -6,12 +6,12 @@ using Win.Sfs.SettleAccount.Entities.CodeSettings;
using Win.Sfs.SettleAccount.FISes;
using Win.Sfs.SettleAccount.Entities.Materials;
using Win.Sfs.SettleAccount.Entities.SettleAccounts;
-
+
using Win.Sfs.SettleAccount.Inventories;
using Win.Sfs.SettleAccount.Items;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
-
+
using Win.Sfs.SettleAccount.Prebatches;
using Win.Sfs.SettleAccount.Entities.Controls;
using Win.Sfs.SettleAccount.SendUnsettledDiffReports;
@@ -72,7 +72,7 @@ namespace Win.Sfs.SettleAccount
CreateMapBom();
CreateMapBomVersion();
CreateMapInventoryDetail();
-
+
CreateMapMaterial();
CreateMapMaterialRelationship();
CreateMapCodeSetting();
@@ -84,7 +84,7 @@ namespace Win.Sfs.SettleAccount
CreateMapPrebatch();
CreateMapInventoryDetailVersion();
-
+
CreateMapFISVersion();
CreateMapFactory();
CreateMapEstimatedStockDiffReport();
@@ -97,13 +97,13 @@ namespace Win.Sfs.SettleAccount
CreateMapSecondaryActuralDiffReport();
-
+
CreateMapBTSeqKBDiffReport();
CreateMapBTNotConsignReport();
CreateMapHQNotConsignReport();
CreateMapHQSPNotConsignReport();
CreateMapImportColumnMap();
-
+
CreateMapInvoiceSettledDiff();
CreateMapInvoiceSettledDiffVersion();
CreateMapPriceList();
@@ -152,7 +152,7 @@ namespace Win.Sfs.SettleAccount
private void CreateMapWMSDiffOutputSum()
{
CreateMap().ReverseMap();
-
+
}
private void CreateMapWMSCacelOutputSum()
{
@@ -172,7 +172,7 @@ namespace Win.Sfs.SettleAccount
#region PG-派格映射
-
+
///
/// 红旗明细未结导入
@@ -301,15 +301,24 @@ namespace Win.Sfs.SettleAccount
CreateMap().ReverseMap();
}
-
-
+ ///
+ /// 销售价格
+ ///
private void CreateMapPriceList()
-
{
+ CreateMap();
+ CreateMap()
+ .ForMember(x => x.LU, y => y.MapFrom(y => y.PartNo))
+ .ForMember(x => x.Price, y => y.MapFrom(y => y.TotalPrice))
+ .ForMember(x => x.BeginTime, y => y.MapFrom(y => y.ValidFrom))
+ .ForMember(x => x.EndTime, y => y.MapFrom(y => y.ValidTo))
+ .ForMember(x => x.ClientCode, y => y.MapFrom(y => y.Plant));
+ CreateMap();
+
+
CreateMap().ReverseMap();
CreateMap().ReverseMap();
- CreateMap().ReverseMap();
- CreateMap().ReverseMap();
+
}
private void CreateMapPriceListBJ()
@@ -343,7 +352,7 @@ namespace Win.Sfs.SettleAccount
-
+
@@ -370,7 +379,7 @@ namespace Win.Sfs.SettleAccount
CreateMap();
CreateMap();
CreateMap();
-
+
CreateMap();
CreateMap();
@@ -387,10 +396,10 @@ namespace Win.Sfs.SettleAccount
CreateMap().ReverseMap();
CreateMap().ReverseMap(); ;
CreateMap().ReverseMap(); ;
-
+
CreateMap().ReverseMap(); ;
-
+
CreateMap();
CreateMap();
@@ -401,10 +410,10 @@ namespace Win.Sfs.SettleAccount
{
CreateMap().ReverseMap();
CreateMap().ReverseMap();
- CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
CreateMap().ReverseMap();
-
+
CreateMap();
CreateMap();
@@ -440,9 +449,9 @@ namespace Win.Sfs.SettleAccount
CreateMap().ReverseMap();
CreateMap().ReverseMap();
CreateMap().ReverseMap();
-
- CreateMap().ReverseMap();
+
+ CreateMap().ReverseMap();
CreateMap();
}
@@ -452,9 +461,9 @@ namespace Win.Sfs.SettleAccount
{
CreateMap().ReverseMap();
CreateMap().ReverseMap();
- CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
- CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
CreateMap();
@@ -479,7 +488,7 @@ namespace Win.Sfs.SettleAccount
CreateMap().ReverseMap();
CreateMap().ReverseMap();
CreateMap().ReverseMap();
-
+
CreateMap();
CreateMap();
}
@@ -521,10 +530,10 @@ namespace Win.Sfs.SettleAccount
CreateMap();
CreateMap();
CreateMap();
-
-
+
+
}
-
+
@@ -539,7 +548,7 @@ namespace Win.Sfs.SettleAccount
CreateMap();
CreateMap();
CreateMap();
-
+
}
private void CreateMapSupplierItemSetUp()
{
@@ -616,7 +625,7 @@ namespace Win.Sfs.SettleAccount
CreateMap().ReverseMap();
CreateMap();
CreateMap();
-
+
CreateMap();
CreateMap();
}
@@ -673,11 +682,11 @@ namespace Win.Sfs.SettleAccount
private void CreateMapBTNotConsignReport()
{
CreateMap().ReverseMap();
- CreateMap().ReverseMap();
- CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
- CreateMap().ReverseMap();
+ CreateMap().ReverseMap();
CreateMap();
}
@@ -685,7 +694,7 @@ namespace Win.Sfs.SettleAccount
-
+
private void CreateMapHQNotConsignReport()
{
CreateMap().ReverseMap();
@@ -697,7 +706,7 @@ namespace Win.Sfs.SettleAccount
CreateMap();
}
- private void CreateMapHQSPNotConsignReport()
+ private void CreateMapHQSPNotConsignReport()
{
CreateMap().ReverseMap();
CreateMap().ReverseMap();
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 8c1f4e23..b41079b9 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
@@ -16,14 +16,18 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
public decimal SapPrice { set; get; }
}
- public class PriceList:FullAuditedAggregateRootBase
+
+ ///
+ /// 销售价格
+ ///
+ public class PriceList : FullAuditedAggregateRootBase
{
public PriceList()
{ }
- public PriceList(Guid Id,DateTime beginDate, DateTime endDate, decimal price, string materialCode, int type,Guid parentId,string version, string customerCode) :base(Id)
+ public PriceList(Guid Id, DateTime beginDate, DateTime endDate, decimal price, string materialCode, int type, Guid parentId, string version, string customerCode) : base(Id)
{
- BeginDate = beginDate;
- EndDate = endDate;
+ BeginTime = beginDate;
+ EndTime = endDate;
Price = price;
MaterialCode = materialCode;
Type = type;
@@ -32,51 +36,76 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
CustomerCode = customerCode;
}
- public void Set(DateTime beginDate, DateTime endDate, decimal price, string materialCode, int type,string customerCode)
+ public void Set(DateTime beginDate, DateTime endDate, decimal price, string materialCode, int type, string customerCode)
{
- BeginDate = beginDate;
- EndDate = endDate;
+ BeginTime = beginDate;
+ EndTime = endDate;
Price = price;
MaterialCode = materialCode;
Type = type;
CustomerCode = customerCode;
}
- public void Update(Guid id,string version)
+ public void Update(Guid id, string version)
{
Id = id;
Version = version;
}
- [Display(Name = "客户")]
- public string CustomerCode { get; set; }
///
- ///版本
+ /// 零件号
///
- [Display(Name = "版本")]
- public string Version { set; get; }
+ [Display(Name = "零件号")]
+ public string LU { get; set; }
+ ///
+ /// 价格
+ ///
+ [Display(Name = "价格")]
+ public Decimal Price { set; get; }
///
/// 开始时间
///
[Display(Name = "开始时间")]
- public DateTime BeginDate { set; get; }
+ public DateTime BeginTime { set; get; }
+
///
/// 结束时间
///
- [Display(Name = "结算时间")]
- public DateTime EndDate { set; get; }
+ [Display(Name = "结束时间")]
+ public DateTime EndTime { set; get; }
+
///
- /// 价格
+ /// 客户编码
///
- [Display(Name = "价格")]
- public Decimal Price { set; get; }
+ [Display(Name = "客户编码")]
+ public string ClientCode { get; set; }
+
+ ///
+ /// 业务类别
+ ///
+ [Display(Name = "业务类别")]
+ public string BusinessType { get; set; }
+
+
+
+
+ ///
+ ///版本
+ ///
+ [Display(Name = "版本")]
+ public string Version { set; get; }
+
+
+
+ [Display(Name = "客户")]
+ public string CustomerCode { get; set; }
///
/// 物料编号
///
[Display(Name = "物料编号")]
- public string MaterialCode { set; get; }
+ public string MaterialCode { set; get; }
///
/// 类型
@@ -90,6 +119,10 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
public Guid ParentId { set; get; }
}
+
+ ///
+ /// 备件价格
+ ///
public class PriceListBJ : FullAuditedAggregateRootBase
{
public PriceListBJ()
@@ -120,6 +153,31 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
Id = id;
Version = version;
}
+
+ ///
+ /// 零件号
+ ///
+ [Display(Name = "零件号")]
+ public string LU { get; set; }
+
+ ///
+ /// 价格
+ ///
+ [Display(Name = "价格")]
+ public Decimal Price { set; get; }
+
+ ///
+ /// 客户编码
+ ///
+ [Display(Name = "客户编码")]
+ public string ClientCode { get; set; }
+
+
+
+
+
+
+
[Display(Name = "客户")]
public string CustomerCode { get; set; }
@@ -140,11 +198,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
///
[Display(Name = "结算时间")]
public DateTime EndDate { set; get; }
- ///
- /// 价格
- ///
- [Display(Name = "价格")]
- public Decimal Price { set; get; }
+
///
/// 物料编号
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListManager.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListManager.cs
index 3040074a..af23c6ea 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListManager.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/Prices/PriceListManager.cs
@@ -87,7 +87,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
join itm2 in pricelist
on new { itm1.Type, itm1.MaterialCode,itm1.CustomerCode } equals new { itm2.Type, itm2.MaterialCode, itm2.CustomerCode }
where itm1.Price != itm2.Price
- select new PriceList(itm2.Id, itm2.BeginDate, itm2.EndDate, itm1.Price, itm2.MaterialCode, itm2.Type, itm2.ParentId, itm2.Version, itm1.CustomerCode);
+ select new PriceList(itm2.Id, itm2.BeginTime, itm2.EndTime, itm1.Price, itm2.MaterialCode, itm2.Type, itm2.ParentId, itm2.Version, itm1.CustomerCode);
if (update.Count() > 0)
{
@@ -122,7 +122,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
public virtual async Task CreateAsync(PriceList input)
{
var entity = new PriceList(
- GuidGenerator.Create(), input.BeginDate, input.EndDate, input.Price, input.MaterialCode, input.Type,input.ParentId,input.Version,input.CustomerCode
+ GuidGenerator.Create(), input.BeginTime, input.EndTime, input.Price, input.MaterialCode, input.Type,input.ParentId,input.Version,input.CustomerCode
);
return await _repository.InsertAsync(entity);
@@ -134,7 +134,7 @@ namespace Win.Sfs.SettleAccount.Entities.Prices
{
var entity = await _repository.GetAsync(id);
entity.Set(
- input.BeginDate, input.EndDate, input.Price, input.MaterialCode, input.Type,input.CustomerCode
+ input.BeginTime, input.EndTime, input.Price, input.MaterialCode, input.Type,input.CustomerCode
);
return await _repository.UpdateAsync(entity);
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230710062137_20230710-1.Designer.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230710062137_20230710-1.Designer.cs
new file mode 100644
index 00000000..3360ad1f
--- /dev/null
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230710062137_20230710-1.Designer.cs
@@ -0,0 +1,3744 @@
+//
+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("20230710062137_20230710-1")]
+ partial class _202307101
+ {
+ 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("State")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ 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