diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json index 6b611411..5f13e167 100644 --- a/.vs/VSWorkspaceState.json +++ b/.vs/VSWorkspaceState.json @@ -2,5 +2,6 @@ "ExpandedNodes": [ "" ], + "SelectedNode": "\\SettleAccount.sln (src\\Modules\\SettleAccount\\SettleAccount.sln)", "PreviewInSolutionExplorer": false } \ No newline at end of file diff --git a/.vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo b/.vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo index 223c4ea4..caa323f2 100644 Binary files a/.vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo and b/.vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo differ diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsJitOutPutDetialDto.cs b/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsJitOutPutDetialDto.cs index 36a8d678..25573de6 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Wms/WmsJitOutPutDetialDto.cs +++ b/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 { [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 Guids { set; get; } + + + + } + + + + public class WmsKanbanOutPutDto: AuditedEntityDto + { + 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 + { + [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; } + + + + + } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs index 625cfb37..4912d2eb 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/CodeSettingTables/CodeSettingAppService.cs +++ b/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>(entities); + + dtos=dtos.OrderBy(p => p.Value).ToList(); + return new PagedResultDto(totalCount, dtos); } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs index 18ca23e7..e69c78f1 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs +++ b/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(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 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>(_ls); - string _fileName = string.Empty; //声明导出容器 @@ -562,7 +513,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts /// /// /// - [HttpPost] + [HttpPost] [Route("Export")] //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] virtual public async Task ExportAsync(SettleAccountRequestDto input) @@ -671,11 +622,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts virtual public async Task> GetAllAsync(Guid branchId) { var entities = await _repository.GetAllAsync(branchId, true); - - var dtos = ObjectMapper.Map, List>(entities); - - return new ListResultDto(dtos); } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSAppService.cs deleted file mode 100644 index 344bc21e..00000000 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSAppService.cs +++ /dev/null @@ -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 -{ - /// - /// 大众准时化结算明细导入-R3已结 - /// - //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] - [AllowAnonymous] - [Route("api/settleaccount/wms")] - public class WMSAppService : - ApplicationService - { - - private readonly ISettleAccountBranchEfCoreRepository _wmsRepository; - private readonly ISettleAccountBranchEfCoreRepository _wmsVersionRepository; - private readonly WMSEfCoreRepository _wmsefRespository; - - private readonly WMSEfCoreRepository _wmstbRespository; - private readonly ISettleAccountBranchEfCoreRepository _job; - - private readonly TaskJobService _service; - /// - /// 构建方法 - /// - /// 构建UID - - /// 仓储接口 - /// 缓存 - public WMSAppService( - - ISettleAccountBranchEfCoreRepository wmsRepository, - - ISettleAccountBranchEfCoreRepository job, - - ISettleAccountBranchEfCoreRepository wmsVersionRepository, - WMSEfCoreRepository wmsefRespository, - WMSEfCoreRepository wmstbRespository - ) - { - _job = job; - _wmstbRespository = wmstbRespository; - _wmsRepository = wmsRepository; - _wmsVersionRepository = wmsVersionRepository; - _wmsefRespository = wmsefRespository; - } - - /// - /// 选择结算明细任务列表,选择相关任务合拼导期间出库表 - /// - /// 上传的文件(前端已经限制只能上传一个附件) - /// - [HttpGet] - [Route("WmsJitOutPut")] - [DisableRequestSizeLimit] - - public async Task WmsJitOutPut(List ids, string version) - { - - var _joblist=_job.Where(p => ids.Contains(p.Id)).ToList(); - - - var fileList = _joblist.Select(p => p.RealDownFileName).ToList(); - - List _lst = new List(); - 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(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(); - _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 WmsJitOutPutPass( string version, List p_list=null) - { - if (p_list != null) - { - List _ls = new List(); - 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(); - _l.Add(uniapi); - await _wmsefRespository.GetDbContext().BulkInsertAsync(_l); - - } - } - //_wmsDapper.GetListBySql("insert into WmsJitOutPutDetial", false); - //_wmsDapper.DbConnection.ConnectionTimeout = 1200; - //_wmsRepository.Where(p=>p) - return true; - - } - - - [HttpGet] - [Route("WmsJitOutPut-Cancel")] - - public async Task WmsJitOutPutCancel(List 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(); - _l.Add(uniapi); - await _wmsefRespository.GetDbContext().BulkInsertAsync(_l); - - } - return true; - - } - - - - - } -} \ No newline at end of file diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs new file mode 100644 index 00000000..b45679aa --- /dev/null +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSJitAppService.cs @@ -0,0 +1,439 @@ +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 +{ + /// + /// wms出库 + /// + + [AllowAnonymous] + [Route("api/settleaccount/wmsjitoutput")] + public class WMSJitAppService : + ApplicationService + { + private readonly ISettleAccountBranchEfCoreRepository _wmsRepository; + private readonly ISettleAccountBranchEfCoreRepository _wmsVersionRepository; + private readonly WMSEfCoreRepository _wmsefRespository; + private readonly WMSEfCoreRepository _wmstbRespository; + private readonly ISettleAccountBranchEfCoreRepository _job; + private readonly IExcelImportAppService _excelImportService; + private readonly TaskJobService _service; + /// + /// + /// + /// + /// + /// + /// + /// + public WMSJitAppService( + IExcelImportAppService excelImportService, + ISettleAccountBranchEfCoreRepository wmsRepository, + ISettleAccountBranchEfCoreRepository job, + ISettleAccountBranchEfCoreRepository wmsVersionRepository, + WMSEfCoreRepository wmsefRespository, + WMSEfCoreRepository wmstbRespository + ) + { + _job = job; + _wmstbRespository = wmstbRespository; + _wmsRepository = wmsRepository; + _wmsVersionRepository = wmsVersionRepository; + _wmsefRespository = wmsefRespository; + _excelImportService = excelImportService; + } + + + [HttpPost] + [Route("ExcelImport")] + [DisableRequestSizeLimit] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + public async Task ExcelImport([FromForm] IFormFileCollection files, string version) + { + var _billNum = "T" + DateTime.Now.ToString("yyyyMMddhhmmss"); + ExportImporter _exportImporter = new ExportImporter(); + var result = await _exportImporter.ExtendExcelImport(files, _excelImportService); + List _lst = new List(); + var _lsCopy = new List(); + 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 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 GetCountAsync(WmsJitOutPutRequestDto input) + { + return await _wmsVersionRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters); + } + + /// + /// 准时化出库主表 + /// + /// + /// + [HttpPost] + [Route("WmsJitList")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> 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(totalCount, entities); + } + + /// + /// 准时化出库明细 + /// + /// + /// + [HttpPost] + [Route("WmsJitDetailList")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> 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>(entities); + + return new PagedResultDto(totalCount, entities); + } + /// + /// 任务明细标记已确认 + /// + /// 上传的文件(前端已经限制只能上传一个附件) + /// + [HttpPost] + [Route("WmsJitOutPutAudit")] + [DisableRequestSizeLimit] + + public async Task WmsJitAudit(List 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; + } + + /// + /// 任务明细标记已确认 + /// + /// 上传的文件(前端已经限制只能上传一个附件) + /// + [HttpPost] + [Route("WmsJitOutPutCancel")] + [DisableRequestSizeLimit] + + public async Task WmsJitCancel(List 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; + } + + + + + + + + + + /// + /// 选择任务,生成出库单,只包含已确认的单据 + /// + /// + /// + /// + [HttpPost] + [Route("WmsJitOutPut")] + public async Task 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 _lst = new List(); + 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(); + var _lsCopy = new List(); + 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 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(); + //_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; + } + /// + /// 出库界面功能,核准出库功能 + /// + /// + /// + /// + [HttpPost] + [Route("WmsJitOutPut-Pass")] + public async Task WmsJitOutPutPass(WmsJitRequestDto input) + { + if (input.Guids != null) + { + List _ls = new List(); + 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(); + //_l.Add(uniapi); + //await _wmsefRespository.GetDbContext().BulkInsertAsync(_l); + + } + } + + return true; + } + /// + ///出库界面功能, 撤销核准出库 + /// + /// + /// + /// + [HttpPost] + [Route("WmsJitOutPut-Cancel")] + public async Task 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(); + //_l.Add(uniapi); + //await _wmsefRespository.GetDbContext().BulkInsertAsync(_l); + } + return true; + } + + + } +} \ No newline at end of file diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSKanbanAppService.cs new file mode 100644 index 00000000..d432f4b3 --- /dev/null +++ b/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 +{ + /// + /// wms出库 + /// + + [AllowAnonymous] + [Route("api/settleaccount/wmskanbanoutput")] + public class WMSKanbanAppService : + ApplicationService + { + + private readonly ISettleAccountBranchEfCoreRepository _wmsRepository; + private readonly ISettleAccountBranchEfCoreRepository _wmsVersionRepository; + private readonly WMSEfCoreRepository _wmsefRespository; + + private readonly WMSEfCoreRepository _wmstbRespository; + private readonly ISettleAccountBranchEfCoreRepository _job; + private readonly IExcelImportAppService _excelImportService; + + private readonly TaskJobService _service; + /// + /// + /// + /// + /// + /// + /// + /// + public WMSKanbanAppService( + + + IExcelImportAppService excelImportService, + + ISettleAccountBranchEfCoreRepository wmsRepository, + ISettleAccountBranchEfCoreRepository job, + ISettleAccountBranchEfCoreRepository wmsVersionRepository, + WMSEfCoreRepository wmsefRespository, + WMSEfCoreRepository wmstbRespository + ) + { + _job = job; + _wmstbRespository = wmstbRespository; + _wmsRepository = wmsRepository; + _wmsVersionRepository = wmsVersionRepository; + _wmsefRespository = wmsefRespository; + _excelImportService = excelImportService; + } + + private async Task GetCountAsync(WmsKanbanOutPutDetialRequestDto input) + { + return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters); + } + + private async Task GetCountAsync(WmsKanbanOutPutRequestDto input) + { + return await _wmsVersionRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters); + } + + /// + /// 准时化出库主表 + /// + /// + /// + [HttpPost] + [Route("WmsKanbanList")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> 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(totalCount, entities); + } + + /// + /// 准时化出库明细 + /// + /// + /// + [HttpPost] + [Route("WmsKanbanDetailList")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> 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(totalCount, entities); + } + /// + /// 任务明细标记已确认 + /// + /// 上传的文件(前端已经限制只能上传一个附件) + /// + [HttpGet] + [Route("WmsKanbanOutPutAudit")] + [DisableRequestSizeLimit] + + public async Task WmsKanbanAudit(List 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; + } + /// + /// 选择任务,生成出库单,只包含已确认的单据 + /// + /// + /// + /// + [HttpGet] + [Route("WmsKanbanOutPut")] + public async Task 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 _lst = new List(); + 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(); + 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; + } + /// + /// 出库界面功能,核准出库功能 + /// + /// + /// + /// + [HttpGet] + [Route("WmsKanbanOutPut-Pass")] + public async Task WmsKanbanOutPutPass(WmsJitRequestDto input) + { + if (input.Guids != null) + { + List _ls = new List(); + 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(); + _l.Add(uniapi); + await _wmsefRespository.GetDbContext().BulkInsertAsync(_l); + } + } + return true; + } + /// + ///出库界面功能, 撤销核准出库 + /// + /// + /// + /// + [HttpGet] + [Route("WmsKanbanOutPut-Cancel")] + public async Task 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(); + _l.Add(uniapi); + await _wmsefRespository.GetDbContext().BulkInsertAsync(_l); + } + return true; + } + [HttpPost] + [Route("ExcelImport")] + [DisableRequestSizeLimit] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + public async Task ExcelImport([FromForm] IFormFileCollection files, string version) + { + var _billNum = "K" + DateTime.Now.ToString("yyyyMMddhhmmss"); + ExportImporter _exportImporter = new ExportImporter(); + var result = await _exportImporter.ExtendExcelImport(files, _excelImportService); + List _lst = new List(); + var _lsCopy = new List(); + 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; + } + + + } +} \ No newline at end of file diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/WMS/WMSSharePartAppService.cs new file mode 100644 index 00000000..f594b1cf --- /dev/null +++ b/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 +{ + /// + /// wms出库 + /// + + [AllowAnonymous] + [Route("api/settleaccount/wmsSharePartoutput")] + public class WMSSharePartAppService : + ApplicationService + { + + private readonly ISettleAccountBranchEfCoreRepository _wmsRepository; + private readonly ISettleAccountBranchEfCoreRepository _wmsVersionRepository; + private readonly WMSEfCoreRepository _wmsefRespository; + + private readonly WMSEfCoreRepository _wmstbRespository; + private readonly ISettleAccountBranchEfCoreRepository _job; + private readonly IExcelImportAppService _excelImportService; + + private readonly TaskJobService _service; + /// + /// + /// + /// + /// + /// + /// + /// + public WMSSharePartAppService( + + ISettleAccountBranchEfCoreRepository wmsRepository, + ISettleAccountBranchEfCoreRepository job, + ISettleAccountBranchEfCoreRepository wmsVersionRepository, + WMSEfCoreRepository wmsefRespository, + WMSEfCoreRepository wmstbRespository, + IExcelImportAppService excelImportService + ) + { + _excelImportService = excelImportService; + _job = job; + _wmstbRespository = wmstbRespository; + _wmsRepository = wmsRepository; + _wmsVersionRepository = wmsVersionRepository; + _wmsefRespository = wmsefRespository; + } + + private async Task GetCountAsync(WmsSharePartOutPutDetialRequestDto input) + { + return await _wmsRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters); + } + + private async Task GetCountAsync(WmsSharePartOutPutRequestDto input) + { + return await _wmsVersionRepository.GetCountByFilterAsync(GuidGenerator.Create(), input.Filters); + } + + /// + /// 准时化出库主表 + /// + /// + /// + [HttpPost] + [Route("WmsSharePartList")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> 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(totalCount, entities); + } + + /// + /// 准时化出库明细 + /// + /// + /// + [HttpPost] + [Route("WmsSharePartDetailList")] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + virtual public async Task> 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(totalCount, entities); + } + /// + /// 任务明细标记已确认 + /// + /// 上传的文件(前端已经限制只能上传一个附件) + /// + [HttpGet] + [Route("WmsSharePartOutPutAudit")] + [DisableRequestSizeLimit] + + public async Task WmsSharePartAudit(List 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; + } + /// + /// 选择任务,生成出库单,只包含已确认的单据 + /// + /// + /// + /// + [HttpGet] + [Route("WmsSharePartOutPut")] + + + public async Task 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 _lst = new List(); + 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(); + 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(); + //_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; + } + /// + /// 出库界面功能,核准出库功能 + /// + /// + /// + /// + [HttpGet] + [Route("WmsSharePartOutPut-Pass")] + public async Task WmsSharePartOutPutPass(WmsJitRequestDto input) + { + if (input.Guids != null) + { + List _ls = new List(); + 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(); + _l.Add(uniapi); + await _wmsefRespository.GetDbContext().BulkInsertAsync(_l); + } + } + return true; + } + /// + ///出库界面功能, 撤销核准出库 + /// + /// + /// + /// + [HttpGet] + [Route("WmsSharePartOutPut-Cancel")] + public async Task 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(); + _l.Add(uniapi); + await _wmsefRespository.GetDbContext().BulkInsertAsync(_l); + } + return true; + } + [HttpPost] + [Route("ExcelImport")] + [DisableRequestSizeLimit] + //[Authorize(SettleAccountPermissions.SettleAccounts.Default)] + public async Task ExcelImport([FromForm] IFormFileCollection files, string version) + { + var _billNum = "B" + DateTime.Now.ToString("yyyyMMddhhmmss"); + ExportImporter _exportImporter = new ExportImporter(); + var result = await _exportImporter.ExtendExcelImport(files, _excelImportService); + List _lst = new List(); + var _lsCopy = new List(); + 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; + } + + + } +} \ No newline at end of file diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Jobs/TaskJobService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Jobs/TaskJobService.cs index 0d1dfaa6..f78df279 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Jobs/TaskJobService.cs +++ b/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, diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs index 88b3190e..f4e4d811 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Reports/ReportServices/ReportMakeService.cs @@ -115,7 +115,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices 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) => + var _taskid = await _service.ExportEnqueueAsync("准时化结算门板价格差异比对报表", ExportExtentsion.Excel,version, string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup, CurrentUser, typeof(SettleDoorPanelExportService), customConditionList, (rs) => { }); return _taskid; @@ -216,29 +216,29 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices /// /// /// - [HttpGet] - [Route("UnSettledDiff-Make")] - [DisableRequestSizeLimit] + //[HttpGet] + //[Route("UnSettledDiff-Make")] + //[DisableRequestSizeLimit] - public async Task UnSettledMake(string year, string period, string version, string customerCode, string factory, string matialCode, string state,DateTime begin,DateTime end) - { - - List customConditionList = new List(); - 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 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 customConditionList = new List(); + // 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; + //} /// @@ -254,26 +254,26 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices /// /// /// - [HttpGet] - [Route("FisUnSettledDiff-Make")] - [DisableRequestSizeLimit] + //[HttpGet] + //[Route("FisUnSettledDiff-Make")] + //[DisableRequestSizeLimit] - public async Task FisUnSettledMake(string year, string version, string customerCode, string factory, string state) - { + //public async Task FisUnSettledMake(string year, string version, string customerCode, string factory, string state) + //{ - List customConditionList = new List(); - 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 customConditionList = new List(); + // 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; + //} /// /// 价差量差分析报表 @@ -284,37 +284,37 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices /// /// /// - [HttpGet] - [Route("PriceQtyDiff-Make")] - [DisableRequestSizeLimit] + //[HttpGet] + //[Route("PriceQtyDiff-Make")] + //[DisableRequestSizeLimit] - public async Task 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 customConditionList = new List(); - 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 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 customConditionList = new List(); + // 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; + //} /// @@ -342,7 +342,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,7 +350,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices } /// - /// 2.大众发票与结算核对明细表 + ///发票与结算核对明细表 /// /// 上传的文件(前端已经限制只能上传一个附件) /// @@ -377,6 +377,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices // str1 = string.Join(',', materialGroup.ToArray()); //} + List customConditionList = new List(); 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 }); @@ -388,14 +389,14 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices 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) => + var _taskid = await _service.ExportEnqueueAsync("准时化结算核对明细", ExportExtentsion.Excel,version, string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup, CurrentUser, typeof(InvoiceSettledDetailDiffExportService), customConditionList, (rs) => { }); return _taskid; } /// - ///3.大众准时化结算数量差异比对表 + ///3.准时化结算数量差异比对表 /// /// 上传的文件(前端已经限制只能上传一个附件) /// @@ -428,7 +429,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices 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) => + var _taskid = await _service.ExportEnqueueAsync("准时化结算数量差异比对输出", ExportExtentsion.Excel,version, string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup, CurrentUser, typeof(UnInvoiceSettledDetailDiffExportService), customConditionList, (rs) => { }); return _taskid; @@ -439,7 +440,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices /// - /// 7.大众准时化未结明细表(包含漏结,漏结要有标识) + /// 准时化未结明细表(包含漏结,漏结要有标识) /// /// 上传的文件(前端已经限制只能上传一个附件) /// @@ -469,7 +470,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices 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) => + var _taskid = await _service.ExportEnqueueAsync("准时化未结明细表", ExportExtentsion.Excel,version, string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup, CurrentUser, typeof(UnsettledDetailReportService), customConditionList, (rs) => { }); return _taskid; @@ -477,7 +478,7 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices /// - ///6.大众准时化未结差异比对表 + ///准时化未结差异比对表 /// /// 上传的文件(前端已经限制只能上传一个附件) /// @@ -505,43 +506,43 @@ namespace Win.Sfs.SettleAccount.Reports.ReportServices 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) => + var _taskid = await _service.ExportEnqueueAsync("准时化未结差异比对输出", ExportExtentsion.Excel,version, string.IsNullOrEmpty(materialGroup) ? string.Empty : materialGroup, CurrentUser, typeof(UnSettleDiffExportService), customConditionList, (rs) => { }); return _taskid; } - /// - /// 结算总成和ERP总成价格对比 - /// - /// 上传的文件(前端已经限制只能上传一个附件) - /// - [HttpGet] - [Route("SettledPartAndErpPartPriceDiff-Make")] - [DisableRequestSizeLimit] + ///// + ///// 结算总成和ERP总成价格对比 + ///// + ///// 上传的文件(前端已经限制只能上传一个附件) + ///// + //[HttpGet] + //[Route("SettledPartAndErpPartPriceDiff-Make")] + //[DisableRequestSizeLimit] - public async Task SettledPartAndErpPartPriceDiffMake( string version, string customerCode) - { + //public async Task 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 customConditionList = new List(); + // List customConditionList = new List(); - 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; + //} ///// diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml index e1d39fe5..b5c833e8 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml @@ -1587,26 +1587,193 @@ 请求条件 实体DTO列表 - + - 大众准时化结算明细导入-R3已结 + wms出库 - + - 构建方法 + - 构建UID - 仓储接口 - 缓存 + + + + + - + - 选择结算明细任务列表,选择相关任务合拼导期间出库表 + 准时化出库主表 + + + + + + + 准时化出库明细 + + + + + + + 任务明细标记已确认 + + 上传的文件(前端已经限制只能上传一个附件) + + + + + 任务明细标记已确认 上传的文件(前端已经限制只能上传一个附件) + + + 选择任务,生成出库单,只包含已确认的单据 + + + + + + + + 出库界面功能,核准出库功能 + + + + + + + + 出库界面功能, 撤销核准出库 + + + + + + + + wms出库 + + + + + + + + + + + + + + + 准时化出库主表 + + + + + + + 准时化出库明细 + + + + + + + 任务明细标记已确认 + + 上传的文件(前端已经限制只能上传一个附件) + + + + + 选择任务,生成出库单,只包含已确认的单据 + + + + + + + + 出库界面功能,核准出库功能 + + + + + + + + 出库界面功能, 撤销核准出库 + + + + + + + + wms出库 + + + + + + + + + + + + + + + 准时化出库主表 + + + + + + + 准时化出库明细 + + + + + + + 任务明细标记已确认 + + 上传的文件(前端已经限制只能上传一个附件) + + + + + 选择任务,生成出库单,只包含已确认的单据 + + + + + + + + 出库界面功能,核准出库功能 + + + + + + + + 出库界面功能, 撤销核准出库 + + + + + 结算包与散件对应关系服务 @@ -2714,47 +2881,6 @@ - - - 未结算对比 - - - - - - - - - - - - - - - ERP总成开票报表功能 - - - - - - - - - - - - - - - 价差量差分析报表 - - - - - - - - 1.大众发票与结算核对汇总表 @@ -2763,40 +2889,33 @@ - - 2.大众发票与结算核对明细表 - - 上传的文件(前端已经限制只能上传一个附件) - + + 发票与结算核对明细表 + + 上传的文件(前端已经限制只能上传一个附件) + - 3.大众准时化结算数量差异比对表 + 3.准时化结算数量差异比对表 上传的文件(前端已经限制只能上传一个附件) - 7.大众准时化未结明细表(包含漏结,漏结要有标识) + 准时化未结明细表(包含漏结,漏结要有标识) 上传的文件(前端已经限制只能上传一个附件) - 6.大众准时化未结差异比对表 + 准时化未结差异比对表 上传的文件(前端已经限制只能上传一个附件) - - - 结算总成和ERP总成价格对比 - - 上传的文件(前端已经限制只能上传一个附件) - - 红旗H平台导入 diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TEA_TASK_SUB.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TEA_TASK_SUB.cs new file mode 100644 index 00000000..d1483a15 --- /dev/null +++ b/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 CK.SCP.Models.ExchangeCenterTables +{ + /// + /// ı + /// + [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; } + + } +} \ No newline at end of file diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TaskJob.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TaskJob.cs index 18a94eca..9c070862 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/TaskJobs/TaskJob.cs +++ b/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; } diff --git a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs b/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs index 584f63f9..b7075954 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/WMS/TaskList.cs +++ b/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)] + /// + /// 扩展字段1 + /// + public string Extend1 { set; get; } + /// + /// 扩展字段2 + /// + [ImporterHeader(Name = "扩展字段2", IsIgnore = true)] + public string Extend2 { set; get; } + /// + /// 扩展字段3 + /// + [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 + { + 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; } + + + + } + + + /// + /// + /// + public class WmsKanbanOutPutDetial : FullAuditedAggregateRootBase + { + 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")] + /// + /// 扩展字段1 + /// + public string Extend1 { set; get; } + /// + /// 扩展字段2 + /// + [ImporterHeader(Name = "扩展字段2")] + public string Extend2 { set; get; } + /// + /// 扩展字段3 + /// + [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 + { + 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; } + + + + } + + + /// + /// + /// + public class WmsSharePartOutPutDetial : FullAuditedAggregateRootBase + { + 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 + + + + + + + + + } diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs index 4ccd9fa6..08229577 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs @@ -317,7 +317,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 } @@ -920,6 +927,119 @@ namespace Win.Sfs.SettleAccount } + private static void ConfigureWmsJitOutPutVersion(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) + { + + builder.Entity(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(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(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(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(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(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 diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs index 4f81d637..2c7e1036 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/InvoiceSettledDetailDiffDapperRepository.cs +++ b/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; } diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs index c66e8ae0..cea2a3cd 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettledDetailDapperRepository.cs +++ b/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" + diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs index d6da20b0..17a95d5a 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/SettleAccounts/SettleAccountRepository.cs +++ b/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) diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs index 375a6f4f..d2e0764a 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs @@ -23,7 +23,7 @@ namespace Win.Sfs.SettleAccount.Repository public virtual async Task> 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"; diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountRepository.cs index 7370f668..2185dfd7 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/UnSettleAccount/UnSettleAccountRepository.cs +++ b/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) { diff --git a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDiffExportService.cs b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDiffExportService.cs index ed5de12b..1703a0ea 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDiffExportService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/InvoiceSettledDiffExportService.cs @@ -96,6 +96,7 @@ namespace SettleAccount.Job.Services }); } + _lsExport=_lsExport.OrderBy(p => p.SapMaterialGroup).ToList(); _outputService.Export(id,_first, _lsExport); diff --git a/vue/src/components/ImportExcel-base/index.vue b/vue/src/components/ImportExcel-base/index.vue index fb7631b0..f8468ed3 100644 --- a/vue/src/components/ImportExcel-base/index.vue +++ b/vue/src/components/ImportExcel-base/index.vue @@ -302,6 +302,7 @@ export default { scrapClaims: "CP7报废和索赔", sparePart: "大众备件结算明细", hqHPlatform: "红旗H平台导入", + hqMPlatform: "红旗M平台导入", bomdatabase: "产品结构BOM", prebatch: "预批量", secondaryPriceRatio: "二配结算价格比例", @@ -328,7 +329,7 @@ export default { scrapClaims: "/api/settleaccount/ScrapClaims/ExcelImport", //CP7报废和索赔导入 sparePart: "/api/settleaccount/SparePart/ExcelImport", //大众备件结算明细导入 hqHPlatform: "/api/settleaccount/HQHPlatform/ExcelImport", //红旗H平台导入 - + hqMPlatform: "/api/settleaccount/HQMPlatform/ExcelImport", //红旗M平台导入 bomdatabase: "/api/settleaccount/bom/ExcelImport", prebatch: "/api/settleaccount/Prebatch/ExcelImport", secondaryPriceRatio: diff --git a/vue/src/router/index.js b/vue/src/router/index.js index 4f0f543f..a1bc2d5a 100644 --- a/vue/src/router/index.js +++ b/vue/src/router/index.js @@ -16,6 +16,10 @@ import vwFisDataRouter from './modules/vwFisData' import wheeldataRouter from './modules/wheeldata' import vwNoBarcodeRouter from './modules/vwKBNoBarcodedata' import JobTimeDataRouter from './modules/jobtimedata' +import vwMenudataRouter from './modules/vw_menu' +import hqMenudataRouter from './modules/hq_menu' +import btcarDataRouter from './modules/bt_menu' +import vwOutOrderDataRouter from './modules/vw_out_order' //import newjitRouter from './modules/newjit-basedata' import pgfis from './modules/fis' import pgfisPrint from './modules/fisprint' @@ -86,8 +90,8 @@ export const constantRoutes = [ children: [ { path: 'dashboard', - component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'),//fis - //component: () => import('@/views/ux/backGroundWork'), + //component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'),//fis + component: () => import('@/views/ux/backGroundWork'), name: 'Dashboard', meta: { title: '系统首页', @@ -170,14 +174,18 @@ export const asyncRoutes = [ /** when your routing map is too long, you can split it into small modules **/ managerRouter,//系统首页 personRouter,//系统管理 - //basedataRouter,//基础数据维护 + basedataRouter,//基础数据维护 + vwMenudataRouter,//大众 + hqMenudataRouter,//红旗 + vwOutOrderDataRouter, + //btcarDataRouter,//一汽轿车 //vwFisDataRouter,//结算与开票数据导入 //billdataRouter,//销售结算与开票报表 //businessdataRouter, //wheeldataRouter,//大众看板和备件 - pgfisPrint,//排序单打印 - pgfis,//派格fis - //JobTimeDataRouter,//后台作业监控 + // pgfisPrint,//排序单打印 + // pgfis,//派格fis + JobTimeDataRouter,//后台作业监控 // 404 page must be placed at the end !!! { path: '*', redirect: '/404', hidden: true } diff --git a/vue/src/router/modules/bt_menu.js b/vue/src/router/modules/bt_menu.js new file mode 100644 index 00000000..b20b3408 --- /dev/null +++ b/vue/src/router/modules/bt_menu.js @@ -0,0 +1,44 @@ +//大众-FIS结算-路由 +import Layout from '@/layout' + +const btcarDataRouter = { + path: '/cpat', + component: Layout, + redirect: 'pg', + name: 'btcar', + //hidden: true, + meta: { + //requiresAuth: true, + title: '一轿奔腾', + index: 0, + type: 'crm', + icon: '单据导入', + keepAlive: false, + }, + children: [ + { + path: 'hq-car-platform', + component: () => import('@/views/ux/vw/dataInput/hq_bt'), + name: 'ERPEI',//命名路由 + meta: { + title: '一轿奔腾导入', + roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色) + icon: '结算' + } + }, + { + path: 'hq-car-platform-export', + component: () => import('@/views/ux/vw/dataInput/hq_m'), + name: 'ERPEI',//命名路由 + meta: { + title: '一轿奔腾结算核对输出', + //roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色) + icon: '结算' + } + }, + + ] +} + +export default btcarDataRouter + diff --git a/vue/src/router/modules/hq_menu.js b/vue/src/router/modules/hq_menu.js new file mode 100644 index 00000000..be030aad --- /dev/null +++ b/vue/src/router/modules/hq_menu.js @@ -0,0 +1,125 @@ + +import Layout from '@/layout' + +const hqMenudataRouter = { + path: '/capt-hq', + component: Layout, + redirect: 'ux/vw/dataInput/hq_h', + name: 'HQData', + meta: { + title: '红旗工厂', + icon: '红旗', + //roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns', 'SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'], + keepAlive: false, + }, + children: [ + { + path: '/import-h-data', + name: 'import-h-data',//命名路由-二级 + component: () => import('@/views/ux/vw/dataInput/hq_h'), + redirect: 'ux/vw/dataInput/hq_h', + meta: { + title: 'H平台', + // roles: ['SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'], + icon: '看板' + }, + children: [ + { + path: 'hq-H-platform', + component: () => import('@/views/ux/vw/dataInput/hq_h'), + name: 'ERPEI',//命名路由 + meta: { + title: '红旗H平台导入', + roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色) + icon: '结算' + } + }, + { + path: 'hq-H-platform-export', + component: () => import('@/views/ux/vw/dataInput/ScrapClaims'), + name: 'ScrapClaims', + meta: { + title: 'H平台结算差异输出', + roles: ['SettleAccount.FISs'], + icon: '文件' + } + } + ] + }, + { + path: '/export-m-data', + component: () => import('@/views/ux/vw/dataInput/hq_m'), + name: 'export-m-data',//命名路由 + redirect: '/ux/vw/dataInput/hq_m', + meta: { + title: 'M平台', + //roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns'], + icon: '结算' + }, + children: [ + { + path: 'hq-M-platform', + component: () => import('@/views/ux/vw/dataInput/hq_m'), + name: 'ERPEI',//命名路由 + meta: { + title: '红旗M平台导入', + //roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色) + icon: '结算' + } + }, + + { + path: 'hq-M-platform-export', + component: () => import('@/views/ux/billManage/sparePart'), + name: 'SparePartReport',//命名路由 + meta: { + title: 'H平台结算差异输出', + //roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色) + icon: '二配' + } + } + ] + }, + { + path: '/export-f-data', + component: () => import('@/views/ux/vw/dataInput/hq_f'), + name: 'export-f-data',//命名路由 + redirect: '/ux/vw/dataInput/hq_f', + meta: { + title: 'F平台', + //roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns'], + icon: '结算' + }, + children: [ + { + path: 'hq-F-platform', + component: () => import('@/views/ux/vw/dataInput/hq_f'), + name: 'ERPEI',//命名路由 + meta: { + title: '红旗F平台导入', + //roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色) + icon: '结算' + } + }, + + { + path: 'hq-F-platform-export', + component: () => import('@/views/ux/billManage/sparePart'), + name: 'SparePartReport',//命名路由 + meta: { + title: 'F平台结算差异输出', + //roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色) + icon: '二配' + } + } + ] + } + ] +} + +export default hqMenudataRouter + + + + + diff --git a/vue/src/router/modules/vwFisData.js b/vue/src/router/modules/vwFisData.js index 6b4da0d5..e52fc1d1 100644 --- a/vue/src/router/modules/vwFisData.js +++ b/vue/src/router/modules/vwFisData.js @@ -88,6 +88,16 @@ const vwFisDataRouter = { icon: '结算' } }, + { + path: 'hq-M-platform', + component: () => import('@/views/ux/vw/dataInput/hq_m'), + name: 'ERPEI',//命名路由 + meta: { + title: '红旗M平台导入', + //roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色) + icon: '结算' + } + }, ] } diff --git a/vue/src/router/modules/vw_menu.js b/vue/src/router/modules/vw_menu.js new file mode 100644 index 00000000..5d8e00ed --- /dev/null +++ b/vue/src/router/modules/vw_menu.js @@ -0,0 +1,181 @@ + +import Layout from '@/layout' + +const vwMenudataRouter = { + path: '/capt-vw', + component: Layout, + redirect: 'ux/basedata/Invoice/index', + name: 'HQData', + meta: { + title: '大众工厂', + icon: 'vw', + //roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns', 'SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'], + keepAlive: false, + }, + children: [ + { + path: '/import-data', + name: 'import-data',//命名路由-二级 + component: () => import('@/views/ux/billManage/index'), + redirect: 'ux/basedata/Invoice/index', + meta: { + title: '数据导入', + // roles: ['SettleAccount.HQKBs', 'SettleAccount.HQSpecKBs'], + icon: '看板' + }, + children: [ + { + path: 'invoice', + component: () => import('@/views/ux/basedata/Invoice/index'), + name: 'Invoices', + meta: { + title: '发票汇总', + roles: ['SettleAccount.Invoices'], + icon: '对比' + } + }, + { + path: 'settle-account-finish', + component: () => import('@/views/ux/vw/dataInput/r3'), + name: 'SettleAccount', + meta: { + title: 'FIS结算明细', + roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色) + icon: '库存' + } + }, + { + path: 'unsettle-account', + component: () => import('@/views/ux/vw/dataInput/r3'), + name: 'SettleAccount', + meta: { + title: 'FIS未结明细', + roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色) + icon: '结算' + } + }, + { + path: 'kan-ban', + component: () => import('@/views/ux/vw/dataInput/vwKanBan/index'), + name: 'VWKanBan',//命名路由 + meta: { + title: '大众看板结算导入', + roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色) + icon: '看板' + } + }, + { + path: 'spare-part', + component: () => import('@/views/ux/vw/dataInput/SparePart'), + name: 'SparePart',//命名路由 + meta: { + title: '大众备件结算导入', + roles: ['SettleAccount.Boms'],//控制页面角色(可以设置多个角色) + icon: '工厂' + } + }, + { + path: 'scrap-claims', + component: () => import('@/views/ux/vw/dataInput/ScrapClaims'), + name: 'ScrapClaims', + meta: { + title: 'CP7报废和索赔导入', + roles: ['SettleAccount.FISs'], + icon: '文件' + } + }, + ] + }, + { + path: '/export-data', + component: () => import('@/views/ux/billManage/index'), + name: 'export-data',//命名路由 + redirect: 'export-data', + meta: { + title: '数据输出', + //roles: ['SettleAccount.HQConsigns', 'SettleAccount.HQSpecConsigns'], + icon: '结算' + }, + children: [ + { + path: '/invoice-settled/diff', + component: () => import('@/views/ux/billManage/InvoiceSettledDiff'), + name: 'InvoiceSettledDiff',//命名路由 + meta: { + title: '发票与结算核对汇总', + roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色) + icon: '结算' + } + }, + { + path: '/invoice-settled/detaildiff', + component: () => import('@/views/ux/billManage/InvoiceSettledDetailDiff'), + name: 'InvoiceSettledDetailDiff',//命名路由 + meta: { + title: '准时化结算核对明细', + roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色) + icon: '结算对比' + } + }, + { + path: '/unInvoice-settled/detailDiff', + component: () => import('@/views/ux/billManage/UnInvoiceSettledDetailDiff'), + name: 'UnInvoiceSettledDetailDiff',//命名路由 + meta: { + title: '准时化量差价差输出', + roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色) + icon: '售后' + } + }, + { + path: '/unsettle-diff/export', + component: () => import('@/views/ux/billManage/UnSettleDiffExport'), + name: 'UnSettleDiffExport',//命名路由 + meta: { + title: '准时化未结核对', + roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色) + icon: '器具' + } + }, + { + path: '/unsettled-detail',//大众准时化未结明细表(包含漏结,漏结要有标识) + component: () => import('@/views/ux/billManage/IssuedUnsettled/index'), + name: 'UnsettledDetail',//命名路由 + meta: { + title: '准时化未结明细', + roles: ['SettleAccount.Reports'],//控制页面角色(可以设置多个角色) + icon: '报表' + } + }, + { + path: '/kbwithcode', + component: () => import('@/views/ux/billManage/kanBanWithCode'), + name: 'KanBanWithCode',//命名路由 + meta: { + title: '看板结算输出', + //roles: ['SettleAccount.EstimatedStockDiffReports'],//控制页面角色(可以设置多个角色) + icon: '看板' + } + }, + + { + path: '/vwsparepart', + component: () => import('@/views/ux/billManage/sparePart'), + name: 'SparePartReport',//命名路由 + meta: { + title: '备件结算输出', + //roles: ['abpvnext_master.ProjectPeople'],//控制页面角色(可以设置多个角色) + icon: '供货' + } + } + ] + } + ] +} + +export default vwMenudataRouter + + + + + diff --git a/vue/src/router/modules/vw_out_order.js b/vue/src/router/modules/vw_out_order.js new file mode 100644 index 00000000..cba355fb --- /dev/null +++ b/vue/src/router/modules/vw_out_order.js @@ -0,0 +1,54 @@ +//大众-FIS结算-路由 +import Layout from '@/layout' + +const vwOutOrderDataRouter = { + path: '/cpat-order', + component: Layout, + redirect: 'pg', + name: '业务数据', + //hidden: true, + meta: { + //requiresAuth: true, + title: '大众出库单管理', + index: 0, + type: 'crm', + icon: '单据导入', + keepAlive: false, + }, + children: [ + { + path: 'vw-out-order', + component: () => import('@/views/ux/billManage/vwOutOrder/index'), + name: 'SettleAccount',//命名路由 + meta: { + title: '大众准时化出库单', + roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色) + icon: '结算' + } + }, + { + path: 'kanban-out-order', + component: () => import('@/views/ux/billManage/kanbanOutOrder/index'), + name: 'SettleAccount',//命名路由 + meta: { + title: '大众看板出库单', + roles: ['SettleAccount.SettleAccounts'],//控制页面角色(可以设置多个角色) + icon: '结算' + } + }, + // { + // path: 'invoice', + // component: () => import('@/views/ux/basedata/Invoice/index'), + // name: 'Invoices',//命名路由 + // meta: { + // title: '大众发票汇总导入', + // roles: ['SettleAccount.Invoices'], + // icon: '对比' + // } + // }, + + ] +} + +export default vwOutOrderDataRouter + diff --git a/vue/src/views/pg-fis/basedate/m100Online/index.vue b/vue/src/views/pg-fis/basedate/m100Online/index.vue index 41361ed5..4bc19bd0 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/index.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/index.vue @@ -857,7 +857,7 @@ export default { }, getList(data) { this.listLoading = true; - if (data != undefined) {alert() + if (data != undefined) { this.listQuery.SkipCount = (this.page - 1) * data.limit; } else { this.listQuery.SkipCount = (this.page - 1) * 15; diff --git a/vue/src/views/ux/basedata/index.vue b/vue/src/views/ux/basedata/index.vue new file mode 100644 index 00000000..509198d1 --- /dev/null +++ b/vue/src/views/ux/basedata/index.vue @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/vue/src/views/ux/billManage/FisUnSettledDiff/index.vue b/vue/src/views/ux/billManage/FisUnSettledDiff/index.vue index cb67d913..d37088e2 100644 --- a/vue/src/views/ux/billManage/FisUnSettledDiff/index.vue +++ b/vue/src/views/ux/billManage/FisUnSettledDiff/index.vue @@ -512,7 +512,7 @@ export default { tempsTabs.push({ label: "单据流水号", prop: "taskId", - width: 80, + width: 130, }); tempsTabs.push({ label: "当前版本", diff --git a/vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue b/vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue index 93de70ed..0541e6fd 100644 --- a/vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue +++ b/vue/src/views/ux/billManage/InvoiceSettledDetailDiff/index.vue @@ -17,7 +17,7 @@ type="primary" icon="el-icon-plus" @click="handleCreate" - >统计 + >统计明细 生成出库单(支持批量) + 已确认 @@ -55,7 +63,7 @@ 说明:每间隔15秒进行自动刷新!说明:每间隔30秒进行自动刷新! @@ -75,6 +83,7 @@ border highlight-current-row style="width: 100%" + @sort-change="sortChange" @row-click="handleRowClick" @selection-change="handleSelectionChange" @filter-change="filterChange" @@ -396,21 +405,46 @@ + > + {{ item.label }} + {{ + item.value + }} + + @@ -524,28 +558,25 @@ - + - - - - + - + - - - + { clearInterval(timer); @@ -860,7 +893,7 @@ export default { tempsTabs.push({ label: "单据流水号", prop: "taskId", - width: 85, + width: 120, }); tempsTabs.push({ label: "模块名称", @@ -882,20 +915,46 @@ export default { prop: "remark", width: 220, }); - // tempsTabs.push({ - // label: "状态", - // prop: "stateName", - // width: 100, - // }); + tempsTabs.push({ + label: "审批状态", + prop: "fileName", + width: 150, + }); return tempsTabs; }, }, methods: { + sortChange(data) { + const { prop, order } = data; + if (!prop || !order) { + this.handleFilter(); + return; + } + this.listQuery.Sorting = prop + " " + order; + console.log(this.listQuery.Sorting); + this.handleFilter(); + }, + /** 筛选操作 */ + handleFilter() { + this.page = 1; + this.getList(); + this.listQuery.Filters = []; + if (this.searchContent != "") { + var column = "taskId"; + let filter = { + logic: 0, + column: column, + action: 0, + value: this.searchContent, + }; + this.listQuery.Filters.push(filter); + } + this.getList(); + }, handleSelectionChange(val) { this.multipleSelection = val; }, - //出库单 - handleCreateBills(row){ + handleConfirm(row) { if (this.multipleSelection.length == 0) { this.$message({ message: "至少选择一行!", @@ -917,6 +976,58 @@ export default { }); myalert = "选中项"; } + this.$confirm("是否确认" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.$axios + .posts("/api/settleaccount/wmsjitoutput/WmsJitOutPutAudit", params) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "操作成功", + type: "success", + duration: 2000, + }); + this.getList(); + }); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", + }); + }); + }, + //出库单 + handleCreateBills(row) { + // if (this.multipleSelection.length == 0) { + // this.$message({ + // message: "至少选择一行!", + // type: "warning", + // }); + // return; + // } + var params = []; + let myalert = ""; //声明变量,其变量必须在此声明后使用 + if (row) { + //单行 + params.push(row.id); + myalert = row.name; + } else { + //多选 + this.multipleSelection.forEach((element) => { + let id = element.id; + params.push(id); + }); + myalert = "选中项"; + } + this.listBillQuery.guids = params; + this.listBillQuery.version = this.JobversionValue; + console.log("出库单条件:" + JSON.stringify(this.listBillQuery)); this.$confirm("是否确认出库" + myalert + "?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", @@ -924,8 +1035,14 @@ export default { }) .then(() => { this.$axios - .posts("/api/settleaccount/wms/WmsJitOutPut", params) + .posts( + "/api/settleaccount/wmsjitoutput/WmsJitOutPut", + this.listBillQuery + ) .then((response) => { + console.log( + "检查柱护板-hostCheckQuery" + JSON.stringify(response) + ); const index = this.list.indexOf(row); this.$notify({ title: "成功", @@ -933,6 +1050,7 @@ export default { type: "success", duration: 2000, }); + this.getList(); }); }) @@ -1134,19 +1252,41 @@ export default { }); }, //获取物料组车型 + // getMaterialGroup() { + // this.$axios + // .posts("/api/settleaccount/CodeSetting/list", { + // project: "物料组", + // maxResultCount: 1000, + // skipCount: 0, + // }) + // .then((response) => { + // this.materialGroupList = []; + // response.items.forEach((element) => { + // let options = {}; + // options.value = element.description; + // options.label = element.value; + // this.materialGroupList.push(options); + // }); + // }) + // .catch(() => { + // this.listLoading = false; + // }); + // }, + //获取物料组车型 getMaterialGroup() { this.$axios .posts("/api/settleaccount/CodeSetting/list", { project: "物料组", maxResultCount: 1000, skipCount: 0, + sorting:"value ascending" }) .then((response) => { this.materialGroupList = []; response.items.forEach((element) => { let options = {}; options.value = element.description; - options.label = element.description + "/" + element.value; + options.label = element.value; this.materialGroupList.push(options); }); }) @@ -1363,7 +1503,7 @@ export default { getList() { this.listLoading = true; //导入界面中超链接过来的参数 - this.listQuery.name = "大众发票与结算核对明细表"; + this.listQuery.name = "准时化结算核对明细"; this.listQuery.type = this.JobversionValue; this.$axios .posts("/api/settleaccount/Job/list", this.listQuery) @@ -1416,7 +1556,6 @@ export default { }; - + \ No newline at end of file diff --git a/vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue b/vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue index 736c2e9d..53b6a364 100644 --- a/vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue +++ b/vue/src/views/ux/billManage/InvoiceSettledDiff/index.vue @@ -379,7 +379,6 @@ - @@ -627,7 +626,7 @@ export default { tempsTabs.push({ label: "单据流水号", prop: "taskId", - width: 85, + width: 130, }); tempsTabs.push({ label: "模块名称", @@ -990,7 +989,7 @@ export default { getList() { this.listLoading = true; //导入界面中超链接过来的参数 - this.listQuery.name = "大众发票与结算核对汇总表"; + this.listQuery.name = "发票与结算核对汇总"; this.listQuery.type = this.JobversionValue; this.$axios .posts("/api/settleaccount/Job/list", this.listQuery) diff --git a/vue/src/views/ux/billManage/IssuedUnsettled/index.vue b/vue/src/views/ux/billManage/IssuedUnsettled/index.vue index fe737698..6e6ac6a8 100644 --- a/vue/src/views/ux/billManage/IssuedUnsettled/index.vue +++ b/vue/src/views/ux/billManage/IssuedUnsettled/index.vue @@ -730,7 +730,7 @@ export default { tempsTabs.push({ label: "单据流水号", prop: "taskId", - width: 85, + width: 130, }); tempsTabs.push({ label: "模块名称", diff --git a/vue/src/views/ux/billManage/SettleDoorPanel/index.vue b/vue/src/views/ux/billManage/SettleDoorPanel/index.vue index 2aa3f604..c810301d 100644 --- a/vue/src/views/ux/billManage/SettleDoorPanel/index.vue +++ b/vue/src/views/ux/billManage/SettleDoorPanel/index.vue @@ -772,7 +772,7 @@ export default { tempsTabs.push({ label: "单据流水号", prop: "taskId", - width: 85, + width: 130, }); tempsTabs.push({ label: "模块名称", diff --git a/vue/src/views/ux/billManage/UnInvoiceSettledDetailDiff/index.vue b/vue/src/views/ux/billManage/UnInvoiceSettledDetailDiff/index.vue index 7d837232..068ea053 100644 --- a/vue/src/views/ux/billManage/UnInvoiceSettledDetailDiff/index.vue +++ b/vue/src/views/ux/billManage/UnInvoiceSettledDetailDiff/index.vue @@ -388,20 +388,24 @@ + > + {{ item.label }} + {{ + item.value + }} + @@ -773,7 +777,7 @@ export default { tempsTabs.push({ label: "单据流水号", prop: "taskId", - width: 85, + width: 130, }); tempsTabs.push({ label: "模块名称", @@ -953,13 +957,14 @@ export default { project: "物料组", maxResultCount: 1000, skipCount: 0, + sorting: "value ascending", }) .then((response) => { this.materialGroupList = []; response.items.forEach((element) => { let options = {}; options.value = element.description; - options.label = element.description + "/" + element.value; + options.label = element.value; this.materialGroupList.push(options); }); }) @@ -1176,7 +1181,7 @@ export default { getList() { this.listLoading = true; //导入界面中超链接过来的参数 - this.listQuery.name = "大众准时化结算数量差异比对表"; + this.listQuery.name = "准时化量差输出"; this.listQuery.type = this.JobversionValue; this.$axios .posts("/api/settleaccount/Job/list", this.listQuery) diff --git a/vue/src/views/ux/billManage/UnSettleDiffExport/index.vue b/vue/src/views/ux/billManage/UnSettleDiffExport/index.vue index 5fa2d4c3..bfd56ab4 100644 --- a/vue/src/views/ux/billManage/UnSettleDiffExport/index.vue +++ b/vue/src/views/ux/billManage/UnSettleDiffExport/index.vue @@ -390,19 +390,23 @@ v-model="formCount.materialGroupValue" size="medium" multiple - collapse-tags filterable clearable + style="width: 380px; margin-right: 15px" @change="valueChange" - style="width: 350px; margin-right: 15px" placeholder="请选择" > + > + {{ item.label }} + {{ + item.value + }} + @@ -730,7 +734,7 @@ export default { tempsTabs.push({ label: "单据流水号", prop: "taskId", - width: 85, + width: 130, }); tempsTabs.push({ label: "模块名称", @@ -905,13 +909,14 @@ export default { project: "物料组", maxResultCount: 1000, skipCount: 0, + sorting: "value ascending", }) .then((response) => { this.materialGroupList = []; response.items.forEach((element) => { let options = {}; options.value = element.description; - options.label = element.description + "/" + element.value; + options.label = element.value; this.materialGroupList.push(options); }); }) @@ -1120,7 +1125,7 @@ export default { getList() { this.listLoading = true; //导入界面中超链接过来的参数 - this.listQuery.name = "大众准时化未结差异比对表"; + this.listQuery.name = "准时化未结差异比对输出"; this.listQuery.type = this.JobversionValue; this.$axios .posts("/api/settleaccount/Job/list", this.listQuery) diff --git a/vue/src/views/ux/billManage/UnSettledDiff/index.vue b/vue/src/views/ux/billManage/UnSettledDiff/index.vue index fc2a3da1..c3602e58 100644 --- a/vue/src/views/ux/billManage/UnSettledDiff/index.vue +++ b/vue/src/views/ux/billManage/UnSettledDiff/index.vue @@ -728,7 +728,7 @@ export default { tempsTabs.push({ label: "单据流水号", prop: "taskId", - width: 85, + width: 130, }); tempsTabs.push({ label: "模块名称", diff --git a/vue/src/views/ux/billManage/index.vue b/vue/src/views/ux/billManage/index.vue new file mode 100644 index 00000000..509198d1 --- /dev/null +++ b/vue/src/views/ux/billManage/index.vue @@ -0,0 +1,7 @@ + + \ No newline at end of file diff --git a/vue/src/views/ux/billManage/kanBanWithCode/index.vue b/vue/src/views/ux/billManage/kanBanWithCode/index.vue index 9e0f12b1..8c051717 100644 --- a/vue/src/views/ux/billManage/kanBanWithCode/index.vue +++ b/vue/src/views/ux/billManage/kanBanWithCode/index.vue @@ -35,6 +35,14 @@ @click="handleCreateBills()" >生成出库单(支持批量) + 已确认 @@ -396,20 +404,24 @@ + > + {{ item.label }} + {{ + item.value + }} + @@ -455,25 +467,23 @@ - - - + @@ -728,7 +738,7 @@ export default { tempsTabs.push({ label: "单据流水号", prop: "taskId", - width: 85, + width: 120, }); tempsTabs.push({ label: "模块名称", @@ -745,21 +755,16 @@ export default { prop: "createdAt", width: 150, }); - tempsTabs.push({ + tempsTabs.push({ label: "说明", prop: "remark", width: 220, }); - // tempsTabs.push({ - // label: "操作名称", - // prop: "actionName", - // width: 120, - // }); - // tempsTabs.push({ - // label: "状态", - // prop: "stateName", - // width: 100, - // }); + tempsTabs.push({ + label: "审批状态", + prop: "fileName", + width: 150, + }); return tempsTabs; }, }, @@ -816,6 +821,54 @@ export default { }); }); }, + handleConfirm(row) { + if (this.multipleSelection.length == 0) { + this.$message({ + message: "至少选择一行!", + type: "warning", + }); + return; + } + var params = []; + let myalert = ""; //声明变量,其变量必须在此声明后使用 + if (row) { + //单行 + params.push(row.id); + myalert = row.name; + } else { + //多选 + this.multipleSelection.forEach((element) => { + let id = element.id; + params.push(id); + }); + myalert = "选中项"; + } + this.$confirm("是否确认" + myalert + "?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + this.$axios + .posts("/api/settleaccount/wms/WmsJitOutPut", params) + .then((response) => { + const index = this.list.indexOf(row); + this.$notify({ + title: "成功", + message: "生成成功", + type: "success", + duration: 2000, + }); + this.getList(); + }); + }) + .catch(() => { + this.$message({ + type: "info", + message: "已取消操作", + }); + }); + }, //出库单 handleCreateBills(row) { if (this.multipleSelection.length == 0) { @@ -957,13 +1010,14 @@ export default { project: "物料组", maxResultCount: 1000, skipCount: 0, + sorting: "value ascending", }) .then((response) => { this.materialGroupList = []; response.items.forEach((element) => { let options = {}; options.value = element.description; - options.label = element.description + "/" + element.value; + options.label = element.value; this.materialGroupList.push(options); }); }) @@ -1152,7 +1206,7 @@ export default { getList() { this.listLoading = true; //导入界面中超链接过来的参数 - this.listQuery.name = "大众看板结算与交货核对明细表"; + this.listQuery.name = "看板结算数量差异输出"; this.$axios .posts("/api/settleaccount/Job/list", this.listQuery) .then((response) => { diff --git a/vue/src/views/ux/billManage/kanbanOutOrder/detail.vue b/vue/src/views/ux/billManage/kanbanOutOrder/detail.vue new file mode 100644 index 00000000..c7fdcb9a --- /dev/null +++ b/vue/src/views/ux/billManage/kanbanOutOrder/detail.vue @@ -0,0 +1,541 @@ + + + + + + + + diff --git a/vue/src/views/ux/billManage/kanbanOutOrder/index.vue b/vue/src/views/ux/billManage/kanbanOutOrder/index.vue new file mode 100644 index 00000000..cd7f23ba --- /dev/null +++ b/vue/src/views/ux/billManage/kanbanOutOrder/index.vue @@ -0,0 +1,317 @@ + + + + + + + + diff --git a/vue/src/views/ux/billManage/sparePart/index.vue b/vue/src/views/ux/billManage/sparePart/index.vue index a0b13a3c..567066e5 100644 --- a/vue/src/views/ux/billManage/sparePart/index.vue +++ b/vue/src/views/ux/billManage/sparePart/index.vue @@ -35,6 +35,14 @@ @click="handleCreateBills()" >生成出库单(支持批量) + 已确认 @@ -396,17 +404,24 @@ + > + {{ item.label }} + {{ + item.value + }} + @@ -416,17 +431,30 @@ - + + + + + + + @@ -471,37 +499,60 @@ - - + + - - + + - - - + + - +