From a0d7d742ab55d8236dff4b0d0ac771f32912cfe6 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Wed, 22 Nov 2023 15:05:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E6=89=93=E5=8D=B0=E5=89=8D=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=EF=BC=8C=E6=94=B9=E6=B5=8B=E8=AF=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ZhuHuBanReports/ZhuHuBanPrintInputDto.cs | 2 +- .../WY.NewJit.Application.Contracts.xml | 2 +- .../PrintTable/WaitPrintAppService.cs | 36 +++++++- .../PrintTable/WaitPrintAppService_ZHB.cs | 83 ++++++++++++++----- .../MsgCheck/Services/M100DomainService.cs | 4 +- .../basedate/m100Online/normalPritIndex.vue | 7 +- 6 files changed, 106 insertions(+), 28 deletions(-) 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 cebddb2..2a469ac 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 @@ -54,7 +54,7 @@ namespace WY.NewJit.Extends public virtual List WaitPrintIdList { get; set; } /// - /// 1 门板 2 其它柱护板 3 柱护板 + /// 1 门板 2 其它柱护板 3 AC柱护板 /// public virtual string GroupName { get; set; } 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 681d50c..abffb13 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 @@ -575,7 +575,7 @@ - 1 门板 2 其它柱护板 3 柱护板 + 1 门板 2 其它柱护板 3 AC柱护板 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 4db67bc..6dc2cee 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 @@ -828,10 +828,42 @@ namespace WY.NewJit.PrintTable [Route("check-mb-hostsn-break-num")] public virtual async Task> CheckMBHostSNBreakNum(MenBanPrintInputDto input) { - //报文解析时已经校验断号,打印前不用校验 List retLst = new List(); - + //输入起始大众顺序号和 未打印表 中最小大众顺序号校验 + + int minHostSN2 = await _waitPrintRepository.Where(itm => + itm.BusinessType == BusinessTypeEnum.MenBan + && itm.ProductLine == input.ProductLine //生产线 + && itm.PrintType == PrintTypeEnum.OrderPrint //顺序打印 + ).MinAsync(itm => itm.HostSN2); + int minHostSN = minHostSN2 % 100000; + if (input.BeginHostSN != minHostSN) + { + retLst.Add($"输入的大众起始大众顺序号{input.BeginHostSN}和未打印表中的最小大众顺序号{minHostSN2}不相等!"); + return new ListResultDto(retLst); + } + //判断是否断号 + ListResultDto tempLst = await GetMBReportDetailList(input, true); //------------------- + List billLst = tempLst.Item; + bool isBreakNum = billLst.Any(itm => itm.BillStatus == BillStatusEnum.BreakNum); + if (isBreakNum) + { + var breakNumLst = billLst.Where(itm => itm.BillStatus == BillStatusEnum.BreakNum).OrderBy(itm => itm.HostSN2).Select(itm => itm.HostSN2.ToString() + ",").ToList(); + string breakNumStr = string.Concat(breakNumLst); + retLst.Add($"存在断号:{breakNumStr}"); + return new ListResultDto(retLst); + } + //判断未知总成 + bool containNotMatch = billLst.Any(itm => itm.BillStatus == BillStatusEnum.NotMatch); + if (containNotMatch) + { + var lst = billLst.Where(itm => itm.BillStatus == BillStatusEnum.NotMatch).OrderBy(itm => itm.HostSN2).Select(itm => itm.HostSN2.ToString() + ",").ToList(); + string str = string.Concat(lst); + retLst.Add($"存在未知总成:{str}"); + return new ListResultDto(retLst); + } return new ListResultDto(retLst); + } [UnitOfWork(IsDisabled = true)] 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 9f5ae2e..614c4bf 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 @@ -92,7 +92,7 @@ namespace WY.NewJit.PrintTable zhbObj.BeginHostSN = tempLst[0].HostSN.ToString(); zhbObj.EndHostSN = tempLst[tempLst.Count - 1].HostSN.ToString(); } - zhbObj.MinOnlineTime = billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用 + zhbObj.MinOnlineTime = billLst.Count == 0 ? null : billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用 //取当前页的详细信息 foreach (WaitPrint billObj in billLst) @@ -104,7 +104,7 @@ namespace WY.NewJit.PrintTable zhbRec.VIN = billObj.VIN; zhbRec.HostSN = billObj.HostSN; zhbRec.HostSN2 = billObj.HostSN2; - if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) + if (_m100PartDicCache.ContainsKey(billObj.M100Id) && _m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) { //取柱护板-A上C上 if (zhbPartType == "A上C上") @@ -172,7 +172,7 @@ namespace WY.NewJit.PrintTable zhbObj.BeginHostSN = tempLst[0].HostSN.ToString(); zhbObj.EndHostSN = tempLst[tempLst.Count - 1].HostSN.ToString(); } - zhbObj.MinOnlineTime = billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用 + zhbObj.MinOnlineTime = billLst.Count == 0 ? null : billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用 //取当前页的详细信息 @@ -185,7 +185,7 @@ namespace WY.NewJit.PrintTable zhbRec.VIN = billObj.VIN; zhbRec.HostSN = billObj.HostSN; zhbRec.HostSN2 = billObj.HostSN2; - if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) + if (_m100PartDicCache.ContainsKey(billObj.M100Id) && _m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) { //取A柱下、A中 if (zhbPartType == "A柱下A中") @@ -262,14 +262,14 @@ namespace WY.NewJit.PrintTable zhbObj.BeginHostSN = tempLst[0].HostSN.ToString(); zhbObj.EndHostSN = tempLst[tempLst.Count - 1].HostSN.ToString(); } - zhbObj.MinOnlineTime = billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用 + zhbObj.MinOnlineTime = billLst.Count == 0 ? null : billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用 //取当前页的详细信息 foreach (WaitPrint billObj in billLst) { ZhuHuBanPackingRec zhbRec; - if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) + if (_m100PartDicCache.ContainsKey(billObj.M100Id) && _m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) { if (zhbPartType == "B柱上") { @@ -392,7 +392,7 @@ namespace WY.NewJit.PrintTable zhbObj.BeginHostSN = tempLst[0].HostSN.ToString(); zhbObj.EndHostSN = tempLst[tempLst.Count - 1].HostSN.ToString(); } - zhbObj.MinOnlineTime = billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用 + zhbObj.MinOnlineTime = billLst.Count == 0 ? null : billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用 //取当前页的详细信息 foreach (WaitPrint billObj in billLst) @@ -415,7 +415,7 @@ namespace WY.NewJit.PrintTable zhbRec.VIN = billObj.VIN; zhbRec.HostSN = billObj.HostSN; zhbRec.HostSN2 = billObj.HostSN2; - if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) + if (_m100PartDicCache.ContainsKey(billObj.M100Id) && _m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) { if (zhbPartType == "D柱") { @@ -736,19 +736,7 @@ namespace WY.NewJit.PrintTable printBillCnt = input.EndHostSN - input.BeginHostSN + 1; - BusinessTypeEnum busiType; - if (input.GroupName == "2") - { - busiType = BusinessTypeEnum.OtherZhuHuBan; - } - else if (input.GroupName == "3") - { - busiType = BusinessTypeEnum.AC_ZhuHuBan; - } - else - { - throw new Exception("input.GroupName参数值必须是2或3!"); - } + BusinessTypeEnum busiType = GetBusinessType(input.GroupName); int minHostSN2 = await _waitPrintRepository.Where(itm => itm.BusinessType == busiType @@ -788,6 +776,25 @@ namespace WY.NewJit.PrintTable return ret; } + private static BusinessTypeEnum GetBusinessType(string groupName) + { + BusinessTypeEnum busiType; + if (groupName == "2") + { + busiType = BusinessTypeEnum.OtherZhuHuBan; + } + else if (groupName == "3") + { + busiType = BusinessTypeEnum.AC_ZhuHuBan; + } + else + { + throw new Exception("input.GroupName参数值必须是2或3!"); + } + + return busiType; + } + #endregion #region 柱护板公有方法 @@ -818,6 +825,40 @@ namespace WY.NewJit.PrintTable public virtual async Task> CheckZHBHostSNBreakNum(ZhuHuBanPrintInputDto input) { List retLst = new List(); + //输入起始大众顺序号和 未打印表 中最小大众顺序号校验 + BusinessTypeEnum busiType = GetBusinessType(input.GroupName); + + int minHostSN2 = await _waitPrintRepository.Where(itm => + itm.BusinessType == busiType + && itm.ProductLine == input.ProductLine //生产线 + && itm.PrintType == PrintTypeEnum.OrderPrint //顺序打印 + ).MinAsync(itm => itm.HostSN2); + int minHostSN = minHostSN2 % 100000; + if (input.BeginHostSN != minHostSN) + { + retLst.Add($"输入的大众起始大众顺序号{input.BeginHostSN}和未打印表中的最小大众顺序号{minHostSN2}不相等!"); + return new ListResultDto(retLst); + } + //判断是否断号 + ListResultDto tempLst = await GetZHBReportDetailList(input, true); //------------------- + List billLst = tempLst.Item; + bool isBreakNum = billLst.Any(itm => itm.BillStatus == BillStatusEnum.BreakNum); + if (isBreakNum) + { + var breakNumLst = billLst.Where(itm => itm.BillStatus == BillStatusEnum.BreakNum).OrderBy(itm => itm.HostSN2).Select(itm => itm.HostSN2.ToString() + ",").ToList(); + string breakNumStr = string.Concat(breakNumLst); + retLst.Add($"存在断号:{breakNumStr}"); + return new ListResultDto(retLst); + } + //判断未知总成 + bool containNotMatch = billLst.Any(itm => itm.BillStatus == BillStatusEnum.NotMatch); + if (containNotMatch) + { + var lst = billLst.Where(itm => itm.BillStatus == BillStatusEnum.NotMatch).OrderBy(itm => itm.HostSN2).Select(itm => itm.HostSN2.ToString() + ",").ToList(); + string str = string.Concat(lst); + retLst.Add($"存在未知总成:{str}"); + return new ListResultDto(retLst); + } return new ListResultDto(retLst); } 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 94998d6..5608406 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 @@ -90,7 +90,7 @@ namespace WY.NewJit.MsgCheck targetWaitPrint.HostSN2 = breaknum.HostSN2; targetWaitPrint.Description = null; targetWaitPrint.ReceiveTime = null; - //targetWaitPrint.CreationTime = null; + targetWaitPrint.CreationTime = ServerHelper.CurrentDateTime; //targetWaitPrint.CreatorId = null; //targetWaitPrint.LastModificationTime = null; //targetWaitPrint.LastModifierId = null; @@ -186,7 +186,7 @@ namespace WY.NewJit.MsgCheck waitPrint.HostSN2 = (int)m100Ret.HostSN2; waitPrint.Description = m100Ret.Description; waitPrint.ReceiveTime = m100Ret.ReceiveTime; - waitPrint.CreationTime = m100Ret.CreationTime; + waitPrint.CreationTime = ServerHelper.CurrentDateTime; //m100Ret.CreationTime; waitPrint.CreatorId = m100Ret.CreatorId; waitPrint.LastModificationTime = m100Ret.LastModificationTime; waitPrint.LastModifierId = m100Ret.LastModifierId; diff --git a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue index 54a56e7..0eeae5a 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue @@ -689,7 +689,7 @@ export default { computed: { getDefaultField() { var tempsTabs = []; - tempsTabs.push({ label: "流水号", prop: "serialNum", width: 100 }); + //tempsTabs.push({ label: "流水号", prop: "serialNum", width: 100 }); tempsTabs.push({ label: "大众顺序号", prop: "hostSN", width: 120 }); // tempsTabs.push({ // label: "底盘号", @@ -741,6 +741,11 @@ export default { prop: "billStatus", width: 120, }); + tempsTabs.push({ + label: "顺序号", + prop: "hostSN2", + width: 120, + }); // tempsTabs.push({ // label: "柱护板状态",