From 3e26937d9322f838a407014fe75a5d62a4c64804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AD=A3=E6=98=93?= Date: Tue, 15 Apr 2025 14:34:04 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/qc/FQC/QCStatisticsController.cs | 2 +- ZR.Model/MES/qc/QcQualityStatisticsAgain.cs | 2 +- ZR.Service/mes/echarts/FQCEchartsService.cs | 2 +- ZR.Service/mes/qc/QCStatisticsService.cs | 16 ++++++++-------- ZR.Service/mes/qc/QcGp12Service.cs | 4 ++++ ZR.Service/mes/wms/WmBlankRecordService.cs | 18 ++++++++++-------- .../mes/wms/WmOneTimeInventoryService.cs | 2 ++ ZR.Service/mes/wms/WmPolishInventoryService.cs | 2 ++ 8 files changed, 29 insertions(+), 19 deletions(-) diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/QCStatisticsController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/QCStatisticsController.cs index 523ffa3b..bd041dcc 100644 --- a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/QCStatisticsController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/QCStatisticsController.cs @@ -125,7 +125,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.FQC "水斑", "脏点", "变形","油珠","脱落","撞伤","其他", "毛刺", "缩印", "擦伤","砂印","流痕","开裂", "流挂", "色漆 缺漆", "清漆缺漆","桔皮","其他", - "下件擦伤", "清漆漆块", "色漆漆块","发花","亮斑","喷漏",}; + "下件擦伤", "清漆漆块", "色漆漆块","发花","停机","喷漏",}; // 标题列位于第几行 int startTitle = 0; if (isShowDetail) diff --git a/ZR.Model/MES/qc/QcQualityStatisticsAgain.cs b/ZR.Model/MES/qc/QcQualityStatisticsAgain.cs index 287a7775..6bf7344b 100644 --- a/ZR.Model/MES/qc/QcQualityStatisticsAgain.cs +++ b/ZR.Model/MES/qc/QcQualityStatisticsAgain.cs @@ -235,7 +235,7 @@ [SugarColumn(ColumnName = "team_fahua")] public int? TeamFahua { get; set; } /// - /// 班组操作-亮斑 + /// 班组操作-亮斑 改为停机 /// [SugarColumn(ColumnName = "team_liangbang")] public int? TeamLiangbang { get; set; } diff --git a/ZR.Service/mes/echarts/FQCEchartsService.cs b/ZR.Service/mes/echarts/FQCEchartsService.cs index dd7946e7..cc3c96c9 100644 --- a/ZR.Service/mes/echarts/FQCEchartsService.cs +++ b/ZR.Service/mes/echarts/FQCEchartsService.cs @@ -346,7 +346,7 @@ namespace ZR.Service.MES.md "清漆漆块", "色漆漆块", "发花", - "亮斑", + "停机", "喷漏", }; string[] detailColDict = diff --git a/ZR.Service/mes/qc/QCStatisticsService.cs b/ZR.Service/mes/qc/QCStatisticsService.cs index d8d51f60..2c7b2151 100644 --- a/ZR.Service/mes/qc/QCStatisticsService.cs +++ b/ZR.Service/mes/qc/QCStatisticsService.cs @@ -47,11 +47,11 @@ namespace ZR.Service.mes.qc .Create() //XXX:修改查询日期查询的字段 .AndIF( - starttime > new DateTime(2023, 1, 1, 0, 0, 0), + starttime > DateTime.MinValue && string.IsNullOrEmpty(workorderid), it => it.StartTime >= starttime.ToLocalTime() ) .AndIF( - endTime > new DateTime(2023, 1, 1, 0, 0, 0), + endTime > DateTime.MinValue && string.IsNullOrEmpty(workorderid), it => it.StartTime <= endTime.ToLocalTime() ) .AndIF( @@ -130,11 +130,11 @@ namespace ZR.Service.mes.qc .Create() //XXX:修改查询日期查询的字段 .AndIF( - starttime > new DateTime(2023, 1, 1, 0, 0, 0), + starttime > DateTime.MinValue && string.IsNullOrEmpty(workorderid), it => it.StartTime >= starttime.ToLocalTime() ) .AndIF( - endTime > new DateTime(2023, 1, 1, 0, 0, 0), + endTime > DateTime.MinValue && string.IsNullOrEmpty(workorderid), it => it.StartTime <= endTime.ToLocalTime() ) .AndIF( @@ -213,11 +213,11 @@ namespace ZR.Service.mes.qc .Create() //XXX:修改查询日期查询的字段 .AndIF( - starttime > new DateTime(2023, 1, 1, 0, 0, 0), + starttime > DateTime.MinValue && string.IsNullOrEmpty(workorderid), it => it.StartTime >= starttime.ToLocalTime() ) .AndIF( - endTime > new DateTime(2023, 1, 1, 0, 0, 0), + endTime > DateTime.MinValue && string.IsNullOrEmpty(workorderid), it => it.StartTime <= endTime.ToLocalTime() ) .AndIF( @@ -296,11 +296,11 @@ namespace ZR.Service.mes.qc .Create() //XXX:修改查询日期查询的字段 .AndIF( - starttime > new DateTime(2023, 1, 1, 0, 0, 0), + starttime > DateTime.MinValue && string.IsNullOrEmpty(workorderid), it => it.StartTime >= starttime.ToLocalTime() ) .AndIF( - endTime > new DateTime(2023, 1, 1, 0, 0, 0), + endTime > DateTime.MinValue && string.IsNullOrEmpty(workorderid), it => it.StartTime <= endTime.ToLocalTime() ) .AndIF( diff --git a/ZR.Service/mes/qc/QcGp12Service.cs b/ZR.Service/mes/qc/QcGp12Service.cs index 27194887..8bf15958 100644 --- a/ZR.Service/mes/qc/QcGp12Service.cs +++ b/ZR.Service/mes/qc/QcGp12Service.cs @@ -439,6 +439,10 @@ namespace ZR.Service.Business { try { + if(string.IsNullOrEmpty(data.DefectCode)) + { + throw new Exception("缺陷项传入为空!"); + } Context.Ado.BeginTran(); DateTime nowTime = DateTime.Now; // 获取缺陷信息 diff --git a/ZR.Service/mes/wms/WmBlankRecordService.cs b/ZR.Service/mes/wms/WmBlankRecordService.cs index e03bd688..649d7de4 100644 --- a/ZR.Service/mes/wms/WmBlankRecordService.cs +++ b/ZR.Service/mes/wms/WmBlankRecordService.cs @@ -334,17 +334,19 @@ namespace ZR.Service.mes.wms throw new Exception("工单记录不存在!" + workOrderId); } //TODO 20250325 remark1 存在不扣,则不扣除 - if (workOrderInfo.Remark1.Contains("不扣")) + if (workOrderInfo.Remark1 != null) { - Context.Ado.CommitTran(); - return 0; + if (workOrderInfo.Remark1.Contains("不扣")) + { + Context.Ado.RollbackTran(); + return 0; + } + if (workOrderInfo.Remark1.Contains("返工")) + { + type = 2; + } } - - if (workOrderInfo.Remark1.Contains("返工")) - { - type = 2; - } // 根据工单查看毛坯库存数据记录 WmBlankInventory blankInventory = Context .Queryable() diff --git a/ZR.Service/mes/wms/WmOneTimeInventoryService.cs b/ZR.Service/mes/wms/WmOneTimeInventoryService.cs index e7056ed7..1e4f876b 100644 --- a/ZR.Service/mes/wms/WmOneTimeInventoryService.cs +++ b/ZR.Service/mes/wms/WmOneTimeInventoryService.cs @@ -242,6 +242,8 @@ namespace ZR.Service.mes.wms .Queryable() .LeftJoin((m, p) => m.Partnumber == p.Partnumber) .Distinct() + .Where((m, p) => !m.Description.Contains("倒车雷达")) + .Where((m, p) => !m.Description.Contains("AH8")) .WhereIF( !string.IsNullOrEmpty(parm.Description), (m, p) => m.Description.Contains(parm.Description) diff --git a/ZR.Service/mes/wms/WmPolishInventoryService.cs b/ZR.Service/mes/wms/WmPolishInventoryService.cs index c7c063eb..db6c99e5 100644 --- a/ZR.Service/mes/wms/WmPolishInventoryService.cs +++ b/ZR.Service/mes/wms/WmPolishInventoryService.cs @@ -258,6 +258,8 @@ namespace ZR.Service.mes.wms .Queryable() .LeftJoin((m, p) => m.Partnumber == p.Partnumber) .Distinct() + .Where((m, p) => !m.Description.Contains("倒车雷达")) + .Where((m, p) => !m.Description.Contains("AH8")) .WhereIF( !string.IsNullOrEmpty(parm.Description), (m, p) => m.Description.Contains(parm.Description)