This commit is contained in:
commit
a7f5f042b2
|
@ -5735,3 +5735,5 @@ HJGLPackFile/版本日志/HJGLDB_2024.05.02.sql
|
|||
/DataBase/版本日志/HJGLDB_2024.05.12.sql
|
||||
/HJGL/.vs/HJGL/v17/.suo
|
||||
/HJGL/WebApi/ErrLog.txt
|
||||
/HJGL/Model/Model.cs
|
||||
/CreateModel.bat
|
||||
|
|
|
@ -162,7 +162,7 @@
|
|||
</site>
|
||||
<site name="WebApi" id="2">
|
||||
<application path="/" applicationPool="Clr4IntegratedAppPool">
|
||||
<virtualDirectory path="/" physicalPath="E:\MyProject\ZJ_BSF\Basf_TCC7\HJGL\WebApi" />
|
||||
<virtualDirectory path="/" physicalPath="E:\湛江巴斯夫\Basf_TCC7\HJGL\WebApi" />
|
||||
</application>
|
||||
<bindings>
|
||||
<binding protocol="http" bindingInformation="*:3862:localhost" />
|
||||
|
|
|
@ -169,6 +169,9 @@ namespace BLL
|
|||
newPipelineList.PTP_ID = IsoList.PTP_ID;
|
||||
newPipelineList.PipelineId = IsoList.PipelineId;
|
||||
newPipelineList.PT_DataType = IsoList.PT_DataType;
|
||||
newPipelineList.IsAll = IsoList.IsAll;
|
||||
newPipelineList.WorkAreaId= IsoList.WorkAreaId;
|
||||
newPipelineList.WeldJonintCode = IsoList.WeldJonintCode;
|
||||
db.PTP_PipelineList.InsertOnSubmit(newPipelineList);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
|
|
@ -110,7 +110,8 @@
|
|||
<f:DatePicker ID="txtTableDate" Label="建档日期" runat="server" DateFormatString="yyyy-MM-dd" LabelWidth="120px" ShowRedStar="true" Required="true">
|
||||
</f:DatePicker>
|
||||
<f:CheckBox runat="server" ID="ckSelect" Label="只显示选中项" LabelWidth="120px" AutoPostBack="true"
|
||||
OnCheckedChanged="ckSelect_OnCheckedChanged"></f:CheckBox>
|
||||
OnCheckedChanged="ckSelect_OnCheckedChanged">
|
||||
</f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
|
@ -118,7 +119,7 @@
|
|||
</Items>
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="true" ShowHeader="true" AutoScroll="true" Title="查询条件" EnableCollapse="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" Collapsed="true">
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" Collapsed="false">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
|
@ -154,9 +155,26 @@
|
|||
<f:RenderField HeaderText="工作区" ColumnID="WorkAreaCode" DataField="WorkAreaCode" SortField="WorkAreaCode"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ID="WorkAreaId" ColumnID="WorkAreaId" DataField="WorkAreaId" runat="server" Hidden="true"></f:RenderField>
|
||||
<f:RenderField HeaderText="管线编号" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="220px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="部分/全部焊口" Width="200" RendererFunction="selectData" ColumnID="isALL" DataField="WeldJonintCode" >
|
||||
<Editor>
|
||||
<f:DropDownBox runat="server" ID="txtIsAll" EmptyText="全部"
|
||||
EnableMultiSelect="true" TopSpaceFirst="true" AutoShowClearIcon="true" >
|
||||
<PopPanel>
|
||||
<f:Grid ID="Grid2" Width="300" ShowBorder="true" ShowHeader="false" runat="server" EnableCheckBoxSelect="true" KeepCurrentSelection="true"
|
||||
Hidden="true" DataKeyNames="PipelineId" DataIDField="WeldJointCode" DataTextField="WeldJointCode" EnableMultiSelect="true"
|
||||
AllowPaging="true" PageSize="10" ShowPagingMessage="false" PagingType="NumberButton">
|
||||
<Columns>
|
||||
<f:RenderField ColumnID="WeldJointCode" ExpandUnusedSpace="true" DataField="WeldJointCode" HeaderText="焊口号" />
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</PopPanel>
|
||||
</f:DropDownBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="设计压力" ColumnID="DesignPressure" DataField="DesignPressure" SortField="DesignPressure"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
|
||||
</f:RenderField>
|
||||
|
@ -181,6 +199,7 @@
|
|||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
|
@ -211,6 +230,7 @@
|
|||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
var txtIsAllClientID = '<%= txtIsAll.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
|
@ -219,6 +239,16 @@
|
|||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
function selectData(value) {
|
||||
if (value == '')
|
||||
return '全部';
|
||||
|
||||
var ddlHobby = F(txtIsAllClientID);
|
||||
var hobbies = value.split(',');
|
||||
console.log(hobbies);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -3,7 +3,9 @@ using System.Collections.Generic;
|
|||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web.ModelBinding;
|
||||
using BLL;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
|
@ -103,6 +105,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
}
|
||||
}
|
||||
this.PageInfoLoad(); ///加载页面
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@ -170,6 +173,14 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
}
|
||||
this.txtRemark.Text = testPackageManage.Remark;
|
||||
|
||||
var items = Funs.DB.PTP_PipelineList.Where(t => t.PTP_ID == testPackageManage.PTP_ID)
|
||||
.Select(t=>t.WorkAreaId).FirstOrDefault();
|
||||
|
||||
if (items != null)
|
||||
{
|
||||
drpWorkArea.SelectedValue = items;
|
||||
}
|
||||
|
||||
this.BindGrid(); ////初始化页面
|
||||
this.ShowGridItem();
|
||||
}
|
||||
|
@ -192,22 +203,46 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT IsoInfo.ProjectId,IsoInfo.WorkAreaId,WorkArea.WorkAreaCode,IsoInfo.PipelineId,IsoInfo.PipelineCode,
|
||||
string strSql = string.Empty;
|
||||
if (string.IsNullOrEmpty(this.PTP_ID))
|
||||
{
|
||||
strSql = @"SELECT
|
||||
IsoInfo.ProjectId,IsoInfo.WorkAreaId,WorkArea.WorkAreaCode,IsoInfo.PipelineId,IsoInfo.PipelineCode,
|
||||
IsoInfo.DesignPressure,IsoInfo.DesignTemperature, WorkArea.InstallationId,IsoInfo.UnitId,
|
||||
IsoInfo.TestPressure,IsoInfo.TestTemperature,bs.MediumName,IsoInfo.SingleNumber,
|
||||
IsoInfo.Specification,IsoInfo.PipingClassId,IsoInfo.MainMaterialId,IsoList.PT_PipeId,IsoList.PTP_ID
|
||||
IsoInfo.TestPressure,IsoInfo.TestTemperature,bs.MediumName,IsoInfo.SingleNumber
|
||||
FROM dbo.Pipeline_Pipeline AS IsoInfo
|
||||
LEFT JOIN DBO.Project_WorkArea AS WorkArea ON IsoInfo.WorkAreaId =WorkArea.WorkAreaId
|
||||
LEFT JOIN dbo.Base_Medium AS bs ON bs.MediumId = IsoInfo.MediumId
|
||||
LEFT JOIN dbo.PTP_PipelineList AS IsoList ON IsoList.PipelineId = IsoInfo.PipelineId
|
||||
WHERE IsoInfo.ProjectId= @ProjectId AND IsoInfo.UnitId= @UnitId
|
||||
AND WorkArea.InstallationId= @InstallationId AND (IsoList.PTP_ID IS NULL OR IsoList.PTP_ID = @PTP_ID)";
|
||||
AND WorkArea.InstallationId= @InstallationId
|
||||
AND NOT EXISTS(select 1 from PTP_PipelineList where IsoInfo.PipelineId=PTP_PipelineList.PipelineId and isAll=1) ";
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql = @"SELECT
|
||||
IsoInfo.ProjectId,IsoInfo.WorkAreaId,WorkArea.WorkAreaCode,IsoInfo.PipelineId,IsoInfo.PipelineCode,
|
||||
IsoInfo.DesignPressure,IsoInfo.DesignTemperature, WorkArea.InstallationId,IsoInfo.UnitId,
|
||||
IsoInfo.TestPressure,IsoInfo.TestTemperature,bs.MediumName,IsoInfo.SingleNumber,
|
||||
IsoList.isAll,(case when (isnull(IsoList.WeldJonintCode,'')='') then '全部' else IsoList.WeldJonintCode end) as WeldJonintCode
|
||||
FROM dbo.Pipeline_Pipeline AS IsoInfo
|
||||
LEFT JOIN DBO.Project_WorkArea AS WorkArea ON IsoInfo.WorkAreaId =WorkArea.WorkAreaId
|
||||
LEFT JOIN dbo.Base_Medium AS bs ON bs.MediumId = IsoInfo.MediumId
|
||||
LEFT JOIN dbo.PTP_PipelineList AS IsoList ON IsoList.PipelineId = IsoInfo.PipelineId and IsoInfo.WorkAreaId=IsoList.WorkAreaId
|
||||
WHERE IsoInfo.ProjectId= @ProjectId AND IsoInfo.UnitId= @UnitId
|
||||
AND WorkArea.InstallationId= @InstallationId ";
|
||||
}
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@PTP_ID", this.PTP_ID));
|
||||
|
||||
listStr.Add(new SqlParameter("@UnitId", this.drpUnit.SelectedValue));
|
||||
listStr.Add(new SqlParameter("@InstallationId", this.drpInstallation.SelectedValue));
|
||||
|
||||
if (!string.IsNullOrEmpty(this.PTP_ID))
|
||||
{
|
||||
strSql += " AND IsoList.PTP_ID=@PTP_ID";
|
||||
listStr.Add(new SqlParameter("@PTP_ID", this.PTP_ID));
|
||||
}
|
||||
|
||||
if (this.drpWorkArea.SelectedValue != Const._Null && drpWorkArea.SelectedValue!=null)
|
||||
{
|
||||
strSql += " AND IsoInfo.WorkAreaId = @WorkAreaId";
|
||||
|
@ -283,6 +318,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
this.GetInitGrid1Data();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -491,15 +528,26 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
BLL.TestPackageManageEditService.AddTestPackage(testPackage);
|
||||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.TestPackageManageEditMenuId, Const.BtnAdd, this.PTP_ID);
|
||||
}
|
||||
JArray teamGroupData = Grid1.GetMergedData();
|
||||
|
||||
foreach (var item in listSelects)
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
string PipelineId = teamGroupRow["id"].ToString();
|
||||
string status = teamGroupRow.Value<string>("status");
|
||||
if (listSelects.Contains(PipelineId))
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
string WeldJonintCodes = values.Value<string>("isALL");
|
||||
string workAreaId = values.Value<string>("WorkAreaId");
|
||||
Model.PTP_PipelineList newitem = new Model.PTP_PipelineList();
|
||||
newitem.PTP_ID = this.PTP_ID;
|
||||
newitem.PipelineId = item;
|
||||
newitem.PipelineId = PipelineId;
|
||||
newitem.IsAll = WeldJonintCodes=="全部" ? true : false;
|
||||
newitem.WeldJonintCode = WeldJonintCodes;
|
||||
newitem.WorkAreaId = workAreaId;
|
||||
BLL.TestPackageManageEditService.AddPipelineList(newitem);
|
||||
}
|
||||
|
||||
}
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(this.PTP_ID)
|
||||
+ ActiveWindow.GetHidePostBackReference());
|
||||
|
@ -512,6 +560,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 收集Grid页面信息
|
||||
/// <summary>
|
||||
/// 收集Grid页面信息
|
||||
|
@ -532,9 +581,57 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
listSelects.Add(rowID);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 绑定焊口信息Grid2列表
|
||||
|
||||
private void GetInitGrid1Data()
|
||||
{
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[i][0].ToString();
|
||||
this.GetBindGrid2Data(rowID);
|
||||
}
|
||||
}
|
||||
private void GetBindGrid2Data(string PipelineID)
|
||||
{
|
||||
this.Grid2.DataSource = GetDataJointGrid2(PipelineID);
|
||||
this.Grid2.DataBind();
|
||||
}
|
||||
private List<View_Pipeline_WeldJoint> GetDataJointGrid2(string PipelineID)
|
||||
{
|
||||
string[] arr = null;
|
||||
var tempData=Funs.DB.PTP_PipelineList.Where(t=>t.PipelineId == PipelineID && t.IsAll==false)
|
||||
.Select(t=>t.WeldJonintCode).FirstOrDefault();
|
||||
|
||||
if (tempData != null)
|
||||
{
|
||||
arr = tempData.Split(',');
|
||||
}
|
||||
var query = Funs.DB.View_Pipeline_WeldJoint.Where(t => t.PipelineId == PipelineID )
|
||||
.OrderBy(t => t.WeldJointCode).AsQueryable();
|
||||
if (arr != null)
|
||||
{
|
||||
query = query.Where(t => !arr.Contains(t.WeldJointCode));
|
||||
}
|
||||
return query.ToList();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private Dictionary<int, Dictionary<string, object>> GetModifiedDict()
|
||||
{
|
||||
Dictionary<int, Dictionary<string, object>> modifiedDict = Grid2.GetModifiedDict();
|
||||
|
||||
return modifiedDict;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Grid 明细操作事件
|
||||
/// <summary>
|
||||
/// 全选
|
||||
|
@ -600,5 +697,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
|||
this.ShowGridItem();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -7,10 +7,12 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.TestPackageManage {
|
||||
namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
{
|
||||
|
||||
|
||||
public partial class TestPackageManageItemEdit {
|
||||
public partial class TestPackageManageItemEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Head1 控件。
|
||||
|
@ -426,6 +428,33 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// WorkAreaId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RenderField WorkAreaId;
|
||||
|
||||
/// <summary>
|
||||
/// txtIsAll 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownBox txtIsAll;
|
||||
|
||||
/// <summary>
|
||||
/// Grid2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid2;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue