diff --git a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/QCStatisticsController.cs b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/QCStatisticsController.cs index d6758774..7bb28915 100644 --- a/ZR.Admin.WebApi/Controllers/mes/qc/FQC/QCStatisticsController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/qc/FQC/QCStatisticsController.cs @@ -91,12 +91,12 @@ namespace ZR.Admin.WebApi.Controllers.mes.qc.FQC /// 是否展示细节,展示细节则根据三行,两行合并规则 /// [HttpGet("downloadStatisticsTableExcel")] - public IActionResult DownloadStatisticsTableExcel(DateTime starttime, DateTime endTime, string workorderid, string partnumber, string product_description, string team, int pageNum, int pageSize, int type, bool isShowDetail) + public IActionResult DownloadStatisticsTableExcel(DateTime starttime, DateTime endTime, string workorderid, string partnumber, string product_description, string team, int pageNum, int pageSize, int type, bool isShowDetail,int sortType) { try { string fileName = @"导出统计报表-" + DateTime.Now.ToString("yyyyMMddHHmmss") + "-" + Guid.NewGuid() + ".xlsx"; - List excelDataList = qcStatistics.DownloadStatisticsTableExcel(starttime, endTime, workorderid, partnumber, product_description, team, pageNum, pageSize, type); + List excelDataList = qcStatistics.DownloadStatisticsTableExcel(starttime, endTime, workorderid, partnumber, product_description, team, pageNum, pageSize, type, sortType); XSSFWorkbook workbook = new XSSFWorkbook(); var sheet = workbook.CreateSheet(); // 单元格样式 diff --git a/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs b/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs index 81f7d389..bcef2d24 100644 --- a/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs +++ b/ZR.Admin.WebApi/Controllers/mes/ql/PainLab02Controller.cs @@ -21,17 +21,18 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql /// /// /// 颜色代码 + /// 产品描述 /// /// /// [HttpGet("gettestlist")] - public IActionResult GetTestlist(DateTime starttime, DateTime endTime, string workorderid, int pageNum, int pageSize) + public IActionResult GetTestlist(DateTime starttime, DateTime endTime, string workorderid, string description, int pageNum, int pageSize) { //starttime = starttime.AddHours(8); //endTime = endTime.AddHours(8); // 时间要增加,8个小时 - (List, int) lst = plTestService.GetPLTestTable(starttime, endTime, workorderid, pageNum, pageSize); + (List, int) lst = plTestService.GetPLTestTable(starttime, endTime, workorderid, description, pageNum, pageSize); return ToResponse(new ApiResult(200, "success", lst)); } @@ -89,6 +90,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql PLTest pLTest = new PLTest(); pLTest.Id = pLTestDto.Id; pLTest.IdGroup = pLTestDto.plIdGroup; + pLTest.Description = pLTestDto.Description; pLTest.Code = pLTestDto.plCode; pLTest.Dt = pLTestDto.plDt; pLTest.Value01 = pLTestDto.plValue01; diff --git a/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs b/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs index 9d15c0ed..d6169ba8 100644 --- a/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs +++ b/ZR.Admin.WebApi/Controllers/mes/ql/PainLab03Controller.cs @@ -25,13 +25,13 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql /// /// [HttpGet("getbatchlist")] - public IActionResult GetBatchlist(DateTime starttime, DateTime endTime, string workorderid, int pageNum, int pageSize) + public IActionResult GetBatchlist(DateTime starttime, DateTime endTime, string workorderid, string description, int pageNum, int pageSize) { //starttime = starttime.AddHours(8); //endTime = endTime.AddHours(8); // 时间要增加,8个小时 - (List, int) lst = plBatchService.GetPLBatchTable(starttime, endTime, workorderid, pageNum, pageSize); + (List, int) lst = plBatchService.GetPLBatchTable(starttime, endTime, workorderid, description, pageNum, pageSize); return ToResponse(new ApiResult(200, "success", lst)); } @@ -89,6 +89,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql PLBatch pLBatch = new PLBatch(); pLBatch.Id = pLBatchDto.Id; pLBatch.IdGroup = pLBatchDto.plIdGroup; + pLBatch.Description = pLBatchDto.Description; pLBatch.Code = pLBatchDto.plCode; pLBatch.Dt = pLBatchDto.plDt; pLBatch.Value01 = pLBatchDto.plValue01; diff --git a/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs b/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs index 59af6f7c..ab4bba51 100644 --- a/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs +++ b/ZR.Admin.WebApi/Controllers/mes/ql/PainLabController.cs @@ -41,13 +41,13 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql /// 页大小 /// [HttpGet("getrawmateriallist")] - public IActionResult GetRawMateriallist(DateTime starttime, DateTime endTime, string workorderid,string partnumber,int pageNum, int pageSize) + public IActionResult GetRawMateriallist(DateTime starttime, DateTime endTime, string workorderid,string partnumber,string description, int pageNum, int pageSize) { //starttime = starttime.AddHours(8); //endTime = endTime.AddHours(8); // 时间要增加,8个小时 - (List, int) lst = plRawMaterialService.GetRawMaterialTable(starttime, endTime, workorderid, partnumber,pageNum, pageSize); + (List, int) lst = plRawMaterialService.GetRawMaterialTable(starttime, endTime, workorderid, partnumber, description, pageNum, pageSize); return ToResponse(new ApiResult(200, "success", lst)); } @@ -105,6 +105,7 @@ namespace ZR.Admin.WebApi.Controllers.mes.ql PLRawMaterial pLRawMaterial = new PLRawMaterial(); pLRawMaterial.Id = pLRawMaterialDto.Id; pLRawMaterial.IdGroup = pLRawMaterialDto.plIdGroup; + pLRawMaterial.Description = pLRawMaterialDto.Description; pLRawMaterial.Code = pLRawMaterialDto.plCode; pLRawMaterial.Pci = pLRawMaterialDto.plPci; pLRawMaterial.Value01 = pLRawMaterialDto.plValue01; diff --git a/ZR.Model/MES/ql/DTO/PLBatchDto.cs b/ZR.Model/MES/ql/DTO/PLBatchDto.cs index 61ce6965..2ababb18 100644 --- a/ZR.Model/MES/ql/DTO/PLBatchDto.cs +++ b/ZR.Model/MES/ql/DTO/PLBatchDto.cs @@ -16,6 +16,11 @@ /// public string plIdGroup { get; set; } + /// + /// 产品描述 + /// + public string Description { get; set; } + /// /// 颜色/代号 /// diff --git a/ZR.Model/MES/ql/DTO/PLRawMaterialDto.cs b/ZR.Model/MES/ql/DTO/PLRawMaterialDto.cs index 39cad423..90886f37 100644 --- a/ZR.Model/MES/ql/DTO/PLRawMaterialDto.cs +++ b/ZR.Model/MES/ql/DTO/PLRawMaterialDto.cs @@ -16,6 +16,11 @@ /// public string plIdGroup { get; set; } + /// + /// 产品描述 + /// + public string Description { get; set; } + /// /// 颜色/代号 /// diff --git a/ZR.Model/MES/ql/DTO/PLTestDto.cs b/ZR.Model/MES/ql/DTO/PLTestDto.cs index 2446e23b..55663cbf 100644 --- a/ZR.Model/MES/ql/DTO/PLTestDto.cs +++ b/ZR.Model/MES/ql/DTO/PLTestDto.cs @@ -16,6 +16,11 @@ /// public string plIdGroup { get; set; } + /// + /// 产品描述 + /// + public string Description { get; set; } + /// /// 颜色/代号 /// diff --git a/ZR.Model/MES/ql/PLBatch.cs b/ZR.Model/MES/ql/PLBatch.cs index e6970541..a1bf312c 100644 --- a/ZR.Model/MES/ql/PLBatch.cs +++ b/ZR.Model/MES/ql/PLBatch.cs @@ -19,6 +19,13 @@ [SugarColumn(ColumnName = "id_group")] public string IdGroup { get; set; } + + /// + /// 产品描述 + /// + [SugarColumn(ColumnName = "description")] + public string Description { get; set; } + /// /// 日期 /// diff --git a/ZR.Model/MES/ql/PLRawMaterial.cs b/ZR.Model/MES/ql/PLRawMaterial.cs index d829f8c0..ffb9d714 100644 --- a/ZR.Model/MES/ql/PLRawMaterial.cs +++ b/ZR.Model/MES/ql/PLRawMaterial.cs @@ -19,6 +19,12 @@ [SugarColumn(ColumnName = "id_group")] public string IdGroup { get; set; } + /// + /// 产品描述 + /// + [SugarColumn(ColumnName = "description")] + public string Description { get; set; } + /// /// 颜色/代号 /// diff --git a/ZR.Model/MES/ql/PLTest.cs b/ZR.Model/MES/ql/PLTest.cs index 0bbc13b6..b26f94e6 100644 --- a/ZR.Model/MES/ql/PLTest.cs +++ b/ZR.Model/MES/ql/PLTest.cs @@ -19,6 +19,12 @@ [SugarColumn(ColumnName = "id_group")] public string IdGroup { get; set; } + /// + /// 产品描述 + /// + [SugarColumn(ColumnName = "description")] + public string Description { get; set; } + /// /// 日期 /// diff --git a/ZR.Service/mes/qc/IService/IQCStatisticsService.cs b/ZR.Service/mes/qc/IService/IQCStatisticsService.cs index 14d1e192..b780b840 100644 --- a/ZR.Service/mes/qc/IService/IQCStatisticsService.cs +++ b/ZR.Service/mes/qc/IService/IQCStatisticsService.cs @@ -82,6 +82,7 @@ namespace ZR.Service.mes.qc.IService /// /// /// + /// 排序描述 /// List DownloadStatisticsTableExcel( DateTime starttime, @@ -92,7 +93,8 @@ namespace ZR.Service.mes.qc.IService string team, int pageNum, int pageSize, - int type + int type, + int sortType ); } } diff --git a/ZR.Service/mes/qc/QCStatisticsService.cs b/ZR.Service/mes/qc/QCStatisticsService.cs index c7c2e9e3..1ccdc9ec 100644 --- a/ZR.Service/mes/qc/QCStatisticsService.cs +++ b/ZR.Service/mes/qc/QCStatisticsService.cs @@ -395,7 +395,8 @@ namespace ZR.Service.mes.qc string team, int pageNum, int pageSize, - int type + int type, + int sortType = 0 ) { try @@ -414,7 +415,8 @@ namespace ZR.Service.mes.qc product_description, team, pageNum, - pageSize + pageSize, + sortType ), // 抛光 2 @@ -426,7 +428,8 @@ namespace ZR.Service.mes.qc product_description, team, pageNum, - pageSize + pageSize, + sortType ), // 包装 3 @@ -438,7 +441,8 @@ namespace ZR.Service.mes.qc product_description, team, pageNum, - pageSize + pageSize, + sortType ), // 总表 4 @@ -450,7 +454,8 @@ namespace ZR.Service.mes.qc product_description, team, pageNum, - pageSize + pageSize, + sortType ), _ => throw new Exception("获取的报表类型错误!" + type), }; @@ -469,7 +474,8 @@ namespace ZR.Service.mes.qc string product_description, string team, int pageNum, - int pageSize + int pageSize, + int sortType ) { List list = GetQualityStatisticsTable_first( @@ -480,7 +486,8 @@ namespace ZR.Service.mes.qc product_description, team, pageNum, - pageSize + pageSize, + sortType ).Item1; List newList = list.Select( item => new QcQualityStatisticsFirstDto() @@ -548,7 +555,8 @@ namespace ZR.Service.mes.qc string product_description, string team, int pageNum, - int pageSize + int pageSize, + int sortType ) { List list = GetQualityStatisticsTable_again( @@ -559,7 +567,8 @@ namespace ZR.Service.mes.qc product_description, team, pageNum, - pageSize + pageSize, + sortType ).Item1; List newList = list.Select( item => new QcQualityStatisticsFirstDto() @@ -627,7 +636,8 @@ namespace ZR.Service.mes.qc string product_description, string team, int pageNum, - int pageSize + int pageSize, + int sortType ) { List list = GetQualityStatisticsTable_final( @@ -638,7 +648,8 @@ namespace ZR.Service.mes.qc product_description, team, pageNum, - pageSize + pageSize, + sortType ).Item1; List newList = list.Select( item => new QcQualityStatisticsFirstDto() @@ -706,7 +717,8 @@ namespace ZR.Service.mes.qc string product_description, string team, int pageNum, - int pageSize + int pageSize, + int sortType ) { List list = GetQualityStatisticsTable_total( @@ -717,7 +729,8 @@ namespace ZR.Service.mes.qc product_description, team, pageNum, - pageSize + pageSize, + sortType ).Item1; List newList = list.Select( item => new QcQualityStatisticsFirstDto() diff --git a/ZR.Service/mes/ql/IService/IPLBatchService.cs b/ZR.Service/mes/ql/IService/IPLBatchService.cs index e458ed8c..af5d6302 100644 --- a/ZR.Service/mes/ql/IService/IPLBatchService.cs +++ b/ZR.Service/mes/ql/IService/IPLBatchService.cs @@ -7,7 +7,7 @@ namespace ZR.Service.mes.ql.IService public interface IPLBatchService { - public (List, int) GetPLBatchTable(DateTime starttime, DateTime endTime, string code, int pageNum, int pageSize); + public (List, int) GetPLBatchTable(DateTime starttime, DateTime endTime, string code,string description, int pageNum, int pageSize); public int AddPLBatchRecords(int num, int size); diff --git a/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs b/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs index 3e16183c..57f263af 100644 --- a/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs +++ b/ZR.Service/mes/ql/IService/IPLRawMaterialService.cs @@ -7,7 +7,7 @@ namespace ZR.Service.mes.ql.IService public interface IPLRawMaterialService { - public (List, int) GetRawMaterialTable(DateTime starttime, DateTime endTime, string pci, string colorCode, int pageNum, int pageSize); + public (List, int) GetRawMaterialTable(DateTime starttime, DateTime endTime, string pci, string colorCode,string description, int pageNum, int pageSize); public int AddRawMaterialRecords(int num, int size); diff --git a/ZR.Service/mes/ql/IService/IPLTestService.cs b/ZR.Service/mes/ql/IService/IPLTestService.cs index 6e32b125..332e8c05 100644 --- a/ZR.Service/mes/ql/IService/IPLTestService.cs +++ b/ZR.Service/mes/ql/IService/IPLTestService.cs @@ -7,7 +7,7 @@ namespace ZR.Service.mes.ql.IService public interface IPLTestService { - public (List, int) GetPLTestTable(DateTime starttime, DateTime endTime, string code, int pageNum, int pageSize); + public (List, int) GetPLTestTable(DateTime starttime, DateTime endTime, string code,string description, int pageNum, int pageSize); public int AddPLTestRecords(int num, int size); diff --git a/ZR.Service/mes/ql/PLBatchService.cs b/ZR.Service/mes/ql/PLBatchService.cs index 91da8ad3..ddce4e4c 100644 --- a/ZR.Service/mes/ql/PLBatchService.cs +++ b/ZR.Service/mes/ql/PLBatchService.cs @@ -66,7 +66,7 @@ namespace ZR.Service.mes.ql /// /// /// - public (List, int) GetPLBatchTable(DateTime starttime, DateTime endTime, string code, int pageNum, int pageSize) + public (List, int) GetPLBatchTable(DateTime starttime, DateTime endTime, string code,string description, int pageNum, int pageSize) { starttime = starttime.ToLocalTime(); endTime = endTime.ToLocalTime(); @@ -75,6 +75,7 @@ namespace ZR.Service.mes.ql .AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.CreatedTime >= starttime.ToLocalTime()) .AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.CreatedTime <= endTime.ToLocalTime()) .AndIF(!string.IsNullOrEmpty(code), it => it.Code.Contains(code)) + .AndIF(!string.IsNullOrEmpty(description), it => it.Description.Contains(description)) .ToExpression(); //int totalNum = 0; @@ -103,6 +104,7 @@ namespace ZR.Service.mes.ql { Id = 0, IdGroup = DateTime.Now.ToString("yyyyMMddHHmmssfff"), + Description = "", Dt = "", Code = "", Value01 = "", diff --git a/ZR.Service/mes/ql/PLRawMaterialService.cs b/ZR.Service/mes/ql/PLRawMaterialService.cs index 0d2b783a..b0298d58 100644 --- a/ZR.Service/mes/ql/PLRawMaterialService.cs +++ b/ZR.Service/mes/ql/PLRawMaterialService.cs @@ -58,7 +58,7 @@ namespace ZR.Service.mes.ql /// 查询数据记录,要改成分页查询 /// /// - public (List, int) GetRawMaterialTable(DateTime starttime, DateTime endTime, string pci, string colorCode, int pageNum, int pageSize) + public (List, int) GetRawMaterialTable(DateTime starttime, DateTime endTime, string pci, string colorCode,string description, int pageNum, int pageSize) { starttime = starttime.ToLocalTime(); endTime = endTime.ToLocalTime(); @@ -68,6 +68,7 @@ namespace ZR.Service.mes.ql .AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.CreatedTime <= endTime.ToLocalTime()) .AndIF(!string.IsNullOrEmpty(pci), it => it.Pci.Contains(pci)) .AndIF(!string.IsNullOrEmpty(colorCode), it => it.Pci.Contains(colorCode)) + .AndIF(!string.IsNullOrEmpty(description), it => it.Description.Contains(description)) .ToExpression(); @@ -113,6 +114,7 @@ namespace ZR.Service.mes.ql { Id = 0, IdGroup = DateTime.Now.ToString("yyyyMMddHHmmssfff"), + Description = "", Code = "", Pci = "", Value01 = "", diff --git a/ZR.Service/mes/ql/PLTestService.cs b/ZR.Service/mes/ql/PLTestService.cs index 56979436..b80ec5ef 100644 --- a/ZR.Service/mes/ql/PLTestService.cs +++ b/ZR.Service/mes/ql/PLTestService.cs @@ -66,7 +66,7 @@ namespace ZR.Service.mes.ql /// /// /// - public (List, int) GetPLTestTable(DateTime starttime, DateTime endTime, string code, int pageNum, int pageSize) + public (List, int) GetPLTestTable(DateTime starttime, DateTime endTime, string code,string description, int pageNum, int pageSize) { starttime = starttime.ToLocalTime(); endTime = endTime.ToLocalTime(); @@ -75,6 +75,7 @@ namespace ZR.Service.mes.ql .AndIF(starttime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.CreatedTime >= starttime.ToLocalTime()) .AndIF(endTime > new DateTime(2023, 1, 1, 0, 0, 0), it => it.CreatedTime <= endTime.ToLocalTime()) .AndIF(!string.IsNullOrEmpty(code), it => it.Code.Contains(code)) + .AndIF(!string.IsNullOrEmpty(description), it => it.Description.Contains(description)) .ToExpression(); //int totalNum = 0; @@ -103,6 +104,7 @@ namespace ZR.Service.mes.ql { Id = 0, IdGroup = DateTime.Now.ToString("yyyyMMddHHmmssfff"), + Description = "", Dt = "", Code = "", Value01 = "",