From 5a0e5d79f5400ad80e29c0d8d7e89db394bb8249 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Fri, 17 Nov 2023 16:00:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=9F=BA=E6=9C=AC=E9=80=9A?= =?UTF-8?q?=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MenBanReports/MenBanPrintInputDto.cs | 5 + .../ZhuHuBanReports/ZhuHuBanPrintInputDto.cs | 5 + .../IPrintTemplateConfigurationService.cs | 3 + .../PrintTemplateConfiguratioDto.cs | 24 + .../Interfaces/IBillM100AppService.cs | 6 +- .../PrintTable/Dtos/WaitPrintDto.cs | 2 + .../Interfaces/IWaitPrintAppService.cs | 4 +- .../WY.NewJit.Application.Contracts.xml | 25 ++ .../PrintTemplateConfigurationService.cs | 28 ++ .../MsgCheck/BillM100s/BillM100AppService.cs | 148 +++---- .../BillM100s/MenBanPackingRecService.cs | 29 +- .../BillM100s/ZhuHuBanPackingRecService.cs | 84 +++- .../PrintTable/WaitPrintAppService.cs | 98 ++-- .../PrintTable/WaitPrintAppService_ZHB.cs | 148 ++++++- .../WY.NewJit.Application.xml | 52 ++- .../Common/ExtMethod.cs | 8 + .../Common/PagedAndSortedBase.cs | 6 +- .../PrintTable/BusinessTypeEnum.cs | 2 +- .../PaiGe/MenBanReports/MenBanPackingList.cs | 2 +- .../MsgCheck/Services/M100DomainService.cs | 2 +- vue/src/router/index.js | 4 +- .../basedate/m100Online/RepetitionMB.vue | 3 +- .../basedate/m100Online/RepetitionZHB.vue | 8 +- .../pg-fis/basedate/m100Online/budaMB.vue | 143 +++--- .../pg-fis/basedate/m100Online/budaZHB.vue | 140 +++--- .../basedate/m100Online/normalPritIndex.vue | 419 +++++++++++------- 26 files changed, 925 insertions(+), 473 deletions(-) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs index 8db7403..0a03b8d 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs @@ -7,6 +7,11 @@ namespace WY.NewJit.Extends { public class MenBanPrintInputDto { + /// + /// 业务类型:1 门板 2 其它柱护板 3 柱护板 + /// + public WY.NewJit.PrintTable.BusinessTypeEnum BusinessType { get; set; } + /// /// 打印类型:0 顺序打印 1 补账打印 3 重新打印 diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/ZhuHuBanReports/ZhuHuBanPrintInputDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/ZhuHuBanReports/ZhuHuBanPrintInputDto.cs index b0d5b04..cebddb2 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/ZhuHuBanReports/ZhuHuBanPrintInputDto.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/ZhuHuBanReports/ZhuHuBanPrintInputDto.cs @@ -21,6 +21,11 @@ namespace WY.NewJit.Extends public class ZhuHuBanPrintInputDto { + /// + /// 业务类型:1 门板 2 其它柱护板 3 柱护板 + /// + public WY.NewJit.PrintTable.BusinessTypeEnum BusinessType { get; set; } + /// /// 打印类型:提供初次打印、重新打印、针对重新解析后单据的补打功能 diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PrintTemplateConfiguration/IPrintTemplateConfigurationService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PrintTemplateConfiguration/IPrintTemplateConfigurationService.cs index ab58904..3e4041c 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PrintTemplateConfiguration/IPrintTemplateConfigurationService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PrintTemplateConfiguration/IPrintTemplateConfigurationService.cs @@ -5,5 +5,8 @@ namespace WY.NewJit.MsgBaseData public interface IPrintTemplateConfigurationService { Task> GetTypeListAsync(); + + Task> GetGroupCodeNameListAsync(); + } } \ No newline at end of file diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PrintTemplateConfiguration/PrintTemplateConfiguratioDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PrintTemplateConfiguration/PrintTemplateConfiguratioDto.cs index 85d0ecf..c2773cc 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PrintTemplateConfiguration/PrintTemplateConfiguratioDto.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PrintTemplateConfiguration/PrintTemplateConfiguratioDto.cs @@ -34,4 +34,28 @@ namespace WY.NewJit.MsgBaseData public virtual string TemplateName { get; set; } } + + /// + /// 分组代码名称DTO + /// + [Serializable] + public class GroupCodeNameDto + { + /// + /// 分组名称 + /// + public virtual int GroupCode { get; set; } + + /// + /// 分组名称 + /// + public virtual string GroupName { get; set; } + + public GroupCodeNameDto(int groupCode, string groupName) + { + GroupCode = groupCode; + GroupName = groupName; + } + } + } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Interfaces/IBillM100AppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Interfaces/IBillM100AppService.cs index 14bc956..955f52f 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Interfaces/IBillM100AppService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Interfaces/IBillM100AppService.cs @@ -99,11 +99,11 @@ namespace WY.NewJit.MsgCheck /// /// 生产线编号列表 /// 生产线超时情况 - Task> ProductLineTimeoutRemind(TimeOutRemindInputDto input); + //Task> ProductLineTimeoutRemind(TimeOutRemindInputDto input); - Task> ProductLineTimeoutRemind_New(TimeOutRemindInputDto input); + Task> ProductLineTimeoutRemind(TimeOutRemindInputDto input); - Task> GetReplenishPrintListAsync(QueryBillM100Dto input); + //Task> GetReplenishPrintListAsync(QueryBillM100Dto input); diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/WaitPrintDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/WaitPrintDto.cs index 2639c20..64c47a1 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/WaitPrintDto.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Dtos/WaitPrintDto.cs @@ -15,6 +15,8 @@ namespace WY.NewJit.PrintTable [Serializable] public class WaitPrintDto { + public Guid Id { get; set; } + /// /// 对应M100的Id /// diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Interfaces/IWaitPrintAppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Interfaces/IWaitPrintAppService.cs index 16158a9..520e606 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Interfaces/IWaitPrintAppService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/PrintTable/Interfaces/IWaitPrintAppService.cs @@ -5,7 +5,6 @@ using System.Text; using System.Threading.Tasks; using Volo.Abp.Application.Dtos; using Volo.Abp.Uow; -using WY.NewJit.PrintTable; using WY.NewJit.PrintTable.Dtos; namespace WY.NewJit.PrintTable @@ -13,6 +12,7 @@ namespace WY.NewJit.PrintTable public interface IWaitPrintAppService { Task> GetReplenishPrintListAsync(QueryReplenishPrintDto input); - Task UpdatePrintDataStatus(List ids, PrintTypeEnum printTypeEnum); + + Task> GetReplenishPrintZHBListAsync(QueryReplenishPrintDto input); } } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml index b50e5de..681d50c 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml @@ -184,6 +184,11 @@ 用于报表排序 + + + 业务类型:1 门板 2 其它柱护板 3 柱护板 + + 打印类型:0 顺序打印 1 补账打印 3 重新打印 @@ -538,6 +543,11 @@ 数据结果类型 1 全部数据, 2 选中数据(仅重新打印时使用) + + + 业务类型:1 门板 2 其它柱护板 3 柱护板 + + 打印类型:提供初次打印、重新打印、针对重新解析后单据的补打功能 @@ -1446,6 +1456,21 @@ 模板名称 + + + 分组代码名称DTO + + + + + 分组名称 + + + + + 分组名称 + + 零件查询结果DTO diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/PrintTemplateConfiguration/PrintTemplateConfigurationService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/PrintTemplateConfiguration/PrintTemplateConfigurationService.cs index fb5c02d..7b17bba 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/PrintTemplateConfiguration/PrintTemplateConfigurationService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/PrintTemplateConfiguration/PrintTemplateConfigurationService.cs @@ -112,6 +112,34 @@ namespace WY.NewJit.MsgBaseData } } + /// + /// 根据筛选条件获取分页实体列表 + /// + /// 输入查询条件 + /// 输入分页条件 + /// 返回符合条件的排序分页列表 + [HttpGet] + [UnitOfWork(false)] + [Route("group-list")] + public virtual async Task> GetGroupCodeNameListAsync() + { + _logger.LogDebug(_errorMessagePrefix + "GetGroupCodeNameListAsync 进入"); + ListResultDto ret = new ListResultDto(); + try + { + var list = await _repository.GetListAsync(); + ret.Item = list.GroupBy(itm => new { itm.GroupCode, itm.GroupName }).Select(r => new GroupCodeNameDto(r.Key.GroupCode, r.Key.GroupName)).ToList(); + return ret; + } + catch (Exception ex) + { + ret.Status = false; + ret.Message = _errorMessagePrefix + "GetGroupCodeNameListAsync 执行出错:" + ex.Message; + _logger.LogError(ret.Message); + return ret; + } + } + #endregion } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs index 0bf845a..787420b 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs @@ -1868,56 +1868,56 @@ select * from /// /// 输入查询条件 /// 返回符合条件的排序分页列表 - [HttpGet] - [UnitOfWork(false)] - [Route("replenish-print-list")] - public virtual async Task> GetReplenishPrintListAsync(QueryBillM100Dto input) - { - _logger.LogDebug(_errorMessagePrefix + "GetReplenishPrintListAsync 进入"); - try - { - input.CanNotPrint = null; //忽略不能打印 - input.ZHBBillStatus = null; - input.BillStatus = BillStatusEnum.Match; //单据状态是已解析未打印 - input.IsNeedReplenishPrint = true; //只显示需要补打的记录 - PagedResultDto ret = await QueryByConditionAsync(input, (PagedAndSortedBase)input); - return ret; - } - catch (Exception ex) - { - string errMsg = _errorMessagePrefix + "GetReplenishPrintListAsync 执行出错:" + ex.Message; - _logger.LogError(errMsg); - return new PagedResultDto(0, new List()); - } - } + //[HttpGet] + //[UnitOfWork(false)] + //[Route("replenish-print-list")] + //public virtual async Task> GetReplenishPrintListAsync(QueryBillM100Dto input) + //{ + // _logger.LogDebug(_errorMessagePrefix + "GetReplenishPrintListAsync 进入"); + // try + // { + // input.CanNotPrint = null; //忽略不能打印 + // input.ZHBBillStatus = null; + // input.BillStatus = BillStatusEnum.Match; //单据状态是已解析未打印 + // input.IsNeedReplenishPrint = true; //只显示需要补打的记录 + // PagedResultDto ret = await QueryByConditionAsync(input, (PagedAndSortedBase)input); + // return ret; + // } + // catch (Exception ex) + // { + // string errMsg = _errorMessagePrefix + "GetReplenishPrintListAsync 执行出错:" + ex.Message; + // _logger.LogError(errMsg); + // return new PagedResultDto(0, new List()); + // } + //} /// /// 取柱护板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印) /// /// 输入查询条件 /// 返回符合条件的排序分页列表 - [HttpGet] - [UnitOfWork(false)] - [Route("replenish-print-zhb-list")] - public virtual async Task> GetReplenishPrintZHBListAsync(QueryBillM100Dto input) - { - _logger.LogDebug(_errorMessagePrefix + "GetReplenishPrintZHBListAsync 进入"); - try - { - input.CanNotPrint = null; //忽略不能打印 - input.BillStatus = null; - input.ZHBBillStatus = ZHBBillStatusEnum.NotPrint; //柱护板状态是已解析未打印 - input.IsNeedReplenishPrint = true; //只显示需要补打的记录 - PagedResultDto ret = await QueryZHBByConditionAsync(input, (PagedAndSortedBase)input); - return ret; - } - catch (Exception ex) - { - string errMsg = _errorMessagePrefix + "GetReplenishPrintZHBListAsync 执行出错:" + ex.Message; - _logger.LogError(errMsg); - return new PagedResultDto(0, new List()); - } - } + //[HttpGet] + //[UnitOfWork(false)] + //[Route("replenish-print-zhb-list")] + //public virtual async Task> GetReplenishPrintZHBListAsync(QueryBillM100Dto input) + //{ + // _logger.LogDebug(_errorMessagePrefix + "GetReplenishPrintZHBListAsync 进入"); + // try + // { + // input.CanNotPrint = null; //忽略不能打印 + // input.BillStatus = null; + // input.ZHBBillStatus = ZHBBillStatusEnum.NotPrint; //柱护板状态是已解析未打印 + // input.IsNeedReplenishPrint = true; //只显示需要补打的记录 + // PagedResultDto ret = await QueryZHBByConditionAsync(input, (PagedAndSortedBase)input); + // return ret; + // } + // catch (Exception ex) + // { + // string errMsg = _errorMessagePrefix + "GetReplenishPrintZHBListAsync 执行出错:" + ex.Message; + // _logger.LogError(errMsg); + // return new PagedResultDto(0, new List()); + // } + //} #endregion @@ -2157,29 +2157,29 @@ select * from /// /// 生产线编号列表 /// 生产线超时情况 - [UnitOfWork] - [HttpPost] - [Route("product-line-timeout-remind")] - public virtual async Task> ProductLineTimeoutRemind(TimeOutRemindInputDto input) - { - List retLst = new List(); - foreach (string plStr in input.ProductLineList) - { - TimeOutRemindResultDto retObj = new TimeOutRemindResultDto(); - retObj.ProductLine = plStr; - retObj.ConfigMinutes = _configuration[$"ConfigDic:ProductLineTimeoutRemind:{plStr}"].TryToInt() ?? 30; + //[UnitOfWork] + //[HttpPost] + //[Route("product-line-timeout-remind")] + //public virtual async Task> ProductLineTimeoutRemind(TimeOutRemindInputDto input) + //{ + // List retLst = new List(); + // foreach (string plStr in input.ProductLineList) + // { + // TimeOutRemindResultDto retObj = new TimeOutRemindResultDto(); + // retObj.ProductLine = plStr; + // retObj.ConfigMinutes = _configuration[$"ConfigDic:ProductLineTimeoutRemind:{plStr}"].TryToInt() ?? 30; - string maxSNStr = await _billM100Repository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.SerialNumStr); - BillM100 lastBill = await _billM100Repository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.SerialNumStr == maxSNStr); - if (lastBill != null) - { - retObj.LastReceiveTime = lastBill.ReceiveTime ?? ServerHelper.CurrentDateTime; - retObj.TimeoutMinutes = MinuteDiff(retObj.LastReceiveTime, ServerHelper.CurrentDateTime); - } - retLst.Add(retObj); - } - return new ListResultDto(retLst); - } + // string maxSNStr = await _billM100Repository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.SerialNumStr); + // BillM100 lastBill = await _billM100Repository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.SerialNumStr == maxSNStr); + // if (lastBill != null) + // { + // retObj.LastReceiveTime = lastBill.ReceiveTime ?? ServerHelper.CurrentDateTime; + // retObj.TimeoutMinutes = MinuteDiff(retObj.LastReceiveTime, ServerHelper.CurrentDateTime); + // } + // retLst.Add(retObj); + // } + // return new ListResultDto(retLst); + //} /// @@ -2191,8 +2191,8 @@ select * from /// 生产线超时情况 [UnitOfWork] [HttpPost] - [Route("product-line-timeout-remind-new")] - public virtual async Task> ProductLineTimeoutRemind_New(TimeOutRemindInputDto input) + [Route("product-line-timeout-remind")] + public virtual async Task> ProductLineTimeoutRemind(TimeOutRemindInputDto input) { List retLst = new List(); foreach (string plStr in input.ProductLineList) @@ -2204,7 +2204,7 @@ select * from int maxSN2= await _waitPrintRepository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.HostSN2); WaitPrint lastitem = await _waitPrintRepository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.HostSN2 == maxSN2); var cache = _timeoutCacheList.FirstOrDefault(itm => itm.ProductLine == plStr); - if (lastitem != null) + if (lastitem != null) //未打印表有数据 { retObj.LastReceiveTime = lastitem.ReceiveTime ?? ServerHelper.CurrentDateTime; retObj.TimeoutMinutes = MinuteDiff(retObj.LastReceiveTime, ServerHelper.CurrentDateTime); @@ -2219,17 +2219,17 @@ select * from _timeoutCacheList.Add(retObj); } } - else + else //未打印表没有数据 { if (cache != null) { - retObj.LastReceiveTime = cache.LastReceiveTime; + retObj.LastReceiveTime = cache.LastReceiveTime; //优先从缓存取 retObj.TimeoutMinutes = MinuteDiff(cache.LastReceiveTime, ServerHelper.CurrentDateTime); } - else + else //缓存没有时从M100取 { - string maxSNStr = await _billM100Repository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.SerialNumStr); - BillM100 lastBill = await _billM100Repository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.SerialNumStr == maxSNStr); + int? maxHostSN2 = await _billM100Repository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.HostSN2); + BillM100 lastBill = await _billM100Repository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.HostSN2 == maxHostSN2); if (lastBill != null) { retObj.LastReceiveTime = lastBill.ReceiveTime ?? ServerHelper.CurrentDateTime; diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs index 816a7dd..74be9cc 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs @@ -306,7 +306,7 @@ namespace Win.Sfs.SettleAccount.FISes _strList.Add(string.Format("'{0}'", p)); }); string str = string.Join(",", _strList.ToArray()); - var wmsLst = _wmsRepository.GetListBySql(string.Format("select top 100 * from TB_BILL with(nolock) where (state=1 or state=2) and BillNum in ({0}) ", str)); + var wmsLst = _wmsRepository.GetListBySql(string.Format("select top 100 * from TB_BILL with(nolock) where (state=1 or state=2) and BillNum in ({0}) ", str), true); if (wmsLst.Count() == 0) //库存没有排序 { //调用库存系统接口 @@ -332,40 +332,41 @@ namespace Win.Sfs.SettleAccount.FISes double updRecCnt2 = await _lineSNDomianServic.SetMaxSN(ProductTypeEnum.门板, curProductLine, "", curPrintDate, 0, null); //调用减号接口,没有上条记录时 单据号传0 } #endregion - + //门板记录表更新成 已作废 状态 foreach (var itm in pairlist) { itm.ReportStatus = WY.NewJit.Extends.PaiGe.ReportStatusEnum.已作废; } - await _menBanPackingListRepository.UpdateManyAsync(pairlist); - //批量改为未打印 - var _childList = await _menBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).ToListAsync(); - var _child = _childList.Select(p => p.M100BillId).Distinct().ToList(); - var _apList = await _alreadyPrintRepository.Where(p => _child.Contains(p.Id)).ToListAsync(); + + #region 删除已打印表、插入未打印表 + var mbRecLst = await _menBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).ToListAsync(); + var alreadyPrintIdLst = mbRecLst.Select(p => p.M100BillId).Distinct().ToList(); //未打印\已打印表id列表 + var _apList = await _alreadyPrintRepository.Where(p => alreadyPrintIdLst.Contains(p.Id)).ToListAsync(); List _wpList = new List(); - foreach (var ap in _apList) + foreach (var ap in _apList) //遍历已打印表 { - var item = await _waitPrintRepository.GetListAsync(r => r.HostSN2 == ap.HostSN2); - if (item.Count == 0) + var waitPrintLst = await _waitPrintRepository.GetListAsync(r => r.HostSN2 == ap.HostSN2 && r.BusinessType == ap.BusinessType); + if (waitPrintLst.Count == 0) //未打印表没有(对应已打印表)记录 { var wp = ObjectMapper.Map(ap); _wpList.Add(wp); } - else if(item.Count==1) + else if(waitPrintLst.Count == 1) //未打印表有一条记录 { - if(ap.BillStatus== BillStatusEnum.BreakNum&&item[0].BillStatus== BillStatusEnum.BreakNum) + if (ap.BillStatus == BillStatusEnum.BreakNum && waitPrintLst[0].BillStatus == BillStatusEnum.BreakNum) { - throw new BusinessException("1001", "未打印列表和已打印列表出现都是断号的情况号码未【"+ ap.HostSN2 + "】,不能报废!"); + throw new BusinessException("1001", "未打印列表和已打印列表出现都是断号的情况号码未【" + ap.HostSN2 + "】,不能报废!"); } } - else if (item.Count > 1) + else if (waitPrintLst.Count > 1) { throw new BusinessException("1001", "未打印列表里出现大众顺序号重复号码为【"+ ap.HostSN2+ "】请检查后在报废!"); } } await _alreadyPrintRepository.DeleteManyAsync(_apList); await _waitPrintRepository.InsertManyAsync(_wpList); + #endregion } else { diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs index 1965a57..1dc33a1 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs @@ -32,6 +32,7 @@ using WY.NewJit.Extends.PaiGe.WMS; using WY.NewJit.Filter; using WY.NewJit.MsgBaseData; using WY.NewJit.MsgCheck; +using WY.NewJit.PrintTable; namespace Win.Sfs.SettleAccount.FISes { @@ -58,18 +59,23 @@ namespace Win.Sfs.SettleAccount.FISes //private readonly IRepository _zHBPrintStatusRepository; private readonly IRepository _printTemplateConfigurationRepository; + + private readonly IRepository _alreadyPrintRepository; + private readonly IRepository _waitPrintRepository; + /// /// 柱护板装箱单仓储明细 /// public ZhuHuBanPackingRecService( - NewJitEfCoreRepository2 ZhuHuBanPackingListRepository, - IRepository billM100Repository, - WMSDapperRepository wmsRepository, - LineSNDomianService lineSNDomianServic, - IRepository tbBillScrapRepository, - //IRepository zHBPrintStatusRepository, - IRepository printTemplateConfigurationRepository - + NewJitEfCoreRepository2 ZhuHuBanPackingListRepository, + IRepository billM100Repository, + WMSDapperRepository wmsRepository, + LineSNDomianService lineSNDomianServic, + IRepository tbBillScrapRepository, + //IRepository zHBPrintStatusRepository, + IRepository printTemplateConfigurationRepository, + IRepository alreadyPrintRepository, + IRepository waitPrintRepository ) { _wmsRepository = wmsRepository; @@ -79,6 +85,8 @@ namespace Win.Sfs.SettleAccount.FISes _tbBillScrapRepository = tbBillScrapRepository; //_zHBPrintStatusRepository = zHBPrintStatusRepository; _printTemplateConfigurationRepository = printTemplateConfigurationRepository; + _alreadyPrintRepository = alreadyPrintRepository; + _waitPrintRepository = waitPrintRepository; } private void DelOrScrapWMSInterface(string billNum, bool isSynchronousMode = false) @@ -273,7 +281,7 @@ namespace Win.Sfs.SettleAccount.FISes /// 是否执行成功 [HttpPost] [Route("scrap")] - [UnitOfWork(isTransactional: false)] + [UnitOfWork] virtual public async Task> ScrapAsync(List ids) { var selLst = await _ZhuHuBanPackingListRepository.Where(p => ids.Contains(p.Id)).ToListAsync(); @@ -311,7 +319,7 @@ namespace Win.Sfs.SettleAccount.FISes _strList.Add(string.Format("'{0}'", p)); }); string str = string.Join(",", _strList.ToArray()); - var wmsLst = _wmsRepository.GetListBySql(string.Format("select * from TB_BILL where (state=1 or state=2) and BillNum in ({0}) ", str)); + var wmsLst = _wmsRepository.GetListBySql(string.Format("select * from TB_BILL with(nolock) where (state=1 or state=2) and BillNum in ({0}) ", str), true); if (wmsLst.Count() == 0) //库存没有排序 { //调用库存系统接口 @@ -347,26 +355,54 @@ namespace Win.Sfs.SettleAccount.FISes } #endregion - //打印记录表更新成 已作废 状态 + //柱护板记录表更新成 已作废 状态 foreach (var itm in pairlist) { itm.ReportStatus = WY.NewJit.Extends.PaiGe.ReportStatusEnum.已作废; } await _ZhuHuBanPackingListRepository.UpdateManyAsync(pairlist); - //批量改为未打印 - var _childList = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).ToListAsync(); - var _child = _childList.Select(p => p.M100BillId).Distinct().ToList(); - var _lst1 = await _billM100Repository.Where(p => _child.Contains(p.Id)).ToListAsync(); - _lst1.ForEach(p => + ////m100批量改为未打印 + //var _childList = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).ToListAsync(); + //var _child = _childList.Select(p => p.M100BillId).Distinct().ToList(); + //var _lst1 = await _billM100Repository.Where(p => _child.Contains(p.Id)).ToListAsync(); + //_lst1.ForEach(p => + //{ + // p.SetZHBBillStatus(ZHBBillStatusEnum.NotPrint); + // p.PrintTime2 = null; + //}); + //await _billM100Repository.UpdateManyAsync(_lst1); + //var types = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).Select(p => p.PartType).Distinct().ToListAsync(); + //var groupName = await _printTemplateConfigurationRepository.FirstOrDefaultAsync(r => types.Contains(r.PartType)); + //var vins = _childList.Select(p => p.VIN).Distinct().ToList(); + ////await _zHBPrintStatusRepository.DeleteAsync(r => vins.Contains(r.VIN) && r.GroupName == groupName.GroupName); + #region 删除已打印表、插入未打印表 + var zhbRecLst = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).ToListAsync(); + var alreadyPrintIdLst = zhbRecLst.Select(p => p.M100BillId).Distinct().ToList(); //未打印\已打印表id列表 + var _apList = await _alreadyPrintRepository.Where(p => alreadyPrintIdLst.Contains(p.Id)).ToListAsync(); + List _wpList = new List(); + foreach (var ap in _apList) //遍历已打印表 { - p.SetZHBBillStatus(ZHBBillStatusEnum.NotPrint); - p.PrintTime2 = null; - }); - await _billM100Repository.UpdateManyAsync(_lst1); - var types = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).Select(p => p.PartType).Distinct().ToListAsync(); - var groupName = await _printTemplateConfigurationRepository.FirstOrDefaultAsync(r => types.Contains(r.PartType)); - var vins = _childList.Select(p => p.VIN).Distinct().ToList(); - //await _zHBPrintStatusRepository.DeleteAsync(r => vins.Contains(r.VIN) && r.GroupName == groupName.GroupName); + var waitPrintLst = await _waitPrintRepository.GetListAsync(r => r.HostSN2 == ap.HostSN2 && r.BusinessType == ap.BusinessType); + if (waitPrintLst.Count == 0) //未打印表没有(对应已打印表)记录 + { + var wp = ObjectMapper.Map(ap); + _wpList.Add(wp); + } + else if (waitPrintLst.Count == 1) //未打印表有一条记录 + { + if (ap.BillStatus == BillStatusEnum.BreakNum && waitPrintLst[0].BillStatus == BillStatusEnum.BreakNum) + { + throw new BusinessException("1001", "未打印列表和已打印列表出现都是断号的情况号码未【" + ap.HostSN2 + "】,不能报废!"); + } + } + else if (waitPrintLst.Count > 1) + { + throw new BusinessException("1001", "未打印列表里出现大众顺序号重复号码为【" + ap.HostSN2 + "】请检查后在报废!"); + } + } + await _alreadyPrintRepository.DeleteManyAsync(_apList); + await _waitPrintRepository.InsertManyAsync(_wpList); + #endregion } else { diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs index 778ac40..5a44620 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs @@ -1,6 +1,9 @@ -using Microsoft.AspNetCore.Mvc; +using Magicodes.ExporterAndImporter.Core; +using Magicodes.ExporterAndImporter.Excel; +using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; +using Shouldly; using System; using System.Collections.Generic; using System.Diagnostics; @@ -10,6 +13,7 @@ using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Services; +using Volo.Abp.BlobStoring; using Volo.Abp.Domain.Repositories; using Volo.Abp.Uow; using WY.NewJit.Common; @@ -35,7 +39,7 @@ namespace WY.NewJit.PrintTable { get { - return System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "."; + return System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "."; } } @@ -105,6 +109,11 @@ namespace WY.NewJit.PrintTable private readonly IRepository _printTemplateConfigurationRepository; private readonly M100DomainService _m100DomainService; + + /// + /// BLOB存储 + /// + private readonly IBlobContainer _blobContainer; #endregion public WaitPrintAppService( @@ -123,7 +132,9 @@ namespace WY.NewJit.PrintTable IRepository alreadyPrintRepository, IRepository zhuHuBanPackingListRepository, IRepository printTemplateConfigurationRepository, - M100DomainService m100DomainService + M100DomainService m100DomainService, + IBlobContainer blobContainer + ) { _waitPrintRepository = waitPrintRepository; @@ -142,6 +153,7 @@ namespace WY.NewJit.PrintTable _zhuHuBanPackingListRepository = zhuHuBanPackingListRepository; _printTemplateConfigurationRepository = printTemplateConfigurationRepository; _m100DomainService = m100DomainService; + _blobContainer = blobContainer; } #region 私有方法 @@ -205,11 +217,11 @@ namespace WY.NewJit.PrintTable { where += string.Format(" and PrintType = {0}", ((int)input.PrintType).ToString()); } - if (input.HostSNBegin != null) + if (input.HostSNBegin.HasValue()) { where += string.Format(" and HostSN >= {0}", input.HostSNBegin); } - if (input.HostSNEnd != null) + if (input.HostSNEnd.HasValue()) { where += string.Format(" and HostSN <= {0}", input.HostSNEnd); } @@ -272,10 +284,10 @@ namespace WY.NewJit.PrintTable ret.TotalCount = await GetEntityCountAsync("FisWaitPrint", where); //计算分页 - int fromRec = page.SkipCount; - int ToRec = page.SkipCount + page.MaxResultCount; + int skipNum = page.SkipCount; + int takeNum = page.MaxResultCount; - var lst = await GetEntityListFromToAsync("FisWaitPrint", where, "HostSN2", fromRec, ToRec); + var lst = await GetEntityListFromToAsync("FisWaitPrint", where, "HostSN2", skipNum, takeNum); ret.Items = lst; return ret; } @@ -761,18 +773,20 @@ namespace WY.NewJit.PrintTable [Route("wait-print-list")] public virtual async Task> GetWaitPrintListAsync(QueryWaitPrintDto input) { - _logger.LogDebug(_errorMessagePrefix + "GetWaitPrintListAsync 进入"); + _logger.LogDebug(_errorMessagePrefix + "GetListAsync 进入"); try { PagedResultDto ret = new PagedResultDto(); - if (input.BusinessType == BusinessTypeEnum.MenBan|| input.BusinessType == BusinessTypeEnum.OtherZhuHuBan || input.BusinessType == BusinessTypeEnum.ZhuHuBan) + if (input.BusinessType == BusinessTypeEnum.MenBan + || input.BusinessType == BusinessTypeEnum.OtherZhuHuBan + || input.BusinessType == BusinessTypeEnum.AC_ZhuHuBan) { ret = await QueryByConditionAsync(input, (PagedAndSortedBase)input); - //} + } //else if (input.BusinessType == BusinessTypeEnum.OtherZhuHuBan || input.BusinessType == BusinessTypeEnum.ZhuHuBan) //{ // ret = await QueryZHBByConditionAsync(input, (PagedAndSortedBase)input); - } + //} else { throw new BusinessException("1001", "请传入正确的BusinessType参数!"); @@ -781,7 +795,7 @@ namespace WY.NewJit.PrintTable } catch (Exception ex) { - string errMsg = _errorMessagePrefix + "GetWaitPrintListAsync 执行出错:" + ex.Message; + string errMsg = _errorMessagePrefix + "GetListAsync 执行出错:" + ex.Message; _logger.LogError(errMsg); return new PagedResultDto(0, new List()); } @@ -902,7 +916,7 @@ namespace WY.NewJit.PrintTable return ret; } bool allMatch = billLst.All(itm => itm.BillStatus == BillStatusEnum.Match); - if (allMatch) + if (!allMatch) { ret.Message = "选择要补打的单据中必须全部是已解析的报文!"; ret.Status = false; @@ -1194,32 +1208,52 @@ namespace WY.NewJit.PrintTable } /// - /// 修改未打印列表状态 + /// 导出信息 /// - /// - /// - /// - [HttpGet] - [UnitOfWork] - [Route("update-print-data-status")] - public virtual async Task UpdatePrintDataStatus(List ids, PrintTypeEnum printTypeEnum) + /// 导出查询条件 + /// 执行成功返回真 + [UnitOfWork(false)] + [HttpPost] + [Route("export")] + public virtual async Task> ExportAsync(QueryWaitPrintDto input) { - _logger.LogDebug(_errorMessagePrefix + "UpdatePrintDataStatus 进入"); - bool result = true; + _logger.LogDebug(_errorMessagePrefix + "ExportAsync 进入"); + ObjectResultDto ret = new ObjectResultDto(); try { - var updatelist = await _waitPrintRepository.GetListAsync(r => ids.Contains(r.Id)); - updatelist.ForEach(r => r.PrintType = printTypeEnum); - await _waitPrintRepository.UpdateManyAsync(updatelist); + PagedResultDto query = new PagedResultDto(); + + if (input.BusinessType == BusinessTypeEnum.MenBan + || input.BusinessType == BusinessTypeEnum.OtherZhuHuBan + || input.BusinessType == BusinessTypeEnum.AC_ZhuHuBan) + { + input.MaxResultCount = 50000; + query = await QueryByConditionAsync(input, (PagedAndSortedBase)input); + } + else + { + throw new BusinessException("1001", "请传入正确的BusinessType参数!"); + } + List items = query.Items.ToList(); + //将实体列表转换成excel文件流 + IExporter exporter = new ExcelExporter(); + byte[] byteArr = await exporter.ExportAsByteArray(items); + byteArr.ShouldNotBeNull(); + //将excel文件流保存到服务器端文件系统 + string fileName = string.Format("未打印表_{0}.xlsx", Guid.NewGuid().ToString()); + await _blobContainer.SaveAsync(fileName, byteArr); + + ret.Item = fileName; + return ret; + } catch (Exception ex) { - string errMsg = _errorMessagePrefix + "UpdatePrintDataStatus 执行出错:" + ex.Message; - _logger.LogError(errMsg); - result = false; - return result; + ret.Status = false; + ret.Message = _errorMessagePrefix + "ExportAsync 执行出错:" + ex.Message; + _logger.LogError(ret.Message); + return ret; } - return result; } } } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService_ZHB.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService_ZHB.cs index 2d6a64e..9f5ae2e 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService_ZHB.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService_ZHB.cs @@ -743,7 +743,7 @@ namespace WY.NewJit.PrintTable } else if (input.GroupName == "3") { - busiType = BusinessTypeEnum.ZhuHuBan; + busiType = BusinessTypeEnum.AC_ZhuHuBan; } else { @@ -791,6 +791,21 @@ namespace WY.NewJit.PrintTable #endregion #region 柱护板公有方法 + + /// + /// 取柱护板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印) + /// + /// 输入查询条件 + /// 返回符合条件的排序分页列表 + [HttpGet] + [UnitOfWork(false)] + [Route("replenish-print-zhb-list")] + public virtual async Task> GetReplenishPrintZHBListAsync(QueryReplenishPrintDto input) + { + return await GetReplenishPrintListAsync(input); + } + + /// /// 打印前检查大众顺序号是否断号 /// @@ -812,12 +827,16 @@ namespace WY.NewJit.PrintTable [UnitOfWork] [HttpPost] [Route("save-group-zhuhuban-report")] - public virtual async Task>> SaveGroupZhuHuBanReport(ZhuHuBanPrintInputDto input) + public virtual async Task> SaveGroupZhuHuBanReport(ZhuHuBanPrintInputDto input) { _logger.LogDebug(_errorMessagePrefix + "SaveGroupZhuHuBanReport 进入"); - List retLst = new List(); - ObjectResultDto> ret = new ObjectResultDto>(); + //List retLst = new List(); + //ObjectResultDto> ret = new ObjectResultDto>(); + + ZhuHuBanPrintResultDto retObj = new ZhuHuBanPrintResultDto(); + ObjectResultDto ret = new ObjectResultDto(retObj); + ret.Status = false; using (var uow = _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true, isolationLevel: System.Data.IsolationLevel.Unspecified)) { @@ -974,6 +993,9 @@ namespace WY.NewJit.PrintTable //加载柱护板缓存列表 _zhbCacheList = _materialExtRepository.Where(itm => itm.MaterialType == "2").ToList(); //取柱护板零件 + //加载M100零件缓存 + _m100PartDicCache = await _m100DomainService.GetM100PartDic(billLst.Select(itm => itm.M100Id).ToList()); + long maxBillNum = 0; //全局唯一装箱单号 DateTime printTime = ServerHelper.CurrentDateTime; @@ -1087,9 +1109,125 @@ namespace WY.NewJit.PrintTable } //补打if + + //按大众顺序号排序 + foreach (var reportMainObj in reportMainLst) + { + List recLst = reportMainObj.Details; + if (recLst == null) + continue; + reportMainObj.Details = recLst.OrderBy(itm => itm.HostSN2).ToList(); + } + + #region 返回结果格式转换 + //实体 转 DTO + List targetLst = ObjectMapper.Map, List>(reportMainLst); + //补充空行 + foreach (var masterObj in targetLst) + { + int trueCnt = masterObj.Details.Count; + + int planCnt = 0; + switch (masterObj.PartType) + { + case "A上C上": + case "A柱下A中": + case "B柱上": + case "B柱下": + case "后轮上装饰板": + planCnt = 24; + break; + case "D柱": + planCnt = 12; + break; + default: + planCnt = 24; + break; + } + if (trueCnt > planCnt) + { + throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}"); + } + int diffCnt = planCnt - trueCnt; + for (int i = 0; i < diffCnt; i++) + { + ZhuHuBanPackingRecDto dtlObj = new ZhuHuBanPackingRecDto(); + masterObj.Details.Add(dtlObj); + } + } + //子表BillNum赋值, BillNum填充空格, SN赋值 + foreach (var masterObj in targetLst) + { + masterObj.BillNum = GetTrueString(masterObj.BillNum); + int sn = 1; + foreach (var detailObj in masterObj.Details) + { + detailObj.BillNum = masterObj.BillNum; + detailObj.KNR = GetTrueString(detailObj.KNR); + detailObj.KNR = detailObj.KNR.Replace(" ", "").Replace("\n", "").Replace("\r", "").Replace("/n", "").Replace("/r", ""); + detailObj.sn = sn++; + detailObj.VIN = detailObj.VIN.TryToRight(6); //底盘号返回后六位 + //客户要求显示零件描述,替换之前的零件编码 + detailObj.PartCode = detailObj.MaterialDescription; + detailObj.PartCode2 = detailObj.MaterialDescription2; + detailObj.MaterialDescription = null; + detailObj.MaterialDescription2 = null; + } + } + + retObj.MasterList_AC = targetLst.Where(itm => itm.PartType == "A上C上").ToList(); + if (retObj.MasterList_AC.Count == 0) retObj.IsVisibleAC = false; + foreach (var masterObj in retObj.MasterList_AC) + { + retObj.DetailList_AC.AddRange(masterObj.Details); + masterObj.Details = null; + } + + retObj.MasterList_AA = targetLst.Where(itm => itm.PartType == "A柱下A中").ToList(); + if (retObj.MasterList_AA.Count == 0) retObj.IsVisibleAA = false; + foreach (var masterObj in retObj.MasterList_AA) + { + retObj.DetailList_AA.AddRange(masterObj.Details); + masterObj.Details = null; + } + + retObj.MasterList_BS = targetLst.Where(itm => itm.PartType == "B柱上").ToList(); + if (retObj.MasterList_BS.Count == 0) retObj.IsVisibleBS = false; + foreach (var masterObj in retObj.MasterList_BS) + { + retObj.DetailList_BS.AddRange(masterObj.Details); + masterObj.Details = null; + } + + retObj.MasterList_BX = targetLst.Where(itm => itm.PartType == "B柱下").ToList(); + if (retObj.MasterList_BX.Count == 0) retObj.IsVisibleBX = false; + foreach (var masterObj in retObj.MasterList_BX) + { + retObj.DetailList_BX.AddRange(masterObj.Details); + masterObj.Details = null; + } + + retObj.MasterList_D = targetLst.Where(itm => itm.PartType == "D柱").ToList(); + if (retObj.MasterList_D.Count == 0) retObj.IsVisibleD = false; + foreach (var masterObj in retObj.MasterList_D) + { + retObj.DetailList_D.AddRange(masterObj.Details); + masterObj.Details = null; + } + + retObj.MasterList_HL = targetLst.Where(itm => itm.PartType == "后轮上装饰板").ToList(); + if (retObj.MasterList_HL.Count == 0) retObj.IsVisibleHL = false; + foreach (var masterObj in retObj.MasterList_HL) + { + retObj.DetailList_HL.AddRange(masterObj.Details); + masterObj.Details = null; + } + #endregion + + await uow.CompleteAsync(); ret.Status = true; - ret.Item = retLst; + ret.Item = retObj; return ret; } catch (Exception ex) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml index 8627e50..359f3f4 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml @@ -893,6 +893,14 @@ 输入分页条件 返回符合条件的排序分页列表 + + + 根据筛选条件获取分页实体列表 + + 输入查询条件 + 输入分页条件 + 返回符合条件的排序分页列表 + M100单据管理应用服务实现 @@ -1014,20 +1022,6 @@ - - - 取门板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印) - - 输入查询条件 - 返回符合条件的排序分页列表 - - - - 取柱护板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印) - - 输入查询条件 - 返回符合条件的排序分页列表 - 根据筛选条件获取分页实体列表 @@ -1080,13 +1074,6 @@ 执行成功返回真 - - 生产线超时提醒 - - 生产线编号列表 - 生产线超时情况 - - 生产线超时提醒(新) 先取未打印列表然后更新缓存列表,如果未打印列表为空取m100更新缓存列表 @@ -1926,6 +1913,11 @@ 柱护板装箱单仓储 + + + BLOB存储 + + 取单表记录总数 @@ -2018,13 +2010,12 @@ 输入查询条件 返回符合条件的排序分页列表 - + - 修改未打印列表状态 + 导出信息 - - - + 导出查询条件 + 执行成功返回真 @@ -2101,6 +2092,13 @@ + + + 取柱护板补打列表(IsNeedReplenishPrint=true、单据状态BillStatus是未打印) + + 输入查询条件 + 返回符合条件的排序分页列表 + 打印前检查大众顺序号是否断号 @@ -2172,7 +2170,7 @@ 区域相关应用服务 - + 柱护板装箱单仓储明细 diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs index cebe326..d27c8f0 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs @@ -316,6 +316,12 @@ namespace WY.NewJit.Common return false; } + public static bool HasValue(this int? p_val) + { + return p_val != null && p_val > 0; + } + + //public static string Left(this string param, int length) //{ // string result = param.Substring(0, length); @@ -450,5 +456,7 @@ namespace WY.NewJit.Common } return ToInt64(p_objVal.ToString()); } + + } } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/PagedAndSortedBase.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/PagedAndSortedBase.cs index 161f661..d65aa40 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/PagedAndSortedBase.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/PagedAndSortedBase.cs @@ -6,16 +6,16 @@ namespace WY.NewJit.Common { public class PagedAndSortedBase { - public int maxResultCount = 500; + private int _maxResultCount = 500; public int MaxResultCount { get { - return maxResultCount; + return _maxResultCount; } set { - maxResultCount = value; + _maxResultCount = value; } } public int SkipCount { get; set; } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BusinessTypeEnum.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BusinessTypeEnum.cs index 6450f6a..f5bcbaf 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BusinessTypeEnum.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/PrintTable/BusinessTypeEnum.cs @@ -17,7 +17,7 @@ namespace WY.NewJit.PrintTable OtherZhuHuBan = 2, [Description("AC柱护板")] - ZhuHuBan = 3, + AC_ZhuHuBan = 3, } diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs index 6089215..45d842c 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs @@ -14,7 +14,7 @@ namespace WY.NewJit.Extends /// public class MenBanPackingList : FullAuditedAggregateRoot { - + /// /// 装箱单号:规则 1开头,11位,自增顺序号 /// diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs index 9e52b71..94998d6 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs @@ -58,7 +58,7 @@ namespace WY.NewJit.MsgCheck { WaitPrint mbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.MenBan); WaitPrint zhbOtherRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.OtherZhuHuBan); - WaitPrint zhbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.ZhuHuBan); + WaitPrint zhbRec = ConvertWaitPrint(m100Obj, BusinessTypeEnum.AC_ZhuHuBan); wpArr = new WaitPrint[3] { mbRec, zhbOtherRec, zhbRec }; } else diff --git a/vue/src/router/index.js b/vue/src/router/index.js index 8193998..41a418f 100644 --- a/vue/src/router/index.js +++ b/vue/src/router/index.js @@ -64,10 +64,10 @@ export const constantRoutes = [ }, { path: '/login', - component: () => import('@/views/login/index'), + //component: () => import('@/views/login/index'), //component: () => import('@/views/pg-fis/basedate/partSwitch'), //?? one //component: () => import('@/views/pg-fis/basedate/assemblyCfg'), //?? one - // component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'), + component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'), hidden: true }, { diff --git a/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue b/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue index 2d235e9..381ddd0 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/RepetitionMB.vue @@ -618,7 +618,8 @@ export default { var params = MBVin1; //选中的门板ID列表 console.log("门板打印-主界面传过来的值:" + JSON.stringify(params)); this.$axios - .posts("/api/newjit/bill-m100/load-menban-report", params) + //.posts("/api/newjit/bill-m100/load-menban-report", params) + .posts("/api/newjit/wait-print/load-menban-report", params) .then((response) => { //alert(response.status); const index = this.list.indexOf(row); diff --git a/vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue b/vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue index 77d4f23..184491e 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/RepetitionZHB.vue @@ -540,7 +540,9 @@ export default { console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); this.$axios //.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) - .posts("/api/newjit/bill-m100/load-zhuhuban-report", params) + //.posts("/api/newjit/bill-m100/load-zhuhuban-report", params) + .posts("/api/newjit/wait-print/load-zhuhuban-report", params) + .then((response) => { console.log("柱护版-打印返回的状态:" + response.status); const index = this.list.indexOf(row); @@ -621,8 +623,8 @@ export default { }; console.log("柱护版-主界面传过来的值:" + JSON.stringify(params)); this.$axios - //.posts("/api/newjit/bill-m100/print-zhuhuban-packing-list", params) - .posts("/api/newjit/bill-m100/load-zhuhuban-report", params) + //.posts("/api/newjit/bill-m100/load-zhuhuban-report", params) + .posts("/api/newjit/wait-print/load-zhuhuban-report", params) .then((response) => { console.log("柱护版-打印返回的状态:" + response.status); const index = this.list.indexOf(row); diff --git a/vue/src/views/pg-fis/basedate/m100Online/budaMB.vue b/vue/src/views/pg-fis/basedate/m100Online/budaMB.vue index 026ff95..e07b1dc 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/budaMB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/budaMB.vue @@ -303,8 +303,9 @@ export default { //TODO } else { newVal.forEach((element) => { - this.customerInfo.printType = 2; //2时补打 + this.customerInfo.printType = 2; //2是补打 this.customerInfo.productLine = element.ProductLine; + this.customerInfo.BusinessType = element.BusinessType; }); if (this.customerInfo.productLine != "") { this.getList(); @@ -348,12 +349,12 @@ export default { width: 100, }); - tempsTabs.push({ - label: "版本", - prop: "version", - width: 100, + // tempsTabs.push({ + // label: "版本", + // prop: "version", + // width: 100, - }); + // }); tempsTabs.push({ label: "产线", @@ -370,7 +371,7 @@ export default { tempsTabs.push({ label: "备注", - prop: "remark", + prop: "description", //remark width: 80, }); @@ -477,7 +478,8 @@ export default { console.log('replenish-print-list方法输入参数:' + JSON.stringify(this.listQuery)); this.$axios .gets( - "/api/newjit/bill-m100/replenish-print-list", + //"/api/newjit/bill-m100/replenish-print-list", + "/api/newjit/wait-print/replenish-print-list", inputParam ) .then((response) => { @@ -494,7 +496,7 @@ export default { }, //补打-门板 handleReplenishPrint() { - + debugger this.isEdit = true; if (this.multipleSelection == null || this.multipleSelection.length == 0) { this.$message({ @@ -511,14 +513,17 @@ export default { productLine: this.customerInfo.productLine, beginVin: beginVin1, endVin: endVin1, - m100IdList: [] + //m100IdList: [] + waitPrintIdList: [], + businessType : this.customerInfo.BusinessType }; this.multipleSelection.forEach(itm => { - params.m100IdList.push(itm.id); + //params.m100IdList.push(itm.id); + params.waitPrintIdList.push(itm.id); }); console.log("门板补打输入参数:" + JSON.stringify(params)); - debugger //补打 + //补打 // this.$axios // .posts("/api/newjit/bill-m100/print-menban-packing-list", params) // .then((response) => { @@ -559,7 +564,8 @@ export default { debugger this.$axios .posts( - "/api/newjit/bill-m100/save-menban-report", + //"/api/newjit/bill-m100/save-menban-report", + "/api/newjit/wait-print/save-menban-report", input ) .then((response) => { @@ -574,49 +580,76 @@ export default { return; } else if (response.status === true) { let loadInput = response.item; - //------------------------------------------- + debugger + //传给grid++接口json数据,得到返回的文件base64 + //this.fileQuery.report = "menban"; + this.fileQuery.dataname = JSON.stringify( + response.item + ); + //this.fileQuery.dataname = ""; + console.log("打印json"); + console.log(this.fileQuery.dataname); this.$axios - .posts( - "/api/newjit/bill-m100/load-menban-report", - loadInput - ) - .then((response) => { - console.log("加载门板报表"); - console.log(response); - console.log(response.status); - if (response.status === false) { - this.$message({ - message: response.message, - type: "error", - }); - return; - } else if (response.status === true) { - //传给grid++接口json数据,得到返回的文件base64 - //this.fileQuery.report = "menban"; - this.fileQuery.dataname = JSON.stringify( - response.item - ); - //this.fileQuery.dataname = ""; - console.log("打印json"); - console.log(this.fileQuery.dataname); - this.$axios - .posts( - "/Handlers/Handler1.ashx?report=menban", - qs.stringify(this.fileQuery) - ) - .then((response) => { - console.log("获取文件base64编码"); - console.log(response); - this.formLoading = false; - this.isDisable = false; - this.printpdf(response); //打印我文件流 - }) - .catch((error) => { - this.formLoading = false; - this.isDisable = false; - }); - } - }); + .posts( + "/Handlers/Handler1.ashx?report=menban", + qs.stringify(this.fileQuery) + ) + .then((response) => { + console.log("获取文件base64编码"); + console.log(response); + this.formLoading = false; + this.isDisable = false; + this.printpdf(response); //打印我文件流 + }) + .catch((error) => { + this.formLoading = false; + this.isDisable = false; + }); + + //------------------------------------------- + // this.$axios + // .posts( + // //"/api/newjit/bill-m100/load-menban-report", + // "/api/newjit/wait-print/load-menban-report", + // loadInput + // ) + // .then((response) => { + // console.log("加载门板报表"); + // console.log(response); + // console.log(response.status); + // if (response.status === false) { + // this.$message({ + // message: response.message, + // type: "error", + // }); + // return; + // } else if (response.status === true) { + // //传给grid++接口json数据,得到返回的文件base64 + // //this.fileQuery.report = "menban"; + // this.fileQuery.dataname = JSON.stringify( + // response.item + // ); + // //this.fileQuery.dataname = ""; + // console.log("打印json"); + // console.log(this.fileQuery.dataname); + // this.$axios + // .posts( + // "/Handlers/Handler1.ashx?report=menban", + // qs.stringify(this.fileQuery) + // ) + // .then((response) => { + // console.log("获取文件base64编码"); + // console.log(response); + // this.formLoading = false; + // this.isDisable = false; + // this.printpdf(response); //打印我文件流 + // }) + // .catch((error) => { + // this.formLoading = false; + // this.isDisable = false; + // }); + // } + // }); //------------------------------------------- } }); diff --git a/vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue b/vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue index 523548b..71f0bea 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/budaZHB.vue @@ -304,7 +304,9 @@ export default { newVal.forEach((element) => { this.customerInfo.printType = 2; //2时补打 this.customerInfo.productLine = element.ProductLine; - this.customerInfo.GroupName = element.GroupName + this.customerInfo.GroupName = element.GroupName; + debugger + this.customerInfo.BusinessType = element.BusinessType; }); if (this.customerInfo.productLine != "") { this.getList(); @@ -348,12 +350,12 @@ export default { width: 100, }); - tempsTabs.push({ - label: "版本", - prop: "version", - width: 100, + // tempsTabs.push({ + // label: "版本", + // prop: "version", + // width: 100, - }); + // }); tempsTabs.push({ label: "产线", @@ -363,14 +365,14 @@ export default { }); tempsTabs.push({ label: "柱护板状态", - prop: "printBillNum", + prop: "billStatus", //"printBillNum", width: 110, }); tempsTabs.push({ label: "备注", - prop: "remark", + prop: "description", //remark width: 80, }); @@ -452,6 +454,7 @@ export default { * @param {Object} data */ getList(data) { + debugger this.listLoading = true; let inputParam = {}; if (data != undefined) { @@ -473,11 +476,15 @@ export default { inputParam.productLine = this.customerInfo.productLine; } inputParam.GroupName = this.customerInfo.GroupName; + inputParam.businessType = this.customerInfo.BusinessType; + inputParam.printType = 2; + console.log(476,inputParam) console.log('取柱护板补打列表replenish-print-zhb-list方法输入参数:' + JSON.stringify(this.listQuery)); this.$axios .gets( - "/api/newjit/bill-m100/replenish-print-zhb-list", + //"/api/newjit/bill-m100/replenish-print-zhb-list", + "/api/newjit/wait-print/replenish-print-zhb-list", inputParam ) .then((response) => { @@ -494,6 +501,7 @@ export default { }, //补打-柱护板 handleReplenishPrint() { + debugger this.isEdit = true; if (this.multipleSelection == null || this.multipleSelection.length == 0) { this.$message({ @@ -511,10 +519,11 @@ export default { GroupName: this.customerInfo.GroupName, beginVin: beginVin1, endVin: endVin1, - m100IdList: [] + waitPrintIdList: [], //m100IdList: [], + businessType : this.customerInfo.BusinessType }; this.multipleSelection.forEach(itm => { - params.m100IdList.push(itm.id); + params.waitPrintIdList.push(itm.id); }); console.log("柱护板补打输入参数:" + JSON.stringify(params)); @@ -561,7 +570,8 @@ export default { //传递大众顺序号起止 this.$axios .posts( - "/api/newjit/bill-m100/save-group-zhuhuban-report", + //"/api/newjit/bill-m100/save-group-zhuhuban-report", + "/api/newjit/wait-print/save-group-zhuhuban-report", input ) .then((response) => { @@ -573,51 +583,75 @@ export default { }); return; } else if (response.status === true) { - let loadInput = {}; - loadInput.dataResultType = "1"; //全部打印 - loadInput.reportIdList = response.item; + //传给grid++接口json数据,得到返回的文件base64 + //this.fileQuery.report = "menban"; + this.fileQuery.dataname = JSON.stringify( + response.item + ); + //this.fileQuery.dataname = ""; + console.log("打印json",this.fileQuery.dataname); + this.$axios + .posts( + "/Handlers/Handler1.ashx?report=zhuhuban", + qs.stringify(this.fileQuery) + ) + .then((response) => { + console.log("获取文件base64编码"); + this.formLoading = false; + this.isDisable = false; + this.printpdf(response); //打印我文件流 + }) + .catch((error) => { + this.formLoading = false; + this.isDisable = false; + }); + // let loadInput = {}; + // loadInput.dataResultType = "1"; //全部打印 + // loadInput.reportIdList = response.item; + // //-------------------------------------- //门板 //传递大众顺序号起止 - this.$axios - .posts( - "/api/newjit/bill-m100/load-zhuhuban-report", - loadInput - ) - .then((response) => { - console.log("加载柱护板报表",response,response.status); - if (response.status === false) { - this.$message({ - message: response.message, - type: "error", - }); - return; - } else if (response.status === true) { - //传给grid++接口json数据,得到返回的文件base64 - //this.fileQuery.report = "menban"; - this.fileQuery.dataname = JSON.stringify( - response.item - ); - //this.fileQuery.dataname = ""; - console.log("打印json",this.fileQuery.dataname); - this.$axios - .posts( - "/Handlers/Handler1.ashx?report=zhuhuban", - qs.stringify(this.fileQuery) - ) - .then((response) => { - console.log("获取文件base64编码"); - this.formLoading = false; - this.isDisable = false; - this.printpdf(response); //打印我文件流 - }) - .catch((error) => { - this.formLoading = false; - this.isDisable = false; - }); - } - }); + // this.$axios + // .posts( + // //"/api/newjit/bill-m100/load-zhuhuban-report", + // "/api/newjit/wait-print/load-zhuhuban-report", + // loadInput + // ) + // .then((response) => { + // console.log("加载柱护板报表",response,response.status); + // if (response.status === false) { + // this.$message({ + // message: response.message, + // type: "error", + // }); + // return; + // } else if (response.status === true) { + // //传给grid++接口json数据,得到返回的文件base64 + // //this.fileQuery.report = "menban"; + // this.fileQuery.dataname = JSON.stringify( + // response.item + // ); + // //this.fileQuery.dataname = ""; + // console.log("打印json",this.fileQuery.dataname); + // this.$axios + // .posts( + // "/Handlers/Handler1.ashx?report=zhuhuban", + // qs.stringify(this.fileQuery) + // ) + // .then((response) => { + // console.log("获取文件base64编码"); + // this.formLoading = false; + // this.isDisable = false; + // this.printpdf(response); //打印我文件流 + // }) + // .catch((error) => { + // this.formLoading = false; + // this.isDisable = false; + // }); + // } + // }); //-------------------------------------- } }); diff --git a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue index 9a22c3e..7753f73 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue @@ -60,8 +60,8 @@ @@ -613,7 +613,7 @@ export default { GroupName: undefined }, hostCheckQuery: { - printType: undefined, //0:打印;1:重打;2:补打; + printType: undefined, //0:打印;1:重打;2:补打; -> 1:打印;2:补打 productLine: undefined, beginHostSN: undefined, endHostSN: undefined, @@ -622,7 +622,7 @@ export default { GroupName:undefined }, hostPrintQuery: { - printType: undefined, //0:打印;1:重打;2:补打; + printType: undefined, //0:打印;1:重打;2:补打; -> 1:打印;2:补打 productLine: undefined, beginHostSN: undefined, endHostSN: undefined, @@ -631,7 +631,7 @@ export default { GroupName: undefined, }, vinPrintQuery: { - printType: undefined, //0:打印;1:重打;2:补打; + printType: undefined, //0:打印;1:重打;2:补打; -> 1:打印;2:补打 productLine: undefined, beginHostSN: undefined, endHostSN: undefined, @@ -715,11 +715,11 @@ export default { prop: "vehicleModelCode", width: 120, }); - tempsTabs.push({ - label: "版本", - prop: "version", - width: 150, - }); + // tempsTabs.push({ + // label: "版本", + // prop: "version", + // width: 150, + // }); tempsTabs.push({ label: "R100上线时间", prop: "r100OnlineTime", @@ -741,17 +741,17 @@ export default { width: 120, }); - tempsTabs.push({ - label: "柱护板状态", - prop: "printBillNum", - width: 120, - }); + // tempsTabs.push({ + // label: "柱护板状态", + // prop: "printBillNum", + // width: 120, + // }); - tempsTabs.push({ - label: "备注", - prop: "remark", - width: 120, - }); + // tempsTabs.push({ + // label: "备注", + // prop: "remark", + // width: 120, + // }); return tempsTabs; }, ...mapGetters(["userInfo"]), //获取当前用户信息 @@ -910,7 +910,8 @@ export default { //默认值是12 this.$axios .gets( - "/api/newjit/bill-m100/get-print-start-hostsn2", + //"/api/newjit/bill-m100/get-print-start-hostsn2", + "/api/newjit/wait-print/get-print-start-hostsn2", this.hostSNQuery ) .then((response) => { @@ -931,26 +932,7 @@ export default { this.form.endHostSN = parseInt(this.printNum) + parseInt(this.form.beginHostSN) - 1; } - // this.$axios - // .gets("/api/newjit/bill-m100/get-print-start-hostsn2", this.hostSNQuery) - // .then((response) => { - // if (response.item !== null) { - // this.form.beginHostSN = parseInt(response.item); - // if (val == 12) { - // //门板 - // this.form.endHostSN = parseInt(response.item) + 11; - // } else { - // this.form.endHostSN = - // parseInt(response.item) + parseInt(this.printNum) - 1; - // } - // } else { - // this.$message({ - // message: "获取不到大众顺序号", - // type: "warning", - // }); - // return; - // } - // }); + }, //柱护板打印更改 valueNumChangeZHB(val) { @@ -959,7 +941,8 @@ export default { //默认值是12 this.$axios .gets( - "/api/newjit/bill-m100/get-print-start-hostsn2", + //"/api/newjit/bill-m100/get-print-start-hostsn2", + "/api/newjit/wait-print/get-print-start-hostsn2", this.hostSNQuery ) .then((response) => { @@ -980,26 +963,7 @@ export default { this.form.endHostSN = parseInt(this.printNumZHB) + parseInt(this.form.beginHostSN) - 1; } - // this.$axios - // .gets("/api/newjit/bill-m100/get-print-start-hostsn2", this.hostSNQuery) - // .then((response) => { - // if (response.item !== null) { - // this.form.beginHostSN = parseInt(response.item); - // if (val == 24) { - // //柱护板 - // this.form.endHostSN = parseInt(response.item) + 23; - // } else { - // this.form.endHostSN = - // parseInt(response.item) + this.printNumZHB - 1; - // } - // } else { - // this.$message({ - // message: "获取不到大众顺序号", - // type: "warning", - // }); - // return; - // } - // }); + }, //抽屉 handleDrawerOpen(param) { @@ -1026,12 +990,28 @@ export default { }, /** 导出功能 assembly-cfg-erp/export */ handleDownload() { + debugger this.listLoading = true; + this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode; this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; + + if (this.listQuery.productType === 2) { // 1 门板 2 柱护板 + if (this.listQuery.GroupName == "3") { // 分组名称:2 其它柱护板 3 AC柱护板 + this.listQuery.BusinessType = 3; + } else { + this.listQuery.BusinessType = 2; + } + + } else { + this.listQuery.BusinessType = 1 + } + this.listQuery.PrintType = 1; + console.log(JSON.stringify(this.listQuery)); this.$axios - .posts("/api/newjit/bill-m100/export", this.listQuery) + //.posts("/api/newjit/bill-m100/export", this.listQuery) + .posts("/api/newjit/wait-print/export", this.listQuery) .then((res) => { let filename = res.item; this.$axios @@ -1135,30 +1115,47 @@ export default { return projectTypeKeyValue[type]; }, getList(data) { + /* + http://localhost:44344/api/newjit/wait-print/wait-print-list? + BusinessType=1 业务类型:1 门板 2 其它柱护板 3 柱护板 + &ProductLine=01 打印类型:1 顺序打印 2 补账打印 + &PrintType=1 + &HostSNBegin=1&HostSNEnd=1999 + */ this.listLoading = true; if (data != undefined) { this.listQueryList.SkipCount = (this.page - 1) * data.limit; } else { this.listQueryList.SkipCount = (this.page - 1) * 15; } - if (this.listQuery.productType === 2) { - this.listQueryList.ZHBBillStatus = 2; - } else { - this.listQueryList.ZHBBillStatus = 0; - } - if (this.listQuery.productType === 2) { - this.listQuery.ZHBBillStatus = 2; + if (this.listQuery.productType === 2) { // 1 门板 2 柱护板 + //this.listQueryList.ZHBBillStatus = 2; + if (this.listQuery.GroupName == "3") { // 分组名称:2 其它柱护板 3 AC柱护板 + this.listQueryList.BusinessType = 3; + } else { + this.listQueryList.BusinessType = 2; + } + } else { - this.listQuery.ZHBBillStatus = 0; + //this.listQueryList.ZHBBillStatus = 0; + this.listQueryList.BusinessType = 1 } - this.listQueryList.BillStatus = 2; //状态 + // if (this.listQuery.productType === 2) { + // this.listQuery.ZHBBillStatus = 2; + // } else { + // this.listQuery.ZHBBillStatus = 0; + // } + //this.listQueryList.BillStatus = 2; //状态 this.listQueryList.ProductLine = this.listQuery.productLine; //产线 - this.listQueryList.CanNotPrint = false; //不可打印 - this.listQueryList.GroupName = this.listQuery.GroupName + //this.listQueryList.CanNotPrint = false; //不可打印 + //this.listQueryList.GroupName = this.listQuery.GroupName + this.listQueryList.PrintType = 1; + console.log("日常打印M100查询条件:" + JSON.stringify(this.listQueryList)); //this.click(); this.$axios - .gets("/api/newjit/bill-m100/list", this.listQueryList) + //.gets("/api/newjit/bill-m100/list", this.listQueryList) + .gets("/api/newjit/wait-print/wait-print-list", this.listQueryList) .then((response) => { this.list = response.items; this.totalCount = response.totalCount; @@ -1199,7 +1196,24 @@ export default { }, // 向子组件更新值 valueselectChange(val) { + debugger this.$forceUpdate(); + + + if (this.listQuery.productType === 2) { // 1 门板 2 柱护板 + //this.listQueryList.ZHBBillStatus = 2; + if (this.listQuery.GroupName == "3") { // 分组名称:2 其它柱护板 3 AC柱护板 + this.listQueryList.BusinessType = 3; + } else { + this.listQueryList.BusinessType = 2; + } + + } else { + //this.listQueryList.ZHBBillStatus = 0; + this.listQueryList.BusinessType = 1 + } + + this.customerInfosMB = []; this.customerInfosZHB = []; if (this.listQuery.productType === 1) { @@ -1208,6 +1222,7 @@ export default { { PrintType: 1, ProductLine: this.listQuery.productLine, + BusinessType: this.listQueryList.BusinessType }, ]; } @@ -1217,7 +1232,8 @@ export default { { PrintType: 1, ProductLine: this.listQuery.productLine, - GroupName:this.listQuery.GroupName + GroupName:this.listQuery.GroupName, + BusinessType: this.listQueryList.BusinessType }, ]; } @@ -1284,7 +1300,7 @@ export default { /**打印 */ print() { (this.hostPrintQuery = { - printType: undefined, //0:打印;1:重打;2:补打; + printType: undefined, //0:打印;1:重打;2:补打; -> 1:打印;2:补打 productLine: undefined, beginHostSN: undefined, endHostSN: undefined, @@ -1292,9 +1308,9 @@ export default { endVin: undefined, GroupName: undefined, }), - (this.hostCheckQuery.printType = 0); - this.hostPrintQuery.printType = 0; - this.vinPrintQuery.printType = 0; + (this.hostCheckQuery.printType = 1); + this.hostPrintQuery.printType = 1; + this.vinPrintQuery.printType = 1; if (this.listQuery.productLine === "" ||this.listQuery.productLine === undefined) { this.$message({ message: "请选择生产线", @@ -1323,7 +1339,8 @@ export default { console.log("门板hostsn2参数" + JSON.stringify(this.hostSNQuery)); this.$axios .gets( - "/api/newjit/bill-m100/get-print-start-hostsn2", + //"/api/newjit/bill-m100/get-print-start-hostsn2", + "/api/newjit/wait-print/get-print-start-hostsn2", this.hostSNQuery ) .then((response) => { @@ -1351,7 +1368,8 @@ export default { this.$axios .gets( - "/api/newjit/bill-m100/get-print-start-hostsn2", + //"/api/newjit/bill-m100/get-print-start-hostsn2", + "/api/newjit/wait-print/get-print-start-hostsn2", this.hostSNQuery ) .then((response) => { @@ -1412,16 +1430,16 @@ export default { /**重打 */ rePrint() { (this.hostPrintQuery = { - printType: undefined, //0:打印;1:重打;2:补打; + printType: undefined, //0:打印;1:重打;2:补打; -> 1:打印;2:补打 productLine: undefined, beginHostSN: undefined, endHostSN: undefined, beginVin: undefined, endVin: undefined, }), - (this.hostCheckQuery.printType = 1); - this.hostPrintQuery.printType = 1; - this.vinPrintQuery.printType = 1; + (this.hostCheckQuery.printType = -1); + this.hostPrintQuery.printType = -1; + this.vinPrintQuery.printType = -1; if ( this.listQuery.productLine === "" || this.listQuery.productLine === undefined @@ -1452,7 +1470,7 @@ export default { /**补打 */ makeUpPrint() { (this.hostPrintQuery = { - printType: undefined, //0:打印;1:重打;2:补打; + printType: undefined, //0:打印;1:重打;2:补打; -> 1:打印;2:补打 productLine: undefined, beginHostSN: undefined, endHostSN: undefined, @@ -1563,7 +1581,8 @@ export default { ); this.$axios .posts( - "/api/newjit/bill-m100/check-mb-hostsn-break-num", + //"/api/newjit/bill-m100/check-mb-hostsn-break-num", + "/api/newjit/wait-print/check-mb-hostsn-break-num", this.hostCheckQuery ) .then((response) => { @@ -1608,7 +1627,8 @@ export default { this.isDisable = true; this.$axios .posts( - "/api/newjit/bill-m100/check-zhb-hostsn-break-num", + //"/api/newjit/bill-m100/check-zhb-hostsn-break-num", + "/api/newjit/wait-print/check-zhb-hostsn-break-num", this.hostCheckQuery ) .then((response) => { @@ -1673,7 +1693,8 @@ export default { { this.$axios .posts( - "/api/newjit/bill-m100/save-menban-report", + //"/api/newjit/bill-m100/save-menban-report", + "/api/newjit/wait-print/save-menban-report", this.hostPrintQuery ) .then((response) => { @@ -1686,45 +1707,70 @@ export default { return; } else if (response.status === true) { let loadInput = response.item; - //------------------------------------------- + + //传给grid++接口json数据,得到返回的文件base64 + //this.fileQuery.report = "menban"; + this.fileQuery.dataname = JSON.stringify( + response.item + ); + //this.fileQuery.dataname = ""; + console.log("打印json"); this.$axios - .posts( - "/api/newjit/bill-m100/load-menban-report", - loadInput - ) - .then((response) => { - console.log("加载门板报表"); - if (response.status === false) { - this.$message({ - message: response.message, - type: "error", - }); - return; - } else if (response.status === true) { - //传给grid++接口json数据,得到返回的文件base64 - //this.fileQuery.report = "menban"; - this.fileQuery.dataname = JSON.stringify( - response.item - ); - //this.fileQuery.dataname = ""; - console.log("打印json"); - this.$axios - .posts( - "/Handlers/Handler1.ashx?report=menban", - qs.stringify(this.fileQuery) - ) - .then((response) => { - console.log("获取文件base64编码"); - this.formLoading = false; - this.isDisable = false; - this.printpdf(response); //打印我文件流 - }) - .catch((error) => { - this.formLoading = false; - this.isDisable = false; - }); - } - }); + .posts( + "/Handlers/Handler1.ashx?report=menban", + qs.stringify(this.fileQuery) + ) + .then((response) => { + console.log("获取文件base64编码"); + this.formLoading = false; + this.isDisable = false; + this.printpdf(response); //打印我文件流 + }) + .catch((error) => { + this.formLoading = false; + this.isDisable = false; + }); + + + //------------------------------------------- + // this.$axios + // .posts( + // "/api/newjit/bill-m100/load-menban-report", + // loadInput + // ) + // .then((response) => { + // console.log("加载门板报表"); + // if (response.status === false) { + // this.$message({ + // message: response.message, + // type: "error", + // }); + // return; + // } else if (response.status === true) { + // //传给grid++接口json数据,得到返回的文件base64 + // //this.fileQuery.report = "menban"; + // this.fileQuery.dataname = JSON.stringify( + // response.item + // ); + // //this.fileQuery.dataname = ""; + // console.log("打印json"); + // this.$axios + // .posts( + // "/Handlers/Handler1.ashx?report=menban", + // qs.stringify(this.fileQuery) + // ) + // .then((response) => { + // console.log("获取文件base64编码"); + // this.formLoading = false; + // this.isDisable = false; + // this.printpdf(response); //打印我文件流 + // }) + // .catch((error) => { + // this.formLoading = false; + // this.isDisable = false; + // }); + // } + // }); //------------------------------------------- } }); @@ -1739,7 +1785,9 @@ export default { //传递大众顺序号起止 this.$axios .posts( - "/api/newjit/bill-m100/save-group-zhuhuban-report", + //"/api/newjit/bill-m100/save-group-zhuhuban-report", + "/api/newjit/wait-print/save-group-zhuhuban-report", + this.hostPrintQuery ) .then((response) => { @@ -1751,50 +1799,76 @@ export default { }); return; } else if (response.status === true) { - let loadInput = {}; - loadInput.dataResultType = (isSelAll == true) ? "1" : "2"; - loadInput.reportIdList = response.item; + + //传给grid++接口json数据,得到返回的文件base64 + //this.fileQuery.report = "menban"; + this.fileQuery.dataname = JSON.stringify( + response.item + ); + //this.fileQuery.dataname = ""; + console.log("打印json"); + this.$axios + .posts( + "/Handlers/Handler1.ashx?report=zhuhuban", + qs.stringify(this.fileQuery) + ) + .then((response) => { + console.log("获取文件base64编码"); + this.formLoading = false; + this.isDisable = false; + this.printpdf(response); //打印我文件流 + }) + .catch((error) => { + this.formLoading = false; + this.isDisable = false; + }); + + + // let loadInput = {}; + // loadInput.dataResultType = (isSelAll == true) ? "1" : "2"; + // loadInput.reportIdList = response.item; + //-------------------------------------- //门板 //传递大众顺序号起止 - this.$axios - .posts( - "/api/newjit/bill-m100/load-zhuhuban-report", - loadInput - ) - .then((response) => { - console.log("加载柱护板报表"); - if (response.status === false) { - this.$message({ - message: response.message, - type: "error", - }); - return; - } else if (response.status === true) { - //传给grid++接口json数据,得到返回的文件base64 - //this.fileQuery.report = "menban"; - this.fileQuery.dataname = JSON.stringify( - response.item - ); - //this.fileQuery.dataname = ""; - console.log("打印json"); - this.$axios - .posts( - "/Handlers/Handler1.ashx?report=zhuhuban", - qs.stringify(this.fileQuery) - ) - .then((response) => { - console.log("获取文件base64编码"); - this.formLoading = false; - this.isDisable = false; - this.printpdf(response); //打印我文件流 - }) - .catch((error) => { - this.formLoading = false; - this.isDisable = false; - }); - } - }); + // this.$axios + // .posts( + // "/api/newjit/bill-m100/load-zhuhuban-report", + // loadInput + // ) + // .then((response) => { + // console.log("加载柱护板报表"); + // if (response.status === false) { + // this.$message({ + // message: response.message, + // type: "error", + // }); + // return; + // } else if (response.status === true) { + // //传给grid++接口json数据,得到返回的文件base64 + // //this.fileQuery.report = "menban"; + // this.fileQuery.dataname = JSON.stringify( + // response.item + // ); + // //this.fileQuery.dataname = ""; + // console.log("打印json"); + // this.$axios + // .posts( + // "/Handlers/Handler1.ashx?report=zhuhuban", + // qs.stringify(this.fileQuery) + // ) + // .then((response) => { + // console.log("获取文件base64编码"); + // this.formLoading = false; + // this.isDisable = false; + // this.printpdf(response); //打印我文件流 + // }) + // .catch((error) => { + // this.formLoading = false; + // this.isDisable = false; + // }); + // } + // }); //-------------------------------------- } }); @@ -1823,6 +1897,7 @@ export default { { PrintType: 1, ProductLine: this.PLChildList[0].productLineCode, + BusinessType: this.listQueryList.BusinessType }, ]; } @@ -1839,7 +1914,7 @@ export default { return a.productLineCode - b.productLineCode; }); this.listQuery.productLine = this.PLChildList[0].productLineCode; - this.listQuery.GroupName = this.listQuery.productType == '1' ? undefined : this.PLChildGroupList[0] + this.listQuery.GroupName = this.listQuery.productType == '1' ? undefined : this.PLChildGroupList[0].groupCode this.changeMainTableHeight() this.valueselectChange() //变更打印按钮文字 @@ -1943,7 +2018,7 @@ export default { getPLChildGroupList(){ this.$axios .gets( - "/api/newjit/print-template-configuration/list", + "/api/newjit/print-template-configuration/group-list", ) .then((response) => { if (response.item !== null) {