feat(hjgl): 完善焊接日报审核与页面展示
统一 PC 端与接口的待审核查询、状态筛选和分页逻辑,补充日报查询参数及焊接信息展示,并调整试压包和焊口列表页面。
This commit is contained in:
@@ -15,6 +15,23 @@ namespace BLL
|
|||||||
ParseWeldingDate(weldingDate), pipelineCode, welderCode);
|
ParseWeldingDate(weldingDate), pipelineCode, welderCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<Model.WeldingDailyTempDetailItem> 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)
|
public static Model.WeldingDailyTempDetailItem GetPendingWeldingDailyTempDetail(string tempDetailId)
|
||||||
{
|
{
|
||||||
return WeldingDailyService.GetWeldingDailyTempDetailById(tempDetailId);
|
return WeldingDailyService.GetWeldingDailyTempDetailById(tempDetailId);
|
||||||
|
|||||||
@@ -338,29 +338,27 @@ namespace BLL
|
|||||||
return new List<Model.WeldingDailyTempDetailItem>();
|
return new List<Model.WeldingDailyTempDetailItem>();
|
||||||
}
|
}
|
||||||
|
|
||||||
var query = QueryPendingWeldingDailyTempDetails().AsQueryable();
|
int totalCount;
|
||||||
query = query.Where(x => x.ProjectId == projectId);
|
return GetWeldingDailyTempDetailList(new Model.WeldingDailyTempDetailInput
|
||||||
if (!string.IsNullOrEmpty(unitWorkId))
|
|
||||||
{
|
{
|
||||||
query = query.Where(x => x.UnitWorkId == unitWorkId);
|
ProjectId = projectId,
|
||||||
}
|
UnitWorkId = unitWorkId,
|
||||||
if (weldingDate.HasValue)
|
WeldingDate = weldingDate,
|
||||||
{
|
PipelineCode = pipelineCode,
|
||||||
DateTime startDate = weldingDate.Value.Date;
|
WelderCode = welderCode
|
||||||
DateTime endDate = startDate.AddDays(1);
|
}, out totalCount);
|
||||||
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)));
|
|
||||||
}
|
|
||||||
|
|
||||||
return query.OrderBy(x => x.PipelineCode).ThenBy(x => x.WeldJointCode).ToList();
|
/// <summary>
|
||||||
|
/// 按查询参数获取焊接日报待审核明细列表。
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input">查询及分页条件</param>
|
||||||
|
/// <param name="totalCount">分页前总记录数</param>
|
||||||
|
/// <returns>待审核明细列表</returns>
|
||||||
|
public static List<Model.WeldingDailyTempDetailItem> GetWeldingDailyTempDetailList(
|
||||||
|
Model.WeldingDailyTempDetailInput input, out int totalCount)
|
||||||
|
{
|
||||||
|
return QueryPendingWeldingDailyTempDetails(input, out totalCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -375,20 +373,59 @@ namespace BLL
|
|||||||
return null;
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 构造待审核查询。PC端列表和接口列表、明细均从这里读取,确保字段映射和待审核状态一致。
|
/// 构造待审核查询。PC端列表和接口列表、明细均从这里读取,确保字段映射和待审核状态一致。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private static List<Model.WeldingDailyTempDetailItem> QueryPendingWeldingDailyTempDetails()
|
/// <param name="input">查询及分页条件</param>
|
||||||
|
/// <param name="totalCount">分页前总记录数</param>
|
||||||
|
private static List<Model.WeldingDailyTempDetailItem> 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<Model.WeldingDailyTempDetailItem>();
|
||||||
|
}
|
||||||
|
|
||||||
List<Model.WeldingDailyTempDetailItem> data;
|
List<Model.WeldingDailyTempDetailItem> data;
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
// 查询必须在数据上下文释放前物化,避免返回失效的延迟查询。
|
var tempQuery = db.HJGL_WeldingDailyTempDetail
|
||||||
data = (from temp in db.HJGL_WeldingDailyTempDetail
|
.Where(x => x.AuditState != AuditStateApproved);
|
||||||
join jotItem in db.View_HJGL_WeldJoint on temp.WeldJointId equals jotItem.WeldJointId into jotItems
|
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()
|
from jot in jotItems.DefaultIfEmpty()
|
||||||
join coverItem in db.SitePerson_Person on temp.CoverWelderId equals coverItem.PersonId into coverItems
|
join coverItem in db.SitePerson_Person on temp.CoverWelderId equals coverItem.PersonId into coverItems
|
||||||
from coverWelder in coverItems.DefaultIfEmpty()
|
from coverWelder in coverItems.DefaultIfEmpty()
|
||||||
@@ -396,13 +433,13 @@ namespace BLL
|
|||||||
from backingWelder in backingItems.DefaultIfEmpty()
|
from backingWelder in backingItems.DefaultIfEmpty()
|
||||||
join locationItem in db.Base_WeldingLocation on temp.WeldingLocationId equals locationItem.WeldingLocationId into locationItems
|
join locationItem in db.Base_WeldingLocation on temp.WeldingLocationId equals locationItem.WeldingLocationId into locationItems
|
||||||
from location in locationItems.DefaultIfEmpty()
|
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()
|
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()
|
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()
|
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()
|
from weldingRod in weldingRodItems.DefaultIfEmpty()
|
||||||
join submitItem in db.Person_Persons on temp.SubmitPersonId equals submitItem.PersonId into submitItems
|
join submitItem in db.Person_Persons on temp.SubmitPersonId equals submitItem.PersonId into submitItems
|
||||||
from submitPerson in submitItems.DefaultIfEmpty()
|
from submitPerson in submitItems.DefaultIfEmpty()
|
||||||
@@ -410,7 +447,6 @@ namespace BLL
|
|||||||
from teamAuditPerson in teamAuditItems.DefaultIfEmpty()
|
from teamAuditPerson in teamAuditItems.DefaultIfEmpty()
|
||||||
join professionalAuditItem in db.Person_Persons on temp.ProfessionalAuditMan equals professionalAuditItem.PersonId into professionalAuditItems
|
join professionalAuditItem in db.Person_Persons on temp.ProfessionalAuditMan equals professionalAuditItem.PersonId into professionalAuditItems
|
||||||
from professionalAuditPerson in professionalAuditItems.DefaultIfEmpty()
|
from professionalAuditPerson in professionalAuditItems.DefaultIfEmpty()
|
||||||
where temp.AuditState < AuditStateApproved
|
|
||||||
select new Model.WeldingDailyTempDetailItem
|
select new Model.WeldingDailyTempDetailItem
|
||||||
{
|
{
|
||||||
TempDetailId = temp.TempDetailId,
|
TempDetailId = temp.TempDetailId,
|
||||||
@@ -430,20 +466,18 @@ namespace BLL
|
|||||||
WeldingLocationId = temp.WeldingLocationId,
|
WeldingLocationId = temp.WeldingLocationId,
|
||||||
WeldingLocationCode = location == null ? null : location.WeldingLocationCode,
|
WeldingLocationCode = location == null ? null : location.WeldingLocationCode,
|
||||||
WeldingMode = temp.WeldingMode,
|
WeldingMode = temp.WeldingMode,
|
||||||
Material1Code = jot == null ? null : jot.Material1Code,
|
|
||||||
Material2Code = jot == null ? null : jot.Material2Code,
|
|
||||||
DNDia = jot == null ? null : jot.DNDia,
|
DNDia = jot == null ? null : jot.DNDia,
|
||||||
Size = jot == null ? (decimal?)null : jot.Size,
|
Size = jot == null ? (decimal?)null : jot.Size,
|
||||||
Dia = jot == null ? (decimal?)null : jot.Dia,
|
Dia = jot == null ? (decimal?)null : jot.Dia,
|
||||||
Thickness = jot == null ? (decimal?)null : jot.Thickness,
|
Thickness = jot == null ? (decimal?)null : jot.Thickness,
|
||||||
WeldTypeId = temp.WeldTypeId ?? (jot == null ? null : jot.WeldTypeId),
|
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),
|
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),
|
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),
|
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,
|
SubmitPersonId = temp.SubmitPersonId,
|
||||||
SubmitPersonName = submitPerson == null ? null : submitPerson.PersonName,
|
SubmitPersonName = submitPerson == null ? null : submitPerson.PersonName,
|
||||||
SubmitDate = temp.SubmitDate,
|
SubmitDate = temp.SubmitDate,
|
||||||
@@ -459,7 +493,28 @@ namespace BLL
|
|||||||
ProfessionalAuditManName = professionalAuditPerson == null ? null : professionalAuditPerson.PersonName,
|
ProfessionalAuditManName = professionalAuditPerson == null ? null : professionalAuditPerson.PersonName,
|
||||||
ProfessionalAuditDate = temp.ProfessionalAuditDate,
|
ProfessionalAuditDate = temp.ProfessionalAuditDate,
|
||||||
AuditStateText = temp.AuditState == AuditStatePendingTeam ? "待班组审核" : "待专工审核"
|
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);
|
SetWeldingDailyTempDetailAttachUrls(data);
|
||||||
return data;
|
return data;
|
||||||
@@ -1142,8 +1197,8 @@ namespace BLL
|
|||||||
newWeldJoint.WeldingDailyCode = weldingDaily.WeldingDailyCode;
|
newWeldJoint.WeldingDailyCode = weldingDaily.WeldingDailyCode;
|
||||||
newWeldJoint.CoverWelderId = coverWelderId;
|
newWeldJoint.CoverWelderId = coverWelderId;
|
||||||
newWeldJoint.BackingWelderId = backingWelderId;
|
newWeldJoint.BackingWelderId = backingWelderId;
|
||||||
newWeldJoint.CoverWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, coverWelderId).TeamGroupId;
|
newWeldJoint.CoverWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, coverWelderId)?.TeamGroupId;
|
||||||
newWeldJoint.BackingWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, backingWelderId).TeamGroupId;
|
newWeldJoint.BackingWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, backingWelderId)?.TeamGroupId;
|
||||||
if (!string.IsNullOrEmpty(weldingLocationId))
|
if (!string.IsNullOrEmpty(weldingLocationId))
|
||||||
{
|
{
|
||||||
newWeldJoint.WeldingLocationId = weldingLocationId;
|
newWeldJoint.WeldingLocationId = weldingLocationId;
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPackageEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.TestPackage.TestPackageEdit" %>
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPackageEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.TestPackage.TestPackageEdit" %>
|
||||||
|
|
||||||
<%@ Register Src="~/Controls/_3DLook.ascx" TagName="_3DLook" TagPrefix="uc1" %>
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head id="Head1" runat="server">
|
<head id="Head1" runat="server">
|
||||||
@@ -37,20 +35,9 @@
|
|||||||
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||||
ShowHeader="false" Layout="Region" BoxConfigAlign="Stretch">
|
ShowHeader="false" Layout="Region" BoxConfigAlign="Stretch">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Panel ID="panelTopRegion" runat="server" RegionPosition="Center" ShowBorder="true" EnableCollapse="true"
|
|
||||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="三维模型"
|
|
||||||
TitleToolTip="三维模型显示" AutoScroll="true" RegionPercent="30%">
|
|
||||||
<Items>
|
|
||||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true"
|
|
||||||
BodyPadding="0px">
|
|
||||||
<uc1:_3DLook ID="ctlAuditFlow" runat="server" Width="1000px" Height="1000px" />
|
|
||||||
</f:ContentPanel>
|
|
||||||
|
|
||||||
</Items>
|
|
||||||
</f:Panel>
|
|
||||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Bottom" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Bottom" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||||
Layout="Fit" ShowHeader="false" RegionSplitWidth="20px" BodyPadding="1px" Height="400px" IconFont="PlusCircle" Title="试压包"
|
Layout="Fit" ShowHeader="false" RegionSplitWidth="20px" BodyPadding="1px" Height="400px" IconFont="PlusCircle" Title="试压包"
|
||||||
TitleToolTip="试压包" AutoScroll="true" RegionPercent="70%">
|
TitleToolTip="试压包" AutoScroll="true" RegionPercent="100%">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="试压包明细" EnableCollapse="true" Collapsed="false"
|
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="试压包明细" EnableCollapse="true" Collapsed="false"
|
||||||
runat="server" BoxFlex="1" DataKeyNames="PT_PipeId" AllowCellEditing="true" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
runat="server" BoxFlex="1" DataKeyNames="PT_PipeId" AllowCellEditing="true" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
||||||
|
|||||||
@@ -46,8 +46,6 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
|
||||||
|
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||||
@@ -264,9 +262,6 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
|
||||||
ctlAuditFlow.data = parameter3D;
|
|
||||||
ctlAuditFlow.BindData();
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -605,9 +600,6 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
|
||||||
ctlAuditFlow.data = parameter3D;
|
|
||||||
ctlAuditFlow.BindData();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -95,33 +95,6 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Panel Panel2;
|
protected global::FineUIPro.Panel Panel2;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// panelTopRegion 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Panel panelTopRegion;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ContentPanel1 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ctlAuditFlow 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Web.Controls._3DLook ctlAuditFlow;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// panelCenterRegion 控件。
|
/// panelCenterRegion 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -298,8 +298,8 @@
|
|||||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="90px">
|
Width="90px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="焊点坐标" ColumnID="WeldJointPoint" DataField="WeldJointPoint"
|
<f:RenderField HeaderText="是否热处理" ColumnID="IsHotProessStr" DataField="IsHotProessStr"
|
||||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Center"
|
||||||
Width="90px">
|
Width="90px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|||||||
@@ -238,6 +238,12 @@
|
|||||||
<f:DatePicker ID="txtPendingWeldingDate" runat="server" Label="焊接日期" LabelAlign="Right"
|
<f:DatePicker ID="txtPendingWeldingDate" runat="server" Label="焊接日期" LabelAlign="Right"
|
||||||
LabelWidth="90px" Width="220px" AutoPostBack="true" OnTextChanged="PendingFilter_TextChanged" AutoShowClearIcon="true">
|
LabelWidth="90px" Width="220px" AutoPostBack="true" OnTextChanged="PendingFilter_TextChanged" AutoShowClearIcon="true">
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
|
<f:DropDownList ID="drpPendingAuditState" runat="server" Label="状态" LabelAlign="Right" AutoSelectFirstItem="true"
|
||||||
|
LabelWidth="50px" Width="180px" AutoPostBack="true" OnSelectedIndexChanged="PendingFilter_TextChanged">
|
||||||
|
<f:ListItem Text="全部" Value="-1" Selected="true" />
|
||||||
|
<f:ListItem Text="待班组审核" Value="0" />
|
||||||
|
<f:ListItem Text="待专工审核" Value="1" />
|
||||||
|
</f:DropDownList>
|
||||||
<f:TextBox ID="txtPendingPipelineCode" runat="server" Label="管线号" EmptyText="输入查询条件"
|
<f:TextBox ID="txtPendingPipelineCode" runat="server" Label="管线号" EmptyText="输入查询条件"
|
||||||
LabelAlign="Right" AutoPostBack="true" OnTextChanged="PendingFilter_TextChanged">
|
LabelAlign="Right" AutoPostBack="true" OnTextChanged="PendingFilter_TextChanged">
|
||||||
</f:TextBox>
|
</f:TextBox>
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
tn1.Text = q.UnitWorkName;
|
tn1.Text = q.UnitWorkName;
|
||||||
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
|
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
|
||||||
tn1.CommandName = "UnitWork";
|
tn1.CommandName = "UnitWork";
|
||||||
|
tn1.EnableClickEvent = true;
|
||||||
rootNode1.Nodes.Add(tn1);
|
rootNode1.Nodes.Add(tn1);
|
||||||
BindNodes(tn1);
|
BindNodes(tn1);
|
||||||
}
|
}
|
||||||
@@ -103,6 +104,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
tn2.Text = q.UnitWorkName;
|
tn2.Text = q.UnitWorkName;
|
||||||
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
|
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
|
||||||
tn2.CommandName = "UnitWork";
|
tn2.CommandName = "UnitWork";
|
||||||
|
tn2.EnableClickEvent = true;
|
||||||
rootNode2.Nodes.Add(tn2);
|
rootNode2.Nodes.Add(tn2);
|
||||||
BindNodes(tn2);
|
BindNodes(tn2);
|
||||||
}
|
}
|
||||||
@@ -151,6 +153,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||||
{
|
{
|
||||||
this.BindGrid();
|
this.BindGrid();
|
||||||
|
GridPending.PageIndex = 0;
|
||||||
this.BindPendingGrid();
|
this.BindPendingGrid();
|
||||||
var daily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(tvControlItem.SelectedNodeID);
|
var daily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(tvControlItem.SelectedNodeID);
|
||||||
if (daily != null)
|
if (daily != null)
|
||||||
@@ -289,18 +292,26 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
weldingDate = parsedDate.Date;
|
weldingDate = parsedDate.Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 待审核列表与接口共用同一套查询和字段映射,避免PC端SQL与接口逐渐分叉。
|
int auditState;
|
||||||
var pendingItems = BLL.WeldingDailyService.GetWeldingDailyTempDetailList(
|
int? auditStateCondition = int.TryParse(drpPendingAuditState.SelectedValue, out auditState)
|
||||||
this.CurrUser.LoginProjectId,
|
&& auditState >= 0 ? (int?)auditState : null;
|
||||||
unitWork == null ? null : unitWork.UnitWorkId,
|
var input = new Model.WeldingDailyTempDetailInput
|
||||||
weldingDate,
|
{
|
||||||
txtPendingPipelineCode.Text.Trim(),
|
ProjectId = this.CurrUser.LoginProjectId,
|
||||||
txtPendingWelderCode.Text.Trim());
|
UnitWorkId = unitWork == null ? null : unitWork.UnitWorkId,
|
||||||
DataTable tb = this.LINQToDataTable(pendingItems);
|
WeldingDate = weldingDate,
|
||||||
GridPending.RecordCount = tb.Rows.Count;
|
PipelineCode = txtPendingPipelineCode.Text.Trim(),
|
||||||
tb = GetFilteredTable(GridPending.FilteredData, tb);
|
WelderCode = txtPendingWelderCode.Text.Trim(),
|
||||||
var table = this.GetPagedDataTable(GridPending, tb);
|
AuditState = auditStateCondition,
|
||||||
GridPending.DataSource = table;
|
PageIndex = GridPending.PageIndex,
|
||||||
|
PageSize = GridPending.PageSize
|
||||||
|
};
|
||||||
|
|
||||||
|
// 查询条件和分页条件统一下推到业务层,页面只绑定当前页数据。
|
||||||
|
int totalCount;
|
||||||
|
var pendingItems = BLL.WeldingDailyService.GetWeldingDailyTempDetailList(input, out totalCount);
|
||||||
|
GridPending.RecordCount = totalCount;
|
||||||
|
GridPending.DataSource = pendingItems;
|
||||||
GridPending.DataBind();
|
GridPending.DataBind();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -662,6 +673,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected void PendingFilter_TextChanged(object sender, EventArgs e)
|
protected void PendingFilter_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
GridPending.PageIndex = 0;
|
||||||
BindPendingGrid();
|
BindPendingGrid();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -302,6 +302,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DatePicker txtPendingWeldingDate;
|
protected global::FineUIPro.DatePicker txtPendingWeldingDate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// drpPendingAuditState 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DropDownList drpPendingAuditState;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtPendingPipelineCode 控件。
|
/// txtPendingPipelineCode 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -2,6 +2,58 @@ using System;
|
|||||||
|
|
||||||
namespace Model
|
namespace Model
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 焊接日报待审核明细查询参数。
|
||||||
|
/// </summary>
|
||||||
|
public class WeldingDailyTempDetailInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 待审核明细ID。
|
||||||
|
/// </summary>
|
||||||
|
public string TempDetailId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 项目ID。
|
||||||
|
/// </summary>
|
||||||
|
public string ProjectId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 单位工程ID。
|
||||||
|
/// </summary>
|
||||||
|
public string UnitWorkId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 焊接日期。
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? WeldingDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 管线编号关键字。
|
||||||
|
/// </summary>
|
||||||
|
public string PipelineCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 焊工编号关键字,同时匹配盖面焊工和打底焊工。
|
||||||
|
/// </summary>
|
||||||
|
public string WelderCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 审核状态,为空时查询全部待审核状态。
|
||||||
|
/// </summary>
|
||||||
|
public int? AuditState { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 页索引,从0开始;为空或小于0时不分页。
|
||||||
|
/// </summary>
|
||||||
|
public int? PageIndex { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 每页记录数;为空或小于等于0时不分页。
|
||||||
|
/// </summary>
|
||||||
|
public int? PageSize { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 焊接日报待审核明细。
|
/// 焊接日报待审核明细。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -193,7 +245,7 @@ namespace Model
|
|||||||
public string AttachUrl { get; set; }
|
public string AttachUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 审核状态:0待审核,1已审核。
|
/// 审核状态:0待班组审核,1待专工审核,2审核完成。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int AuditState { get; set; }
|
public int AuditState { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -337,14 +337,10 @@ namespace WebAPI.Controllers
|
|||||||
return responeData;
|
return responeData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int pageCount;
|
||||||
var getDataList = APIWeldReportService.GetPendingWeldingDailyTempDetailList(
|
var getDataList = APIWeldReportService.GetPendingWeldingDailyTempDetailList(
|
||||||
projectId, unitWorkId, weldingDate, pipelineCode, welderCode);
|
projectId, unitWorkId, weldingDate, pipelineCode, welderCode,
|
||||||
int pageCount = getDataList.Count;
|
pageIndex, out pageCount);
|
||||||
if (pageCount > 0 && pageIndex > 0)
|
|
||||||
{
|
|
||||||
getDataList = getDataList.Skip(Funs.PageSize * (pageIndex - 1))
|
|
||||||
.Take(Funs.PageSize).ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
responeData.data = new { pageCount, getDataList };
|
responeData.data = new { pageCount, getDataList };
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user