44673626 3 years ago
parent
commit
31faf55a92
  1. 1
      .gitignore
  2. 1
      .vs/VSWorkspaceState.json
  3. BIN
      .vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo
  4. 6269
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20211230.txt
  5. 264
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsJitOutPutDetialDto.cs
  6. 35
      src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Reports/ReportRequestDto/ReportRequestDto.cs
  7. 3
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs
  8. 65
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
  9. 264
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSAppService.cs
  10. 458
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs
  11. 381
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs
  12. 382
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs
  13. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Jobs/TaskJobService.cs
  14. 408
      src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs
  15. 261
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  16. 78
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TEA_TASK_SUB.cs
  17. 5
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TaskJob.cs
  18. 50
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-KanBan/WmsKanban.cs
  19. 298
      src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs
  20. 122
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  21. 7
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/WMSDbContext.cs
  22. 24
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs
  23. 3
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs
  24. 24
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettleDiffDapperRepository.cs
  25. 9
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs
  26. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs
  27. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs
  28. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountRepository.cs
  29. 9
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs
  30. 3
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDiffExportService.cs
  31. 11
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleKBWithCodeExportService.cs
  32. 9
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs
  33. 8
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs
  34. BIN
      vue/src/views/pg-fis/basedate.zip
  35. 2
      vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue
  36. 225
      vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue
  37. 9
      vue/src/views/pg-fis/basedate/m100Online/ScrapMB.vue
  38. 34
      vue/src/views/pg-fis/basedate/m100Online/ScrapZHB.vue
  39. 2
      vue/src/views/pg-fis/basedate/m100Online/detailZHB.vue
  40. 156
      vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue
  41. 42
      vue/src/views/pg-fis/basedate/r100Online/index.vue
  42. 645
      vue/src/views/pg-fis/basedate/repeatR100/index.vue
  43. 6
      vue/src/views/pg-fis/basedate/select/index.vue

1
.gitignore

@ -9,3 +9,4 @@
/src/.vs/SettleAccount/v16/.suo /src/.vs/SettleAccount/v16/.suo
/*.rar

1
.vs/VSWorkspaceState.json

@ -2,5 +2,6 @@
"ExpandedNodes": [ "ExpandedNodes": [
"" ""
], ],
"SelectedNode": "\\SettleAccount.sln (src\\Modules\\SettleAccount\\SettleAccount.sln)",
"PreviewInSolutionExplorer": false "PreviewInSolutionExplorer": false
} }

BIN
.vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo

Binary file not shown.

6269
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20211230.txt

File diff suppressed because it is too large

264
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsJitOutPutDetialDto.cs

@ -4,10 +4,46 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Win.Sfs.Shared.DtoBase;
namespace Win.Sfs.SettleAccount.Entities.Wms namespace Win.Sfs.SettleAccount.Entities.Wms
{ {
public class WmsJitOutPutDetialDto public class WmsJitOutPutDto
{
public WmsJitOutPutDto()
{
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
public class WmsJitOutPutRequestDto: RequestDtoBase
{
public WmsJitOutPutRequestDto()
{
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
public class WmsJitOutPutDetialDto: AuditedEntityDto<Guid>
{ {
[ImporterHeader(Name = "交货单号")] [ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; } public string WmsBillNum { set; get; }
@ -39,6 +75,232 @@ namespace Win.Sfs.SettleAccount.Entities.Wms
}
public class WmsJitOutPutDetialRequestDto: RequestDtoBase
{
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "KENN号")]
//KENN号
public string KennCode { set; get; }
[ImporterHeader(Name = "底盘号")]
//底盘号
public string ChassisNumber { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "组件组物料")]
//物料号
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
public string BillNum { set; get; }
}
public class WmsJitRequestDto
{
public string BillNum { set; get; }
public string Version { set; get; }
public List<Guid> Guids { set; get; }
}
public class WmsKanbanOutPutDto: AuditedEntityDto<Guid>
{
public WmsKanbanOutPutDto()
{
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
public class WmsKanbanOutPutRequestDto : RequestDtoBase
{
public WmsKanbanOutPutRequestDto()
{
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
public class WmsKanbanOutPutDetialDto: AuditedEntityDto<Guid>
{
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "订单号")]
//底盘号
public string Kanban { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
[ImporterHeader(Name = "交货数量")]
public decimal Qty { set; get; }
}
public class WmsKanbanOutPutDetialRequestDto : RequestDtoBase
{
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "订单号")]
//底盘号
public string OrderBillNum { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
}
public class WmsSharePartOutPutDto
{
public WmsSharePartOutPutDto()
{
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
public class WmsSharePartOutPutRequestDto : RequestDtoBase
{
public WmsSharePartOutPutRequestDto()
{
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
public class WmsSharePartOutPutDetialDto
{
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "订单号")]
//底盘号
public string SharePart { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
[ImporterHeader(Name = "交货数量")]
public decimal Qty { set; get; }
}
public class WmsSharePartOutPutDetialRequestDto : RequestDtoBase
{
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "订单号")]
//底盘号
public string Kanban { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
} }

35
src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Reports/ReportRequestDto/ReportRequestDto.cs

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Win.Sfs.SettleAccount.Reports.ReportRequestDto
{
public class BaseRequestDto
{
public string Version { set; get; }
public string MaterialCode { set; get; }
public string Begin { set; get; }
public string End { set; get; }
public string Cp7Begin { set; get; }
public string Cp7End { set; get; }
public string Kenncode { set; get; }
public string ChassisNumber { set; get; }
public string MaterialGroup { set; get; }
public string SapCode { set; get; }
}
public class BaseKanbanReqestDto
{
public string KanBan {set;get;}
public string SapMaterialCode {set;get;}
public string Version {set;get;}
public string CustomerCode {set;get;}
public string CustomerPartCode {set;get;}
public string EstimateTypeDesc {set;get;}
public string State {set;get;}
public DateTime Begin {set;get;}
public DateTime End { set; get; }
}
}

3
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs

@ -196,6 +196,9 @@ namespace Win.Sfs.SettleAccount.Entities.CodeSettingTables
var totalCount = await GetCountAsync(input); var totalCount = await GetCountAsync(input);
var dtos = ObjectMapper.Map<List<CodeSetting>, List<CodeSettingDto>>(entities); var dtos = ObjectMapper.Map<List<CodeSetting>, List<CodeSettingDto>>(entities);
dtos=dtos.OrderBy(p => p.Value).ToList();
return new PagedResultDto<CodeSettingDto>(totalCount, dtos); return new PagedResultDto<CodeSettingDto>(totalCount, dtos);
} }

65
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs

@ -245,33 +245,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
[HttpPost] [HttpPost]
[Route("testImport")] [Route("testImport")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
@ -288,10 +261,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
}); });
return _taskid; return _taskid;
} }
[HttpPost] [HttpPost]
[Route("ExcelImport-PG")] [Route("ExcelImport-PG")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
@ -304,13 +273,14 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? string.Empty }); customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Period", Value = period ?? string.Empty }); customConditionList.Add(new CustomCondition() { Name = "Period", Value = period ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty }); customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
var _versionQuery = _versionRepository.Where(p => p.Version == version);
_versionQuery.BatchDelete();
var _query = _repository.Where(p => p.Version == version);
_query.BatchDelete();
var _taskid = await _service.ImportEnqueueAsync<ImportTaskArgs>(files, "结算数据", CurrentUser, typeof(SettleAccountImportService), customConditionList, (rs) => var _taskid = await _service.ImportEnqueueAsync<ImportTaskArgs>(files, "结算数据", CurrentUser, typeof(SettleAccountImportService), customConditionList, (rs) =>
{ {
var _versionQuery = _versionRepository.Where(p => p.Version == version);
_versionQuery.BatchDelete();
var _query = _repository.Where(p => p.Version == version);
_query.BatchDelete();
}); });
return _taskid; return _taskid;
@ -420,17 +390,14 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{ {
checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm, string.Empty, string.Format("关系表中不存在结算物料号{0}!", itm), string.Empty)); checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm, string.Empty, string.Format("关系表中不存在结算物料号{0}!", itm), string.Empty));
} }
foreach (var itm in query) foreach (var itm in query)
{ {
checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}底盘号 {1}有重复", itm.Key.MaterialCode, itm.Key.ChassisNumber), string.Empty)); checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}底盘号 {1}有重复", itm.Key.MaterialCode, itm.Key.ChassisNumber), string.Empty));
} }
if (checkList.Count > 0) if (checkList.Count > 0)
{ {
return await ExportErrorReportAsync(checkList); return await ExportErrorReportAsync(checkList);
} }
var _existls = _preBatchRepository.Where(p => _precodeList.Contains(p.KENNCode)).ToList(); var _existls = _preBatchRepository.Where(p => _precodeList.Contains(p.KENNCode)).ToList();
if (_existls.Count > 0) if (_existls.Count > 0)
{ {
@ -471,8 +438,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
var result = await _repository.GetAsync(id); var result = await _repository.GetAsync(id);
return result; return result;
} }
private async Task<long> GetCountAsync(SettleAccountRequestDto input) private async Task<long> GetCountAsync(SettleAccountRequestDto input)
{ {
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters); return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
@ -500,27 +465,13 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
IExporter _csv = new CsvExporter(); IExporter _csv = new CsvExporter();
IExporter _excel = new ExcelExporter(); IExporter _excel = new ExcelExporter();
//var prebatchList= await _preBatchRepository.GetAllAsync(GuidGenerator.Create());
//if (input.ParentId != Guid.Empty)
//{
// input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() });
//}
//var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, int.MaxValue,
//0, true);
var _query = from itm1 in _preBatchRepository join itm2 in _repository on new { itm1.KENNCode, itm1.Year } equals new { itm2.KENNCode, itm2.Year } where itm2.Version == version select itm2; var _query = from itm1 in _preBatchRepository join itm2 in _repository on new { itm1.KENNCode, itm1.Year } equals new { itm2.KENNCode, itm2.Year } where itm2.Version == version select itm2;
var _ls=await _query.ToListAsync(); var _ls=await _query.ToListAsync();
foreach (var itm in _ls) foreach (var itm in _ls)
{ {
itm.state = 3; itm.state = 3;
} }
var dtoDetails = ObjectMapper.Map<List<SettleAccount>, List<SettleAccountExportDto>>(_ls); var dtoDetails = ObjectMapper.Map<List<SettleAccount>, List<SettleAccountExportDto>>(_ls);
string _fileName = string.Empty; string _fileName = string.Empty;
//声明导出容器 //声明导出容器
@ -562,7 +513,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
[Route("Export")] [Route("Export")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<string> ExportAsync(SettleAccountRequestDto input) virtual public async Task<string> ExportAsync(SettleAccountRequestDto input)
@ -671,11 +622,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
virtual public async Task<ListResultDto<SettleAccountDto>> GetAllAsync(Guid branchId) virtual public async Task<ListResultDto<SettleAccountDto>> GetAllAsync(Guid branchId)
{ {
var entities = await _repository.GetAllAsync(branchId, true); var entities = await _repository.GetAllAsync(branchId, true);
var dtos = ObjectMapper.Map<List<SettleAccount>, List<SettleAccountDto>>(entities); var dtos = ObjectMapper.Map<List<SettleAccount>, List<SettleAccountDto>>(entities);
return new ListResultDto<SettleAccountDto>(dtos); return new ListResultDto<SettleAccountDto>(dtos);
} }

264
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSAppService.cs

@ -1,264 +0,0 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
using AutoMapper;
using System.Linq;
using System.Text;
using Volo.Abp.Guids;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.ObjectMapping;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.CacheBase;
using Win.Utils;
using Volo.Abp.Application.Dtos;
using Win.Sfs.BaseData.ImportExcelCommon;
using Volo.Abp.Domain.Repositories;
using EFCore.BulkExtensions;
using System.IO;
using Microsoft.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
using Win.Sfs.SettleAccount.FISes;
using Win.Sfs.Shared.Enums.SettleAccount;
using Win.Sfs.Shared.Filter;
using Shouldly;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.Data.Common;
using Volo.Abp.Uow;
using Volo.Abp;
using Win.Abp.Snowflakes;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Magicodes.ExporterAndImporter.Core.Models;
using TaskJob.Services;
using TaskJob.EventArgs;
using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.Repository;
using WY.NewJit.Extends.PaiGe.WMS;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
/// <summary>
/// 大众准时化结算明细导入-R3已结
/// </summary>
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
[AllowAnonymous]
[Route("api/settleaccount/wms")]
public class WMSAppService :
ApplicationService
{
private readonly ISettleAccountBranchEfCoreRepository<WmsJitOutPutDetial, Guid> _wmsRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsJitOutPut, Guid> _wmsVersionRepository;
private readonly WMSEfCoreRepository<WmsJitOutPutDetial> _wmsefRespository;
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository;
private readonly ISettleAccountBranchEfCoreRepository<TaskJob, Guid> _job;
private readonly TaskJobService _service;
/// <summary>
/// 构建方法
/// </summary>
/// <param name="guidGenerator">构建UID</param>
/// <param name="repository">仓储接口</param>
/// <param name="cache">缓存</param>
public WMSAppService(
ISettleAccountBranchEfCoreRepository<WmsJitOutPutDetial, Guid> wmsRepository,
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job,
ISettleAccountBranchEfCoreRepository<WmsJitOutPut, Guid> wmsVersionRepository,
WMSEfCoreRepository<WmsJitOutPutDetial> wmsefRespository,
WMSEfCoreRepository<TB_BILL> wmstbRespository
)
{
_job = job;
_wmstbRespository = wmstbRespository;
_wmsRepository = wmsRepository;
_wmsVersionRepository = wmsVersionRepository;
_wmsefRespository = wmsefRespository;
}
/// <summary>
/// 选择结算明细任务列表,选择相关任务合拼导期间出库表
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpGet]
[Route("WmsJitOutPut")]
[DisableRequestSizeLimit]
public async Task<string> WmsJitOutPut(List<Guid> ids, string version)
{
var _joblist=_job.Where(p => ids.Contains(p.Id)).ToList();
var fileList = _joblist.Select(p => p.RealDownFileName).ToList();
List<WmsJitOutPutDetial> _lst = new List<WmsJitOutPutDetial>();
foreach (var filename in fileList)
{
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
IExcelImporter Importer = new Magicodes.ExporterAndImporter.Excel.ExcelImporter();
var _list = await Importer.ImportSameSheets<WmsJitOutPutDetialDto, WmsJitOutPutDetial>(fileSavePath);
foreach (var itm in _list)
{
var list = itm.Value.Data.ToList();
_lst.AddRange(list.ToArray());
}
}
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail= await _wmsRepository.Where(p => p.Version == version).ToListAsync();
var _billNum="T" + DateTime.Now.ToString("yyyyMMddhhmmssdddd");
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.KennCode, itm1.ChassisNumber }
equals
new { itm2.MaterialCode, itm2.KennCode, itm2.ChassisNumber } into temp1
from tm1 in temp1.DefaultIfEmpty() where tm1==null
select itm1;
var _wmslst=query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0 });
int _count= _wmsVersionRepository.Count(p => p.Version == version);
if (_count == 0)
{
var _version = new List<WmsJitOutPut>();
_version.Add(new WmsJitOutPut { Version = version, BillNum = _billNum, Creator = CurrentUser.Email });
await _wmsVersionRepository.GetDbContext().BulkInsertAsync(_version);
}
else
{
var _ls= _wmsVersionRepository.Where(p => p.Version == version).ToList();
foreach (var itm in _ls)
{
itm.BillNum = _billNum;
}
await _wmsVersionRepository.UpdateManyAsync(_ls);
}
//_wmsRepository.Where(p=>p)
return _billNum;
}
[HttpGet]
[Route("WmsJitOutPut-Pass")]
public async Task<bool> WmsJitOutPutPass( string version, List<Guid> p_list=null)
{
if (p_list != null)
{
List<WmsJitOutPutDetial> _ls = new List<WmsJitOutPutDetial>();
if (p_list.Count() > 0)
{
_ls = await _wmsRepository.Where(p => p_list.Contains(p.Id) && p.Version == version && p.State != 2).ToListAsync();
}
else
{
_ls = await _wmsRepository.Where(p => p.Version == version && p.State != 2).ToListAsync();
}
if (_ls.Count() > 0)
{
var _first = _ls.FirstOrDefault();
var _guid = GuidGenerator.Create();
foreach (var itm in _ls)
{
itm.TaskId = _guid;
}
await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls);
var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", version, "WmsJitOutPutDetail",_first.BillNum, 0,0 ,_guid)
{
TaskId = _guid,
SourceBillNum = _first.BillNum,
TableName = "WmsJitOutPutDetail",
InterfaceType = "1",
Version = version,
SettleAccountState = 0,
WmsState=0
};
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
}
//_wmsDapper.GetListBySql<WmsJitOutPutDetial>("insert into WmsJitOutPutDetial", false);
//_wmsDapper.DbConnection.ConnectionTimeout = 1200;
//_wmsRepository.Where(p=>p)
return true;
}
[HttpGet]
[Route("WmsJitOutPut-Cancel")]
public async Task<bool> WmsJitOutPutCancel(List<Guid> ids, string version)
{
//var _guid = GuidGenerator.Create();
//foreach (var itm in _ls)
//{
// itm.TaskId = _guid;
//}
var _ls = await _wmsRepository.Where(p => ids.Contains(p.Id) && p.Version == version && p.State == 1).ToListAsync();
var _first = _ls.FirstOrDefault();
if (_ls.Count>0)
{
var _guid = GuidGenerator.Create();
await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls,new BulkConfig() { BulkCopyTimeout=0 });
var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", version, "WmsJitOutPutDetail", _first.BillNum, 0,0, _guid)
{
TaskId = _guid,
SourceBillNum = _first.BillNum,
TableName = "WmsJitOutPutDetail",
InterfaceType = "1",
Version = version,
WmsState = 0,
SettleAccountState=0
};
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
return true;
}
}
}

458
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs

@ -0,0 +1,458 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
using AutoMapper;
using System.Linq;
using System.Text;
using Volo.Abp.Guids;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.ObjectMapping;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.CacheBase;
using Win.Utils;
using Volo.Abp.Application.Dtos;
using Win.Sfs.BaseData.ImportExcelCommon;
using Volo.Abp.Domain.Repositories;
using EFCore.BulkExtensions;
using System.IO;
using Microsoft.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
using Win.Sfs.SettleAccount.FISes;
using Win.Sfs.Shared.Enums.SettleAccount;
using Win.Sfs.Shared.Filter;
using Shouldly;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.Data.Common;
using Volo.Abp.Uow;
using Volo.Abp;
using Win.Abp.Snowflakes;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Magicodes.ExporterAndImporter.Core.Models;
using TaskJob.Services;
using TaskJob.EventArgs;
using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.Repository;
using WY.NewJit.Extends.PaiGe.WMS;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
/// <summary>
/// wms出库
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/wmsjitoutput")]
public class WMSJitAppService :
ApplicationService
{
private readonly ISettleAccountBranchEfCoreRepository<WmsJitOutPutDetial, Guid> _wmsRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsJitOutPut, Guid> _wmsVersionRepository;
private readonly WMSEfCoreRepository<WmsJitOutPutDetial> _wmsefRespository;
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository;
private readonly ISettleAccountBranchEfCoreRepository<TaskJob, Guid> _job;
private readonly IExcelImportAppService _excelImportService;
private readonly TaskJobService _service;
/// <summary>
///
/// </summary>
/// <param name="wmsRepository"></param>
/// <param name="job"></param>
/// <param name="wmsVersionRepository"></param>
/// <param name="wmsefRespository"></param>
/// <param name="wmstbRespository"></param>
public WMSJitAppService(
IExcelImportAppService excelImportService,
ISettleAccountBranchEfCoreRepository<WmsJitOutPutDetial, Guid> wmsRepository,
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job,
ISettleAccountBranchEfCoreRepository<WmsJitOutPut, Guid> wmsVersionRepository,
WMSEfCoreRepository<WmsJitOutPutDetial> wmsefRespository,
WMSEfCoreRepository<TB_BILL> wmstbRespository
)
{
_job = job;
_wmstbRespository = wmstbRespository;
_wmsRepository = wmsRepository;
_wmsVersionRepository = wmsVersionRepository;
_wmsefRespository = wmsefRespository;
_excelImportService = excelImportService;
}
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> ExcelImport([FromForm] IFormFileCollection files, string version)
{
var _billNum = "T" + DateTime.Now.ToString("yyyyMMddhhmmss");
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExtendExcelImport<WmsJitOutPutDetial>(files, _excelImportService);
List<WmsJitOutPutDetial> _lst = new List<WmsJitOutPutDetial>();
var _lsCopy = new List<WmsJitOutPutDetial>();
foreach (var itm in result)
{
WmsJitOutPutDetial _detail = new WmsJitOutPutDetial(
GuidGenerator.Create(),
itm.WmsBillNum,
itm.KennCode,
itm.ChassisNumber,
itm.MaterialCode,
itm.MaterialDesc,
itm.MaterialGroup,
string.Empty,
string.Empty,
0,
string.Empty,
string.Empty,
version,
itm.ParentMaterialCode,
itm.BillNum,
GuidGenerator.Create()
, string.Empty
, itm.Qty
);
_lsCopy.Add(_detail);
}
_lst.AddRange(_lsCopy.ToArray());
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail = await _wmsRepository.Where(p => p.Version == version).ToListAsync();
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.KennCode, itm1.ChassisNumber }
equals
new { itm2.MaterialCode, itm2.KennCode, itm2.ChassisNumber } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsJitOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email);
await _wmsVersionRepository.InsertAsync(_version, true);
}
return _billNum;
}
private async Task<long> GetCountAsync(WmsJitOutPutDetialRequestDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
private async Task<long> GetCountAsync(WmsJitOutPutRequestDto input)
{
return await _wmsVersionRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
/// <summary>
/// 准时化出库主表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsJitOutPut>> GetListAsync(WmsJitOutPutRequestDto input)
{
var entities = await _wmsVersionRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
return new PagedResultDto<WmsJitOutPut>(totalCount, entities);
}
/// <summary>
/// 准时化出库明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitDetailList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsJitOutPutDetial>> GetListAsync(WmsJitOutPutDetialRequestDto input)
{
input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "BillNum", Logic = EnumFilterLogic.And, Value = input.BillNum });
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
//var dtoDetails = ObjectMapper.Map<List<WmsJitOutPutDetial>, List<WmsJitOutPutDetialDto>>(entities);
return new PagedResultDto<WmsJitOutPutDetial>(totalCount, entities);
}
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitOutPutAudit")]
[DisableRequestSizeLimit]
public async Task<bool> WmsJitAudit(List<Guid> ids)
{
var _joblist = await _job.Where(p => ids.Contains(p.Id)).ToListAsync();
foreach (var itm in _joblist)
{
itm.FileName = "已确认";
await _job.UpdateAsync(itm);
}
return true;
}
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitOutPutCancel")]
[DisableRequestSizeLimit]
public async Task<bool> WmsJitCancel(List<Guid> ids)
{
var _joblist = await _job.Where(p => ids.Contains(p.Id) && p.FileName == "已确认").ToListAsync();
foreach (var itm in _joblist)
{
itm.FileName = "取消确认";
await _job.UpdateAsync(itm);
}
return true;
}
/// <summary>
/// 选择任务,生成出库单,只包含已确认的单据
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitOutPut")]
public async Task<string> WmsJitOutPut(WmsJitRequestDto input)
{
var _billNum = "T" + DateTime.Now.ToString("yyyyMMddhhmmss");
var _joblist = _job.Where(p => input.Guids.Contains(p.Id) && p.FileName == "已确认").ToList();
if (_joblist.Count() > 0)
{
var fileList = _joblist.Select(p => p.RealDownFileName).ToList();
List<WmsJitOutPutDetial> _lst = new List<WmsJitOutPutDetial>();
foreach (var filename in fileList)
{
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
ExcelHelper _excelHelper = new ExcelHelper(fileSavePath);
var _list = _excelHelper.ExcelToList<WmsJitOutPutDetial>();
var _lsCopy = new List<WmsJitOutPutDetial>();
foreach (var itm in _list)
{
WmsJitOutPutDetial _detail = new WmsJitOutPutDetial(
GuidGenerator.Create(),
itm.WmsBillNum,
itm.KennCode,
itm.ChassisNumber,
itm.MaterialCode,
itm.MaterialDesc,
itm.MaterialGroup,
string.Empty,
string.Empty,
0,
string.Empty,
string.Empty,
input.Version,
itm.ParentMaterialCode,
itm.BillNum,
GuidGenerator.Create()
, string.Empty
, itm.Qty
);
_lsCopy.Add(_detail);
}
_lst.AddRange(_lsCopy.ToArray());
}
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version).ToListAsync();
var error = from itm1 in outPutDetail
join itm2 in _ls1 on
new { itm1.MaterialCode, itm1.KennCode, itm1.ChassisNumber }
equals
new { itm2.MaterialCode, itm2.KennCode, itm2.ChassisNumber }
select itm1;
var errList= error.GroupBy(p => new { p.BillNum }).Select(p => new {BillNum=p.Key.BillNum,Number=p.Sum(itm=>itm.Qty) });
if (errList.Count() == 0)
{
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.KennCode, itm1.ChassisNumber }
equals
new { itm2.MaterialCode, itm2.KennCode, itm2.ChassisNumber } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsJitOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email);
//var _ls = new List<WmsJitOutPut>();
//_ls.Add(_version);
await _wmsVersionRepository.InsertAsync(_version, true);
}
foreach (var job in _joblist)
{
job.FileName = _billNum;
await _job.UpdateAsync(job);
}
}
else
{
StringBuilder _buffer = new StringBuilder();
foreach (var itm in errList)
{
_buffer.AppendFormat("出库单号:{0}重复记录数:{1}条", itm.BillNum, itm.Number);
}
var _errinfo= _buffer.ToString();
foreach (var job in _joblist)
{
job.FileName =_errinfo;
await _job.UpdateAsync(job);
}
}
}
else
{
_billNum = string.Empty;
}
return _billNum;
}
/// <summary>
/// 出库界面功能,核准出库功能
/// </summary>
/// <param name="version"></param>
/// <param name="p_list"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitOutPut-Pass")]
public async Task<bool> WmsJitOutPutPass(WmsJitRequestDto input)
{
if (input.Guids != null)
{
List<WmsJitOutPutDetial> _ls = new List<WmsJitOutPutDetial>();
if (input.Guids.Count() > 0)
{
_ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version == input.Version && p.State != 2).ToListAsync();
}
else
{
_ls = await _wmsRepository.Where(p => p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync();
}
if (_ls.Count() > 0)
{
foreach (var itm in _ls)
{
itm.State = 1;
}
await _wmsRepository.GetDbContext().BulkUpdateAsync(_ls);
//var _first = _ls.FirstOrDefault();
//var _guid = GuidGenerator.Create();
//foreach (var itm in _ls)
//{
// itm.TaskId = _guid;
//}
//await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls);
//var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", version, "WmsJitOutPutDetail",_first.BillNum, 0,0 ,_guid)
//{
// TaskId = _guid,
// SourceBillNum = _first.BillNum,
// TableName = "WmsJitOutPutDetail",
// InterfaceType = "1",
// Version = version,
// SettleAccountState = 0,
// WmsState=0
//};
//var _l = new List<TS_UNI_API>();
//_l.Add(uniapi);
//await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
}
return true;
}
/// <summary>
///出库界面功能, 撤销核准出库
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsJitOutPut-Cancel")]
public async Task<bool> WmsJitOutPutCancel(WmsJitRequestDto input)
{
var _ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version == input.Version && p.State == 2).ToListAsync();
var _first = _ls.FirstOrDefault();
if (_ls.Count > 0)
{
//var _guid = GuidGenerator.Create();
//await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls,new BulkConfig() { BulkCopyTimeout=0 });
//var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", version, "WmsJitOutPutDetail", _first.BillNum, 0,0, _guid)
//{
// TaskId = _guid,
// SourceBillNum = _first.BillNum,
// TableName = "WmsJitOutPutDetail",
// InterfaceType = "1",
// Version = version,
// WmsState = 0,
// SettleAccountState=0
//};
//var _l = new List<TS_UNI_API>();
//_l.Add(uniapi);
//await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
return true;
}
}
}

381
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs

@ -0,0 +1,381 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
using AutoMapper;
using System.Linq;
using System.Text;
using Volo.Abp.Guids;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.ObjectMapping;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.CacheBase;
using Win.Utils;
using Volo.Abp.Application.Dtos;
using Win.Sfs.BaseData.ImportExcelCommon;
using Volo.Abp.Domain.Repositories;
using EFCore.BulkExtensions;
using System.IO;
using Microsoft.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
using Win.Sfs.SettleAccount.FISes;
using Win.Sfs.Shared.Enums.SettleAccount;
using Win.Sfs.Shared.Filter;
using Shouldly;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.Data.Common;
using Volo.Abp.Uow;
using Volo.Abp;
using Win.Abp.Snowflakes;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Magicodes.ExporterAndImporter.Core.Models;
using TaskJob.Services;
using TaskJob.EventArgs;
using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.Repository;
using WY.NewJit.Extends.PaiGe.WMS;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
/// <summary>
/// wms出库
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/wmskanbanoutput")]
public class WMSKanbanAppService :
ApplicationService
{
private readonly ISettleAccountBranchEfCoreRepository<WmsKanbanOutPutDetial, Guid> _wmsRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsKanbanOutPut, Guid> _wmsVersionRepository;
private readonly WMSEfCoreRepository<WmsKanbanOutPutDetial> _wmsefRespository;
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository;
private readonly ISettleAccountBranchEfCoreRepository<TaskJob, Guid> _job;
private readonly IExcelImportAppService _excelImportService;
private readonly TaskJobService _service;
/// <summary>
///
/// </summary>
/// <param name="wmsRepository"></param>
/// <param name="job"></param>
/// <param name="wmsVersionRepository"></param>
/// <param name="wmsefRespository"></param>
/// <param name="wmstbRespository"></param>
public WMSKanbanAppService(
IExcelImportAppService excelImportService,
ISettleAccountBranchEfCoreRepository<WmsKanbanOutPutDetial, Guid> wmsRepository,
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job,
ISettleAccountBranchEfCoreRepository<WmsKanbanOutPut, Guid> wmsVersionRepository,
WMSEfCoreRepository<WmsKanbanOutPutDetial> wmsefRespository,
WMSEfCoreRepository<TB_BILL> wmstbRespository
)
{
_job = job;
_wmstbRespository = wmstbRespository;
_wmsRepository = wmsRepository;
_wmsVersionRepository = wmsVersionRepository;
_wmsefRespository = wmsefRespository;
_excelImportService = excelImportService;
}
private async Task<long> GetCountAsync(WmsKanbanOutPutDetialRequestDto input)
{
return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
private async Task<long> GetCountAsync(WmsKanbanOutPutRequestDto input)
{
return await _wmsVersionRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
/// <summary>
/// 准时化出库主表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsKanbanOutPut>> GetListAsync( WmsKanbanOutPutRequestDto input)
{
var entities = await _wmsVersionRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
return new PagedResultDto<WmsKanbanOutPut>(totalCount, entities);
}
/// <summary>
/// 准时化出库明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanDetailList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsKanbanOutPutDetial>> GetListAsync(WmsKanbanOutPutDetialRequestDto input)
{
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
return new PagedResultDto<WmsKanbanOutPutDetial>(totalCount, entities);
}
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanOutPutAudit")]
[DisableRequestSizeLimit]
public async Task<bool> WmsKanbanAudit(List<Guid> ids)
{
var _joblist =await _job.Where(p => ids.Contains(p.Id)).ToListAsync();
foreach (var itm in _joblist)
{
itm.FileName = "已确认";
}
foreach (var itm in _joblist)
{
await _job.UpdateAsync(itm);
}
var _count=await _job.BatchUpdateAsync(_joblist.ToList());
if (_count > 0)
{
return true;
}
return false;
}
/// <summary>
/// 选择任务,生成出库单,只包含已确认的单据
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanOutPut")]
public async Task<string> WmsKanbanOutPut(WmsJitRequestDto input)
{
var _billNum = "K" + DateTime.Now.ToString("yyyyMMddhhmmss");
var _joblist = _job.Where(p => input.Guids.Contains(p.Id) && p.FileName == "已确认").ToList();
if (_joblist.Count() > 0)
{
var fileList = _joblist.Select(p => p.RealDownFileName).ToList();
List<WmsKanbanOutPutDetial> _lst = new List<WmsKanbanOutPutDetial>();
foreach (var filename in fileList)
{
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
ExcelHelper _excelHelper = new ExcelHelper(fileSavePath);
var _list = _excelHelper.ExcelToList<WmsKanbanOutPutDetial>();
foreach (var itm in _list)
{
itm.SetId(GuidGenerator.Create());
}
_lst.AddRange(_list.ToArray());
}
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version).ToListAsync();
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.Kanban }
equals
new { itm2.MaterialCode, itm2.Kanban } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsKanbanOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email);
await _wmsVersionRepository.InsertAsync(_version, true);
}
foreach (var job in _joblist)
{
job.FileName = _billNum;
await _job.UpdateAsync(job);
}
}
else
{
_billNum = string.Empty;
}
return _billNum;
}
/// <summary>
/// 出库界面功能,核准出库功能
/// </summary>
/// <param name="version"></param>
/// <param name="p_list"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanOutPut-Pass")]
public async Task<bool> WmsKanbanOutPutPass(WmsJitRequestDto input)
{
if (input.Guids != null)
{
List<WmsKanbanOutPutDetial> _ls = new List<WmsKanbanOutPutDetial>();
if (input.Guids.Count() > 0)
{
_ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version ==input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync();
}
else
{
_ls = await _wmsRepository.Where(p => p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync();
}
if (_ls.Count() > 0)
{
var _first = _ls.FirstOrDefault();
var _guid = GuidGenerator.Create();
foreach (var itm in _ls)
{
itm.TaskId = _guid;
}
await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls);
var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", input.Version, "WmsKanbanOutPutDetail",_first.BillNum, 0,0 ,_guid)
{
TaskId = _guid,
SourceBillNum = _first.BillNum,
TableName = "WmsKanbanOutPutDetail",
InterfaceType = "2",
Version = input.Version,
SettleAccountState = 0,
WmsState=0
};
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
}
return true;
}
/// <summary>
///出库界面功能, 撤销核准出库
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsKanbanOutPut-Cancel")]
public async Task<bool> WmsKanbanOutPutCancel(WmsJitRequestDto input)
{
var _ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version == input.Version && p.State == 1).ToListAsync();
var _first = _ls.FirstOrDefault();
if (_ls.Count()>0)
{
var _guid = GuidGenerator.Create();
await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls,new BulkConfig() { BulkCopyTimeout=0 });
var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", input.Version, "WmsKanbanOutPutDetail", _first.BillNum, 0,0, _guid)
{
TaskId = _guid,
SourceBillNum = _first.BillNum,
TableName = "WmsKanbanOutPutDetail",
InterfaceType = "2",
Version = input.Version,
WmsState = 0,
SettleAccountState=0
};
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
return true;
}
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> ExcelImport([FromForm] IFormFileCollection files, string version)
{
var _billNum = "K" + DateTime.Now.ToString("yyyyMMddhhmmss");
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExtendExcelImport<WmsKanbanOutPutDetial>(files, _excelImportService);
List<WmsKanbanOutPutDetial> _lst = new List<WmsKanbanOutPutDetial>();
var _lsCopy = new List<WmsKanbanOutPutDetial>();
foreach (var itm in result)
{
WmsKanbanOutPutDetial _detail = new WmsKanbanOutPutDetial(
GuidGenerator.Create(),
itm.WmsBillNum,
itm.Kanban,
itm.MaterialCode,
itm.MaterialDesc,
itm.MaterialGroup,
string.Empty,
string.Empty,
0,
string.Empty,
string.Empty,
version,
itm.ParentMaterialCode,
itm.BillNum,
GuidGenerator.Create()
, string.Empty
, itm.Qty.Value
);
_lsCopy.Add(_detail);
}
_lst.AddRange(_lsCopy.ToArray());
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail = await _wmsRepository.Where(p => p.Version == version).ToListAsync();
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.Kanban }
equals
new { itm2.MaterialCode, itm2.Kanban } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsKanbanOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email);
await _wmsVersionRepository.InsertAsync(_version, true);
}
return _billNum;
}
}
}

382
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs

@ -0,0 +1,382 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Distributed;
using AutoMapper;
using System.Linq;
using System.Text;
using Volo.Abp.Guids;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
using Volo.Abp.ObjectMapping;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.Shared.CacheBase;
using Win.Utils;
using Volo.Abp.Application.Dtos;
using Win.Sfs.BaseData.ImportExcelCommon;
using Volo.Abp.Domain.Repositories;
using EFCore.BulkExtensions;
using System.IO;
using Microsoft.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
using Win.Sfs.SettleAccount.FISes;
using Win.Sfs.Shared.Enums.SettleAccount;
using Win.Sfs.Shared.Filter;
using Shouldly;
using Magicodes.ExporterAndImporter.Csv;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.Data.Common;
using Volo.Abp.Uow;
using Volo.Abp;
using Win.Abp.Snowflakes;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Magicodes.ExporterAndImporter.Core.Models;
using TaskJob.Services;
using TaskJob.EventArgs;
using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.Repository;
using WY.NewJit.Extends.PaiGe.WMS;
namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{
/// <summary>
/// wms出库
/// </summary>
[AllowAnonymous]
[Route("api/settleaccount/wmsSharePartoutput")]
public class WMSSharePartAppService :
ApplicationService
{
private readonly ISettleAccountBranchEfCoreRepository<WmsSharePartOutPutDetial, Guid> _wmsRepository;
private readonly ISettleAccountBranchEfCoreRepository<WmsSharePartOutPut, Guid> _wmsVersionRepository;
private readonly WMSEfCoreRepository<WmsSharePartOutPutDetial> _wmsefRespository;
private readonly WMSEfCoreRepository<TB_BILL> _wmstbRespository;
private readonly ISettleAccountBranchEfCoreRepository<TaskJob, Guid> _job;
private readonly IExcelImportAppService _excelImportService;
private readonly TaskJobService _service;
/// <summary>
///
/// </summary>
/// <param name="wmsRepository"></param>
/// <param name="job"></param>
/// <param name="wmsVersionRepository"></param>
/// <param name="wmsefRespository"></param>
/// <param name="wmstbRespository"></param>
public WMSSharePartAppService(
ISettleAccountBranchEfCoreRepository<WmsSharePartOutPutDetial, Guid> wmsRepository,
ISettleAccountBranchEfCoreRepository<TaskJob, Guid> job,
ISettleAccountBranchEfCoreRepository<WmsSharePartOutPut, Guid> wmsVersionRepository,
WMSEfCoreRepository<WmsSharePartOutPutDetial> wmsefRespository,
WMSEfCoreRepository<TB_BILL> wmstbRespository,
IExcelImportAppService excelImportService
)
{
_excelImportService = excelImportService;
_job = job;
_wmstbRespository = wmstbRespository;
_wmsRepository = wmsRepository;
_wmsVersionRepository = wmsVersionRepository;
_wmsefRespository = wmsefRespository;
}
private async Task<long> GetCountAsync(WmsSharePartOutPutDetialRequestDto input)
{
return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
private async Task<long> GetCountAsync(WmsSharePartOutPutRequestDto input)
{
return await _wmsVersionRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters);
}
/// <summary>
/// 准时化出库主表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsSharePartOutPut>> GetListAsync( WmsSharePartOutPutRequestDto input)
{
var entities = await _wmsVersionRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
return new PagedResultDto<WmsSharePartOutPut>(totalCount, entities);
}
/// <summary>
/// 准时化出库明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartDetailList")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
virtual public async Task<PagedResultDto<WmsSharePartOutPutDetial>> GetListAsync(WmsSharePartOutPutDetialRequestDto input)
{
var entities = await _wmsRepository.GetListByFilterAsync(GuidGenerator.Create(), input.Filters, input.Sorting, input.MaxResultCount,
input.SkipCount, true);
var totalCount = await GetCountAsync(input);
return new PagedResultDto<WmsSharePartOutPutDetial>(totalCount, entities);
}
/// <summary>
/// 任务明细标记已确认
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartOutPutAudit")]
[DisableRequestSizeLimit]
public async Task<bool> WmsSharePartAudit(List<Guid> ids)
{
var _joblist =await _job.Where(p => ids.Contains(p.Id)).ToListAsync();
foreach (var itm in _joblist)
{
itm.FileName = "已确认";
}
foreach (var itm in _joblist)
{
await _job.UpdateAsync(itm);
}
var _count=await _job.BatchUpdateAsync(_joblist.ToList());
if (_count > 0)
{
return true;
}
return false;
}
/// <summary>
/// 选择任务,生成出库单,只包含已确认的单据
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartOutPut")]
public async Task<string> WmsSharePartOutPut(WmsJitRequestDto input)
{
var _billNum = "B" + DateTime.Now.ToString("yyyyMMddhhmmss");
var _joblist = _job.Where(p => input.Guids.Contains(p.Id) && p.FileName == "已确认").ToList();
if (_joblist.Count() > 0)
{
var fileList = _joblist.Select(p => p.RealDownFileName).ToList();
List<WmsSharePartOutPutDetial> _lst = new List<WmsSharePartOutPutDetial>();
foreach (var filename in fileList)
{
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename;
ExcelHelper _excelHelper = new ExcelHelper(fileSavePath);
var _list = _excelHelper.ExcelToList<WmsSharePartOutPutDetial>();
foreach (var itm in _list)
{
itm.SetId(GuidGenerator.Create());
}
_lst.AddRange(_list.ToArray());
}
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail = await _wmsRepository.Where(p => p.Version == input.Version).ToListAsync();
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.OrderBillNum }
equals
new { itm2.MaterialCode, itm2.OrderBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == input.Version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsSharePartOutPut(GuidGenerator.Create(), input.Version, _billNum, CurrentUser.Email);
//var _ls = new List<WmsSharePartOutPut>();
//_ls.Add(_version);
await _wmsVersionRepository.InsertAsync(_version, true);
}
foreach (var job in _joblist)
{
job.FileName = _billNum;
await _job.UpdateAsync(job);
}
}
else
{
_billNum = string.Empty;
}
return _billNum;
}
/// <summary>
/// 出库界面功能,核准出库功能
/// </summary>
/// <param name="version"></param>
/// <param name="p_list"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartOutPut-Pass")]
public async Task<bool> WmsSharePartOutPutPass(WmsJitRequestDto input)
{
if (input.Guids != null)
{
List<WmsSharePartOutPutDetial> _ls = new List<WmsSharePartOutPutDetial>();
if (input.Guids.Count() > 0)
{
_ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync();
}
else
{
_ls = await _wmsRepository.Where(p => p.Version == input.Version && p.BillNum == input.BillNum && p.State != 2).ToListAsync();
}
if (_ls.Count() > 0)
{
var _first = _ls.FirstOrDefault();
var _guid = GuidGenerator.Create();
foreach (var itm in _ls)
{
itm.TaskId = _guid;
}
await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls);
var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", input.Version, "WmsSharePartOutPutDetail",_first.BillNum, 0,0 ,_guid)
{
TaskId = _guid,
SourceBillNum = _first.BillNum,
TableName = "WmsSharePartOutPutDetail",
InterfaceType = "3",
Version = input.Version,
SettleAccountState = 0,
WmsState=0
};
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
}
return true;
}
/// <summary>
///出库界面功能, 撤销核准出库
/// </summary>
/// <param name="ids"></param>
/// <param name="version"></param>
/// <returns></returns>
[HttpPost]
[Route("WmsSharePartOutPut-Cancel")]
public async Task<bool> WmsSharePartOutPutCancel(WmsJitRequestDto input)
{
var _ls = await _wmsRepository.Where(p => input.Guids.Contains(p.Id) && p.Version == input.Version && p.State == 1).ToListAsync();
var _first = _ls.FirstOrDefault();
if (_ls.Count()>0)
{
var _guid = GuidGenerator.Create();
await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls,new BulkConfig() { BulkCopyTimeout=0 });
var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", input.Version, "WmsSharePartOutPutDetail", _first.BillNum, 0,0, _guid)
{
TaskId = _guid,
SourceBillNum = _first.BillNum,
TableName = "WmsSharePartOutPutDetail",
InterfaceType = "3",
Version = input.Version,
WmsState = 0,
SettleAccountState=0
};
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
}
return true;
}
[HttpPost]
[Route("ExcelImport")]
[DisableRequestSizeLimit]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
public async Task<string> ExcelImport([FromForm] IFormFileCollection files, string version)
{
var _billNum = "B" + DateTime.Now.ToString("yyyyMMddhhmmss");
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExtendExcelImport<WmsSharePartOutPutDetial>(files, _excelImportService);
List<WmsSharePartOutPutDetial> _lst = new List<WmsSharePartOutPutDetial>();
var _lsCopy = new List<WmsSharePartOutPutDetial>();
foreach (var itm in result)
{
WmsSharePartOutPutDetial _detail = new WmsSharePartOutPutDetial(
GuidGenerator.Create(),
itm.WmsBillNum,
itm.OrderBillNum,
itm.MaterialCode,
itm.MaterialDesc,
itm.MaterialGroup,
string.Empty,
string.Empty,
0,
string.Empty,
string.Empty,
version,
itm.ParentMaterialCode,
itm.BillNum,
GuidGenerator.Create()
, string.Empty
, itm.Qty.Value
);
_lsCopy.Add(_detail);
}
_lst.AddRange(_lsCopy.ToArray());
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList();
var outPutDetail = await _wmsRepository.Where(p => p.Version == version).ToListAsync();
var query = from itm1 in _ls1
join itm2 in outPutDetail on
new { itm1.MaterialCode, itm1.OrderBillNum }
equals
new { itm2.MaterialCode, itm2.OrderBillNum } into temp1
from tm1 in temp1.DefaultIfEmpty()
where tm1 == null
select itm1;
var _wmslst = query.ToList();
foreach (var itm in _wmslst)
{
itm.BillNum = _billNum;
}
await _wmsRepository.GetDbContext().BulkInsertAsync(_wmslst, new BulkConfig() { BulkCopyTimeout = 0, BatchSize = 10000 });
int _count = _wmsVersionRepository.Count(p => p.Version == version && p.BillNum == _billNum);
if (_count == 0)
{
var _version = new WmsSharePartOutPut(GuidGenerator.Create(), version, _billNum, CurrentUser.Email);
await _wmsVersionRepository.InsertAsync(_version, true);
}
return _billNum;
}
}
}

2
src/Modules/SettleAccount/src/SettleAccount.Application/Jobs/TaskJobService.cs

@ -237,7 +237,7 @@ namespace Win.Sfs.SettleAccount.Entities.TaskJobs
var _serviceName = moudle.FullName; var _serviceName = moudle.FullName;
var guid = Guid.NewGuid(); var guid = Guid.NewGuid();
await _mng.CreateAsync(new TaskJob(guid,version , currentApplicationName, "导出", string.Empty, user.Name, user.Email, string.Empty, string.Empty, str, str, _serviceName,version,remark)); var _entity= await _mng.CreateAsync(new TaskJob(guid,version , currentApplicationName, "导出", string.Empty, user.Name, user.Email, string.Empty,string.Empty, str, str, _serviceName,version,remark));
var args = new ExportTaskArgs() var args = new ExportTaskArgs()
{ {
Id=guid, Id=guid,

408
src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs

@ -28,6 +28,7 @@ using Win.Sfs.SettleAccount.Entities.TaskJobs;
using Win.Sfs.SettleAccount.Entities.Wms; using Win.Sfs.SettleAccount.Entities.Wms;
using Win.Sfs.SettleAccount.Entities.WMS; using Win.Sfs.SettleAccount.Entities.WMS;
using Win.Sfs.SettleAccount.FISes; using Win.Sfs.SettleAccount.FISes;
using Win.Sfs.SettleAccount.Reports.ReportRequestDto;
namespace Win.Sfs.SettleAccount.Reports.ReportServices namespace Win.Sfs.SettleAccount.Reports.ReportServices
{ {
@ -87,35 +88,26 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="sapCode">厂内物料号</param> /// <param name="sapCode">厂内物料号</param>
/// <param name="estimateTypeDesc">物料组</param> /// <param name="estimateTypeDesc">物料组</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpPost]
[Route("SettleDoorPanel")] [Route("SettleDoorPanel")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
public async Task<string> SettleDoorPanel( public async Task<string> SettleDoorPanel(
string version, BaseRequestDto input
string materialCode,
string begin,
string end,
string cp7begin,
string cp7end,
string kenncode,
string chassisNumber,
string materialGroup,
string sapCode
) )
{ {
List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(version) ? string.Empty : version }); customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(input.Version) ? string.Empty : input.Version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(materialCode) ? string.Empty : materialCode }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(input.MaterialCode) ? string.Empty : input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(begin) ? string.Empty : begin }); customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(input.Begin) ? string.Empty : input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(end) ? string.Empty : end }); customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(input.End) ? string.Empty : input.End });
customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(cp7begin) ? string.Empty : cp7begin }); customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(input.Cp7Begin) ? string.Empty : input.Cp7Begin });
customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(cp7end) ? string.Empty : cp7end }); customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(input.Cp7End) ? string.Empty : input.Cp7End });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode }); customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(input.Kenncode) ? string.Empty : input.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber }); customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(input.ChassisNumber) ? string.Empty : input.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup }); customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode }); customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("大众准时化结算门板价格差异比对报表", ExportExtentsion.Excel,version,string.Empty, CurrentUser, typeof(SettleDoorPanelExportService), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("准时化结算门板价格差异比对报表", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(SettleDoorPanelExportService), customConditionList, (rs) =>
{ {
}); });
return _taskid; return _taskid;
@ -133,26 +125,25 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="begin"></param> /// <param name="begin"></param>
/// <param name="end"></param> /// <param name="end"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpPost]
[Route("SettleKanBan-WithCode")] [Route("SettleKanBan-WithCode")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
public async Task<string> SettledKanBanWithCode(string kanBan, string sapMaterialCode, string version, string customerCode, string customerPartCode, string estimateTypeDesc, public async Task<string> SettledKanBanWithCode(BaseKanbanReqestDto input)
string state, DateTime begin, DateTime end)
{ {
List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty }); customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty }); customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = input.CustomerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerPartCode", Value = customerPartCode ?? string.Empty }); customConditionList.Add(new CustomCondition() { Name = "CustomerPartCode", Value = input.CustomerPartCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" }); customConditionList.Add(new CustomCondition() { Name = "State", Value = input.State ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "EstimateTypeDesc", Value = estimateTypeDesc ?? string.Empty }); customConditionList.Add(new CustomCondition() { Name = "EstimateTypeDesc", Value = input.EstimateTypeDesc ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "有条码看板结算核对" }); customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "有条码看板结算核对" });
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = kanBan ?? string.Empty }); customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.KanBan ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value = sapMaterialCode ?? string.Empty }); customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value = input.SapMaterialCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() }); customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = input.Begin.ToString() });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() }); customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End.ToString() });
var _taskid = await _service.ExportEnqueueAsync("大众看板结算与交货核对明细表", ExportExtentsion.Excel,version ,string.Empty,CurrentUser, typeof(SettleKBWithCodeExportService), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("大众看板结算与交货核对明细表", ExportExtentsion.Excel,input.Version ,string.Empty,CurrentUser, typeof(SettleKBWithCodeExportService), customConditionList, (rs) =>
{ {
}); });
return _taskid; return _taskid;
@ -216,29 +207,29 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="begin"></param> /// <param name="begin"></param>
/// <param name="end"></param> /// <param name="end"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] //[HttpGet]
[Route("UnSettledDiff-Make")] //[Route("UnSettledDiff-Make")]
[DisableRequestSizeLimit] //[DisableRequestSizeLimit]
public async Task<string> UnSettledMake(string year, string period, string version, string customerCode, string factory, string matialCode, string state,DateTime begin,DateTime end)
{
List<CustomCondition> customConditionList = new List<CustomCondition>(); //public async Task<string> UnSettledMake(string year, string period, string version, string customerCode, string factory, string matialCode, string state,DateTime begin,DateTime end)
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty }); //{
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "未结算对比" });
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
var _taskid = await _service.ExportEnqueueAsync("未结算对比", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(UnSettledExportService), customConditionList, (rs) => // List<CustomCondition> customConditionList = new List<CustomCondition>();
{ // customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
}); // customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
return _taskid; // customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
} // customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
// customConditionList.Add(new CustomCondition() { Name = "MatialCode", Value = matialCode ?? "0" });
// customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "未结算对比" });
// customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
// customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
// var _taskid = await _service.ExportEnqueueAsync("未结算对比", ExportExtentsion.Excel,version, string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup, CurrentUser, typeof(UnSettledExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
/// <summary> /// <summary>
@ -254,26 +245,26 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="begin"></param> /// <param name="begin"></param>
/// <param name="end"></param> /// <param name="end"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] //[HttpGet]
[Route("FisUnSettledDiff-Make")] //[Route("FisUnSettledDiff-Make")]
[DisableRequestSizeLimit] //[DisableRequestSizeLimit]
public async Task<string> FisUnSettledMake(string year, string version, string customerCode, string factory, string state) //public async Task<string> FisUnSettledMake(string year, string version, string customerCode, string factory, string state)
{ //{
List<CustomCondition> customConditionList = new List<CustomCondition>(); // List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" }); // customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "ERP总成开票报表" }); // customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "ERP总成开票报表" });
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() }); // customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() });
var _taskid = await _service.ExportEnqueueAsync("ERP总成开票报表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(fisUnsettledDiffReport), customConditionList, (rs) => // var _taskid = await _service.ExportEnqueueAsync("ERP总成开票报表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(fisUnsettledDiffReport), customConditionList, (rs) =>
{ // {
}); // });
return _taskid; // return _taskid;
} //}
/// <summary> /// <summary>
/// 价差量差分析报表 /// 价差量差分析报表
@ -284,37 +275,37 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="factory"></param> /// <param name="factory"></param>
/// <param name="state"></param> /// <param name="state"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] //[HttpGet]
[Route("PriceQtyDiff-Make")] //[Route("PriceQtyDiff-Make")]
[DisableRequestSizeLimit] //[DisableRequestSizeLimit]
public async Task<string> PriceQtyDiffMake(string year, string version, string customerCode, string factory, string state) //public async Task<string> PriceQtyDiffMake(string year, string version, string customerCode, string factory, string state)
{ //{
//if (!_invoiceVersionRepository.Any(p => p.Version == version)) // //if (!_invoiceVersionRepository.Any(p => p.Version == version))
//{ // //{
// throw new BusinessException("8989", string.Format("不存发票{0}期间", version)); // // throw new BusinessException("8989", string.Format("不存发票{0}期间", version));
//} // //}
//if (!_settleAccountVersionrepository.Any(p => p.Version == version)) // //if (!_settleAccountVersionrepository.Any(p => p.Version == version))
//{ // //{
// throw new BusinessException("8989", string.Format("不存结算{0}期间", version)); // // throw new BusinessException("8989", string.Format("不存结算{0}期间", version));
//} // //}
//if (!_itemInvoicePriceVersionrepository.Any(p => p.Version == version)) // //if (!_itemInvoicePriceVersionrepository.Any(p => p.Version == version))
//{ // //{
// throw new BusinessException("8989", string.Format("不存QAD价格导入{0}期间", version)); // // throw new BusinessException("8989", string.Format("不存QAD价格导入{0}期间", version));
//} // //}
List<CustomCondition> customConditionList = new List<CustomCondition>(); // List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "Version", Value = version ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" }); // customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "价差量差分析报表" }); // customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "价差量差分析报表" });
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() }); // customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() });
var _taskid = await _service.ExportEnqueueAsync("价差量差分析报表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(PriceQtyDifferenceExportService), customConditionList, (rs) => // var _taskid = await _service.ExportEnqueueAsync("价差量差分析报表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(PriceQtyDifferenceExportService), customConditionList, (rs) =>
{ // {
}); // });
return _taskid; // return _taskid;
} //}
/// <summary> /// <summary>
@ -326,7 +317,9 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
[Route("InvoiceSettledDiff-Make")] [Route("InvoiceSettledDiff-Make")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
public async Task<string> InvoiceSettledDiffMake(string year, string period, string version,string sapCode, string customerCode, string factory, string matialCode, string state) public async Task<string> InvoiceSettledDiffMake(
string year, string period, string version,string sapCode, string customerCode, string factory, string matialCode, string state
)
{ {
//if (!_settleAccountVersionrepository.Any(p => p.Version == version)) //if (!_settleAccountVersionrepository.Any(p => p.Version == version))
//{ //{
@ -342,7 +335,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = sapCode ?? string.Empty }); customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = sapCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "结算与开票数据对比" }); customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "结算与开票数据对比" });
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() }); customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() });
var _taskid = await _service.ExportEnqueueAsync("大众发票与结算核对汇总表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(InvoiceSettledDiffExportService), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("发票与结算核对汇总表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(InvoiceSettledDiffExportService), customConditionList, (rs) =>
{ {
}); });
@ -350,85 +343,66 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
} }
/// <summary> /// <summary>
/// 2.大众发票与结算核对明细表 ///发票与结算核对明细表
/// </summary> /// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpPost]
[Route("InvoiceSettledDetailDiff-Make")] [Route("InvoiceSettledDetailDiff-Make")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
public async Task<string> InvoiceSettledDetailDiffMake( public async Task<string> InvoiceSettledDetailDiffMake(
string version, BaseRequestDto request
string materialCode,
string begin,
string end,
string cp7begin,
string cp7end,
string kenncode,
string chassisNumber,
string materialGroup,
string sapCode
) )
{ {
//string str1 = string.Empty;
//if(materialGroup!=null)
//{
// str1 = string.Join(',', materialGroup.ToArray());
//}
List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value =string.IsNullOrEmpty(version) ?string.Empty:version }); customConditionList.Add(new CustomCondition() { Name = "Version", Value =string.IsNullOrEmpty(request.Version) ?string.Empty:request.Version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(materialCode) ?string.Empty: materialCode }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(request.MaterialCode) ?string.Empty: request.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(begin) ? string.Empty : begin }); customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(request.Begin) ? string.Empty : request.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(end) ? string.Empty : end }); customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(request.End) ? string.Empty : request.End });
customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(cp7begin) ? string.Empty : cp7begin }); customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(request.Cp7Begin) ? string.Empty : request.Cp7Begin });
customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(cp7end) ? string.Empty : cp7end }); customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(request.Cp7End) ? string.Empty : request.Cp7End });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode }); customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(request.Kenncode) ? string.Empty : request.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber }); customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(request.ChassisNumber) ? string.Empty : request.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup }); customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(request.MaterialGroup) ? string.Empty : request.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode }); customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(request.SapCode) ? string.Empty : request.SapCode });
var _taskid = await _service.ExportEnqueueAsync("大众发票与结算核对明细表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(InvoiceSettledDetailDiffExportService), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("准时化结算核对明细", ExportExtentsion.Excel,request.Version, string.IsNullOrEmpty(request.MaterialGroup) ? string.Empty : request.MaterialGroup, CurrentUser, typeof(InvoiceSettledDetailDiffExportService), customConditionList, (rs) =>
{ {
}); });
return _taskid; return _taskid;
} }
/// <summary> /// <summary>
///3.大众准时化结算数量差异比对表 ///3.准时化结算数量差异比对表
/// </summary> /// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpPost]
[Route("UnInvoiceSettledDetailDiff-Make")] [Route("UnInvoiceSettledDetailDiff-Make")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
public async Task<string> UnInvoiceSettledDetailDiffMake( public async Task<string> UnInvoiceSettledDetailDiffMake(
string version,
string materialCode,
string begin, BaseRequestDto request
string end,
string cp7begin,
string cp7end,
string kenncode,
string chassisNumber,
string materialGroup,
string sapCode
) )
{ {
List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(version) ? string.Empty : version }); customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(request.Version) ? string.Empty : request.Version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(materialCode) ? string.Empty : materialCode }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(request.MaterialCode) ? string.Empty : request.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(begin) ? string.Empty : materialCode }); customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(request.Begin) ? string.Empty : request.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(end) ? string.Empty : materialCode }); customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(request.End) ? string.Empty : request.End });
customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(cp7begin) ? string.Empty : cp7begin }); customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(request.Cp7Begin) ? string.Empty : request.Cp7Begin });
customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(cp7end) ? string.Empty : cp7end }); customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(request.Cp7End) ? string.Empty : request.Cp7End });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode }); customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(request.Kenncode) ? string.Empty : request.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber }); customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(request.ChassisNumber) ? string.Empty : request.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "Mater", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup }); customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(request.MaterialGroup) ? string.Empty : request.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode }); customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(request.SapCode) ? string.Empty : request.SapCode });
var _taskid = await _service.ExportEnqueueAsync("大众准时化结算数量差异比对表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(UnInvoiceSettledDetailDiffExportService), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("准时化结算数量差异比对输出", ExportExtentsion.Excel,request.Version, string.IsNullOrEmpty(request.MaterialGroup) ? string.Empty : request.MaterialGroup, CurrentUser, typeof(UnInvoiceSettledDetailDiffExportService), customConditionList, (rs) =>
{ {
}); });
return _taskid; return _taskid;
@ -439,37 +413,32 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <summary> /// <summary>
/// 7.大众准时化未结明细表(包含漏结,漏结要有标识) /// 准时化未结明细表(包含漏结,漏结要有标识)
/// </summary> /// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpPost]
[Route("UnsettledDetailReportService-Make")] [Route("UnsettledDetailReportService-Make")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
public async Task<string> UnsettledDetailReportServiceMake( public async Task<string> UnsettledDetailReportServiceMake(
string version,
string materialCode, BaseRequestDto input
string begin,
string end,
string kenncode,
string chassisNumber,
string materialGroup,
string sapCode
) )
{ {
List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = !string.IsNullOrEmpty(version)?version:string.Empty }); customConditionList.Add(new CustomCondition() { Name = "Version", Value = !string.IsNullOrEmpty(input.Version) ?input.Version:string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value =string.Empty }); customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value =string.Empty });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = !string.IsNullOrEmpty(materialCode)?materialCode:string.Empty }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = !string.IsNullOrEmpty(input.MaterialCode)? input.MaterialCode :string.Empty });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = !string.IsNullOrEmpty(materialGroup)? materialGroup:string.Empty }); customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = !string.IsNullOrEmpty(input.MaterialGroup)? input.MaterialGroup :string.Empty });
customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value =string.Empty }); customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value =string.Empty });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = !string.IsNullOrEmpty(materialCode)?materialCode:string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Begin", Value = !string.IsNullOrEmpty(begin)?string.Empty: begin }); customConditionList.Add(new CustomCondition() { Name = "Begin", Value = !string.IsNullOrEmpty(input.Begin)?string.Empty: input.Begin });
customConditionList.Add(new CustomCondition() { Name = "End", Value = !string.IsNullOrEmpty(end)?string.Empty: end }); customConditionList.Add(new CustomCondition() { Name = "End", Value = !string.IsNullOrEmpty(input.End)?string.Empty: input.End });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode }); customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(input.Kenncode) ? string.Empty : input.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber }); customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(input.ChassisNumber) ? string.Empty : input.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode }); customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("大众准时化未结明细表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(UnsettledDetailReportService), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("准时化未结明细表", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(UnsettledDetailReportService), customConditionList, (rs) =>
{ {
}); });
return _taskid; return _taskid;
@ -477,71 +446,64 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <summary> /// <summary>
///6.大众准时化未结差异比对表 ///准时化未结差异比对表
/// </summary> /// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpPost]
[Route("UnSettleDiffExport-Make")] [Route("UnSettleDiffExport-Make")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
public async Task<string> UnSettleDiffExportServiceMake( public async Task<string> UnSettleDiffExportServiceMake(
string version, BaseRequestDto input
string materialCode,
string begin,
string end,
string kenncode,
string chassisNumber,
string materialGroup,
string sapCode
) )
{ {
List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version }); customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = materialCode }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = begin }); customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end }); customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = materialCode }); customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode }); customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(input.Kenncode) ? string.Empty : input.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber }); customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(input.ChassisNumber) ? string.Empty : input.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup }); customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode }); customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("大众准时化未结差异比对表", ExportExtentsion.Excel,version,string.Empty, CurrentUser, typeof(UnSettleDiffExportService), customConditionList, (rs) => var _taskid = await _service.ExportEnqueueAsync("准时化未结差异比对输出", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(UnSettleDiffExportService), customConditionList, (rs) =>
{ {
}); });
return _taskid; return _taskid;
} }
/// <summary> ///// <summary>
/// 结算总成和ERP总成价格对比 ///// 结算总成和ERP总成价格对比
/// </summary> ///// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param> ///// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns> ///// <returns></returns>
[HttpGet] //[HttpGet]
[Route("SettledPartAndErpPartPriceDiff-Make")] //[Route("SettledPartAndErpPartPriceDiff-Make")]
[DisableRequestSizeLimit] //[DisableRequestSizeLimit]
public async Task<string> SettledPartAndErpPartPriceDiffMake( string version, string customerCode) //public async Task<string> SettledPartAndErpPartPriceDiffMake( string version, string customerCode)
{ //{
if (!_relationshipRepository.Any(p => p.Version == version && p.CustomerCode == customerCode)) // if (!_relationshipRepository.Any(p => p.Version == version && p.CustomerCode == customerCode))
{ // {
throw new BusinessException("8989", string.Format("不存总成与结算件零件关系{0}期间", version)); // throw new BusinessException("8989", string.Format("不存总成与结算件零件关系{0}期间", version));
} // }
if (!_settlementPartVersionrepository.Any(p => p.Version == version && p.CustomerCode == customerCode)) // if (!_settlementPartVersionrepository.Any(p => p.Version == version && p.CustomerCode == customerCode))
{ // {
throw new BusinessException("8989", string.Format("不存结算包价格{0}期间", version)); // throw new BusinessException("8989", string.Format("不存结算包价格{0}期间", version));
} // }
List<CustomCondition> customConditionList = new List<CustomCondition>(); // List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "结算总成和ERP总成价格对比" }); // customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "结算总成和ERP总成价格对比" });
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version??string.Empty }); // customConditionList.Add(new CustomCondition() { Name = "Version", Value = version??string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode }); // customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode });
var _taskid = await _service.ExportEnqueueAsync("结算总成和ERP总成价格对比", ExportExtentsion.Excel,version,string.Empty,CurrentUser, typeof(SettledPartAndErpPartPriceDiffExportService), customConditionList, (rs) => // var _taskid = await _service.ExportEnqueueAsync("结算总成和ERP总成价格对比", ExportExtentsion.Excel,version,string.Empty,CurrentUser, typeof(SettledPartAndErpPartPriceDiffExportService), customConditionList, (rs) =>
{ // {
}); // });
return _taskid; // return _taskid;
} //}
///// <summary> ///// <summary>

261
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -1587,26 +1587,193 @@
<param name="input">请求条件</param> <param name="input">请求条件</param>
<returns>实体DTO列表</returns> <returns>实体DTO列表</returns>
</member> </member>
<member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSAppService"> <member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService">
<summary> <summary>
大众准时化结算明细导入-R3已结 wms出库
</summary> </summary>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSAppService.#ctor(Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{WY.NewJit.Extends.PaiGe.WMS.TB_BILL})"> <member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.#ctor(Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{WY.NewJit.Extends.PaiGe.WMS.TB_BILL})">
<summary> <summary>
构建方法
</summary> </summary>
<param name="guidGenerator">构建UID</param> <param name="wmsRepository"></param>
<param name="repository">仓储接口</param> <param name="job"></param>
<param name="cache">缓存</param> <param name="wmsVersionRepository"></param>
<param name="wmsefRespository"></param>
<param name="wmstbRespository"></param>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSAppService.WmsJitOutPut(System.Collections.Generic.List{System.Guid},System.String)"> <member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsJitOutPutRequestDto)">
<summary> <summary>
选择结算明细任务列表,选择相关任务合拼导期间出库表 准时化出库主表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsJitOutPutDetialRequestDto)">
<summary>
准时化出库明细
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.WmsJitAudit(System.Collections.Generic.List{System.Guid})">
<summary>
任务明细标记已确认
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.WmsJitCancel(System.Collections.Generic.List{System.Guid})">
<summary>
任务明细标记已确认
</summary> </summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.WmsJitOutPut(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
选择任务,生成出库单,只包含已确认的单据
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.WmsJitOutPutPass(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能,核准出库功能
</summary>
<param name="version"></param>
<param name="p_list"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService.WmsJitOutPutCancel(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能, 撤销核准出库
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService">
<summary>
wms出库
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.#ctor(Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsKanbanOutPutDetial},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{WY.NewJit.Extends.PaiGe.WMS.TB_BILL})">
<summary>
</summary>
<param name="wmsRepository"></param>
<param name="job"></param>
<param name="wmsVersionRepository"></param>
<param name="wmsefRespository"></param>
<param name="wmstbRespository"></param>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsKanbanOutPutRequestDto)">
<summary>
准时化出库主表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsKanbanOutPutDetialRequestDto)">
<summary>
准时化出库明细
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.WmsKanbanAudit(System.Collections.Generic.List{System.Guid})">
<summary>
任务明细标记已确认
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.WmsKanbanOutPut(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
选择任务,生成出库单,只包含已确认的单据
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.WmsKanbanOutPutPass(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能,核准出库功能
</summary>
<param name="version"></param>
<param name="p_list"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSKanbanAppService.WmsKanbanOutPutCancel(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能, 撤销核准出库
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService">
<summary>
wms出库
</summary>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.#ctor(Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePartOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.TaskJob,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePartOutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsSharePartOutPutDetial},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{WY.NewJit.Extends.PaiGe.WMS.TB_BILL},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService)">
<summary>
</summary>
<param name="wmsRepository"></param>
<param name="job"></param>
<param name="wmsVersionRepository"></param>
<param name="wmsefRespository"></param>
<param name="wmstbRespository"></param>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsSharePartOutPutRequestDto)">
<summary>
准时化出库主表
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.GetListAsync(Win.Sfs.SettleAccount.Entities.Wms.WmsSharePartOutPutDetialRequestDto)">
<summary>
准时化出库明细
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.WmsSharePartAudit(System.Collections.Generic.List{System.Guid})">
<summary>
任务明细标记已确认
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.WmsSharePartOutPut(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
选择任务,生成出库单,只包含已确认的单据
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.WmsSharePartOutPutPass(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能,核准出库功能
</summary>
<param name="version"></param>
<param name="p_list"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSSharePartAppService.WmsSharePartOutPutCancel(Win.Sfs.SettleAccount.Entities.Wms.WmsJitRequestDto)">
<summary>
出库界面功能, 撤销核准出库
</summary>
<param name="ids"></param>
<param name="version"></param>
<returns></returns>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.SettlementPakAndSparePart.SettlementPakAndSparePartsAppService"> <member name="T:Win.Sfs.SettleAccount.Entities.SettlementPakAndSparePart.SettlementPakAndSparePartsAppService">
<summary> <summary>
结算包与散件对应关系服务 结算包与散件对应关系服务
@ -2673,7 +2840,7 @@
<param name="repository">仓储接口</param> <param name="repository">仓储接口</param>
<param name="cache">缓存</param> <param name="cache">缓存</param>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SettleDoorPanel(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SettleDoorPanel(Win.Sfs.SettleAccount.Reports.ReportRequestDto.BaseRequestDto)">
<summary> <summary>
大众准时化结算门板价格差异比对报表 大众准时化结算门板价格差异比对报表
</summary> </summary>
@ -2684,7 +2851,7 @@
<param name="estimateTypeDesc">物料组</param> <param name="estimateTypeDesc">物料组</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SettledKanBanWithCode(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.DateTime,System.DateTime)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SettledKanBanWithCode(Win.Sfs.SettleAccount.Reports.ReportRequestDto.BaseKanbanReqestDto)">
<summary> <summary>
有条码看板结算核对 有条码看板结算核对
</summary> </summary>
@ -2714,47 +2881,6 @@
<param name="end"></param> <param name="end"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnSettledMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.DateTime,System.DateTime)">
<summary>
未结算对比
</summary>
<param name="year"></param>
<param name="period"></param>
<param name="version"></param>
<param name="customerCode"></param>
<param name="factory"></param>
<param name="matialCode"></param>
<param name="state"></param>
<param name="begin"></param>
<param name="end"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.FisUnSettledMake(System.String,System.String,System.String,System.String,System.String)">
<summary>
ERP总成开票报表功能
</summary>
<param name="year"></param>
<param name="period"></param>
<param name="version"></param>
<param name="customerCode"></param>
<param name="factory"></param>
<param name="matialCode"></param>
<param name="state"></param>
<param name="begin"></param>
<param name="end"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.PriceQtyDiffMake(System.String,System.String,System.String,System.String,System.String)">
<summary>
价差量差分析报表
</summary>
<param name="year"></param>
<param name="version"></param>
<param name="customerCode"></param>
<param name="factory"></param>
<param name="state"></param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.InvoiceSettledDiffMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.InvoiceSettledDiffMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)">
<summary> <summary>
1.大众发票与结算核对汇总表 1.大众发票与结算核对汇总表
@ -2762,41 +2888,34 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.InvoiceSettledDetailDiffMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.InvoiceSettledDetailDiffMake(Win.Sfs.SettleAccount.Reports.ReportRequestDto.BaseRequestDto)">
<summary> <summary>
2.大众发票与结算核对明细表 发票与结算核对明细表
</summary> </summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnInvoiceSettledDetailDiffMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnInvoiceSettledDetailDiffMake(Win.Sfs.SettleAccount.Reports.ReportRequestDto.BaseRequestDto)">
<summary> <summary>
3.大众准时化结算数量差异比对表 3.准时化结算数量差异比对表
</summary> </summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnsettledDetailReportServiceMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnsettledDetailReportServiceMake(Win.Sfs.SettleAccount.Reports.ReportRequestDto.BaseRequestDto)">
<summary> <summary>
7.大众准时化未结明细表(包含漏结,漏结要有标识) 准时化未结明细表(包含漏结,漏结要有标识)
</summary> </summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnSettleDiffExportServiceMake(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)"> <member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.UnSettleDiffExportServiceMake(Win.Sfs.SettleAccount.Reports.ReportRequestDto.BaseRequestDto)">
<summary> <summary>
6.大众准时化未结差异比对表 准时化未结差异比对表
</summary> </summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.SettledPartAndErpPartPriceDiffMake(System.String,System.String)">
<summary>
结算总成和ERP总成价格对比
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</member>
<member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapHQ_H_Platform"> <member name="M:Win.Sfs.SettleAccount.SettleAccountApplicationAutoMapperProfile.CreateMapHQ_H_Platform">
<summary> <summary>
红旗H平台导入 红旗H平台导入

78
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TEA_TASK_SUB.cs

@ -0,0 +1,78 @@
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
namespace Win.Sfs.SettleAccount.Entities
{
/// <summary>
/// 任务订阅表
/// </summary>
[Description("任务订阅表")]
public class TEA_TASK_SUB
{
[Description("任务状态")]
public int TaskState { get; set; }
[Description("任务编号")]
public Guid TaskID { get; set; }
[Description("表格名称")]
[StringLength(50)]
public string TableName { get; set; }
[Description("创建者")]
[StringLength(50)]
public string Creator { get; set; }
[Description("数据行数")]
public int DataCount { get; set; }
[Description("订阅者")]
[StringLength(50)]
public string Subscriber { get; set; }
[Description("失败行数")]
public int FailedCount { get; set; }
[Description("失败信息")]
[StringLength(50)]
public string FailedInfo { get; set; }
[Description("域")]
[StringLength(50)]
public string Domain { get; set; }
[Description("地点")]
[StringLength(50)]
public string Site { get; set; }
[Key]
public Guid GUID { get; set; } = Guid.NewGuid();
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int UID { get; set; }
[Description("创建人")]
[StringLength(50)]
public string CreateUser { get; set; }
[Description("创建时间")]
public DateTime CreateTime { get; set; }
[Description("备注")]
public string Remark { get; set; }
[Description("修改人")]
[StringLength(50)]
public string UpdateUser { get; set; }
[Description("修改时间")]
public DateTime? UpdateTime { get; set; }
}
}

5
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TaskJob.cs

@ -40,7 +40,10 @@ namespace Win.Sfs.SettleAccount.Entities
{ {
DownFileName = downfileName; DownFileName = downfileName;
} }
public void SetRemark(string remark)
{
Remark = remark;
}
public string Type { set; get; } public string Type { set; get; }

50
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS-KanBan/WmsKanban.cs

@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Win.Sfs.Shared.DomainBase;
namespace Win.Sfs.SettleAccount.Entities.WMS_KanBan
{
public class WmsKanban: FullAuditedAggregateRootBase<Guid>
{
/// <summary>
/// 实际发货日期
/// </summary>
public DateTime BeginTime { set; get; }
/// <summary>
///
/// </summary>
public string Version { set; get; }
/// <summary>
/// 零件号
/// </summary>
public string MaterialCode { set; get; }
/// <summary>
/// 用量
/// </summary>
public decimal Qty { set; get; }
}
}

298
src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs

@ -90,7 +90,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
{ {
} }
public WmsJitOutPutDetial(Guid id, string wmsBillNum, string kennCode, string chassisNumber, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode,string billNum,Guid taskId)
public WmsJitOutPutDetial(Guid id, string wmsBillNum, string kennCode, string chassisNumber, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode,string billNum,Guid taskId,string remark,decimal qty):base(id)
{ {
Id = id; Id = id;
WmsBillNum = wmsBillNum; WmsBillNum = wmsBillNum;
@ -108,6 +110,156 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
ParentMaterialCode = parentMaterialCode; ParentMaterialCode = parentMaterialCode;
BillNum = billNum; BillNum = billNum;
TaskId = taskId; TaskId = taskId;
Remark = remark;
Qty = qty;
}
public void SetData(Guid guid,string output,string input,string extend1,string extend2,string version,Guid taskid)
{
Id = guid;
OutPut = output;
InPut = input;
Extend1 = extend1;
Extend2 = extend2;
Version = version;
TaskId=taskid;
}
[ImporterHeader(Name = "出库库位", IsIgnore = true)]
//出库库位
public string OutPut { set; get; }
[ImporterHeader(Name = "入库库位", IsIgnore = true)]
//入库库位
public string InPut { set; get; }
[ImporterHeader(Name = "状态")]
public int State { get; set; }
[ImporterHeader(Name = "扩展字段1", IsIgnore = true)]
/// <summary>
/// 扩展字段1
/// </summary>
public string Extend1 { set; get; }
/// <summary>
/// 扩展字段2
/// </summary>
[ImporterHeader(Name = "扩展字段2", IsIgnore = true)]
public string Extend2 { set; get; }
/// <summary>
/// 扩展字段3
/// </summary>
[ImporterHeader(Name = "版本号", IsIgnore = true)]
public string Version { set; get; }
[ImporterHeader(Name = "单号",IsIgnore =true)]
public string BillNum { set; get; }
[ImporterHeader(Name = "任务号", IsIgnore = true)]
public Guid TaskId { set; get; }
[ImporterHeader(Name = "交货单号", AutoTrim = true)]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "KENN号")]
//KENN号
public string KennCode { set; get; }
[ImporterHeader(Name = "底盘号", AutoTrim = true)]
//底盘号
public string ChassisNumber { set; get; }
[ImporterHeader(Name = "物料号", AutoTrim = true)]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "组件组物料",AutoTrim =true)]
//物料号
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "物料描述", AutoTrim = true)]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)", AutoTrim = true)]
//物料组(车型)
public string MaterialGroup { set; get; }
[ImporterHeader(Name = "结算数量")]
public decimal Qty { set; get; }
}
public class WmsKanbanOutPut : FullAuditedAggregateRootBase<Guid>
{
public WmsKanbanOutPut()
{
}
public WmsKanbanOutPut(Guid id, string version, string billNum, string creator) : base(id)
{
Id = id;
Version = version;
BillNum = billNum;
Creator = creator;
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
/// <summary>
///
/// </summary>
public class WmsKanbanOutPutDetial : FullAuditedAggregateRootBase<Guid>
{
public WmsKanbanOutPutDetial()
{
}
public WmsKanbanOutPutDetial(Guid id, string wmsBillNum, string kanban, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode, string billNum, Guid taskId,string remark,decimal qty)
{
Id = id;
WmsBillNum = wmsBillNum;
Kanban = kanban;
MaterialCode = materialCode;
MaterialDesc = materialDesc;
MaterialGroup = materialGroup;
OutPut = outPut;
InPut = inPut;
State = state;
Extend1 = extend1;
Extend2 = extend2;
Version = extend3;
ParentMaterialCode = parentMaterialCode;
BillNum = billNum;
TaskId = taskId;
Remark = remark;
Qty = qty;
}
public void SetId(Guid id)
{
Id = id;
} }
@ -120,12 +272,10 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public string ParentMaterialCode { set; get; } public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "交货单号")] [ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; } public string WmsBillNum { set; get; }
[ImporterHeader(Name = "KENN号")] [ImporterHeader(Name = "看板号")]
//KENN号 //KENN号
public string KennCode { set; get; } public string Kanban { set; get; }
[ImporterHeader(Name = "底盘号")]
//底盘号
public string ChassisNumber { set; get; }
[ImporterHeader(Name = "物料号")] [ImporterHeader(Name = "物料号")]
//物料号 //物料号
public string MaterialCode { set; get; } public string MaterialCode { set; get; }
@ -159,9 +309,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[ImporterHeader(Name = "版本号")] [ImporterHeader(Name = "版本号")]
public string Version { set; get; } public string Version { set; get; }
[ImporterHeader(Name = "数量")] [ImporterHeader(Name = "数量")]
public string Qty { set; get; } public decimal? Qty { set; get; }
[ImporterHeader(Name = "数量",IsIgnore =true)] [ImporterHeader(Name = "数量", IsIgnore = true)]
public string BillNum { set; get; } public string BillNum { set; get; }
@ -172,4 +322,136 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public class WmsSharePartOutPut : FullAuditedAggregateRootBase<Guid>
{
public WmsSharePartOutPut()
{
}
public WmsSharePartOutPut(Guid id, string version, string billNum, string creator) : base(id)
{
Id = id;
Version = version;
BillNum = billNum;
Creator = creator;
}
public string Version { set; get; }
public string BillNum { set; get; }
public string Creator { set; get; }
}
/// <summary>
///
/// </summary>
public class WmsSharePartOutPutDetial : FullAuditedAggregateRootBase<Guid>
{
public WmsSharePartOutPutDetial()
{
}
public WmsSharePartOutPutDetial(Guid id, string wmsBillNum, string orderBillNum, string materialCode, string materialDesc, string materialGroup, string outPut, string inPut, int state, string extend1, string extend2, string extend3, string parentMaterialCode, string billNum, Guid taskId,string remark,decimal qty )
{
Id = id;
WmsBillNum = wmsBillNum;
OrderBillNum = orderBillNum;
MaterialCode = materialCode;
MaterialDesc = materialDesc;
MaterialGroup = materialGroup;
OutPut = outPut;
InPut = inPut;
State = state;
Extend1 = extend1;
Extend2 = extend2;
Version = extend3;
ParentMaterialCode = parentMaterialCode;
BillNum = billNum;
TaskId = taskId;
Remark = remark;
Qty = qty;
}
public void SetId(Guid id)
{
Id = id;
}
// 交货单号 实际发货日期 KENN号 底盘号 物料号 物料描述 客户物料 组件组物料 组件组物料描述 物料组(车型) 定价 金额 结算平台未结数量 大众R3未结数量 差异金额 差异数量 漏结标识 漏结期间 说明
//交货单号
[ImporterHeader(Name = "组件组物料")]
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "看板号")]
//KENN号
public string OrderBillNum { set; get; }
[ImporterHeader(Name = "物料号")]
//物料号
public string MaterialCode { set; get; }
[ImporterHeader(Name = "物料描述")]
//物料描述
public string MaterialDesc { set; get; }
[ImporterHeader(Name = "物料组(车型)")]
//物料组(车型)
public string MaterialGroup { set; get; }
[ImporterHeader(Name = "出库库位")]
//出库库位
public string OutPut { set; get; }
[ImporterHeader(Name = "入库库位")]
//入库库位
public string InPut { set; get; }
[ImporterHeader(Name = "状态")]
public int State { get; set; }
[ImporterHeader(Name = "扩展字段1")]
/// <summary>
/// 扩展字段1
/// </summary>
public string Extend1 { set; get; }
/// <summary>
/// 扩展字段2
/// </summary>
[ImporterHeader(Name = "扩展字段2")]
public string Extend2 { set; get; }
/// <summary>
/// 扩展字段3
/// </summary>
[ImporterHeader(Name = "版本号")]
public string Version { set; get; }
[ImporterHeader(Name = "数量")]
public decimal? Qty { set; get; }
[ImporterHeader(Name = "数量", IsIgnore = true)]
public string BillNum { set; get; }
public Guid TaskId { set; get; }
}
} }

122
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -322,7 +322,14 @@ namespace Win.Sfs.SettleAccount
//一汽轿车 //一汽轿车
builder.ConfigureBTCar(options); builder.ConfigureBTCar(options);
builder.ConfigureBTCarVersion(options); builder.ConfigureBTCarVersion(options);
builder.ConfigureWmsJitOutPutDetail(options);
builder.ConfigureWmsJitOutPutVersion(options);
builder.ConfigureWmsJitOutPutDetail(options);
builder.ConfigureWmsJitOutPutVersion(options);
builder.ConfigureWmsKanbanOutPutVersion(options);
builder.ConfigureWmsKanbanOutPutDetail(options);
builder.ConfigureWmsSharePartOutPutDetail(options);
builder.ConfigureWmsSharePartOutPutVersion(options);
#endregion #endregion
} }
@ -973,6 +980,119 @@ namespace Win.Sfs.SettleAccount
} }
private static void ConfigureWmsJitOutPutVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsJitOutPut>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsJitOutPut", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.BillNum });
});
}
private static void ConfigureWmsJitOutPutDetail(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsJitOutPutDetial>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsJitOutPutDetial", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.WmsBillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.OutPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.InPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.KennCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ChassisNumber).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ParentMaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend1).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend2).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.MaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.Version }).IsUnique().HasFilter(IsDeletedFilter);
});
}
private static void ConfigureWmsKanbanOutPutVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsKanbanOutPut>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsKanbanOutPut", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.BillNum });
});
}
private static void ConfigureWmsKanbanOutPutDetail(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsKanbanOutPutDetial>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsKanbanOutPutDetial", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.WmsBillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.OutPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.InPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Kanban).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ParentMaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend1).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend2).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.MaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.BillNum});
});
}
private static void ConfigureWmsSharePartOutPutVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsSharePartOutPut>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsSharePartOutPut", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.BillNum });
});
}
private static void ConfigureWmsSharePartOutPutDetail(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<WmsSharePartOutPutDetial>(b =>
{
b.ToTable($"{options.TablePrefix}_WmsSharePartOutPutDetial", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.BillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.WmsBillNum).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Version).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.OutPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.InPut).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.OrderBillNum).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ParentMaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend1).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.Extend2).HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.MaterialCode).HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.BillNum });
});
}
#endregion #endregion

7
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/WMSDbContext.cs

@ -8,6 +8,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using Volo.Abp.Data; using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities;
using Win.Sfs.SettleAccount.Entities.WMS; using Win.Sfs.SettleAccount.Entities.WMS;
using WY.NewJit.Extends.PaiGe.WMS; using WY.NewJit.Extends.PaiGe.WMS;
@ -22,7 +23,11 @@ namespace Win.Sfs.SettleAccount
{ {
#region DbSet #region DbSet
public virtual DbSet<WmsJitOutPutDetial> WmsJitOutPutDetial { get; set; } public virtual DbSet<WmsJitOutPutDetial> WmsJitOutPutDetial { get; set; }
//public virtual DbSet<TS_SORT_DETAIL> TS_SORT_DETAIL { get; set; } public virtual DbSet<TEA_TASK_SUB> TEA_TASK_SUB { get; set; }
public virtual DbSet<WmsKanbanOutPutDetial> WmsKanbanOutPutDetial { get; set; }
public virtual DbSet<WmsSharePartOutPutDetial> WmsSharePartOutPutDetial { get; set; }
#endregion #endregion
/* Add DbSet properties for your Aggregate Roots / Entities here. /* Add DbSet properties for your Aggregate Roots / Entities here.

24
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs

@ -44,27 +44,27 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
// DiffPrice = diffPrice; // DiffPrice = diffPrice;
//} //}
[ExporterHeader(DisplayName = "交货单号 ")] [ExporterHeader(DisplayName = "交货单号")]
public override string WmsBillNum { set; get; } public override string WmsBillNum { set; get; }
[ExporterHeader(DisplayName = "实际发货日期 ")] [ExporterHeader(DisplayName = "实际发货日期")]
public override DateTime CP5Time { set; get; } public override DateTime CP5Time { set; get; }
[ExporterHeader(DisplayName = "KENN号")] [ExporterHeader(DisplayName = "KENN号")]
public override string KENNCode { set; get; } public override string KENNCode { set; get; }
[ExporterHeader(DisplayName = "底盘号")] [ExporterHeader(DisplayName = "底盘号")]
public override string ChassisNumber { set; get; } public override string ChassisNumber { set; get; }
[ExporterHeader(DisplayName = "交货状态 ")] [ExporterHeader(DisplayName = "交货状态")]
public override string WmsState { set; get; } public override string WmsState { set; get; }
[ExporterHeader(DisplayName = "物料号")] [ExporterHeader(DisplayName = "物料号")]
public override string SapMaterialCode { set; get; } public override string SapMaterialCode { set; get; }
[ExporterHeader(DisplayName = "物料描述 ")] [ExporterHeader(DisplayName = "物料描述")]
public override string MaterialDesc { set; get; } public override string MaterialDesc { set; get; }
[ExporterHeader(DisplayName = "客户物料 ")] [ExporterHeader(DisplayName = "客户物料")]
public override string MaterialCode { set; get; } public override string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "组件组物料 ")] [ExporterHeader(DisplayName = "组件组物料")]
public override string ParentSapMaterialCode { set; get; } public override string ParentSapMaterialCode { set; get; }
[ExporterHeader(DisplayName = "组件组物料描述 ")] [ExporterHeader(DisplayName = "组件组物料描述")]
public override string ParentMaterialDesc { set; get; } public override string ParentMaterialDesc { set; get; }
[ExporterHeader(DisplayName = "物料组(车型) ")] [ExporterHeader(DisplayName = "物料组(车型)")]
public override string MaterialGroup { set; get; } public override string MaterialGroup { set; get; }
[ExporterHeader(DisplayName = "定价")] [ExporterHeader(DisplayName = "定价")]
public override decimal Price { set; get; } public override decimal Price { set; get; }
@ -130,11 +130,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
string condition = " where 1=1 "; string condition = " where 1=1 ";
if (!string.IsNullOrEmpty(materialCode)) //if (!string.IsNullOrEmpty(materialCode))
{ //{
condition += string.Format(" and d.MaterialCode in ({0}) ", materialCode); // condition += string.Format(" and d.MaterialCode in ({0}) ", materialCode);
} //}
if (!string.IsNullOrEmpty(begin)) if (!string.IsNullOrEmpty(begin))
{ {
condition += string.Format(" and a.BeginTime>='{0}' ", begin); condition += string.Format(" and a.BeginTime>='{0}' ", begin);

3
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/SettleKBWithCodeDapperReportRepository.cs

@ -44,6 +44,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" row_number() over(order by b.EstimateTypeDesc) as RowId ,\n" + " row_number() over(order by b.EstimateTypeDesc) as RowId ,\n" +
" c.WMSDeliveryNote,--交货单号\n" + " c.WMSDeliveryNote,--交货单号\n" +
" c.WMSActualGoodsDate,--实际发货日期\n" + " c.WMSActualGoodsDate,--实际发货日期\n" +
" a.Kanban,--条码号\n" + " a.Kanban,--条码号\n" +
" b.MaterialCode SapMaterialCode,--厂内物料号\n" + " b.MaterialCode SapMaterialCode,--厂内物料号\n" +
" b.MaterialDesc,--物料描述\n" + " b.MaterialDesc,--物料描述\n" +
@ -65,7 +66,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" LEFT JOIN Set_material AS b ON a.MaterialCode= b.CustomerPartCode\n" + " LEFT JOIN Set_material AS b ON a.MaterialCode= b.CustomerPartCode\n" +
" LEFT JOIN Set_WMSKanBanSettle c ON a.Kanban= c.Kanban \n" + " LEFT JOIN Set_WMSKanBanSettle c ON a.Kanban= c.Kanban \n" +
" AND a.MaterialCode= c.MaterialCode\n" + " AND a.MaterialCode= c.MaterialCode\n" +
" LEFT JOIN ( SELECT SUM ( amt ) / SUM ( Qty ) InvoicePrice, MaterialCode FROM set_invoice WHERE version = '{0}' GROUP BY materialcode ) d ON a.MaterialCode= d.MaterialCode \n" + " LEFT JOIN ( SELECT SUM ( amt ) / SUM ( Qty ) InvoicePrice, MaterialCode FROM set_invoice WHERE version = '{0}' GROUP BY materialcode ) d ON a.MaterialCode= d.MaterialCode where a.VERSION='{0}'\n" +
" ) TEMP1\n" + " ) TEMP1\n" +
" LEFT JOIN ( SELECT Price, --定价\n" + " LEFT JOIN ( SELECT Price, --定价\n" +
" MaterialCode --厂内物料号\n" + " MaterialCode --厂内物料号\n" +

24
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettleDiffDapperRepository.cs

@ -124,10 +124,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
string condition = " where 1=1 "; string condition = " where 1=1 ";
if (!string.IsNullOrEmpty(materialCode)) //if (!string.IsNullOrEmpty(materialCode))
{ //{
condition += string.Format(" and d.MaterialCode='{0}' ", materialCode); // condition += string.Format(" and d.MaterialCode='{0}' ", materialCode);
} //}
if (!string.IsNullOrEmpty(begin)) if (!string.IsNullOrEmpty(begin))
{ {
condition += string.Format(" and a.BeginTime>='{0}' ", begin); condition += string.Format(" and a.BeginTime>='{0}' ", begin);
@ -137,14 +137,14 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
condition += string.Format(" and a.BeginTime<='{0}' ", end); condition += string.Format(" and a.BeginTime<='{0}' ", end);
} }
if (!string.IsNullOrEmpty(kennCode)) //if (!string.IsNullOrEmpty(kennCode))
{ //{
condition += string.Format(" and a.kenncode='{0}' ", kennCode); // condition += string.Format(" and a.kenncode='{0}' ", kennCode);
} //}
if (!string.IsNullOrEmpty(chassisNumber)) //if (!string.IsNullOrEmpty(chassisNumber))
{ //{
condition += string.Format(" and a.chassisNumber='{0}' ", chassisNumber); // condition += string.Format(" and a.chassisNumber='{0}' ", chassisNumber);
} //}
string sql1 = string sql1 =
"SELECT\n" + "SELECT\n" +

9
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs

@ -83,6 +83,10 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ItemCode MaterialCode,\n" + " ItemCode MaterialCode,\n" +
" ChassisNumber,\n" + " ChassisNumber,\n" +
" OrderBillNum KENNCode,\n" + " OrderBillNum KENNCode,\n" +
" ChassisNumber2,\n"+
" KENNCode KENNCode2, \n"+
" QTY,\n" + " QTY,\n" +
" ErpMaterialCode ParentSapMaterialCode,\n" + " ErpMaterialCode ParentSapMaterialCode,\n" +
" '' FLAG \n" + " '' FLAG \n" +
@ -99,6 +103,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ItemCode MaterialCode,\n" + " ItemCode MaterialCode,\n" +
" ChassisNumber,\n" + " ChassisNumber,\n" +
" OrderBillNum KENNCode,\n" + " OrderBillNum KENNCode,\n" +
" ChassisNumber2,\n" +
" KENNCode KENNCode2, \n" +
" QTY,\n" + " QTY,\n" +
" ErpMaterialCode ParentSapMaterialCode,\n" + " ErpMaterialCode ParentSapMaterialCode,\n" +
" 'L' FLAG \n" + " 'L' FLAG \n" +
@ -109,7 +116,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" AND STATE = 4 {0}\n" + " AND STATE = 4 {0}\n" +
" ) A\n" + " ) A\n" +
" left join (select * from Set_Unsettle where version='{1}') f \n" + " left join (select * from Set_Unsettle where version='{1}') f \n" +
" on a.MaterialCode=f.MaterialCode and a.KENNCode=f.KENNCode and a.ChassisNumber=f.ChassisNumber \n"+ " on a.MaterialCode=f.MaterialCode and a.KENNCode2=f.KENNCode and a.ChassisNumber2=f.ChassisNumber \n"+
" LEFT JOIN Set_material B ON a.MaterialCode = b.CustomerPartCode \n" + " LEFT JOIN Set_material B ON a.MaterialCode = b.CustomerPartCode \n" +
" LEFT JOIN Set_material d ON a.ParentSapMaterialCode = d.MaterialCode \n" + " LEFT JOIN Set_material d ON a.ParentSapMaterialCode = d.MaterialCode \n" +
" ) temp1\n" + " ) temp1\n" +

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs

@ -122,7 +122,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount
} }
BulkConfig cfg = new BulkConfig() { BulkCopyTimeout=0, BatchSize=10000,}; BulkConfig cfg = new BulkConfig() { BulkCopyTimeout=0, BatchSize=10000, UseTempDB=true};
DbContext.BulkInsert(_insertls,cfg); DbContext.BulkInsert(_insertls,cfg);
} }
catch (Exception e) catch (Exception e)

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs

@ -23,7 +23,7 @@ namespace Win.Sfs.SettleAccount.Repository
public virtual async Task<List<Job>> GetTaskJobsAsync(Job p_task) public virtual async Task<List<Job>> GetTaskJobsAsync(Job p_task)
{ {
string str = string.Empty; string str = string.Empty;
str += "SELECT b.Id, a.StateId,b.Type, a.StateName, a.InvocationData, a.Arguments, a.CreatedAt, a.ExpireAt, b.TaskId, b.Name, \n"; str += "SELECT b.Id, a.StateId,b.Type, a.StateName, a.InvocationData, a.Arguments, a.CreatedAt, a.ExpireAt, b.TaskId, b.Name,isnull(b.remark,'') remark, \n";
str += " b.ActionName, b.Error, b.Creator, b.Email, b.FileName, b.DownFileName, b.ServiceName,b.RealDownFileName,b.RealFileName \n"; str += " b.ActionName, b.Error, b.Creator, b.Email, b.FileName, b.DownFileName, b.ServiceName,b.RealDownFileName,b.RealFileName \n";
str += " FROM HangFire.Job AS a INNER JOIN \n"; str += " FROM HangFire.Job AS a INNER JOIN \n";
str += " Set_TaskJob AS b ON a.Id = b.TaskId \n"; str += " Set_TaskJob AS b ON a.Id = b.TaskId \n";

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountRepository.cs

@ -57,7 +57,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccount
_insertls.Add(s); _insertls.Add(s);
} }
} }
DbContext.BulkInsert(_insertls); DbContext.BulkInsert(_insertls,new BulkConfig() { BatchSize=100000, BulkCopyTimeout=0 });
} }
catch (Exception e) catch (Exception e)
{ {

9
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDetailDiffExportService.cs

@ -147,6 +147,14 @@ namespace SettleAccount.Job.Services
_ls = _ls.Where(p => _groupList.Contains(p.ChassisNumber)).ToList(); _ls = _ls.Where(p => _groupList.Contains(p.ChassisNumber)).ToList();
} }
} }
if (!string.IsNullOrEmpty(materialCode))
{
var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_ls = _ls.Where(p => _groupList.Contains(p.MaterialCode)).ToList();
}
}
if (!string.IsNullOrEmpty(sapCode)) if (!string.IsNullOrEmpty(sapCode))
{ {
var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList(); var _groupList = sapCode.Split(new char[] { '\n' }).Distinct().ToList();
@ -156,7 +164,6 @@ namespace SettleAccount.Job.Services
} }
} }
_ls = _ls.OrderBy(p => p.ChassisNumber).ThenBy(p => p.KENNCode).ThenBy(p => p.SapMaterialCode).ToList(); _ls = _ls.OrderBy(p => p.ChassisNumber).ThenBy(p => p.KENNCode).ThenBy(p => p.SapMaterialCode).ToList();
} }

3
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDiffExportService.cs

@ -65,7 +65,7 @@ namespace SettleAccount.Job.Services
} }
if (!string.IsNullOrEmpty(matialCode)) if (!string.IsNullOrEmpty(matialCode))
{ {
var _groupList = matialCode.Split(new char[] { ',' }).Distinct().ToList(); var _groupList = matialCode.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0) if (_groupList.Count() > 0)
{ {
_ls = _ls.Where(p => _groupList.Contains(p.MaterialCode)).ToList(); _ls = _ls.Where(p => _groupList.Contains(p.MaterialCode)).ToList();
@ -96,6 +96,7 @@ namespace SettleAccount.Job.Services
}); });
} }
_lsExport=_lsExport.OrderBy(p => p.SapMaterialGroup).ToList();
_outputService.Export<InvoiceSettledDiffExportDto>(id,_first, _lsExport); _outputService.Export<InvoiceSettledDiffExportDto>(id,_first, _lsExport);

11
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/SettleKBWithCodeExportService.cs

@ -37,8 +37,6 @@ namespace SettleAccount.Job.Services.Report
var version = p_list.Where(p => p.Name == "Version").FirstOrDefault().Value; var version = p_list.Where(p => p.Name == "Version").FirstOrDefault().Value;
var materialGroup = p_list.Where(p => p.Name == "EstimateTypeDesc").FirstOrDefault().Value; var materialGroup = p_list.Where(p => p.Name == "EstimateTypeDesc").FirstOrDefault().Value;
var kanban = p_list.Where(p => p.Name == "Kanban").FirstOrDefault().Value; var kanban = p_list.Where(p => p.Name == "Kanban").FirstOrDefault().Value;
var beginTime = p_list.Where(p => p.Name == "BegingTime").FirstOrDefault().Value; var beginTime = p_list.Where(p => p.Name == "BegingTime").FirstOrDefault().Value;
var endTime = p_list.Where(p => p.Name == "EndTime").FirstOrDefault().Value; var endTime = p_list.Where(p => p.Name == "EndTime").FirstOrDefault().Value;
@ -55,8 +53,6 @@ namespace SettleAccount.Job.Services.Report
_first.SumDiffMoney = (_first.SettleNumber * _first.Price) - _first.InvoiceMoney;//总金额差异(结算金额-开票金额) _first.SumDiffMoney = (_first.SettleNumber * _first.Price) - _first.InvoiceMoney;//总金额差异(结算金额-开票金额)
} }
} }
if (!string.IsNullOrEmpty(materialGroup)) if (!string.IsNullOrEmpty(materialGroup))
{ {
var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList(); var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList();
@ -86,15 +82,11 @@ namespace SettleAccount.Job.Services.Report
if (!string.IsNullOrEmpty(beginTime)) if (!string.IsNullOrEmpty(beginTime))
{ {
_list = _list.Where(p => DateTime.Parse(beginTime)<=p.ActualGoodsDate).ToList(); _list = _list.Where(p => DateTime.Parse(beginTime)<=p.ActualGoodsDate).ToList();
} }
if (!string.IsNullOrEmpty(endTime)) if (!string.IsNullOrEmpty(endTime))
{ {
_list = _list.Where(p => DateTime.Parse(endTime) >= p.ActualGoodsDate).ToList(); _list = _list.Where(p => DateTime.Parse(endTime) >= p.ActualGoodsDate).ToList();
} }
if (!string.IsNullOrEmpty(kanban)) if (!string.IsNullOrEmpty(kanban))
@ -104,9 +96,6 @@ namespace SettleAccount.Job.Services.Report
{ {
_list = _list.Where(p => _groupList.Contains(p.Kanban)).ToList(); _list = _list.Where(p => _groupList.Contains(p.Kanban)).ToList();
} }
} }

9
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnInvoiceSettledDetailDiffExportService.cs

@ -128,6 +128,15 @@ namespace SettleAccount.Job.Services
_ls = _ls.Where(p => _groupList.Contains(p.SapMaterialCode)).ToList(); _ls = _ls.Where(p => _groupList.Contains(p.SapMaterialCode)).ToList();
} }
} }
if (!string.IsNullOrEmpty(materialCode))
{
var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_ls = _ls.Where(p => _groupList.Contains(p.MaterialCode)).ToList();
}
}
var _lsSum=_ls.GroupBy(p => new { p.MaterialCode, p.SapMaterialCode, p.MaterialGroup,p.InvoicePrice }).Select(p => new UnInvoiceSettledDetailSum var _lsSum=_ls.GroupBy(p => new { p.MaterialCode, p.SapMaterialCode, p.MaterialGroup,p.InvoicePrice }).Select(p => new UnInvoiceSettledDetailSum
{ {

8
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs

@ -154,6 +154,14 @@ namespace SettleAccount.Job.Services.Report
_ls = _ls.Where(p => _groupList.Contains(p.SapMaterialCode)).ToList(); _ls = _ls.Where(p => _groupList.Contains(p.SapMaterialCode)).ToList();
} }
} }
if (!string.IsNullOrEmpty(materialCode))
{
var _groupList = materialCode.Split(new char[] { '\n' }).Distinct().ToList();
if (_groupList.Count() > 0)
{
_ls = _ls.Where(p => _groupList.Contains(p.MaterialCode)).ToList();
}
}
var _id = Guid.NewGuid(); var _id = Guid.NewGuid();

BIN
vue/src/views/pg-fis/basedate.zip

Binary file not shown.

2
vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue

@ -561,7 +561,7 @@ export default {
}, },
//- //-
handleUpdate(row) { handleUpdate(row) {
var MBVin1 = []; var MBVin1 = [];
let myalert = ""; //使 let myalert = ""; //使
if (row) { if (row) {
// //

225
vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue

@ -99,9 +99,16 @@
type="success" type="success"
icon="el-icon-s-shop" icon="el-icon-s-shop"
@click="handleUpdate()" @click="handleUpdate()"
>重打</el-button >打印当前页</el-button
>
<el-button
class="filter-item"
size="mini"
type="success"
icon="el-icon-s-shop"
@click="handleUpdateall()"
>打印全部</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
</flexbox> </flexbox>
@ -244,6 +251,7 @@ export default {
customerInfo: { customerInfo: {
printType: "1", printType: "1",
productLine: "", productLine: "",
partType: "",
}, },
// //
filterObj: { filterObj: {
@ -261,6 +269,8 @@ export default {
HostSN: undefined, HostSN: undefined,
beginPrintDate: undefined, beginPrintDate: undefined,
endPrintDate: undefined, endPrintDate: undefined,
beginVin: undefined,
endVin: undefined,
}, },
listPLQuery: { listPLQuery: {
BillType: 2, BillType: 2,
@ -344,21 +354,16 @@ export default {
tempsTabs.push({ label: "单据顺号", prop: "billSerialNum", width: 120 }); tempsTabs.push({ label: "单据顺号", prop: "billSerialNum", width: 120 });
tempsTabs.push({ label: "起始顺序号", prop: "beginHostSN", width: 120 }); tempsTabs.push({ label: "起始顺序号", prop: "beginHostSN", width: 120 });
tempsTabs.push({ label: "结束顺序号", prop: "endHostSN", width: 120 }); tempsTabs.push({ label: "结束顺序号", prop: "endHostSN", width: 120 });
tempsTabs.push({
label: "左或右",
prop: "billLocation",
width: 150,
});
tempsTabs.push({
label: "供应商厂家代码",
prop: "providerCode",
width: 150,
});
tempsTabs.push({ tempsTabs.push({
label: "零件类型", label: "零件类型",
prop: "partType", prop: "partType",
width: 180, width: 180,
}); });
tempsTabs.push({
label: "左或右",
prop: "billLocation",
width: 150,
});
tempsTabs.push({ tempsTabs.push({
label: "器具容量", label: "器具容量",
prop: "capacity", prop: "capacity",
@ -379,7 +384,6 @@ export default {
prop: "productLine", prop: "productLine",
width: 120, width: 120,
}); });
tempsTabs.push({ tempsTabs.push({
label: "起始底盘号", label: "起始底盘号",
prop: "beginVin", prop: "beginVin",
@ -390,6 +394,11 @@ export default {
prop: "endVin", prop: "endVin",
width: 160, width: 160,
}); });
tempsTabs.push({
label: "供应商厂家代码",
prop: "providerCode",
width: 150,
});
return tempsTabs; return tempsTabs;
}, },
...mapGetters(["userInfo"]), // ...mapGetters(["userInfo"]), //
@ -425,7 +434,7 @@ export default {
ifr.setAttribute("name", "printPdf" + date); ifr.setAttribute("name", "printPdf" + date);
ifr.src = window.URL.createObjectURL(blob); ifr.src = window.URL.createObjectURL(blob);
document.body.appendChild(ifr); document.body.appendChild(ifr);
this.doPrint("printPdf" + date);alert("ifr.src:"+JSON.stringify(ifr.src)) this.doPrint("printPdf" + date); //alert("ifr.src:"+JSON.stringify(ifr.src))
window.URL.revokeObjectURL(ifr.src); // URL window.URL.revokeObjectURL(ifr.src); // URL
this.dialogFormVisible = false; this.dialogFormVisible = false;
}, },
@ -463,7 +472,7 @@ export default {
if (this.listQuery.Vin != "") { if (this.listQuery.Vin != "") {
this.listQuery.Vin = this.listQuery.Vin; this.listQuery.Vin = this.listQuery.Vin;
} }
this.listQuery.partType = this.listQuery.partType; //this.listQuery.partType = this.listQuery.partType;
var getdate5 = JSON.stringify(this.PrintTimeValue); var getdate5 = JSON.stringify(this.PrintTimeValue);
if (getdate5 != "[]") { if (getdate5 != "[]") {
this.listQuery.beginPrintDate = this.PrintTimeValue this.listQuery.beginPrintDate = this.PrintTimeValue
@ -487,20 +496,14 @@ export default {
this.listQuery this.listQuery
) )
.then((response) => { .then((response) => {
response.items.forEach((item)=>{ response.items.forEach((item) => {
if(item.printType == 0) if (item.printType == 0) {
{
item.printType = "正常打印"; item.printType = "正常打印";
} } else if (item.printType == 1) {
else if(item.printType == 1)
{
item.printType = "重打"; item.printType = "重打";
} } else {
else
{
item.printType = "补打"; item.printType = "补打";
} }
}); });
this.list = response.items; this.list = response.items;
this.totalCount = response.totalCount; this.totalCount = response.totalCount;
@ -515,26 +518,167 @@ export default {
}, },
//- //-
handleUpdate(row) { handleUpdate(row) {
var beginVin1 = []; this.isEdit = true;
let myalert = ""; //使 if (this.multipleSelection.length != 1) {
if (row) { this.$message({
// message: "重新打印必须选择单行,不能多选!",
beginVin1.push(row.id); type: "warning",
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
beginVin1.push(id);
}); });
myalert = "选中项"; return;
} else {
//this.fetchData(this.multipleSelection[0].id);
//
let beginVin1 = this.multipleSelection[0].id;
let ZHBId = [beginVin1];
var params = {
printType: "1",
productLine: this.customerInfo.productLine,
reportIdList: ZHBId,
partType: this.multipleSelection[0].partType,
dataResultType: "2",
};
console.log("柱护版-主界面传过来的值:" + JSON.stringify(params));
this.$axios
.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params)
.then((response) => {
console.log("柱护版-打印返回的状态:" + response.status);
const index = this.list.indexOf(row);
if (response.status === false) {
this.$message({
message: response.message,
type: "error",
});
return;
} else {
this.fileQuery.dataname = JSON.stringify(response.item);
console.log(
"柱板-调用Handlers/Handler1.ashx?report=zhuhuban传的值:" +
JSON.stringify(this.fileQuery.dataname)
);
debugger
let partNum = 0;
if(params.partType == "A上C上")
{
partNum = 1;
}
else if(params.partType == "B柱下")
{
partNum = 2;
}
else if(params.partType == "A柱下A中")
{
partNum = 3;
}
else if(params.partType == "B柱上")
{
partNum = 4;
}
else if(params.partType == "D柱")
{
partNum = 5;
}
else if(params.partType == "后轮上装饰板")
{
partNum = 6;
}
this.$axios
.posts(
"/Handlers/Handler1.ashx?report=zhuhuban&returnfile="+partNum,
qs.stringify(this.fileQuery)
)
.then((response) => {
this.printpdf(response); //
});
this.getList();
}
})
.catch(() => {});
} }
//let beginVin1 = this.multipleSelection[0].id; // var ZHBVin1 = [];
let ZHBId = beginVin1; // ZHBVin1.push(row.id);
// let myalert = ""; //使
// this.isEdit = true;
// if (this.multipleSelection.length != 1) {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// } else {
// // //
// // this.$message({
// // message: "",
// // type: "warning",
// // });
// // return;
// // this.multipleSelection.forEach((element) => {
// // let id = element.id;
// // beginVin1.push(id);
// // });
// // myalert = "";
// //let beginVin1 = this.multipleSelection[0].id;
// let ZHBId = ZHBVin1;
// var params = {
// printType: 1,
// productLine: this.customerInfo.productLine,
// reportIdList: ZHBId,
// };
// console.log("-" + JSON.stringify(params));
// this.$axios
// .posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params)
// .then((response) => {
// console.log("-" + response.status);
// const index = this.list.indexOf(row);
// if (response.status === false) {
// this.$message({
// message: response.message,
// type: "error",
// });
// return;
// } else {
// this.fileQuery.dataname = JSON.stringify(response.item);
// console.log(
// "-Handlers/Handler1.ashx?report=zhuhuban" +
// JSON.stringify(this.fileQuery.dataname)
// );
// this.$axios
// .posts(
// "/Handlers/Handler1.ashx?report=zhuhuban",
// qs.stringify(this.fileQuery)
// )
// .then((response) => {
// this.printpdf(response); //
// });
// this.getList();
// }
// })
// .catch(() => {});
// }
},
handleUpdateall(row) {
this.isEdit = true;
if (this.multipleSelection.length != 1) {
this.$message({
message: "重新打印必须选择单行,不能多选!",
type: "warning",
});
return;
} else {
//this.fetchData(this.multipleSelection[0].id);
//
debugger;
let beginVin1 = this.multipleSelection[0].id;
let ZHBId = [beginVin1];
var params = { var params = {
printType: "1", printType: "1",
productLine: this.customerInfo.productLine, productLine: this.customerInfo.productLine,
reportIdList: ZHBId, reportIdList: ZHBId,
//partType: this.multipleSelection[0].partType,
dataResultType: "1",
}; };
console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); console.log("柱护版-主界面传过来的值:" + JSON.stringify(params));
this.$axios this.$axios
@ -562,10 +706,11 @@ export default {
.then((response) => { .then((response) => {
this.printpdf(response); // this.printpdf(response); //
}); });
this.getList(); this.getList();
} }
}) })
.catch(() => {}); .catch(() => {});
}
}, },
//- //-
handleDelete(row) { handleDelete(row) {

9
vue/src/views/pg-fis/basedate/m100Online/ScrapMB.vue

@ -201,7 +201,7 @@
append-to-body="true" append-to-body="true"
:visible.sync="dialogTableVisible" :visible.sync="dialogTableVisible"
> >
<el-table :data="zflist"> <el-table :data="zflist" class="dialogDiv">
<el-table-column <el-table-column
property="billNum" property="billNum"
label="装箱单号" label="装箱单号"
@ -688,9 +688,10 @@ export default {
type: "success", type: "success",
duration: 2000, duration: 2000,
}); });
this.getList();
}); });
this.dialogTableVisible = false; this.dialogTableVisible = false;
this.getList();
}, },
//- //-
@ -880,6 +881,10 @@ export default {
margin-left: 5px; margin-left: 5px;
margin-right: 5px; margin-right: 5px;
} }
.dialogDiv {
max-height:300px;
overflow: auto;
}
</style> </style>

34
vue/src/views/pg-fis/basedate/m100Online/ScrapZHB.vue

@ -36,22 +36,9 @@
<el-form-item label="大众顺序号"> <el-form-item label="大众顺序号">
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="beginHostSN"> <el-form-item prop="HostSN">
<el-input <el-input
v-model="listQuery.beginHostSN" v-model="listQuery.HostSN"
placeholder=""
clearable
size="small"
style="width: 170px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="11">
<el-form-item prop="endHostSN">
<el-input
v-model="listQuery.endHostSN"
placeholder="" placeholder=""
clearable clearable
size="small" size="small"
@ -124,7 +111,7 @@
type="danger" type="danger"
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
@click="print()" @click=" print()"
>作废(支持批量)</el-button >作废(支持批量)</el-button
> >
</el-form-item> </el-form-item>
@ -200,13 +187,15 @@
/> />
</div> </div>
</div> </div>
<div> <div >
<el-dialog <el-dialog
title="作废信息" title="作废信息"
append-to-body="true" append-to-body="true"
:visible.sync="dialogTableVisible" :visible.sync="dialogTableVisible"
> >
<el-table :data="zflist"> <el-table :data="zflist" class="dialogDiv">
<el-table-column <el-table-column
property="billNum" property="billNum"
label="装箱单号" label="装箱单号"
@ -697,9 +686,10 @@ export default {
type: "success", type: "success",
duration: 2000, duration: 2000,
}); });
this.getList();
}); });
this.dialogTableVisible = false; this.dialogTableVisible = false;
this.getList();
}, },
//- //-
// handleDelete(row) { // handleDelete(row) {
@ -771,6 +761,8 @@ export default {
// }); // });
// } // }
// }) // })
// .catch(() => {}); // .catch(() => {});
// }, // },
fetchData(id) { fetchData(id) {
@ -888,6 +880,10 @@ export default {
margin-left: 5px; margin-left: 5px;
margin-right: 5px; margin-right: 5px;
} }
.dialogDiv {
max-height:300px;
overflow: auto;
}
</style> </style>

2
vue/src/views/pg-fis/basedate/m100Online/detailZHB.vue

@ -547,7 +547,7 @@ export default {
let beginVin1 = this.multipleSelection[0].beginVin1; let beginVin1 = this.multipleSelection[0].beginVin1;
let endVin1 = this.multipleSelection[0].endVin1; let endVin1 = this.multipleSelection[0].endVin1;
var params = { var params = {
printType: "1", printType: 1,
productLine: this.customerInfo.productLine, productLine: this.customerInfo.productLine,
beginVin: beginVin1, beginVin: beginVin1,
endVin: endVin1, endVin: endVin1,

156
vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue

@ -111,6 +111,30 @@
plain plain
><strong>柱护板作废</strong></el-button ><strong>柱护板作废</strong></el-button
> >
<!-- <el-button icon="el-icon-refresh" size="mini" @click="open()"
>测试</el-button
>2Z
<el-button plain @click="open"> 不会自动关闭 </el-button> -->
</el-form-item>
<el-form-item>
<div id="app">
<div
style="
border: solid 1px darkgray;
border-radius: 5px;
margin: 5px;
padding: 5px;
"
>
<span ref="sp01">{{ content01 }}</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span ref="sp05">{{ content05 }}</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span ref="sp07">{{ content07 }}</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span ref="sp08">{{ content08 }}</span>
</div>
</div>
</el-form-item> </el-form-item>
<!-- </el-row> --> <!-- </el-row> -->
@ -385,6 +409,7 @@ import RepetitionMB from "./RepetitionMB.vue";
import RepetitionZHB from "./RepetitionZHB.vue"; import RepetitionZHB from "./RepetitionZHB.vue";
import ScrapMB from "./ScrapMB.vue"; import ScrapMB from "./ScrapMB.vue";
import ScrapZHB from "./ScrapZHB.vue"; import ScrapZHB from "./ScrapZHB.vue";
import { forEach } from "jszip/lib/object";
export default { export default {
name: "M100Online", name: "M100Online",
@ -421,7 +446,16 @@ export default {
} }
}; };
return { return {
content01: "",
content05: "",
content07: "",
content08: "",
// minute01: this.timeoutMinutes,
// minute05: this.timeoutMinutes,
// lastTime01: "14:00",
// lastTime05: "14:40",
crmType: "M100Online", crmType: "M100Online",
//productLineList:null,
isDisable: false, isDisable: false,
drawerMBPrint: false, drawerMBPrint: false,
drawerMBDelete: false, drawerMBDelete: false,
@ -569,6 +603,10 @@ export default {
this.tableHeight = offsetHei - boxH - 67 - 79; //57footer79 this.tableHeight = offsetHei - boxH - 67 - 79; //57footer79
//this.tableHeight = offsetHei -260 //this.tableHeight = offsetHei -260
}); });
let timer = setInterval(() => {
this.open();
}, 50000);
}, },
created() { created() {
this.billState.forEach((element, index) => { this.billState.forEach((element, index) => {
@ -650,6 +688,99 @@ export default {
...mapGetters(["userInfo"]), // ...mapGetters(["userInfo"]), //
}, },
methods: { methods: {
open() {
//console.log("-11111111111111111111111111111111111111111" );
let productLineList = { productLineList: [this.listQuery.productLine] };
console.log("门版-主界面传过来的值:" + JSON.stringify(productLineList));
this.$axios
.posts(
"/api/newjit/bill-m100/product-line-timeout-remind",
productLineList
)
.then((response) => {
if (response.status == false) {
this.$message({
message: response.message,
type: "warning",
});
return;
} else {
console.log(
"超时提醒-接口传过来的值:" + JSON.stringify(response.item)
);
if (response.item !== null) {
response.item.forEach((JKITEM) => {
if (JKITEM.productLine = "01") {
this.content01 = "01生产线已经" + JKITEM.timeoutMinutes + "分钟没收到报文";
if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
//
console.log(
"222222222222222222222222222222222222222222222222"
);
this.$refs.sp01.style.color = "red";
this.$refs.sp01.style.fontWeight = "bold";
}
else{
this.$refs.sp01.style.color = "green";
}
}
if(JKITEM.productLine = "05") {
this.content05 = "05生产线已经" + JKITEM.timeoutMinutes + "分钟没收到报文";
if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
//
console.log(
"222222222222222222222222222222222222222222222222"
);
this.$refs.sp05.style.color = "red";
this.$refs.sp05.style.fontWeight = "bold";
}
else{
this.$refs.sp05.style.color = "green";
}
}
if(JKITEM.productLine = "07") {
this.content07 = "07生产线已经" + JKITEM.timeoutMinutes + "分钟没收到报文";
if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
//
console.log(
"222222222222222222222222222222222222222222222222"
);
this.$refs.sp07.style.color = "red";
this.$refs.sp07.style.fontWeight = "bold";
}
else{
this.$refs.sp07.style.color = "green";
}
}
if(JKITEM.productLine = "08") {
this.content08 = JKITEM.productLine+"生产线已经" + JKITEM.timeoutMinutes + "分钟没收到报文";
if (JKITEM.timeoutMinutes >= JKITEM.configMinutes) {
//
console.log(
"222222222222222222222222222222222222222222222222"
);
this.$refs.sp08.style.color = "red";
this.$refs.sp08.style.fontWeight = "bold";
}
else{
this.$refs.sp08.style.color = "green";
}
}
});
} else {
this.$message({
message: "获取接口数据",
type: "warning",
});
return;
}
}
});
},
debounceClick() { debounceClick() {
console.log("2秒内点击无数次,都只会触发一次"); console.log("2秒内点击无数次,都只会触发一次");
}, },
@ -922,6 +1053,7 @@ export default {
console.log( console.log(
"日常打印M100查询条件:" + JSON.stringify(this.listQueryList) "日常打印M100查询条件:" + JSON.stringify(this.listQueryList)
); );
//this.click();
this.$axios this.$axios
.gets("/api/newjit/bill-m100/list", this.listQueryList) .gets("/api/newjit/bill-m100/list", this.listQueryList)
.then((response) => { .then((response) => {
@ -1354,7 +1486,9 @@ export default {
} }
}); });
}) })
.catch(() => { this.isDisable = false;}); .catch(() => {
this.isDisable = false;
});
} else { } else {
// //
// //
@ -1391,12 +1525,12 @@ export default {
console.log("获取文件base64编码"); console.log("获取文件base64编码");
console.log(response); console.log(response);
this.formLoading = false; this.formLoading = false;
this.isDisable = false; this.isDisable = false;
this.printpdf(response); // this.printpdf(response); //
}) })
.catch((error) => { .catch((error) => {
this.formLoading = false; this.formLoading = false;
this.isDisable = false; this.isDisable = false;
}); });
} }
}) })
@ -1405,7 +1539,7 @@ export default {
message: response.message, message: response.message,
type: "error", type: "error",
}); });
this.isDisable = false; this.isDisable = false;
return; return;
}); });
} }
@ -1484,7 +1618,9 @@ export default {
} }
}); });
}) })
.catch(() => {this.isDisable = false;}); .catch(() => {
this.isDisable = false;
});
} else { } else {
// //
// //
@ -1521,7 +1657,7 @@ export default {
console.log("获取文件base64编码"); console.log("获取文件base64编码");
console.log(response); console.log(response);
this.formLoading = false; this.formLoading = false;
this.isDisable = false this.isDisable = false;
this.printpdf(response); // this.printpdf(response); //
}) })
.catch((error) => { .catch((error) => {
@ -1535,7 +1671,7 @@ export default {
message: response.message, message: response.message,
type: "error", type: "error",
}); });
this.isDisable = false; this.isDisable = false;
return; return;
}); });
} }
@ -2130,9 +2266,11 @@ export default {
}, },
//线 //线
getProductLine() { getProductLine() {
this.listPLQuery.UserId = this.userInfo.userId; this.listPLQuery.UserId = this.userInfo.userId;
console.log("this.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserId"+this.listPLQuery.UserId); console.log(
"this.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserId" +
this.listPLQuery.UserId
);
this.$axios this.$axios
.gets("/api/newjit/product-line/list", this.listPLQuery) .gets("/api/newjit/product-line/list", this.listPLQuery)
.then((response) => { .then((response) => {

42
vue/src/views/pg-fis/basedate/r100Online/index.vue

@ -329,7 +329,7 @@ export default {
], ],
}, },
billState: [ billState: [
{ id: 2, name: "已匹配" }, { id: 2, name: "未导出" },
{ id: 3, name: "已导出" }, { id: 3, name: "已导出" },
], ],
valueSelect: "", valueSelect: "",
@ -512,7 +512,7 @@ export default {
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listQuery)); console.log(JSON.stringify(this.listQuery));
this.$axios this.$axios
.posts("/api/newjit/bill-r100/export", this.listQuery) .posts("//api/newjit/bill-r100/export-erp-assembly-code", this.listQuery)
.then((res) => { .then((res) => {
let filename = res.item; let filename = res.item;
this.$axios this.$axios
@ -719,7 +719,43 @@ export default {
this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.toggleRowSelection(row); this.$refs.multipleTable.toggleRowSelection(row);
}, },
SAPExport() {}, SAPExport() {
this.listLoading = true;
// this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode;
// this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listQuery));
this.$axios
.posts("/api/newjit/bill-r100/export-erp-assembly-code", this.listQuery)
.then((res) => {
let filename = res.item;
this.$axios
.BolbGets("/api/newjit/exclude-part-cfg/download/" + filename)
.then((response) => {
if (filename.indexOf("_") != -1) {
let downName =
filename.slice(0, filename.lastIndexOf("_")) +
filename.slice(filename.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, filename);
this.$notify({
title: "成功",
message: "数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
});
});
this.listLoading = false;
},
//线 //线
getProductLine() { getProductLine() {
this.listPLQuery.UserId = this.userInfo.userId; this.listPLQuery.UserId = this.userInfo.userId;

645
vue/src/views/pg-fis/basedate/repeatR100/index.vue

@ -2,122 +2,181 @@
<template> <template>
<div class="cr-body-content"> <div class="cr-body-content">
<div ref="box"> <div ref="box">
<flexbox class="content-header"> <flexbox class="content-header">
<el-form <el-form
:model="listQuery" :model="listQuery"
ref="queryForm" ref="queryForm"
v-show="showSearch" v-show="showSearch"
:inline="true" :inline="true"
> >
<el-form-item label="起始顺序号" prop="HostSNBegin"> <!-- <el-form-item label="数据采集点" prop="productType">
<el-input <el-checkbox v-model="listQuery.checked1" >M100</el-checkbox>
v-model="listQuery.HostSNBegin" <el-checkbox v-model="listQuery.checked2" >R100</el-checkbox>
placeholder="起始顺序号" </el-form-item> -->
clearable <el-form-item label="数据采集点" prop="State" >
size="small" <el-checkbox-group v-model="listQuery.state">
style="width: 120px" <el-checkbox
@keyup.enter.native="handleQuery" v-for="(item, index) in billState"
/> :key="item.id"
</el-form-item> :label="item.id"
<el-form-item label="结束顺序号" prop="HostSNEnd"> @change="checkedListChange(index)"
<el-input >
v-model="listQuery.HostSNEnd" {{ item.name }}
placeholder="结束顺序号" </el-checkbox>
clearable </el-checkbox-group>
size="small" </el-form-item>
style="width: 120px"
@keyup.enter.native="handleQuery" <el-form-item label="生产线:" prop="productType">
/> <el-select
</el-form-item> v-model="listQuery.productType"
<el-form-item label="KNR:" prop="KNRBegin"> clearable
<el-input placeholder="请选择"
v-model="listQuery.KNRBegin" size="medium"
placeholder="" style="margin-right: 15px"
clearable @change="ptypeselectChange"
size="small" >
style="width: 240px" <el-option
@keyup.enter.native="handleQuery" v-for="item in productTypeList"
/> :key="item.id"
</el-form-item> :label="item.name"
<el-form-item label="-" prop="KNREnd"> :value="item.id"
<el-input />
v-model="listQuery.KNREnd" </el-select>
placeholder="" </el-form-item>
clearable <el-form-item label="" prop="productLine">
size="small" <el-select
style="width: 240px" v-model="listQuery.productLine"
@keyup.enter.native="handleQuery" clearable
/> placeholder="请选择"
</el-form-item> size="medium"
<el-form-item label="底盘号:" prop="VINBegin"> style="margin-right: 15px"
<el-input @change="valueselectChange"
v-model="listQuery.VINBegin" >
placeholder="" <el-option
clearable v-for="item in PLChildList"
size="small" :key="item.productLineCode"
style="width: 240px" :label="item.productLineName"
@keyup.enter.native="handleQuery" :value="item.productLineCode"
/> />
</el-form-item> </el-select>
<el-form-item label="-" prop="VINEnd"> </el-form-item>
<el-input
v-model="listQuery.VINEnd" <el-form-item label="起始顺序号" prop="HostSNBegin">
placeholder="" <el-input
clearable v-model="listQuery.HostSNBegin"
size="small" placeholder="起始顺序号"
style="width: 240px" clearable
@keyup.enter.native="handleQuery" size="small"
/> style="width: 120px"
</el-form-item> @keyup.enter.native="handleQuery"
/>
<el-form-item label="车型代码" prop="VehicleModelCode"> </el-form-item>
<el-input <el-form-item label="结束顺序号" prop="HostSNEnd">
v-model="listQuery.VehicleModelCode" <el-input
placeholder="请输入总成名称" v-model="listQuery.HostSNEnd"
clearable placeholder="结束顺序号"
size="small" clearable
style="width: 240px" size="small"
@keyup.enter.native="handleQuery" style="width: 120px"
/> @keyup.enter.native="handleQuery"
</el-form-item> />
</el-form-item>
<el-form-item label="版本" prop="Version"> <el-form-item label="KNR:" prop="KNRBegin">
<el-input <el-input
v-model="listQuery.Version" v-model="listQuery.KNRBegin"
placeholder="请输入总成名称" placeholder=""
clearable clearable
size="small" size="small"
style="width: 240px" style="width: 240px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="-" prop="KNREnd">
<el-form-item label="上线日期"> <el-input
<el-date-picker v-model="listQuery.KNREnd"
v-model="OnlineTimeValue" placeholder=""
size="small" clearable
style="width: 240px" size="small"
value-format="yyyy-MM-dd" style="width: 240px"
type="daterange" @keyup.enter.native="handleQuery"
range-separator="-" />
start-placeholder="开始日期" </el-form-item>
end-placeholder="结束日期" <el-form-item label="底盘号:" prop="VINBegin" v-show="isVINShowState">
></el-date-picker> <el-input
</el-form-item> v-model="listQuery.VINBegin"
<el-form-item label="接收日期"> placeholder=""
<el-date-picker clearable
v-model="ReceiveTimeValue" size="small"
size="small" style="width: 240px"
style="width: 240px"
value-format="yyyy-MM-dd" :visible.sync="dialogTableVisible"
type="daterange" @keyup.enter.native="handleQuery"
range-separator="-" />
start-placeholder="开始日期" </el-form-item>
end-placeholder="结束日期"
></el-date-picker> <el-form-item label="车型代码" prop="vehicleModelCode">
</el-form-item> <el-select
v-model="listQuery.vehicleModelCode"
<!-- <el-form-item label="单据状态" prop="BillStatus"> clearable
placeholder="请选择"
size="medium"
style="margin-right: 15px"
@change="valueselectChange1"
>
<el-option
v-for="item in vehicleModelList"
:key="item.id"
:label="item.dicItemName"
:value="item.dicItemCode"/>
</el-select>
</el-form-item>
<!-- <el-select
v-model="listQuery.VehicleModelCode"
placeholder="请输入总成名称"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/> -->
<el-form-item label="版本" prop="Version">
<el-input
v-model="listQuery.Version"
placeholder="请输入总成名称"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="上线日期">
<el-date-picker
v-model="OnlineTimeValue"
size="small"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label="接收日期">
<el-date-picker
v-model="ReceiveTimeValue"
size="small"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<!-- <el-form-item label="单据状态" prop="BillStatus">
<el-select <el-select
v-model="listQuery.BillStatus" v-model="listQuery.BillStatus"
placeholder="请选择" placeholder="请选择"
@ -129,32 +188,32 @@
</el-select> </el-select>
</el-form-item> --> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
@click="handleFilter" @click="handleFilter"
>搜索</el-button >搜索</el-button
> >
<el-button <el-button
icon="el-icon-refresh" icon="el-icon-refresh"
size="mini" size="mini"
@click="resetQuery('queryForm')" @click="resetQuery('queryForm')"
>重置</el-button >重置</el-button
> >
<el-button <el-button
type="warning" type="warning"
plain plain
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
style="margin-left: 15px" style="margin-left: 15px"
@click="handleDownload()" @click="handleDownload()"
>导出(Excel)查询信息 >导出(Excel)查询信息
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</flexbox> </flexbox>
</div> </div>
<div class="l-table"> <div class="l-table">
<!--表格渲染--> <!--表格渲染-->
@ -249,6 +308,7 @@ import Pagination from "@/components/Pagination";
import permission from "@/directive/permission/index.js"; import permission from "@/directive/permission/index.js";
import CRMTableHead from "../../components/CRMTableHead"; import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw"; import importExcel from "@/components/ImportExcel-vw";
import { mapGetters } from "vuex";
import Lockr from "lockr"; import Lockr from "lockr";
import moment from "moment"; import moment from "moment";
import message_table from "../../components/mixins/message_table"; import message_table from "../../components/mixins/message_table";
@ -285,9 +345,16 @@ export default {
return { return {
crmType: "bomdatabase", crmType: "bomdatabase",
customerInfos: [], customerInfos: [],
billState: [
{ id: 2, name: "R100" },
{ id: 3, name: "M100" },
],
isVINShowState:false,
OnlineTimeValue: [], OnlineTimeValue: [],
ReceiveTimeValue: [], ReceiveTimeValue: [],
versionValue: "", versionValue: "",
customerInfosMB:[],
customerInfosZHB:[],
versionList: [], // versionList: [], //
searchContent: "", // searchContent: "", //
showExcelImport: false, showExcelImport: false,
@ -307,6 +374,11 @@ export default {
}, },
}, },
listQuery: { listQuery: {
productType: 1, //1:2:
ProductLine: undefined,
checked1:true,
checked2:true,
SkipCount: 0, SkipCount: 0,
MaxResultCount: 15, MaxResultCount: 15,
HostSNBegin: undefined, HostSNBegin: undefined,
@ -319,13 +391,39 @@ export default {
VehicleModelCode: undefined, VehicleModelCode: undefined,
Version: undefined, Version: undefined,
KNR: undefined, KNR: undefined,
state: [],
},
listPLQuery: {
BillType: 2,
//UserId: this.userinfo.UserId,
},
vehicleModelQuery:{
dicTypeName:"派格车型",
}, },
page: 1, page: 1,
// //
// VehicleModelCodelist:[
// {id: 1, name: "C8"},
// {id: 2, name: "B8L"},
// {id: 3, name: "CC"},
// {id: 4, name: "BSMV"},
// {id: 5, name: "B9"},
// {id: 6, name: "Q5"},
// ],
productTypeList: [
{ id: 1, name: "门板" },
{ id: 2, name: "柱护板" },
],
showSearch: true, showSearch: true,
bomUnit, bomUnit,
PLList: [],
PLChildList: [], //线
multipleSelection: [], multipleSelection: [],
drawer: false, drawer: false,
isShowState: true,
dialogTableVisible: false,
vehicleModelList:[],//list
//tableHeight: document.documentElement.clientHeight - 260, //tableHeight: document.documentElement.clientHeight - 260,
}; };
}, },
@ -338,7 +436,14 @@ export default {
}); });
}, },
created() { created() {
this.getList(); //this.getList();
this.billState.forEach((element, index) => {
if (index === 0) {
this.listQuery.state.push(element.id);
}
});
this.getvehicleModel();
this.getProductLine();
}, },
computed: { computed: {
getDefaultField() { getDefaultField() {
@ -350,11 +455,11 @@ export default {
prop: "knr", prop: "knr",
width: 120, width: 120,
}); });
// tempsTabs.push({ tempsTabs.push({
// label: "", label: "底盘号",
// prop: "vin", prop: "vin",
// width: 130, width: 130,
// }); });
tempsTabs.push({ tempsTabs.push({
label: "上线时间", label: "上线时间",
prop: "onlineTime", prop: "onlineTime",
@ -375,6 +480,17 @@ export default {
prop: "version", prop: "version",
width: 150, width: 150,
}); });
tempsTabs.push({
label: "产线",
prop: "printNum",
width: 150,
});
tempsTabs.push({
label: "数据采集点",
prop: "",
width: 150,
});
tempsTabs.push({ label: "单据状态", prop: "billStatus", width: 120 }); tempsTabs.push({ label: "单据状态", prop: "billStatus", width: 120 });
tempsTabs.push({ tempsTabs.push({
label: "车型名称", label: "车型名称",
@ -383,8 +499,15 @@ export default {
}); });
return tempsTabs; return tempsTabs;
}, },
...mapGetters(["userInfo"]), //
}, },
methods: { methods: {
ss(data) {
//alert(data);
//
this.valueSelect = data;
this.getList();
},
// //
handleDrawerOpen(param) { handleDrawerOpen(param) {
this.drawer = true; this.drawer = true;
@ -461,26 +584,50 @@ export default {
}); });
}); });
}, },
/*单据状态变更 */
checkedListChange(index) {
if (this.listQuery.state.length <= 1) {
this.listQuery.state.push(this.billState[index].id);
} else {
this.listQuery.state = [];
this.listQuery.state.push(this.billState[index].id);
}
if(this.listQuery.state[0]=="3")
{
this.isVINShowState = true;
}
else
{
this.isVINShowState = false;
}
},
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery(refName) { resetQuery(refName) {
this.OnlineTimeValue = []; this.OnlineTimeValue = [];
this.ReceiveTimeValue = []; this.ReceiveTimeValue = [];
this.listQuery.state = [];
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
this.handleQuery(); this.handleQuery();
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.listQuery.SkipCount = 1; this.listQuery.SkipCount = 1;
this.getList(); //this.getList();
// this.getListM100();
// this.getListR100();
}, },
selectValue(params) { selectValue(params) {
// //
this.versionValue = params.value; this.versionValue = params.value;
this.getList(); this.getList();
// this.getListM100();
// this.getListR100();
}, },
selectOptionsChange(item) { selectOptionsChange(item) {
this.getList(); this.getList();
// this.getListM100();
// this.getListR100();
}, },
importExcelData() { importExcelData() {
// //
@ -492,6 +639,8 @@ export default {
handleHandle(data) { handleHandle(data) {
if (data.type !== "edit") { if (data.type !== "edit") {
this.getList(); this.getList();
// this.getListM100();
// this.getListR100();
} }
}, },
/** 格式化字段 */ /** 格式化字段 */
@ -512,8 +661,11 @@ export default {
}, },
roleFilter(type) { roleFilter(type) {
return projectTypeKeyValue[type]; return projectTypeKeyValue[type];
}, },
getList(data) {
getList(data){
this.listLoading = true; this.listLoading = true;
if (data != undefined) { if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit; this.listQuery.SkipCount = (this.page - 1) * data.limit;
@ -524,11 +676,38 @@ export default {
this.listQuery.OnlineTimeBegin = this.OnlineTimeValue[0]; this.listQuery.OnlineTimeBegin = this.OnlineTimeValue[0];
this.listQuery.OnlineTimeEnd = this.OnlineTimeValue[1]; this.listQuery.OnlineTimeEnd = this.OnlineTimeValue[1];
} }
// if (this.valueSelect != "") {
// this.listQuery.VehicleModelCode = this.valueSelect;
// } else {
// this.listQuery.VehicleModelCode = "";
// }
if (this.ReceiveTimeValue != []) { if (this.ReceiveTimeValue != []) {
this.listQuery.ReceiveTimeBegin = this.ReceiveTimeValue[0]; this.listQuery.ReceiveTimeBegin = this.ReceiveTimeValue[0];
this.listQuery.ReceiveTimeEnd = this.ReceiveTimeValue[1]; this.listQuery.ReceiveTimeEnd = this.ReceiveTimeValue[1];
} }
this.$axios
if(this.listQuery.state[0] == "2")
{
this.dialogTableVisible = false;
console.log("555555555555555555555555555555"+JSON.stringify(this.listQuery));
this.$axios
.gets("/api/newjit/repeat-r100/list", this.listQuery)
.then((response) => {
this.list = response.items;
this.totalCount = response.totalCount;
setTimeout(() => {
//
this.listLoading = false;
}, 500);
})
.catch(() => {
this.listLoading = false;
});
}
else
{
this.dialogTableVisible = true;
this.$axios
.gets("/api/newjit/repeat-m100/list", this.listQuery) .gets("/api/newjit/repeat-m100/list", this.listQuery)
.then((response) => { .then((response) => {
this.list = response.items; this.list = response.items;
@ -541,13 +720,97 @@ export default {
.catch(() => { .catch(() => {
this.listLoading = false; this.listLoading = false;
}); });
}, }
// if (this.billState=== 2) {
// this.$axios
// .gets("/api/newjit/repeat-r100/list", this.listQuery)
// .then((response) => {
// this.list = response.items;
// this.totalCount = response.totalCount;
// setTimeout(() => {
// //
// this.listLoading = false;
// }, 500);
// })
// .catch(() => {
// this.listLoading = false;
// });
// }
// else if(this.billState === 3){
// this.$axios
// .gets("/api/newjit/repeat-m100/list", this.listQuery)
// .then((response) => {
// this.list = response.items;
// this.totalCount = response.totalCount;
// setTimeout(() => {
// //
// this.listLoading = false;
// }, 500);
// })
// .catch(() => {
// this.listLoading = false;
// });
// }
//}
},
// getList(data) {
// this.listLoading = true;
// if (data != undefined) {
// this.listQuery.SkipCount = (this.page - 1) * data.limit;
// } else {
// this.listQuery.SkipCount = (this.page - 1) * 15;
// }
// if (this.OnlineTimeValue != []) {
// this.listQuery.OnlineTimeBegin = this.OnlineTimeValue[0];
// this.listQuery.OnlineTimeEnd = this.OnlineTimeValue[1];
// }
// if (this.ReceiveTimeValue != []) {
// this.listQuery.ReceiveTimeBegin = this.ReceiveTimeValue[0];
// this.listQuery.ReceiveTimeEnd = this.ReceiveTimeValue[1];
// }
// if (this.listQuery.state !== undefined) {
// this.listQuery.billStatus = this.listQuery.state[0];
// }
// //this.listQueryList.ProductLine = this.listQuery.productLine;
// this.$axios
// .gets("/api/newjit/repeat-m100/list", this.listQuery)
// .then((response) => {
// this.list = response.items;
// this.totalCount = response.totalCount;
// setTimeout(() => {
// //
// this.listLoading = false;
// }, 500);
// })
// .catch(() => {
// this.listLoading = false;
// });
// },
handleFilter() { handleFilter() {
this.dialogTableVisible = false;
this.page = 1; this.page = 1;
this.getList(); this.getList();
// this.getListM100();
// this.getListR100();
}, },
//线
ptypeselectChange() {
debugger
this.$forceUpdate();
//console.log("222222222222222222222222222222222222222222"+this.listQuery.productType);
this.listQuery.productLine = "";
this.PLChildList = this.PLList.filter(
(u) => u.productType === parseInt(this.listQuery.productType)
).sort((a, b) => {
return a.productLineCode - b.productLineCode;
});
console.log(this.PLList)
},
sortChange(data) { sortChange(data) {
const { prop, order } = data; const { prop, order } = data;
if (!prop || !order) { if (!prop || !order) {
@ -557,9 +820,85 @@ export default {
this.listQuery.Sorting = prop + " " + order; this.listQuery.Sorting = prop + " " + order;
this.handleFilter(); this.handleFilter();
}, },
getProductLine() {
//debugger
//console.log(JSON.stringify(this.userInfo));
this.listPLQuery.UserId = this.userInfo.userId;
console.log("this.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserIdthis.listPLQuery.UserId"+this.listPLQuery.UserId);
this.$axios
.gets("/api/newjit/product-line/list", this.listPLQuery)
.then((response) => {
//console.log("线"+JSON.stringify(response.item));
this.PLList = response.item;
this.PLChildList = this.PLList.filter(
(u) => u.productType === parseInt(this.listQuery.productType)
).sort((a, b) => {
return a.productLineCode - b.productLineCode;
});
console.log("2222222获取产线数据:"+JSON.stringify(this.PLChildList));
this.listQuery.productLine = this.PLChildList[0].productLineCode;
if (this.listQuery.productLine != "") {
//线
this.customerInfosMB = [
{
PrintType: 1,
ProductLine: this.PLChildList[0].productLineCode,
},
];
}
this.getList();
// this.getListM100();
// this.getListR100();
//console.log(this.PLList)
})
.catch(() => {});
},
valueselectChange1(){},
valueselectChange(val) {
this.$forceUpdate();
this.customerInfosMB = [];
this.customerInfosZHB = [];
if (this.listQuery.productType === 1) {
//线
this.customerInfosMB = [
{
PrintType: 1,
ProductLine: val,
},
];
}
if (this.listQuery.productType === 2) {
//线
this.customerInfosZHB = [
{
PrintType: 1,
ProductLine: val,
},
];
}
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
getvehicleModel()
{
this.$axios
.gets(
"/api/newjit/dic/list",this.vehicleModelQuery
)
.then((response) => {
//console.log(response);
this.vehicleModelList = response.item;
//console.log()
})
.catch(() => {
});
},
/** 通过回调控制style */ /** 通过回调控制style */
cellStyle({ row, column, rowIndex, columnIndex }) { cellStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") { if (column.property === "qty") {

6
vue/src/views/pg-fis/basedate/select/index.vue

@ -500,6 +500,7 @@ export default {
ReceiveTimeEnd: undefined, ReceiveTimeEnd: undefined,
billStatus: undefined, billStatus: undefined,
state: [], state: [],
ZHBBillStatus: undefined,
}, },
listExportQuery: { listExportQuery: {
erpAssemblyCode: undefined, erpAssemblyCode: undefined,
@ -807,6 +808,11 @@ export default {
if (this.listQuery.state !== undefined) { if (this.listQuery.state !== undefined) {
this.listQuery.billStatus = this.listQuery.state[0]; this.listQuery.billStatus = this.listQuery.state[0];
} }
if (this.listQuery.productType === 2) {
this.listQuery.ZHBBillStatus = 2;
} else {
this.listQuery.ZHBBillStatus = 0;
}
this.$axios this.$axios
.gets("/api/newjit/bill-m100/list", this.listQuery) .gets("/api/newjit/bill-m100/list", this.listQuery)
.then((response) => { .then((response) => {

Loading…
Cancel
Save