From 42787c15204111fc55c2db3327006d17b40a51e4 Mon Sep 17 00:00:00 2001 From: fei550 <1420031550@qq.com> Date: Thu, 20 Aug 2026 10:47:12 +0800 Subject: [PATCH] =?UTF-8?q?feat(hjgl):=20=E5=AE=8C=E5=96=84=E7=84=8A?= =?UTF-8?q?=E6=8E=A5=E6=97=A5=E6=8A=A5=E5=AE=A1=E6=A0=B8=E4=B8=8E=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 统一 PC 端与接口的待审核查询、状态筛选和分页逻辑,补充日报查询参数及焊接信息展示,并调整试压包和焊口列表页面。 --- SGGL/BLL/API/HJGL/APIWeldReportService.cs | 17 +++ .../HJGL/WeldingManage/WeldingDailyService.cs | 135 ++++++++++++------ .../HJGL/TestPackage/TestPackageEdit.aspx | 15 +- .../HJGL/TestPackage/TestPackageEdit.aspx.cs | 12 +- .../TestPackageEdit.aspx.designer.cs | 27 ---- .../HJGL/WeldingManage/WeldJointList.aspx | 4 +- .../HJGL/WeldingManage/WeldReport.aspx | 6 + .../HJGL/WeldingManage/WeldReport.aspx.cs | 36 +++-- .../WeldingManage/WeldReport.aspx.designer.cs | 9 ++ .../HJGL/WeldingDailyTempDetailItem.cs | 54 ++++++- .../PreWeldingDailyController.cs | 10 +- 11 files changed, 212 insertions(+), 113 deletions(-) diff --git a/SGGL/BLL/API/HJGL/APIWeldReportService.cs b/SGGL/BLL/API/HJGL/APIWeldReportService.cs index 7076594b..ccbf15ec 100644 --- a/SGGL/BLL/API/HJGL/APIWeldReportService.cs +++ b/SGGL/BLL/API/HJGL/APIWeldReportService.cs @@ -15,6 +15,23 @@ namespace BLL ParseWeldingDate(weldingDate), pipelineCode, welderCode); } + public static List GetPendingWeldingDailyTempDetailList( + string projectId, string unitWorkId, string weldingDate, string pipelineCode, + string welderCode, int pageIndex, out int totalCount) + { + return WeldingDailyService.GetWeldingDailyTempDetailList(new Model.WeldingDailyTempDetailInput + { + ProjectId = projectId, + UnitWorkId = unitWorkId, + WeldingDate = ParseWeldingDate(weldingDate), + PipelineCode = pipelineCode, + WelderCode = welderCode, + // API页码从1开始,业务层页索引从0开始;非正数继续兼容返回全部数据。 + PageIndex = pageIndex > 0 ? (int?)(pageIndex - 1) : null, + PageSize = pageIndex > 0 ? (int?)Funs.PageSize : null + }, out totalCount); + } + public static Model.WeldingDailyTempDetailItem GetPendingWeldingDailyTempDetail(string tempDetailId) { return WeldingDailyService.GetWeldingDailyTempDetailById(tempDetailId); diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs index 516aec11..7943929a 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs @@ -338,29 +338,27 @@ namespace BLL return new List(); } - var query = QueryPendingWeldingDailyTempDetails().AsQueryable(); - query = query.Where(x => x.ProjectId == projectId); - if (!string.IsNullOrEmpty(unitWorkId)) + int totalCount; + return GetWeldingDailyTempDetailList(new Model.WeldingDailyTempDetailInput { - query = query.Where(x => x.UnitWorkId == unitWorkId); - } - if (weldingDate.HasValue) - { - DateTime startDate = weldingDate.Value.Date; - DateTime endDate = startDate.AddDays(1); - query = query.Where(x => x.WeldingDate >= startDate && x.WeldingDate < endDate); - } - if (!string.IsNullOrEmpty(pipelineCode)) - { - query = query.Where(x => x.PipelineCode != null && x.PipelineCode.Contains(pipelineCode)); - } - if (!string.IsNullOrEmpty(welderCode)) - { - query = query.Where(x => (x.CoverWelderCode != null && x.CoverWelderCode.Contains(welderCode)) - || (x.BackingWelderCode != null && x.BackingWelderCode.Contains(welderCode))); - } + ProjectId = projectId, + UnitWorkId = unitWorkId, + WeldingDate = weldingDate, + PipelineCode = pipelineCode, + WelderCode = welderCode + }, out totalCount); + } - return query.OrderBy(x => x.PipelineCode).ThenBy(x => x.WeldJointCode).ToList(); + /// + /// 按查询参数获取焊接日报待审核明细列表。 + /// + /// 查询及分页条件 + /// 分页前总记录数 + /// 待审核明细列表 + public static List GetWeldingDailyTempDetailList( + Model.WeldingDailyTempDetailInput input, out int totalCount) + { + return QueryPendingWeldingDailyTempDetails(input, out totalCount); } /// @@ -375,20 +373,59 @@ namespace BLL return null; } - return QueryPendingWeldingDailyTempDetails().FirstOrDefault(x => x.TempDetailId == tempDetailId); + int totalCount; + return QueryPendingWeldingDailyTempDetails(new Model.WeldingDailyTempDetailInput + { + TempDetailId = tempDetailId, + PageIndex = 0, + PageSize = 1 + }, out totalCount).FirstOrDefault(); } /// /// 构造待审核查询。PC端列表和接口列表、明细均从这里读取,确保字段映射和待审核状态一致。 /// - private static List QueryPendingWeldingDailyTempDetails() + /// 查询及分页条件 + /// 分页前总记录数 + private static List QueryPendingWeldingDailyTempDetails( + Model.WeldingDailyTempDetailInput input, out int totalCount) { + input = input ?? new Model.WeldingDailyTempDetailInput(); + if (input.ProjectId != null && string.IsNullOrWhiteSpace(input.ProjectId)) + { + totalCount = 0; + return new List(); + } + List data; using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - // 查询必须在数据上下文释放前物化,避免返回失效的延迟查询。 - data = (from temp in db.HJGL_WeldingDailyTempDetail - join jotItem in db.View_HJGL_WeldJoint on temp.WeldJointId equals jotItem.WeldJointId into jotItems + var tempQuery = db.HJGL_WeldingDailyTempDetail + .Where(x => x.AuditState != AuditStateApproved); + if (!string.IsNullOrEmpty(input.TempDetailId)) + { + tempQuery = tempQuery.Where(x => x.TempDetailId == input.TempDetailId); + } + if (!string.IsNullOrEmpty(input.ProjectId)) + { + tempQuery = tempQuery.Where(x => x.ProjectId == input.ProjectId); + } + if (!string.IsNullOrEmpty(input.UnitWorkId)) + { + tempQuery = tempQuery.Where(x => x.UnitWorkId == input.UnitWorkId); + } + if (input.WeldingDate.HasValue) + { + tempQuery = tempQuery.Where(x => x.WeldingDate == input.WeldingDate); + } + if (input.AuditState.HasValue) + { + tempQuery = tempQuery.Where(x => x.AuditState == input.AuditState.Value); + } + + // 主表条件先过滤,再执行关联和文本条件,避免无关待审核记录参与联表。 + var query = from temp in tempQuery + join jotItem in db.HJGL_WeldJoint on temp.WeldJointId equals jotItem.WeldJointId into jotItems from jot in jotItems.DefaultIfEmpty() join coverItem in db.SitePerson_Person on temp.CoverWelderId equals coverItem.PersonId into coverItems from coverWelder in coverItems.DefaultIfEmpty() @@ -396,13 +433,13 @@ namespace BLL from backingWelder in backingItems.DefaultIfEmpty() join locationItem in db.Base_WeldingLocation on temp.WeldingLocationId equals locationItem.WeldingLocationId into locationItems from location in locationItems.DefaultIfEmpty() - join weldTypeItem in db.Base_WeldType on temp.WeldTypeId equals weldTypeItem.WeldTypeId into weldTypeItems + join weldTypeItem in db.Base_WeldType on (temp.WeldTypeId ?? jot.WeldTypeId) equals weldTypeItem.WeldTypeId into weldTypeItems from weldType in weldTypeItems.DefaultIfEmpty() - join weldingMethodItem in db.Base_WeldingMethod on temp.WeldingMethodId equals weldingMethodItem.WeldingMethodId into weldingMethodItems + join weldingMethodItem in db.Base_WeldingMethod on (temp.WeldingMethodId ?? jot.WeldingMethodId) equals weldingMethodItem.WeldingMethodId into weldingMethodItems from weldingMethod in weldingMethodItems.DefaultIfEmpty() - join weldingWireItem in db.Base_Consumables on temp.WeldingWire equals weldingWireItem.ConsumablesId into weldingWireItems + join weldingWireItem in db.Base_Consumables on (temp.WeldingWire ?? jot.WeldingWire) equals weldingWireItem.ConsumablesId into weldingWireItems from weldingWire in weldingWireItems.DefaultIfEmpty() - join weldingRodItem in db.Base_Consumables on temp.WeldingRod equals weldingRodItem.ConsumablesId into weldingRodItems + join weldingRodItem in db.Base_Consumables on (temp.WeldingRod ?? jot.WeldingRod) equals weldingRodItem.ConsumablesId into weldingRodItems from weldingRod in weldingRodItems.DefaultIfEmpty() join submitItem in db.Person_Persons on temp.SubmitPersonId equals submitItem.PersonId into submitItems from submitPerson in submitItems.DefaultIfEmpty() @@ -410,7 +447,6 @@ namespace BLL from teamAuditPerson in teamAuditItems.DefaultIfEmpty() join professionalAuditItem in db.Person_Persons on temp.ProfessionalAuditMan equals professionalAuditItem.PersonId into professionalAuditItems from professionalAuditPerson in professionalAuditItems.DefaultIfEmpty() - where temp.AuditState < AuditStateApproved select new Model.WeldingDailyTempDetailItem { TempDetailId = temp.TempDetailId, @@ -430,20 +466,18 @@ namespace BLL WeldingLocationId = temp.WeldingLocationId, WeldingLocationCode = location == null ? null : location.WeldingLocationCode, WeldingMode = temp.WeldingMode, - Material1Code = jot == null ? null : jot.Material1Code, - Material2Code = jot == null ? null : jot.Material2Code, DNDia = jot == null ? null : jot.DNDia, Size = jot == null ? (decimal?)null : jot.Size, Dia = jot == null ? (decimal?)null : jot.Dia, Thickness = jot == null ? (decimal?)null : jot.Thickness, WeldTypeId = temp.WeldTypeId ?? (jot == null ? null : jot.WeldTypeId), - WeldTypeCode = weldType == null ? (jot == null ? null : jot.WeldTypeCode) : weldType.WeldTypeCode, + WeldTypeCode = weldType == null ? null : weldType.WeldTypeCode, WeldingMethodId = temp.WeldingMethodId ?? (jot == null ? null : jot.WeldingMethodId), - WeldingMethodCode = weldingMethod == null ? (jot == null ? null : jot.WeldingMethodCode) : weldingMethod.WeldingMethodCode, + WeldingMethodCode = weldingMethod == null ? null : weldingMethod.WeldingMethodCode, WeldingWire = temp.WeldingWire ?? (jot == null ? null : jot.WeldingWire), - WeldingWireCode = weldingWire == null ? (jot == null ? null : jot.WeldingWireCode) : weldingWire.ConsumablesCode, + WeldingWireCode = weldingWire == null ? null : weldingWire.ConsumablesCode, WeldingRod = temp.WeldingRod ?? (jot == null ? null : jot.WeldingRod), - WeldingRodCode = weldingRod == null ? (jot == null ? null : jot.WeldingRodCode) : weldingRod.ConsumablesCode, + WeldingRodCode = weldingRod == null ? null : weldingRod.ConsumablesCode, SubmitPersonId = temp.SubmitPersonId, SubmitPersonName = submitPerson == null ? null : submitPerson.PersonName, SubmitDate = temp.SubmitDate, @@ -459,7 +493,28 @@ namespace BLL ProfessionalAuditManName = professionalAuditPerson == null ? null : professionalAuditPerson.PersonName, ProfessionalAuditDate = temp.ProfessionalAuditDate, AuditStateText = temp.AuditState == AuditStatePendingTeam ? "待班组审核" : "待专工审核" - }).ToList(); + }; + + if (!string.IsNullOrEmpty(input.PipelineCode)) + { + query = query.Where(x => x.PipelineCode != null && x.PipelineCode.Contains(input.PipelineCode)); + } + if (!string.IsNullOrEmpty(input.WelderCode)) + { + query = query.Where(x => (x.CoverWelderCode != null && x.CoverWelderCode.Contains(input.WelderCode)) + || (x.BackingWelderCode != null && x.BackingWelderCode.Contains(input.WelderCode))); + } + + totalCount = query.Count(); + query = query.OrderBy(x => x.PipelineCode).ThenBy(x => x.WeldJointCode); + if (input.PageIndex.HasValue && input.PageIndex.Value >= 0 + && input.PageSize.HasValue && input.PageSize.Value > 0) + { + query = query.Skip(input.PageIndex.Value * input.PageSize.Value).Take(input.PageSize.Value); + } + + // 查询必须在数据上下文释放前物化,避免返回失效的延迟查询。 + data = query.ToList(); } SetWeldingDailyTempDetailAttachUrls(data); return data; @@ -1142,8 +1197,8 @@ namespace BLL newWeldJoint.WeldingDailyCode = weldingDaily.WeldingDailyCode; newWeldJoint.CoverWelderId = coverWelderId; newWeldJoint.BackingWelderId = backingWelderId; - newWeldJoint.CoverWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, coverWelderId).TeamGroupId; - newWeldJoint.BackingWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, backingWelderId).TeamGroupId; + newWeldJoint.CoverWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, coverWelderId)?.TeamGroupId; + newWeldJoint.BackingWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, backingWelderId)?.TeamGroupId; if (!string.IsNullOrEmpty(weldingLocationId)) { newWeldJoint.WeldingLocationId = weldingLocationId; diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx index 2c1a8bb3..fa5e432e 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx @@ -1,7 +1,5 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPackageEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.TestPackage.TestPackageEdit" %> -<%@ Register Src="~/Controls/_3DLook.ascx" TagName="_3DLook" TagPrefix="uc1" %> - @@ -37,20 +35,9 @@ - - - - - - - - + TitleToolTip="试压包" AutoScroll="true" RegionPercent="100%"> protected void Page_Load(object sender, EventArgs e) { - ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId); - if (!IsPostBack) { this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); @@ -263,10 +261,7 @@ namespace FineUIPro.Web.HJGL.TestPackage parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(testPackageManage.UnitWorkId); } - } - ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName; - ctlAuditFlow.data = parameter3D; - ctlAuditFlow.BindData(); + } } #endregion @@ -604,10 +599,7 @@ namespace FineUIPro.Web.HJGL.TestPackage parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(testPackageManage.UnitWorkId); } - } - ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName; - ctlAuditFlow.data = parameter3D; - ctlAuditFlow.BindData(); + } } /// diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx.designer.cs index 17fda953..2ea41231 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx.designer.cs @@ -95,33 +95,6 @@ namespace FineUIPro.Web.HJGL.TestPackage /// protected global::FineUIPro.Panel Panel2; - /// - /// panelTopRegion 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Panel panelTopRegion; - - /// - /// ContentPanel1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ContentPanel ContentPanel1; - - /// - /// ctlAuditFlow 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Web.Controls._3DLook ctlAuditFlow; - /// /// panelCenterRegion 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx index 3e38fd8e..d23dc82d 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointList.aspx @@ -298,8 +298,8 @@ FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px"> - diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx index 25075e2e..7c2b419a 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx @@ -238,6 +238,12 @@ + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs index 4297cea3..f2a0a78c 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.cs @@ -89,6 +89,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage tn1.Text = q.UnitWorkName; tn1.ToolTip = "施工单位:" + unitNamesUnitIds; tn1.CommandName = "UnitWork"; + tn1.EnableClickEvent = true; rootNode1.Nodes.Add(tn1); BindNodes(tn1); } @@ -103,6 +104,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage tn2.Text = q.UnitWorkName; tn2.ToolTip = "施工单位:" + unitNamesUnitIds; tn2.CommandName = "UnitWork"; + tn2.EnableClickEvent = true; rootNode2.Nodes.Add(tn2); BindNodes(tn2); } @@ -151,6 +153,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)) { this.BindGrid(); + GridPending.PageIndex = 0; this.BindPendingGrid(); var daily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(tvControlItem.SelectedNodeID); if (daily != null) @@ -289,18 +292,26 @@ namespace FineUIPro.Web.HJGL.WeldingManage weldingDate = parsedDate.Date; } - // 待审核列表与接口共用同一套查询和字段映射,避免PC端SQL与接口逐渐分叉。 - var pendingItems = BLL.WeldingDailyService.GetWeldingDailyTempDetailList( - this.CurrUser.LoginProjectId, - unitWork == null ? null : unitWork.UnitWorkId, - weldingDate, - txtPendingPipelineCode.Text.Trim(), - txtPendingWelderCode.Text.Trim()); - DataTable tb = this.LINQToDataTable(pendingItems); - GridPending.RecordCount = tb.Rows.Count; - tb = GetFilteredTable(GridPending.FilteredData, tb); - var table = this.GetPagedDataTable(GridPending, tb); - GridPending.DataSource = table; + int auditState; + int? auditStateCondition = int.TryParse(drpPendingAuditState.SelectedValue, out auditState) + && auditState >= 0 ? (int?)auditState : null; + var input = new Model.WeldingDailyTempDetailInput + { + ProjectId = this.CurrUser.LoginProjectId, + UnitWorkId = unitWork == null ? null : unitWork.UnitWorkId, + WeldingDate = weldingDate, + PipelineCode = txtPendingPipelineCode.Text.Trim(), + WelderCode = txtPendingWelderCode.Text.Trim(), + AuditState = auditStateCondition, + PageIndex = GridPending.PageIndex, + PageSize = GridPending.PageSize + }; + + // 查询条件和分页条件统一下推到业务层,页面只绑定当前页数据。 + int totalCount; + var pendingItems = BLL.WeldingDailyService.GetWeldingDailyTempDetailList(input, out totalCount); + GridPending.RecordCount = totalCount; + GridPending.DataSource = pendingItems; GridPending.DataBind(); } #endregion @@ -662,6 +673,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected void PendingFilter_TextChanged(object sender, EventArgs e) { + GridPending.PageIndex = 0; BindPendingGrid(); } #endregion diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.designer.cs index fca1d596..9cdf5840 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReport.aspx.designer.cs @@ -302,6 +302,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected global::FineUIPro.DatePicker txtPendingWeldingDate; + /// + /// drpPendingAuditState 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpPendingAuditState; + /// /// txtPendingPipelineCode 控件。 /// diff --git a/SGGL/Model/APIItem/HJGL/WeldingDailyTempDetailItem.cs b/SGGL/Model/APIItem/HJGL/WeldingDailyTempDetailItem.cs index 99f77783..871d7ec4 100644 --- a/SGGL/Model/APIItem/HJGL/WeldingDailyTempDetailItem.cs +++ b/SGGL/Model/APIItem/HJGL/WeldingDailyTempDetailItem.cs @@ -2,6 +2,58 @@ using System; namespace Model { + /// + /// 焊接日报待审核明细查询参数。 + /// + public class WeldingDailyTempDetailInput + { + /// + /// 待审核明细ID。 + /// + public string TempDetailId { get; set; } + + /// + /// 项目ID。 + /// + public string ProjectId { get; set; } + + /// + /// 单位工程ID。 + /// + public string UnitWorkId { get; set; } + + /// + /// 焊接日期。 + /// + public DateTime? WeldingDate { get; set; } + + /// + /// 管线编号关键字。 + /// + public string PipelineCode { get; set; } + + /// + /// 焊工编号关键字,同时匹配盖面焊工和打底焊工。 + /// + public string WelderCode { get; set; } + + /// + /// 审核状态,为空时查询全部待审核状态。 + /// + public int? AuditState { get; set; } + + /// + /// 页索引,从0开始;为空或小于0时不分页。 + /// + public int? PageIndex { get; set; } + + /// + /// 每页记录数;为空或小于等于0时不分页。 + /// + public int? PageSize { get; set; } + + } + /// /// 焊接日报待审核明细。 /// @@ -193,7 +245,7 @@ namespace Model public string AttachUrl { get; set; } /// - /// 审核状态:0待审核,1已审核。 + /// 审核状态:0待班组审核,1待专工审核,2审核完成。 /// public int AuditState { get; set; } diff --git a/SGGL/WebAPI/Controllers/HJGL/WeldingManage/PreWeldingDailyController.cs b/SGGL/WebAPI/Controllers/HJGL/WeldingManage/PreWeldingDailyController.cs index 22651107..b0a5cd62 100644 --- a/SGGL/WebAPI/Controllers/HJGL/WeldingManage/PreWeldingDailyController.cs +++ b/SGGL/WebAPI/Controllers/HJGL/WeldingManage/PreWeldingDailyController.cs @@ -337,14 +337,10 @@ namespace WebAPI.Controllers return responeData; } + int pageCount; var getDataList = APIWeldReportService.GetPendingWeldingDailyTempDetailList( - projectId, unitWorkId, weldingDate, pipelineCode, welderCode); - int pageCount = getDataList.Count; - if (pageCount > 0 && pageIndex > 0) - { - getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1)) - .Take(Funs.PageSize).ToList(); - } + projectId, unitWorkId, weldingDate, pipelineCode, welderCode, + pageIndex, out pageCount); responeData.data = new { pageCount, getDataList }; }