From 9cfe1989c92722eb80ae1b77cefd5b601146541f Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 9 Feb 2022 08:34:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SettleAccounts/SettleAccountAppService.cs | 2 - .../ReportServices/ReportMakeService.cs | 4 - .../Report/ErpPartDapperRepository.cs | 2 +- .../SettleAccountImportService.cs | 73 +------------------ 4 files changed, 4 insertions(+), 77 deletions(-) diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs index 0d851ea4..547b9a41 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs @@ -358,11 +358,9 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts decimal _qty = decimal.Parse(_lst[8].Trim()); string _settlementID = _lst[9].Trim(); string _settlementSupplier = _lst[10].Trim(); - if (_preList.Any(p => p.KENNCode == _kENNCode)) { _precodeList.Add(_kENNCode); - } _setls.Add(new SettleAccount( GuidGenerator.Create(), diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs index a6186e5c..4847fe52 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs @@ -171,9 +171,6 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices }); return _taskid; } - - - #region 大众备件0-90天和90天以上输出 /// @@ -568,7 +565,6 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices BaseRequestDto input ) { - List customConditionList = new List(); customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode }); diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpPartDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpPartDapperRepository.cs index 728edbbb..43e132b2 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpPartDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/ErpPartDapperRepository.cs @@ -51,7 +51,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report } else { - _materialList = DbConnection.Query("select max(Id) Factory,MaterialCode,MaterialDesc from Set_material group by MaterialCode,MaterialDesc,EstimateTypeDesc,EstimateType ").ToList(); + _materialList = DbConnection.Query("select max(Id) ID,''Factory,MaterialCode,MaterialDesc from Set_material group by MaterialCode,MaterialDesc,EstimateTypeDesc,EstimateType ").ToList(); } if (CacheManager.CachePriceList != null) { diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs index dc1a6549..003cd10f 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/SettleAccount/SettleAccountImportService.cs @@ -61,72 +61,7 @@ namespace TaskJob.Services { var filePath = fileSavePath + itm;//获取到导入的excel var exten = Path.GetExtension(fileSavePath); - //List _errorList = new List(); - //var checkList = new List(); - ////var _chList = await _relrepository.GetAllAsync(GuidGenerator.Create(), true); - ////var _chls = _chList.Select(p => p.SettleMaterialCode).Distinct(); - //List _precodeList = new List();// - //if (exten.ToUpper() == ".TXT") - //{ - // using (TextReader textReader = new StreamReader(filePath)) - // { - // int i = 0; - // while (true) - // { - // string str = textReader.ReadLine(); - // if (string.IsNullOrEmpty(str)) - // { - // break; - // } - // else - // { - // try - // { - // var _lst = str.Split(new char[] { '|' }).ToList(); - // string _settleyear = _lst[1].Trim(); - // string _kENNCode = _lst[2].Trim(); - // string _chassisNumber = _lst[3].Trim(); - // string _model = _lst[4].Trim(); - // DateTime _cP5A = DateTime.Parse(_lst[5].Trim()); - // DateTime _cP7 = DateTime.Parse(_lst[6].Trim()); - // string _materialCode = _lst[7].Trim(); - // decimal _qty = decimal.Parse(_lst[8].Trim()); - // string _settlementID = _lst[9].Trim(); - // string _settlementSupplier = _lst[10].Trim(); - // _setls.Add(new Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount( - // Guid.NewGuid(), - // Guid.NewGuid(), - // _settleyear, - // _kENNCode, - // _chassisNumber, - // _model, - // _cP5A, - // _cP7, - // _materialCode, - // _qty, - // _settlementID, - // _settlementSupplier, - // DateTime.Now.Year.ToString(), - // DateTime.Now.Month.ToString(), - // _id, - // version, - // DateTime.Now, - // Guid.NewGuid() - // )); - // } - // catch - // { - - // } - // } - // i++; - // } - // textReader.Close(); - // } - //} - //else - //{ - // _setls= _inputService.Input(filePath); + var errorlist = new List(); var dtoList = _inputService.Input(filePath, null, errorlist); foreach (var dto in dtoList) @@ -139,13 +74,12 @@ namespace TaskJob.Services dto.ChassisNumber, dto.Model, dto.CP5A, dto.CP7, Regex.Replace(dto.MaterialCode, @"\s", ""), dto.Qty, dto.SettlementID, dto.SettlementSupplier, DateTime.Now.Month.ToString(), dto.SettleYear, _id, version, DateTime.Now, Guid.NewGuid()); - _setls.Add(_settleaccount); + _setls.Add(_settleaccount); } //} #region //var errorFileName = "错误文件.xlsx"; //checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}底盘号 {1}有重复", "11111111111", "22222222222"), string.Empty)); - //_service.ExportError(id,errorFileName, checkList); #endregion } @@ -158,8 +92,7 @@ namespace TaskJob.Services _setls = _setls.GroupBy(p => new { p.ChassisNumber, p.MaterialCode, p.KENNCode }).Select(p => p.FirstOrDefault()).ToList(); _repository.Insert(_setls); _versionRepository.Insert(_id, version, customerCode, customerCode); - - _repository.GetDbContext().Database.ExecuteSqlRaw( + _repository.GetDbContext().Database.ExecuteSqlRaw( "EXEC sp_settle_fis_update" );