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. 9
      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. 13
      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. 637
      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
/*.rar

1
.vs/VSWorkspaceState.json

@ -2,5 +2,6 @@
"ExpandedNodes": [
""
],
"SelectedNode": "\\SettleAccount.sln (src\\Modules\\SettleAccount\\SettleAccount.sln)",
"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.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Win.Sfs.Shared.DtoBase;
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 = "交货单号")]
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 dtos = ObjectMapper.Map<List<CodeSetting>, List<CodeSettingDto>>(entities);
dtos=dtos.OrderBy(p => p.Value).ToList();
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]
[Route("testImport")]
[DisableRequestSizeLimit]
@ -288,10 +261,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
});
return _taskid;
}
[HttpPost]
[Route("ExcelImport-PG")]
[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 = "Period", Value = period ?? 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 _versionQuery = _versionRepository.Where(p => p.Version == version);
_versionQuery.BatchDelete();
var _query = _repository.Where(p => p.Version == version);
_query.BatchDelete();
});
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));
}
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));
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
var _existls = _preBatchRepository.Where(p => _precodeList.Contains(p.KENNCode)).ToList();
if (_existls.Count > 0)
{
@ -471,8 +438,6 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
var result = await _repository.GetAsync(id);
return result;
}
private async Task<long> GetCountAsync(SettleAccountRequestDto input)
{
return await _repository.GetCountByFilterAsync(input.BranchId, input.Filters);
@ -500,27 +465,13 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
IExporter _csv = new CsvExporter();
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 _ls=await _query.ToListAsync();
foreach (var itm in _ls)
{
itm.state = 3;
}
var dtoDetails = ObjectMapper.Map<List<SettleAccount>, List<SettleAccountExportDto>>(_ls);
string _fileName = string.Empty;
//声明导出容器
@ -562,7 +513,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[HttpPost]
[Route("Export")]
//[Authorize(SettleAccountPermissions.SettleAccounts.Default)]
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)
{
var entities = await _repository.GetAllAsync(branchId, true);
var dtos = ObjectMapper.Map<List<SettleAccount>, List<SettleAccountDto>>(entities);
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 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()
{
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.FISes;
using Win.Sfs.SettleAccount.Reports.ReportRequestDto;
namespace Win.Sfs.SettleAccount.Reports.ReportServices
{
@ -87,35 +88,26 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="sapCode">厂内物料号</param>
/// <param name="estimateTypeDesc">物料组</param>
/// <returns></returns>
[HttpGet]
[HttpPost]
[Route("SettleDoorPanel")]
[DisableRequestSizeLimit]
public async Task<string> SettleDoorPanel(
string version,
string materialCode,
string begin,
string end,
string cp7begin,
string cp7end,
string kenncode,
string chassisNumber,
string materialGroup,
string sapCode
BaseRequestDto input
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(version) ? string.Empty : version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(materialCode) ? string.Empty : materialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(begin) ? string.Empty : begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(end) ? string.Empty : end });
customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(cp7begin) ? string.Empty : cp7begin });
customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(cp7end) ? string.Empty : cp7end });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", 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 = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode });
var _taskid = await _service.ExportEnqueueAsync("大众准时化结算门板价格差异比对报表", ExportExtentsion.Excel,version,string.Empty, CurrentUser, typeof(SettleDoorPanelExportService), customConditionList, (rs) =>
customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(input.Version) ? string.Empty : input.Version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(input.MaterialCode) ? string.Empty : input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(input.Begin) ? string.Empty : input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(input.End) ? string.Empty : input.End });
customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(input.Cp7Begin) ? string.Empty : input.Cp7Begin });
customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(input.Cp7End) ? string.Empty : input.Cp7End });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(input.Kenncode) ? string.Empty : input.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(input.ChassisNumber) ? string.Empty : input.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("准时化结算门板价格差异比对报表", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(SettleDoorPanelExportService), customConditionList, (rs) =>
{
});
return _taskid;
@ -133,26 +125,25 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="begin"></param>
/// <param name="end"></param>
/// <returns></returns>
[HttpGet]
[HttpPost]
[Route("SettleKanBan-WithCode")]
[DisableRequestSizeLimit]
public async Task<string> SettledKanBanWithCode(string kanBan, string sapMaterialCode, string version, string customerCode, string customerPartCode, string estimateTypeDesc,
string state, DateTime begin, DateTime end)
public async Task<string> SettledKanBanWithCode(BaseKanbanReqestDto input)
{
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 });
customConditionList.Add(new CustomCondition() { Name = "CustomerPartCode", Value = customerPartCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "EstimateTypeDesc", Value = estimateTypeDesc ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = input.CustomerCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerPartCode", Value = input.CustomerPartCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = input.State ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "EstimateTypeDesc", Value = input.EstimateTypeDesc ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "有条码看板结算核对" });
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = kanBan ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value = sapMaterialCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = begin.ToString() });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end.ToString() });
customConditionList.Add(new CustomCondition() { Name = "Kanban", Value = input.KanBan ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "SapMaterialCode", Value = input.SapMaterialCode ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "BegingTime", Value = input.Begin.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;
@ -216,29 +207,29 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="begin"></param>
/// <param name="end"></param>
/// <returns></returns>
[HttpGet]
[Route("UnSettledDiff-Make")]
[DisableRequestSizeLimit]
//[HttpGet]
//[Route("UnSettledDiff-Make")]
//[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>();
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() });
//public async Task<string> UnSettledMake(string year, string period, string version, string customerCode, string factory, string matialCode, string state,DateTime begin,DateTime end)
//{
var _taskid = await _service.ExportEnqueueAsync("未结算对比", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(UnSettledExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
// 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 });
// 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>
@ -254,26 +245,26 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="begin"></param>
/// <param name="end"></param>
/// <returns></returns>
[HttpGet]
[Route("FisUnSettledDiff-Make")]
[DisableRequestSizeLimit]
//[HttpGet]
//[Route("FisUnSettledDiff-Make")]
//[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>();
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 = "ProjectName", Value = "ERP总成开票报表" });
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() });
// 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 });
// customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
// customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "ERP总成开票报表" });
// 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) =>
{
});
return _taskid;
}
// var _taskid = await _service.ExportEnqueueAsync("ERP总成开票报表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(fisUnsettledDiffReport), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
/// <summary>
/// 价差量差分析报表
@ -284,37 +275,37 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <param name="factory"></param>
/// <param name="state"></param>
/// <returns></returns>
[HttpGet]
[Route("PriceQtyDiff-Make")]
[DisableRequestSizeLimit]
//[HttpGet]
//[Route("PriceQtyDiff-Make")]
//[DisableRequestSizeLimit]
public async Task<string> PriceQtyDiffMake(string year, string version, string customerCode, string factory, string state)
{
//if (!_invoiceVersionRepository.Any(p => p.Version == version))
//{
// throw new BusinessException("8989", string.Format("不存发票{0}期间", version));
//}
//if (!_settleAccountVersionrepository.Any(p => p.Version == version))
//{
// throw new BusinessException("8989", string.Format("不存结算{0}期间", version));
//}
//if (!_itemInvoicePriceVersionrepository.Any(p => p.Version == version))
//{
// throw new BusinessException("8989", string.Format("不存QAD价格导入{0}期间", version));
//}
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 });
customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "价差量差分析报表" });
customConditionList.Add(new CustomCondition() { Name = "Year", Value = year ?? DateTime.Now.Year.ToString() });
//public async Task<string> PriceQtyDiffMake(string year, string version, string customerCode, string factory, string state)
//{
// //if (!_invoiceVersionRepository.Any(p => p.Version == version))
// //{
// // throw new BusinessException("8989", string.Format("不存发票{0}期间", version));
// //}
// //if (!_settleAccountVersionrepository.Any(p => p.Version == version))
// //{
// // throw new BusinessException("8989", string.Format("不存结算{0}期间", version));
// //}
// //if (!_itemInvoicePriceVersionrepository.Any(p => p.Version == version))
// //{
// // throw new BusinessException("8989", string.Format("不存QAD价格导入{0}期间", version));
// //}
// 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 });
// customConditionList.Add(new CustomCondition() { Name = "Factory", Value = factory ?? string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "State", Value = state ?? "0" });
// customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "价差量差分析报表" });
// 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) =>
{
});
return _taskid;
}
// var _taskid = await _service.ExportEnqueueAsync("价差量差分析报表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(PriceQtyDifferenceExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
/// <summary>
@ -326,7 +317,9 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
[Route("InvoiceSettledDiff-Make")]
[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))
//{
@ -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 = "ProjectName", Value = "结算与开票数据对比" });
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>
/// 2.大众发票与结算核对明细表
///发票与结算核对明细表
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpGet]
[HttpPost]
[Route("InvoiceSettledDetailDiff-Make")]
[DisableRequestSizeLimit]
public async Task<string> InvoiceSettledDetailDiffMake(
string version,
string materialCode,
string begin,
string end,
string cp7begin,
string cp7end,
string kenncode,
string chassisNumber,
string materialGroup,
string sapCode
BaseRequestDto request
)
{
//string str1 = string.Empty;
//if(materialGroup!=null)
//{
// str1 = string.Join(',', materialGroup.ToArray());
//}
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value =string.IsNullOrEmpty(version) ?string.Empty:version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(materialCode) ?string.Empty: materialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(begin) ? string.Empty : begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(end) ? string.Empty : end });
customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(cp7begin) ? string.Empty : cp7begin });
customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(cp7end) ? string.Empty : cp7end });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", 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 = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode });
var _taskid = await _service.ExportEnqueueAsync("大众发票与结算核对明细表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(InvoiceSettledDetailDiffExportService), customConditionList, (rs) =>
customConditionList.Add(new CustomCondition() { Name = "Version", Value =string.IsNullOrEmpty(request.Version) ?string.Empty:request.Version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(request.MaterialCode) ?string.Empty: request.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(request.End) ? string.Empty : request.End });
customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(request.Cp7Begin) ? string.Empty : request.Cp7Begin });
customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(request.Cp7End) ? string.Empty : request.Cp7End });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(request.Kenncode) ? string.Empty : request.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(request.ChassisNumber) ? string.Empty : request.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(request.MaterialGroup) ? string.Empty : request.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(request.SapCode) ? string.Empty : request.SapCode });
var _taskid = await _service.ExportEnqueueAsync("准时化结算核对明细", ExportExtentsion.Excel,request.Version, string.IsNullOrEmpty(request.MaterialGroup) ? string.Empty : request.MaterialGroup, CurrentUser, typeof(InvoiceSettledDetailDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
/// <summary>
///3.大众准时化结算数量差异比对表
///3.准时化结算数量差异比对表
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpGet]
[HttpPost]
[Route("UnInvoiceSettledDetailDiff-Make")]
[DisableRequestSizeLimit]
public async Task<string> UnInvoiceSettledDetailDiffMake(
string version,
string materialCode,
string begin,
string end,
string cp7begin,
string cp7end,
string kenncode,
string chassisNumber,
string materialGroup,
string sapCode
BaseRequestDto request
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(version) ? string.Empty : version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(materialCode) ? string.Empty : materialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = string.IsNullOrEmpty(begin) ? string.Empty : materialCode });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = string.IsNullOrEmpty(end) ? string.Empty : materialCode });
customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(cp7begin) ? string.Empty : cp7begin });
customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(cp7end) ? string.Empty : cp7end });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : 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 = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode });
var _taskid = await _service.ExportEnqueueAsync("大众准时化结算数量差异比对表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(UnInvoiceSettledDetailDiffExportService), customConditionList, (rs) =>
customConditionList.Add(new CustomCondition() { Name = "Version", Value = string.IsNullOrEmpty(request.Version) ? string.Empty : request.Version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = string.IsNullOrEmpty(request.MaterialCode) ? string.Empty : request.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(request.End) ? string.Empty : request.End });
customConditionList.Add(new CustomCondition() { Name = "Cp7BeginTime", Value = string.IsNullOrEmpty(request.Cp7Begin) ? string.Empty : request.Cp7Begin });
customConditionList.Add(new CustomCondition() { Name = "Cp7EndTime", Value = string.IsNullOrEmpty(request.Cp7End) ? string.Empty : request.Cp7End });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(request.Kenncode) ? string.Empty : request.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(request.ChassisNumber) ? string.Empty : request.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(request.MaterialGroup) ? string.Empty : request.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(request.SapCode) ? string.Empty : request.SapCode });
var _taskid = await _service.ExportEnqueueAsync("准时化结算数量差异比对输出", ExportExtentsion.Excel,request.Version, string.IsNullOrEmpty(request.MaterialGroup) ? string.Empty : request.MaterialGroup, CurrentUser, typeof(UnInvoiceSettledDetailDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
@ -439,37 +413,32 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <summary>
/// 7.大众准时化未结明细表(包含漏结,漏结要有标识)
/// 准时化未结明细表(包含漏结,漏结要有标识)
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpGet]
[HttpPost]
[Route("UnsettledDetailReportService-Make")]
[DisableRequestSizeLimit]
public async Task<string> UnsettledDetailReportServiceMake(
string version,
string materialCode,
string begin,
string end,
string kenncode,
string chassisNumber,
string materialGroup,
string sapCode
BaseRequestDto input
)
{
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 = "MaterialCode", Value = !string.IsNullOrEmpty(materialCode)?materialCode:string.Empty });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = !string.IsNullOrEmpty(materialGroup)? materialGroup: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(input.MaterialGroup)? input.MaterialGroup :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 = "End", Value = !string.IsNullOrEmpty(end)?string.Empty: end });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(chassisNumber) ? string.Empty : chassisNumber });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode });
var _taskid = await _service.ExportEnqueueAsync("大众准时化未结明细表", ExportExtentsion.Excel,version,string.Empty ,CurrentUser, typeof(UnsettledDetailReportService), customConditionList, (rs) =>
customConditionList.Add(new CustomCondition() { Name = "Begin", Value = !string.IsNullOrEmpty(input.Begin)?string.Empty: input.Begin });
customConditionList.Add(new CustomCondition() { Name = "End", Value = !string.IsNullOrEmpty(input.End)?string.Empty: input.End });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(input.Kenncode) ? string.Empty : input.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(input.ChassisNumber) ? string.Empty : input.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("准时化未结明细表", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(UnsettledDetailReportService), customConditionList, (rs) =>
{
});
return _taskid;
@ -477,71 +446,64 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices
/// <summary>
///6.大众准时化未结差异比对表
///准时化未结差异比对表
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpGet]
[HttpPost]
[Route("UnSettleDiffExport-Make")]
[DisableRequestSizeLimit]
public async Task<string> UnSettleDiffExportServiceMake(
string version,
string materialCode,
string begin,
string end,
string kenncode,
string chassisNumber,
string materialGroup,
string sapCode
BaseRequestDto input
)
{
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = materialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = end });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = materialCode });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(kenncode) ? string.Empty : kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", 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 = "SapCode", Value = string.IsNullOrEmpty(sapCode) ? string.Empty : sapCode });
var _taskid = await _service.ExportEnqueueAsync("大众准时化未结差异比对表", ExportExtentsion.Excel,version,string.Empty, CurrentUser, typeof(UnSettleDiffExportService), customConditionList, (rs) =>
customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "BeginTime", Value = input.Begin });
customConditionList.Add(new CustomCondition() { Name = "EndTime", Value = input.End });
customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
customConditionList.Add(new CustomCondition() { Name = "KennCode", Value = string.IsNullOrEmpty(input.Kenncode) ? string.Empty : input.Kenncode });
customConditionList.Add(new CustomCondition() { Name = "ChassisNumber", Value = string.IsNullOrEmpty(input.ChassisNumber) ? string.Empty : input.ChassisNumber });
customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
customConditionList.Add(new CustomCondition() { Name = "SapCode", Value = string.IsNullOrEmpty(input.SapCode) ? string.Empty : input.SapCode });
var _taskid = await _service.ExportEnqueueAsync("准时化未结差异比对输出", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(UnSettleDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
/// <summary>
/// 结算总成和ERP总成价格对比
/// </summary>
/// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
/// <returns></returns>
[HttpGet]
[Route("SettledPartAndErpPartPriceDiff-Make")]
[DisableRequestSizeLimit]
///// <summary>
///// 结算总成和ERP总成价格对比
///// </summary>
///// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
///// <returns></returns>
//[HttpGet]
//[Route("SettledPartAndErpPartPriceDiff-Make")]
//[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))
{
throw new BusinessException("8989", string.Format("不存总成与结算件零件关系{0}期间", version));
}
if (!_settlementPartVersionrepository.Any(p => p.Version == version && p.CustomerCode == customerCode))
{
throw new BusinessException("8989", string.Format("不存结算包价格{0}期间", version));
}
// if (!_relationshipRepository.Any(p => p.Version == version && p.CustomerCode == customerCode))
// {
// throw new BusinessException("8989", string.Format("不存总成与结算件零件关系{0}期间", version));
// }
// if (!_settlementPartVersionrepository.Any(p => p.Version == version && p.CustomerCode == customerCode))
// {
// 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 = "Version", Value = version??string.Empty });
customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode });
var _taskid = await _service.ExportEnqueueAsync("结算总成和ERP总成价格对比", ExportExtentsion.Excel,version,string.Empty,CurrentUser, typeof(SettledPartAndErpPartPriceDiffExportService), customConditionList, (rs) =>
{
});
return _taskid;
}
// customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = "结算总成和ERP总成价格对比" });
// customConditionList.Add(new CustomCondition() { Name = "Version", Value = version??string.Empty });
// customConditionList.Add(new CustomCondition() { Name = "CustomerCode", Value = customerCode });
// var _taskid = await _service.ExportEnqueueAsync("结算总成和ERP总成价格对比", ExportExtentsion.Excel,version,string.Empty,CurrentUser, typeof(SettledPartAndErpPartPriceDiffExportService), customConditionList, (rs) =>
// {
// });
// return _taskid;
//}
///// <summary>

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

@ -1587,26 +1587,193 @@
<param name="input">请求条件</param>
<returns>实体DTO列表</returns>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSAppService">
<member name="T:Win.Sfs.SettleAccount.Entities.SettleAccounts.WMSJitAppService">
<summary>
大众准时化结算明细导入-R3已结
wms出库
</summary>
</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>
<param name="guidGenerator">构建UID</param>
<param name="repository">仓储接口</param>
<param name="cache">缓存</param>
<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.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>
<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>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</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">
<summary>
结算包与散件对应关系服务
@ -2673,7 +2840,7 @@
<param name="repository">仓储接口</param>
<param name="cache">缓存</param>
</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>
@ -2684,7 +2851,7 @@
<param name="estimateTypeDesc">物料组</param>
<returns></returns>
</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>
@ -2714,47 +2881,6 @@
<param name="end"></param>
<returns></returns>
</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)">
<summary>
1.大众发票与结算核对汇总表
@ -2762,41 +2888,34 @@
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</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)">
<summary>
2.大众发票与结算核对明细表
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
<member name="M:Win.Sfs.SettleAccount.Reports.ReportServices.ReportService.InvoiceSettledDetailDiffMake(Win.Sfs.SettleAccount.Reports.ReportRequestDto.BaseRequestDto)">
<summary>
发票与结算核对明细表
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</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>
3.大众准时化结算数量差异比对表
3.准时化结算数量差异比对表
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</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>
7.大众准时化未结明细表(包含漏结,漏结要有标识)
准时化未结明细表(包含漏结,漏结要有标识)
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</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>
6.大众准时化未结差异比对表
准时化未结差异比对表
</summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns>
</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">
<summary>
红旗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; }
}
}

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

@ -40,9 +40,12 @@ namespace Win.Sfs.SettleAccount.Entities
{
DownFileName = downfileName;
}
public void SetRemark(string remark)
{
Remark = remark;
}
public string Type { set; get; }
public string State { 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;
WmsBillNum = wmsBillNum;
@ -108,6 +110,156 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
ParentMaterialCode = parentMaterialCode;
BillNum = billNum;
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,133 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
public string ParentMaterialCode { set; get; }
[ImporterHeader(Name = "交货单号")]
public string WmsBillNum { set; get; }
[ImporterHeader(Name = "KENN号")]
[ImporterHeader(Name = "看板号")]
//KENN号
public string KennCode { set; get; }
[ImporterHeader(Name = "底盘号")]
//底盘号
public string ChassisNumber { set; get; }
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 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; }
}
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; }
@ -159,9 +432,9 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
[ImporterHeader(Name = "版本号")]
public string Version { set; get; }
[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; }
@ -172,4 +445,13 @@ namespace Win.Sfs.SettleAccount.Entities.WMS
}

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

@ -322,7 +322,14 @@ namespace Win.Sfs.SettleAccount
//一汽轿车
builder.ConfigureBTCar(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
}
@ -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

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

@ -8,6 +8,7 @@ using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities;
using Win.Sfs.SettleAccount.Entities.WMS;
using WY.NewJit.Extends.PaiGe.WMS;
@ -22,7 +23,11 @@ namespace Win.Sfs.SettleAccount
{
#region DbSet
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
/* 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;
//}
[ExporterHeader(DisplayName = "交货单号 ")]
[ExporterHeader(DisplayName = "交货单号")]
public override string WmsBillNum { set; get; }
[ExporterHeader(DisplayName = "实际发货日期 ")]
[ExporterHeader(DisplayName = "实际发货日期")]
public override DateTime CP5Time { set; get; }
[ExporterHeader(DisplayName = "KENN号")]
public override string KENNCode { set; get; }
[ExporterHeader(DisplayName = "底盘号")]
public override string ChassisNumber { set; get; }
[ExporterHeader(DisplayName = "交货状态 ")]
[ExporterHeader(DisplayName = "交货状态")]
public override string WmsState { set; get; }
[ExporterHeader(DisplayName = "物料号")]
public override string SapMaterialCode { set; get; }
[ExporterHeader(DisplayName = "物料描述 ")]
[ExporterHeader(DisplayName = "物料描述")]
public override string MaterialDesc { set; get; }
[ExporterHeader(DisplayName = "客户物料 ")]
[ExporterHeader(DisplayName = "客户物料")]
public override string MaterialCode { set; get; }
[ExporterHeader(DisplayName = "组件组物料 ")]
[ExporterHeader(DisplayName = "组件组物料")]
public override string ParentSapMaterialCode { set; get; }
[ExporterHeader(DisplayName = "组件组物料描述 ")]
[ExporterHeader(DisplayName = "组件组物料描述")]
public override string ParentMaterialDesc { set; get; }
[ExporterHeader(DisplayName = "物料组(车型) ")]
[ExporterHeader(DisplayName = "物料组(车型)")]
public override string MaterialGroup { set; get; }
[ExporterHeader(DisplayName = "定价")]
public override decimal Price { set; get; }
@ -130,11 +130,11 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
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))
{
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" +
" c.WMSDeliveryNote,--交货单号\n" +
" c.WMSActualGoodsDate,--实际发货日期\n" +
" a.Kanban,--条码号\n" +
" b.MaterialCode SapMaterialCode,--厂内物料号\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_WMSKanBanSettle c ON a.Kanban= c.Kanban \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" +
" LEFT JOIN ( SELECT Price, --定价\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 ";
if (!string.IsNullOrEmpty(materialCode))
{
condition += string.Format(" and d.MaterialCode='{0}' ", materialCode);
}
//if (!string.IsNullOrEmpty(materialCode))
//{
// condition += string.Format(" and d.MaterialCode='{0}' ", materialCode);
//}
if (!string.IsNullOrEmpty(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);
}
if (!string.IsNullOrEmpty(kennCode))
{
condition += string.Format(" and a.kenncode='{0}' ", kennCode);
}
if (!string.IsNullOrEmpty(chassisNumber))
{
condition += string.Format(" and a.chassisNumber='{0}' ", chassisNumber);
}
//if (!string.IsNullOrEmpty(kennCode))
//{
// condition += string.Format(" and a.kenncode='{0}' ", kennCode);
//}
//if (!string.IsNullOrEmpty(chassisNumber))
//{
// condition += string.Format(" and a.chassisNumber='{0}' ", chassisNumber);
//}
string sql1 =
"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" +
" ChassisNumber,\n" +
" OrderBillNum KENNCode,\n" +
" ChassisNumber2,\n"+
" KENNCode KENNCode2, \n"+
" QTY,\n" +
" ErpMaterialCode ParentSapMaterialCode,\n" +
" '' FLAG \n" +
@ -99,6 +103,9 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" ItemCode MaterialCode,\n" +
" ChassisNumber,\n" +
" OrderBillNum KENNCode,\n" +
" ChassisNumber2,\n" +
" KENNCode KENNCode2, \n" +
" QTY,\n" +
" ErpMaterialCode ParentSapMaterialCode,\n" +
" 'L' FLAG \n" +
@ -109,7 +116,7 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
" AND STATE = 4 {0}\n" +
" ) A\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 d ON a.ParentSapMaterialCode = d.MaterialCode \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);
}
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)
{
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 += " FROM HangFire.Job AS a INNER JOIN \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);
}
}
DbContext.BulkInsert(_insertls);
DbContext.BulkInsert(_insertls,new BulkConfig() { BatchSize=100000, BulkCopyTimeout=0 });
}
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();
}
}
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))
{
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();
}

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

@ -65,7 +65,7 @@ namespace SettleAccount.Job.Services
}
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)
{
_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);

13
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 materialGroup = p_list.Where(p => p.Name == "EstimateTypeDesc").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 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;//总金额差异(结算金额-开票金额)
}
}
if (!string.IsNullOrEmpty(materialGroup))
{
var _groupList = materialGroup.Split(new char[] { ',' }).Distinct().ToList();
@ -86,15 +82,11 @@ namespace SettleAccount.Job.Services.Report
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))
{
_list = _list.Where(p => DateTime.Parse(endTime) >= p.ActualGoodsDate).ToList();
}
if (!string.IsNullOrEmpty(kanban))
@ -104,9 +96,6 @@ namespace SettleAccount.Job.Services.Report
{
_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();
}
}
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
{

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();
}
}
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();

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) {
var MBVin1 = [];
var MBVin1 = [];
let myalert = ""; //使
if (row) {
//

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

@ -99,9 +99,16 @@
type="success"
icon="el-icon-s-shop"
@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>
</flexbox>
@ -244,6 +251,7 @@ export default {
customerInfo: {
printType: "1",
productLine: "",
partType: "",
},
//
filterObj: {
@ -261,6 +269,8 @@ export default {
HostSN: undefined,
beginPrintDate: undefined,
endPrintDate: undefined,
beginVin: undefined,
endVin: undefined,
},
listPLQuery: {
BillType: 2,
@ -344,21 +354,16 @@ export default {
tempsTabs.push({ label: "单据顺号", prop: "billSerialNum", width: 120 });
tempsTabs.push({ label: "起始顺序号", prop: "beginHostSN", 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({
label: "零件类型",
prop: "partType",
width: 180,
});
tempsTabs.push({
label: "左或右",
prop: "billLocation",
width: 150,
});
tempsTabs.push({
label: "器具容量",
prop: "capacity",
@ -379,7 +384,6 @@ export default {
prop: "productLine",
width: 120,
});
tempsTabs.push({
label: "起始底盘号",
prop: "beginVin",
@ -390,6 +394,11 @@ export default {
prop: "endVin",
width: 160,
});
tempsTabs.push({
label: "供应商厂家代码",
prop: "providerCode",
width: 150,
});
return tempsTabs;
},
...mapGetters(["userInfo"]), //
@ -425,7 +434,7 @@ export default {
ifr.setAttribute("name", "printPdf" + date);
ifr.src = window.URL.createObjectURL(blob);
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
this.dialogFormVisible = false;
},
@ -463,7 +472,7 @@ export default {
if (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);
if (getdate5 != "[]") {
this.listQuery.beginPrintDate = this.PrintTimeValue
@ -487,20 +496,14 @@ export default {
this.listQuery
)
.then((response) => {
response.items.forEach((item)=>{
if(item.printType == 0)
{
response.items.forEach((item) => {
if (item.printType == 0) {
item.printType = "正常打印";
}
else if(item.printType == 1)
{
} else if (item.printType == 1) {
item.printType = "重打";
}
else
{
} else {
item.printType = "补打";
}
});
this.list = response.items;
this.totalCount = response.totalCount;
@ -515,26 +518,167 @@ export default {
},
//-
handleUpdate(row) {
var beginVin1 = [];
let myalert = ""; //使
if (row) {
//
beginVin1.push(row.id);
myalert = row.name;
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
beginVin1.push(id);
this.isEdit = true;
if (this.multipleSelection.length != 1) {
this.$message({
message: "重新打印必须选择单行,不能多选!",
type: "warning",
});
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;
let ZHBId = beginVin1;
// var ZHBVin1 = [];
// 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 = {
printType: "1",
productLine: this.customerInfo.productLine,
reportIdList: ZHBId,
//partType: this.multipleSelection[0].partType,
dataResultType: "1",
};
console.log("柱护版-主界面传过来的值:" + JSON.stringify(params));
this.$axios
@ -562,10 +706,11 @@ export default {
.then((response) => {
this.printpdf(response); //
});
this.getList();
this.getList();
}
})
.catch(() => {});
}
},
//-
handleDelete(row) {

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

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

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

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

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

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

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

@ -111,6 +111,30 @@
plain
><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-row> -->
@ -385,6 +409,7 @@ import RepetitionMB from "./RepetitionMB.vue";
import RepetitionZHB from "./RepetitionZHB.vue";
import ScrapMB from "./ScrapMB.vue";
import ScrapZHB from "./ScrapZHB.vue";
import { forEach } from "jszip/lib/object";
export default {
name: "M100Online",
@ -421,7 +446,16 @@ export default {
}
};
return {
content01: "",
content05: "",
content07: "",
content08: "",
// minute01: this.timeoutMinutes,
// minute05: this.timeoutMinutes,
// lastTime01: "14:00",
// lastTime05: "14:40",
crmType: "M100Online",
//productLineList:null,
isDisable: false,
drawerMBPrint: false,
drawerMBDelete: false,
@ -569,6 +603,10 @@ export default {
this.tableHeight = offsetHei - boxH - 67 - 79; //57footer79
//this.tableHeight = offsetHei -260
});
let timer = setInterval(() => {
this.open();
}, 50000);
},
created() {
this.billState.forEach((element, index) => {
@ -650,6 +688,99 @@ export default {
...mapGetters(["userInfo"]), //
},
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() {
console.log("2秒内点击无数次,都只会触发一次");
},
@ -922,6 +1053,7 @@ export default {
console.log(
"日常打印M100查询条件:" + JSON.stringify(this.listQueryList)
);
//this.click();
this.$axios
.gets("/api/newjit/bill-m100/list", this.listQueryList)
.then((response) => {
@ -1354,7 +1486,9 @@ export default {
}
});
})
.catch(() => { this.isDisable = false;});
.catch(() => {
this.isDisable = false;
});
} else {
//
//
@ -1391,12 +1525,12 @@ export default {
console.log("获取文件base64编码");
console.log(response);
this.formLoading = false;
this.isDisable = false;
this.isDisable = false;
this.printpdf(response); //
})
.catch((error) => {
this.formLoading = false;
this.isDisable = false;
this.isDisable = false;
});
}
})
@ -1405,7 +1539,7 @@ export default {
message: response.message,
type: "error",
});
this.isDisable = false;
this.isDisable = false;
return;
});
}
@ -1484,7 +1618,9 @@ export default {
}
});
})
.catch(() => {this.isDisable = false;});
.catch(() => {
this.isDisable = false;
});
} else {
//
//
@ -1521,7 +1657,7 @@ export default {
console.log("获取文件base64编码");
console.log(response);
this.formLoading = false;
this.isDisable = false
this.isDisable = false;
this.printpdf(response); //
})
.catch((error) => {
@ -1535,7 +1671,7 @@ export default {
message: response.message,
type: "error",
});
this.isDisable = false;
this.isDisable = false;
return;
});
}
@ -2130,9 +2266,11 @@ export default {
},
//线
getProductLine() {
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
.gets("/api/newjit/product-line/list", this.listPLQuery)
.then((response) => {

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

@ -329,7 +329,7 @@ export default {
],
},
billState: [
{ id: 2, name: "已匹配" },
{ id: 2, name: "未导出" },
{ id: 3, name: "已导出" },
],
valueSelect: "",
@ -512,7 +512,7 @@ export default {
this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName;
console.log(JSON.stringify(this.listQuery));
this.$axios
.posts("/api/newjit/bill-r100/export", this.listQuery)
.posts("//api/newjit/bill-r100/export-erp-assembly-code", this.listQuery)
.then((res) => {
let filename = res.item;
this.$axios
@ -719,7 +719,43 @@ export default {
this.$refs.multipleTable.clearSelection();
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() {
this.listPLQuery.UserId = this.userInfo.userId;

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

@ -2,122 +2,181 @@
<template>
<div class="cr-body-content">
<div ref="box">
<flexbox class="content-header">
<el-form
:model="listQuery"
ref="queryForm"
v-show="showSearch"
:inline="true"
>
<el-form-item label="起始顺序号" prop="HostSNBegin">
<el-input
v-model="listQuery.HostSNBegin"
placeholder="起始顺序号"
clearable
size="small"
style="width: 120px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="结束顺序号" prop="HostSNEnd">
<el-input
v-model="listQuery.HostSNEnd"
placeholder="结束顺序号"
clearable
size="small"
style="width: 120px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="KNR:" prop="KNRBegin">
<el-input
v-model="listQuery.KNRBegin"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="-" prop="KNREnd">
<el-input
v-model="listQuery.KNREnd"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="底盘号:" prop="VINBegin">
<el-input
v-model="listQuery.VINBegin"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="-" prop="VINEnd">
<el-input
v-model="listQuery.VINEnd"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<flexbox class="content-header">
<el-form
:model="listQuery"
ref="queryForm"
v-show="showSearch"
:inline="true"
>
<!-- <el-form-item label="数据采集点" prop="productType">
<el-checkbox v-model="listQuery.checked1" >M100</el-checkbox>
<el-checkbox v-model="listQuery.checked2" >R100</el-checkbox>
</el-form-item> -->
<el-form-item label="数据采集点" prop="State" >
<el-checkbox-group v-model="listQuery.state">
<el-checkbox
v-for="(item, index) in billState"
:key="item.id"
:label="item.id"
@change="checkedListChange(index)"
>
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="车型代码" prop="VehicleModelCode">
<el-input
v-model="listQuery.VehicleModelCode"
placeholder="请输入总成名称"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="生产线:" prop="productType">
<el-select
v-model="listQuery.productType"
clearable
placeholder="请选择"
size="medium"
style="margin-right: 15px"
@change="ptypeselectChange"
>
<el-option
v-for="item in productTypeList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="" prop="productLine">
<el-select
v-model="listQuery.productLine"
clearable
placeholder="请选择"
size="medium"
style="margin-right: 15px"
@change="valueselectChange"
>
<el-option
v-for="item in PLChildList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
/>
</el-select>
</el-form-item>
<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="起始顺序号" prop="HostSNBegin">
<el-input
v-model="listQuery.HostSNBegin"
placeholder="起始顺序号"
clearable
size="small"
style="width: 120px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="结束顺序号" prop="HostSNEnd">
<el-input
v-model="listQuery.HostSNEnd"
placeholder="结束顺序号"
clearable
size="small"
style="width: 120px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="KNR:" prop="KNRBegin">
<el-input
v-model="listQuery.KNRBegin"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="-" prop="KNREnd">
<el-input
v-model="listQuery.KNREnd"
placeholder=""
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="底盘号:" prop="VINBegin" v-show="isVINShowState">
<el-input
v-model="listQuery.VINBegin"
placeholder=""
clearable
size="small"
style="width: 240px"
:visible.sync="dialogTableVisible"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="车型代码" prop="vehicleModelCode">
<el-select
v-model="listQuery.vehicleModelCode"
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-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-select
v-model="listQuery.VehicleModelCode"
placeholder="请输入总成名称"
clearable
size="small"
style="width: 240px"
@keyup.enter.native="handleQuery"
/> -->
<!-- <el-form-item label="单据状态" prop="BillStatus">
<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
v-model="listQuery.BillStatus"
placeholder="请选择"
@ -129,32 +188,32 @@
</el-select>
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleFilter"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery('queryForm')"
>重置</el-button
>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
style="margin-left: 15px"
@click="handleDownload()"
>导出(Excel)查询信息
</el-button>
</el-form-item>
</el-form>
</flexbox>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleFilter"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery('queryForm')"
>重置</el-button
>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
style="margin-left: 15px"
@click="handleDownload()"
>导出(Excel)查询信息
</el-button>
</el-form-item>
</el-form>
</flexbox>
</div>
<div class="l-table">
<!--表格渲染-->
@ -249,6 +308,7 @@ import Pagination from "@/components/Pagination";
import permission from "@/directive/permission/index.js";
import CRMTableHead from "../../components/CRMTableHead";
import importExcel from "@/components/ImportExcel-vw";
import { mapGetters } from "vuex";
import Lockr from "lockr";
import moment from "moment";
import message_table from "../../components/mixins/message_table";
@ -285,9 +345,16 @@ export default {
return {
crmType: "bomdatabase",
customerInfos: [],
billState: [
{ id: 2, name: "R100" },
{ id: 3, name: "M100" },
],
isVINShowState:false,
OnlineTimeValue: [],
ReceiveTimeValue: [],
versionValue: "",
customerInfosMB:[],
customerInfosZHB:[],
versionList: [], //
searchContent: "", //
showExcelImport: false,
@ -307,6 +374,11 @@ export default {
},
},
listQuery: {
productType: 1, //1:2:
ProductLine: undefined,
checked1:true,
checked2:true,
SkipCount: 0,
MaxResultCount: 15,
HostSNBegin: undefined,
@ -319,13 +391,39 @@ export default {
VehicleModelCode: undefined,
Version: undefined,
KNR: undefined,
state: [],
},
listPLQuery: {
BillType: 2,
//UserId: this.userinfo.UserId,
},
vehicleModelQuery:{
dicTypeName:"派格车型",
},
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,
bomUnit,
PLList: [],
PLChildList: [], //线
multipleSelection: [],
drawer: false,
isShowState: true,
dialogTableVisible: false,
vehicleModelList:[],//list
//tableHeight: document.documentElement.clientHeight - 260,
};
},
@ -338,7 +436,14 @@ export default {
});
},
created() {
this.getList();
//this.getList();
this.billState.forEach((element, index) => {
if (index === 0) {
this.listQuery.state.push(element.id);
}
});
this.getvehicleModel();
this.getProductLine();
},
computed: {
getDefaultField() {
@ -350,11 +455,11 @@ export default {
prop: "knr",
width: 120,
});
// tempsTabs.push({
// label: "",
// prop: "vin",
// width: 130,
// });
tempsTabs.push({
label: "底盘号",
prop: "vin",
width: 130,
});
tempsTabs.push({
label: "上线时间",
prop: "onlineTime",
@ -375,6 +480,17 @@ export default {
prop: "version",
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: "车型名称",
@ -383,8 +499,15 @@ export default {
});
return tempsTabs;
},
...mapGetters(["userInfo"]), //
},
methods: {
ss(data) {
//alert(data);
//
this.valueSelect = data;
this.getList();
},
//
handleDrawerOpen(param) {
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) {
this.OnlineTimeValue = [];
this.ReceiveTimeValue = [];
this.listQuery.state = [];
this.$refs[refName].resetFields();
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.listQuery.SkipCount = 1;
this.getList();
//this.getList();
// this.getListM100();
// this.getListR100();
},
selectValue(params) {
//
this.versionValue = params.value;
this.getList();
// this.getListM100();
// this.getListR100();
},
selectOptionsChange(item) {
this.getList();
// this.getListM100();
// this.getListR100();
},
importExcelData() {
//
@ -492,6 +639,8 @@ export default {
handleHandle(data) {
if (data.type !== "edit") {
this.getList();
// this.getListM100();
// this.getListR100();
}
},
/** 格式化字段 */
@ -512,8 +661,11 @@ export default {
},
roleFilter(type) {
return projectTypeKeyValue[type];
},
getList(data) {
getList(data){
this.listLoading = true;
if (data != undefined) {
this.listQuery.SkipCount = (this.page - 1) * data.limit;
@ -524,11 +676,38 @@ export default {
this.listQuery.OnlineTimeBegin = this.OnlineTimeValue[0];
this.listQuery.OnlineTimeEnd = this.OnlineTimeValue[1];
}
// if (this.valueSelect != "") {
// this.listQuery.VehicleModelCode = this.valueSelect;
// } else {
// this.listQuery.VehicleModelCode = "";
// }
if (this.ReceiveTimeValue != []) {
this.listQuery.ReceiveTimeBegin = this.ReceiveTimeValue[0];
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)
.then((response) => {
this.list = response.items;
@ -541,13 +720,97 @@ export default {
.catch(() => {
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() {
this.dialogTableVisible = false;
this.page = 1;
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) {
const { prop, order } = data;
if (!prop || !order) {
@ -557,9 +820,85 @@ export default {
this.listQuery.Sorting = prop + " " + order;
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) {
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 */
cellStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === "qty") {

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

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

Loading…
Cancel
Save