From c4f43bee08197632967b4e6ba6cb1eaec1f56eed Mon Sep 17 00:00:00 2001
From: xiaju <1784803958@qq.com>
Date: Fri, 25 Jul 2025 17:43:33 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E5=B1=95=E7=A4=BA=E7=9A=84?=
=?UTF-8?q?=E4=B8=A4=E4=B8=AA=E9=97=AE=E9=A2=98=EF=BC=8C=20=E4=B8=80?=
=?UTF-8?q?=E4=B8=AA=E6=98=AF=E8=B4=A8=E9=87=8F=E7=AE=A1=E7=90=86=E7=82=B9?=
=?UTF-8?q?=E5=87=BB=E6=8A=A5=E9=94=99=EF=BC=8C=20=E4=BA=8C=E6=98=AF?=
=?UTF-8?q?=E7=82=B9=E5=87=BB=E9=A1=B9=E7=9B=AE=E6=B8=85=E5=8D=95=E5=90=8E?=
=?UTF-8?q?=EF=BC=8C=E5=8A=A0=E8=BD=BD=E7=9A=84=E9=A1=B9=E7=9B=AE=E6=B8=85?=
=?UTF-8?q?=E5=8D=95=E9=A1=B5=E9=9D=A2=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E6=89=80=E6=9C=89=E8=A1=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SGGL/BLL/IDP/IDPDataService.cs | 241 +++++++++---------
SGGL/BLL/PMP/PMPDataService.cs | 10 +
SGGL/FineUIPro.Web/HJGL/FL/HJGLDataEdit.aspx | 18 +-
.../HJGL/FL/HJGLDataEdit.aspx.designer.cs | 38 +--
.../ProjectData/ProjectList.aspx | 2 +-
.../BeforeTestRun/SelectInstrument.aspx.cs | 13 +-
.../BeforeTestRun/SelectProperty.aspx.cs | 13 +-
.../BeforeTestRun/SelectTechnology.aspx.cs | 13 +-
.../SysPipingDeviceImport.aspx.cs | 3 +-
SGGL/Model/IDP/IDPPreRunData.cs | 176 +++++++++++++
SGGL/Model/Model.csproj | 1 +
SGGL/WebAPI/Controllers/IDP/IDPController.cs | 2 +-
12 files changed, 371 insertions(+), 159 deletions(-)
create mode 100644 SGGL/Model/IDP/IDPPreRunData.cs
diff --git a/SGGL/BLL/IDP/IDPDataService.cs b/SGGL/BLL/IDP/IDPDataService.cs
index 02cdc6ce..04cdac8a 100644
--- a/SGGL/BLL/IDP/IDPDataService.cs
+++ b/SGGL/BLL/IDP/IDPDataService.cs
@@ -30,102 +30,72 @@ namespace BLL
//private static readonly string IDPApiUrl = "https://idp.cwcec.com/";
private static readonly string IDPApiUrl = SysConstSetService.WuHuanIDPPath;
- #region 接口授权认证
+ #region 试车工作包
///
- /// 加密公钥
+ /// 项目试车工作包
///
- private static readonly string publicKey = "g1sk7Xtc1TJouHdY4+FAe5atGCu2n17NhoKVDV57pki1IL+9+S7BY4gxAjmMkUU2/cbCCdbPoUJLBrCBCjX7yI3UJW6FZwQWkn3kVoeulLEwdPCIq/GUjMXaWf3Iaaad5wBUFbfXAzv15VN6z48Nt1IY/O8YEzhIpuZdtEgDdos=AQAB";
- //private static readonly string publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQChnc2YD0YzJPx6QTh+/n7XzjR1ugFzrsmPolJhpCfWMKrSGbT7iX/Kgcm1AI+T95K4Jzv3KS42QTecZ1ziJ4Rr9Luzw+9ZCSjMZgrmAUbY5IeBaA6GzaSk8UWHZ4n5PL+GUGq+2f+COL7+KCS2AxEpaqDZVrJrIfg/UektdgNyzwIDAQAB";
-
- ///
- /// 第三方加密认证接口
- ///
- /// 五环IDP系统SessionId有效期30分钟
- ///
- public static SessionItem GetAuthenticationSession()
+ /// 项目Id
+ /// 获取指定时间之后到现在的异动数据
+ public static void GetIDPProjectPreRunData(string projectId = "")
{
- SessionItem session = new SessionItem();
+ string mainProjectId = string.Empty;//五环主数据项目Id
+ string wbsCode = string.Empty;//五环主数据wbs编码
+ string workitemCode = string.Empty;//五环主数据文件类别码
+ if (!string.IsNullOrWhiteSpace(projectId))
+ {
+ var project = BLL.ProjectService.GetProjectByProjectId(projectId);
+ var mainProject = BLL.PMPDataService.GetPMPProjectByCode(project.ProjectCode);
+ if (mainProject != null)
+ {
+ mainProjectId = mainProject.Code;
+ }
+ }
+
+ //https://idp.cwcec.com/OSS/projects/100168/wbs/040101/workitems/CP2100/objects/latest
+ //string url = $"{IDPApiUrl}/OSS/projects/{mainProjectId}/wbs/{wbsCode}/workitems/{workitemCode}/objects/latest";
+ string url = $"{IDPApiUrl}OSS/projects/100168/wbs/040101/workitems/CP2100/objects/latest";
+
try
{
- //// 创建RSA加密服务提供者
- ////using (RSA rsa = RSA.Create())
- //using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider())
- //{
- //// 获取公钥false表示只导出公钥
- //string publicKey = rsa.ToXmlString(false);
- //// 获取私钥true表示导出公钥和私钥
- //string privateKey = rsa.ToXmlString(true);
+ var session = GetAuthenticationSession();
-
- ////用户名加密
- //string encryptedUsername = EncryptData("dataviewer", publicKey);
- ////密码加密
- //string encryptedPassword = EncryptData("a3365$!", publicKey);
-
- //用户名加密后的密文
- string encryptedUsername = "k0N0tx/hfRPY0v2lq1G8eH6hCO+UiMqlSZi1PD6bhGf4YpP/koJq5hfMsDSzdn3dZjzExrwyrjFWp/1jZLde0+gRbQ0D7tzm0R5D6AmriodD2cJvrEiwtDy7SeGNloSaNmpTEMuycpuueiOeGhMkKnTwWfRkEw73lxEpTmaahq4=";
- //密码加密后的密文
- string encryptedPassword = "HLLroiNJJzyTWJt9td1xgChbVzyQkoxWCGGXqdwI2cvlUF/A30FAPaInszSwEhNRQlJZZ01EODElemkgv36DMF+XGwfDi0BfIq9jKG+/+wq0TVOHNhiu2NPzpn5Ji2X3yXIXpH1zv6XEtkvx/qiLToZYfRQCufsl5vH1cZxk2fQ=";
-
- string url = $"{IDPApiUrl}UAMS/authEncrypt";
- //string url = $"http://10.5.6.151:8100/UAMS/authEncrypt";
- string contenttype = "application/json;charset=utf-8";
- var body = new
+ ErrLogInfo.WriteLog($"Session——name:{session.name};value:{session.value}");
+ Hashtable newToken = new Hashtable { { "Cookie", $"{session.name}={session.value}" } };
+ var returndata = BLL.APIGetHttpService.OutsideHttp(url, "GET", null, newToken, null);
+ if (!string.IsNullOrEmpty(returndata))
{
- encryptedUsername = encryptedUsername,
- encryptedPassword = encryptedPassword
- };
-
- string pushContent = JsonConvert.SerializeObject(body);
- string strJosn = APIGetHttpService.Http(url, "POST", contenttype, null, pushContent);
- //string strJosn = HttpHelper.Post(url, null, pushContent);
- JObject obj = JObject.Parse(strJosn);
- if (!string.IsNullOrEmpty(strJosn))
- {
- string value = obj["value"].ToString();
- string name = obj["name"].ToString();
- session.value = value;
- session.name = name;
+ IDPPreRunData responseData = IDPPreRunData.FromJson(returndata);
}
- //}
}
catch (WebException ex)
{
- return null;
+
}
finally
{
}
- return session;
}
- ///
- /// 加密字符串
- ///
- /// 加密信息
- /// 公钥
- ///
- public static string EncryptData(string data, string publicKey)
- {
- using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider())
- {
- string result = string.Empty;
- try
- {
- rsa.FromXmlString(publicKey); //从字符串加载公钥
- byte[] dataBytes = Encoding.UTF8.GetBytes(data);
- byte[] encryptedBytes = rsa.Encrypt(dataBytes, false); //使用公钥加密数据,false表示使用OAEP填充方式
- result = Convert.ToBase64String(encryptedBytes); //返回Base64编码的加密数据
- }
- catch (Exception ex)
- {
- Console.WriteLine("Error encrypting: {0}", ex.Message);
- }
- return result;
- }
- }
+
+ //public static void AddPMP_Project(List newtables)
+ //{
+ // Model.SGGLDB db = Funs.DB;
+ // db.PMP_Project.InsertAllOnSubmit(newtables);
+ // db.SubmitChanges();
+ //}
+
+ //public static void DeleteAllPMP_Project()
+ //{
+ // Model.SGGLDB db = Funs.DB;
+ // if (db.PMP_Project.FirstOrDefault() != null)
+ // {
+ // db.PMP_Project.DeleteAllOnSubmit(db.PMP_Project);
+ // db.SubmitChanges();
+ // }
+ //}
+
#endregion
@@ -680,63 +650,104 @@ namespace BLL
#endregion
- #region 试车工作包
+ #region 接口授权认证
///
- /// 获取工作包结构化数据
+ /// 加密公钥
///
- public static void GetIDPProjectMasterData()
+ private static readonly string publicKey = "g1sk7Xtc1TJouHdY4+FAe5atGCu2n17NhoKVDV57pki1IL+9+S7BY4gxAjmMkUU2/cbCCdbPoUJLBrCBCjX7yI3UJW6FZwQWkn3kVoeulLEwdPCIq/GUjMXaWf3Iaaad5wBUFbfXAzv15VN6z48Nt1IY/O8YEzhIpuZdtEgDdos=AQAB";
+ //private static readonly string publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQChnc2YD0YzJPx6QTh+/n7XzjR1ugFzrsmPolJhpCfWMKrSGbT7iX/Kgcm1AI+T95K4Jzv3KS42QTecZ1ziJ4Rr9Luzw+9ZCSjMZgrmAUbY5IeBaA6GzaSk8UWHZ4n5PL+GUGq+2f+COL7+KCS2AxEpaqDZVrJrIfg/UektdgNyzwIDAQAB";
+
+ ///
+ /// 第三方加密认证接口
+ ///
+ /// 五环IDP系统SessionId有效期30分钟
+ ///
+ public static SessionItem GetAuthenticationSession()
{
- string projectId = string.Empty;//五环主数据项目Id
- string wbsCode = string.Empty;//五环主数据wbs编码
- string workitemCode = string.Empty;//五环主数据文件类别码
-
- //https://idp.cwcec.com/OSS/projects/9100168/wbs/000000/workitems/CP2100/objects/latest
- //string url = $"{IDPApiUrl}/OSS/projects/{projectId}/wbs/{wbsCode}/workitems/{workitemCode}/objects/latest";
- string url = $"{IDPApiUrl}/OSS/projects/9100168/wbs/000000/workitems/CP2100/objects/latest";
-
-
- //测试环境接口地址
- var testApiUrl = "http://10.5.6.151:8100/OSS/projects/9100168/wbs/000000/workitems/CP2100/objects/latest";
+ SessionItem session = new SessionItem();
try
{
- var session = GetAuthenticationSession();
+ //// 创建RSA加密服务提供者
+ ////using (RSA rsa = RSA.Create())
+ //using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider())
+ //{
+ //// 获取公钥false表示只导出公钥
+ //string publicKey = rsa.ToXmlString(false);
+ //// 获取私钥true表示导出公钥和私钥
+ //string privateKey = rsa.ToXmlString(true);
- ErrLogInfo.WriteLog($"Session——name:{session.name};value:{session.value}");
- Hashtable newToken = new Hashtable { { session.name, session.value } };
- var returndata = BLL.APIGetHttpService.OutsideHttp(url, "GET", null, newToken, null);
+ ////用户名加密
+ //string encryptedUsername = EncryptData("dataviewer", publicKey);
+ ////密码加密
+ //string encryptedPassword = EncryptData("a3365$!", publicKey);
+
+ //用户名加密后的密文
+ string encryptedUsername = "k0N0tx/hfRPY0v2lq1G8eH6hCO+UiMqlSZi1PD6bhGf4YpP/koJq5hfMsDSzdn3dZjzExrwyrjFWp/1jZLde0+gRbQ0D7tzm0R5D6AmriodD2cJvrEiwtDy7SeGNloSaNmpTEMuycpuueiOeGhMkKnTwWfRkEw73lxEpTmaahq4=";
+ //密码加密后的密文
+ string encryptedPassword = "HLLroiNJJzyTWJt9td1xgChbVzyQkoxWCGGXqdwI2cvlUF/A30FAPaInszSwEhNRQlJZZ01EODElemkgv36DMF+XGwfDi0BfIq9jKG+/+wq0TVOHNhiu2NPzpn5Ji2X3yXIXpH1zv6XEtkvx/qiLToZYfRQCufsl5vH1cZxk2fQ=";
+
+ string url = $"{IDPApiUrl}UAMS/authEncrypt";
+ //string url = $"http://10.5.6.151:8100/UAMS/authEncrypt";
+ string contenttype = "application/json;charset=utf-8";
+ var body = new
+ {
+ encryptedUsername = encryptedUsername,
+ encryptedPassword = encryptedPassword
+ };
+
+ string pushContent = JsonConvert.SerializeObject(body);
+ string strJosn = APIGetHttpService.Http(url, "POST", contenttype, null, pushContent);
+ //string strJosn = HttpHelper.Post(url, null, pushContent);
+ JObject obj = JObject.Parse(strJosn);
+ if (!string.IsNullOrEmpty(strJosn))
+ {
+ string value = obj["value"].ToString();
+ string name = obj["name"].ToString();
+ session.value = value;
+ session.name = name;
+ }
+ //}
}
catch (WebException ex)
{
-
+ return null;
}
finally
{
}
+ return session;
}
-
- //public static void AddPMP_Project(List newtables)
- //{
- // Model.SGGLDB db = Funs.DB;
- // db.PMP_Project.InsertAllOnSubmit(newtables);
- // db.SubmitChanges();
- //}
-
- //public static void DeleteAllPMP_Project()
- //{
- // Model.SGGLDB db = Funs.DB;
- // if (db.PMP_Project.FirstOrDefault() != null)
- // {
- // db.PMP_Project.DeleteAllOnSubmit(db.PMP_Project);
- // db.SubmitChanges();
- // }
- //}
-
+ ///
+ /// 加密字符串
+ ///
+ /// 加密信息
+ /// 公钥
+ ///
+ public static string EncryptData(string data, string publicKey)
+ {
+ using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider())
+ {
+ string result = string.Empty;
+ try
+ {
+ rsa.FromXmlString(publicKey); //从字符串加载公钥
+ byte[] dataBytes = Encoding.UTF8.GetBytes(data);
+ byte[] encryptedBytes = rsa.Encrypt(dataBytes, false); //使用公钥加密数据,false表示使用OAEP填充方式
+ result = Convert.ToBase64String(encryptedBytes); //返回Base64编码的加密数据
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine("Error encrypting: {0}", ex.Message);
+ }
+ return result;
+ }
+ }
#endregion
- }
+ }
}
diff --git a/SGGL/BLL/PMP/PMPDataService.cs b/SGGL/BLL/PMP/PMPDataService.cs
index 40993ab5..d1522377 100644
--- a/SGGL/BLL/PMP/PMPDataService.cs
+++ b/SGGL/BLL/PMP/PMPDataService.cs
@@ -16,6 +16,16 @@ namespace BLL
//private static readonly string PmpApiUrl = "http://mdm.cwcec.com:8020/";
private static readonly string PmpApiUrl = SysConstSetService.WuHuanPMPPath;
+ ///
+ /// 根据主项目code获取主项目数据
+ ///
+ ///
+ ///
+ public static Model.PMP_Project GetPMPProjectByCode(string proCode)
+ {
+ return Funs.DB.PMP_Project.OrderBy(x => x.RealEndDate).FirstOrDefault(e => e.StNum == proCode);
+ }
+
///
/// 获取token
///
diff --git a/SGGL/FineUIPro.Web/HJGL/FL/HJGLDataEdit.aspx b/SGGL/FineUIPro.Web/HJGL/FL/HJGLDataEdit.aspx
index d13b1403..4c5f5b11 100644
--- a/SGGL/FineUIPro.Web/HJGL/FL/HJGLDataEdit.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/FL/HJGLDataEdit.aspx
@@ -14,14 +14,22 @@
-
-
+
+
+
+
+ <%--
+ --%>
-
-
+
+
+
+
+ <%--
+ --%>
@@ -30,7 +38,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/HJGL/FL/HJGLDataEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/FL/HJGLDataEdit.aspx.designer.cs
index e4895ace..a53bb04a 100644
--- a/SGGL/FineUIPro.Web/HJGL/FL/HJGLDataEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HJGL/FL/HJGLDataEdit.aspx.designer.cs
@@ -7,11 +7,13 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.HJGL.FL {
-
-
- public partial class HJGLDataEdit {
-
+namespace FineUIPro.Web.HJGL.FL
+{
+
+
+ public partial class HJGLDataEdit
+ {
+
///
/// form1 控件。
///
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.FL {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.FL {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// SimpleForm1 控件。
///
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.FL {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
/// txtTotalWeldQuantity 控件。
///
@@ -46,8 +48,8 @@ namespace FineUIPro.Web.HJGL.FL {
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtTotalWeldQuantity;
-
+ protected global::FineUIPro.NumberBox txtTotalWeldQuantity;
+
///
/// txtTotalCompleted 控件。
///
@@ -55,8 +57,8 @@ namespace FineUIPro.Web.HJGL.FL {
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtTotalCompleted;
-
+ protected global::FineUIPro.NumberBox txtTotalCompleted;
+
///
/// txtOneTimeFilmAmount 控件。
///
@@ -64,8 +66,8 @@ namespace FineUIPro.Web.HJGL.FL {
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtOneTimeFilmAmount;
-
+ protected global::FineUIPro.NumberBox txtOneTimeFilmAmount;
+
///
/// txtOneTimeFilmQualifiedAmount 控件。
///
@@ -73,8 +75,8 @@ namespace FineUIPro.Web.HJGL.FL {
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtOneTimeFilmQualifiedAmount;
-
+ protected global::FineUIPro.NumberBox txtOneTimeFilmQualifiedAmount;
+
///
/// Toolbar1 控件。
///
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.FL {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// hdAttachUrl 控件。
///
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.FL {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.HiddenField hdAttachUrl;
-
+
///
/// btnSave 控件。
///
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx
index 8fc6ce26..688be2a1 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx
@@ -22,7 +22,7 @@
diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SelectInstrument.aspx.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SelectInstrument.aspx.cs
index dfe1ef82..5276ce2a 100644
--- a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SelectInstrument.aspx.cs
+++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SelectInstrument.aspx.cs
@@ -56,15 +56,16 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
///
private void BindGrid()
{
- string strSql = @"select * from PreRun_InstrumentSysPiping where ProjectId=@ProjectId and SystemId=@SystemId ";
+ //string strSql = @"select * from PreRun_InstrumentSysPiping where ProjectId=@ProjectId and SystemId=@SystemId ";
+ string strSql = @"select * from PreRun_InstrumentSysPiping where ProjectId=@ProjectId and SystemId=@SystemId and InstrumentId not in (select InstrumentId from PreRun_SubInstrumentSelect) ";
List listStr = new List();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@SystemId", this.SystemId));
- if (!string.IsNullOrWhiteSpace(SelectInstrumentIds))
- {
- var ids = SelectInstrumentIds.Split(',').ToList();
- strSql += $" and InstrumentId not in ('{string.Join("','", ids)}')";
- }
+ //if (!string.IsNullOrWhiteSpace(SelectInstrumentIds))
+ //{
+ // var ids = SelectInstrumentIds.Split(',').ToList();
+ // strSql += $" and InstrumentId not in ('{string.Join("','", ids)}')";
+ //}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SelectProperty.aspx.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SelectProperty.aspx.cs
index 18c4b547..80a46e63 100644
--- a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SelectProperty.aspx.cs
+++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SelectProperty.aspx.cs
@@ -56,15 +56,16 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
///
private void BindGrid()
{
- string strSql = @"select * from PreRun_PropertySysPiping where ProjectId=@ProjectId and SystemId=@SystemId and PropertyId not in (select PropertyId from PreRun_SubPropertySelect where SystemId=@SystemId) ";
+ //string strSql = @"select * from PreRun_PropertySysPiping where ProjectId=@ProjectId and SystemId=@SystemId and PropertyId not in (select PropertyId from PreRun_SubPropertySelect where SystemId=@SystemId) ";
+ string strSql = @"select * from PreRun_PropertySysPiping where ProjectId=@ProjectId and SystemId=@SystemId and PropertyId not in (select PropertyId from PreRun_SubPropertySelect) ";
List listStr = new List();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@SystemId", this.SystemId));
- if (!string.IsNullOrWhiteSpace(SelectPropertyIds))
- {
- var ids = SelectPropertyIds.Split(',').ToList();
- strSql += $" and PropertyId not in ('{string.Join("','", ids)}')";
- }
+ //if (!string.IsNullOrWhiteSpace(SelectPropertyIds))
+ //{
+ // var ids = SelectPropertyIds.Split(',').ToList();
+ // strSql += $" and PropertyId not in ('{string.Join("','", ids)}')";
+ //}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SelectTechnology.aspx.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SelectTechnology.aspx.cs
index 7444f161..1ca73e4e 100644
--- a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SelectTechnology.aspx.cs
+++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SelectTechnology.aspx.cs
@@ -57,15 +57,16 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
///
private void BindGrid()
{
- string strSql = @"select * from PreRun_TechnologySysPiping where ProjectId=@ProjectId and SystemId=@SystemId and TechnologyId not in (select TechnologyId from PreRun_SubTechnologySelect where SystemId=@SystemId) ";
+ //string strSql = @"select * from PreRun_TechnologySysPiping where ProjectId=@ProjectId and SystemId=@SystemId and TechnologyId not in (select TechnologyId from PreRun_SubTechnologySelect where SystemId=@SystemId) ";
+ string strSql = @"select * from PreRun_TechnologySysPiping where ProjectId=@ProjectId and SystemId=@SystemId and TechnologyId not in (select TechnologyId from PreRun_SubTechnologySelect ) ";
List listStr = new List();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@SystemId", this.SystemId));
- if (!string.IsNullOrWhiteSpace(SelectTechnologyIds))
- {
- var ids = SelectTechnologyIds.Split(',').ToList();
- strSql += $" and TechnologyId not in ('{string.Join("','", ids)}')";
- }
+ //if (!string.IsNullOrWhiteSpace(SelectTechnologyIds))
+ //{
+ // var ids = SelectTechnologyIds.Split(',').ToList();
+ // strSql += $" and TechnologyId not in ('{string.Join("','", ids)}')";
+ //}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
diff --git a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SysPipingDeviceImport.aspx.cs b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SysPipingDeviceImport.aspx.cs
index 28040f7d..ea9d7aa7 100644
--- a/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SysPipingDeviceImport.aspx.cs
+++ b/SGGL/FineUIPro.Web/TestRun/BeforeTestRun/SysPipingDeviceImport.aspx.cs
@@ -1253,7 +1253,8 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
///
protected void btngySelect_Click(object sender, EventArgs e)
{
- string window = $"SelectTechnology.aspx?SubSystemId={this.tvControlItem.SelectedNodeID}&SystemId={hidSystemId.Text}&SelectTechnologyIds={hidSelectTechnology.Text}";
+ //string window = $"SelectTechnology.aspx?SubSystemId={this.tvControlItem.SelectedNodeID}&SystemId={hidSystemId.Text}&SelectTechnologyIds={hidSelectTechnology.Text}";
+ string window = $"SelectTechnology.aspx?SubSystemId={this.tvControlItem.SelectedNodeID}&SystemId={hidSystemId.Text}";
PageContext.RegisterStartupScript(Window2.GetSaveStateReference(this.hidSelectTechnology.ClientID) + Window2.GetShowReference(window));
}
diff --git a/SGGL/Model/IDP/IDPPreRunData.cs b/SGGL/Model/IDP/IDPPreRunData.cs
new file mode 100644
index 00000000..1257b32a
--- /dev/null
+++ b/SGGL/Model/IDP/IDPPreRunData.cs
@@ -0,0 +1,176 @@
+//
+//
+// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
+//
+// using Model;
+//
+// var response = Response.FromJson(jsonString);
+
+
+namespace Model
+{
+ using System;
+ using Newtonsoft.Json;
+
+ ///
+ /// 数据结果对象
+ ///
+ public partial class IDPPreRunData
+ {
+ ///
+ /// id
+ ///
+ [JsonProperty("id")]
+ public string id { get; set; }
+ ///
+ /// categoryName
+ ///
+ [JsonProperty("categoryName")]
+ public string categoryName { get; set; }
+ ///
+ /// tag
+ ///
+ [JsonProperty("tag")]
+ public string tag { get; set; }
+ ///
+ /// name
+ ///
+ [JsonProperty("name")]
+ public string name { get; set; }
+ ///
+ /// parentId
+ ///
+ [JsonProperty("parentId")]
+ public string parentId { get; set; }
+ ///
+ /// projectId
+ ///
+ [JsonProperty("projectId")]
+ public string projectId { get; set; }
+ ///
+ /// wbsCode
+ ///
+ [JsonProperty("wbsCode")]
+ public string wbsCode { get; set; }
+ ///
+ /// itemType
+ ///
+ [JsonProperty("itemType")]
+ public string itemType { get; set; }
+ ///
+ /// versionId
+ ///
+ [JsonProperty("versionId")]
+ public string versionId { get; set; }
+ ///
+ /// fileCode
+ ///
+ [JsonProperty("fileCode")]
+ public string fileCode { get; set; }
+ ///
+ /// projectCode
+ ///
+ [JsonProperty("projectCode")]
+ public string projectCode { get; set; }
+ ///
+ /// workItemCode
+ ///
+ [JsonProperty("workItemCode")]
+ public string workItemCode { get; set; }
+ ///
+ /// tagnumber
+ ///
+ [JsonProperty("tagnumber")]
+ public string tagnumber { get; set; }
+ ///
+ /// sequence
+ ///
+ [JsonProperty("sequence")]
+ public string sequence { get; set; }
+ ///
+ /// version
+ ///
+ [JsonProperty("version")]
+ public string version { get; set; }
+ ///
+ /// createTime
+ ///
+ [JsonProperty("createTime")]
+ public DateTime? createTime { get; set; }
+ ///
+ /// updateTime
+ ///
+ [JsonProperty("updateTime")]
+ public DateTime? updateTime { get; set; }
+
+ ///
+ /// 返回数据属性对象
+ ///
+ [JsonProperty("properties")]
+ public System.Collections.Generic.List properties { get; set; }
+ }
+
+
+ ///
+ /// 数据属性对象
+ ///
+ public partial class Property
+ {
+ ///
+ /// id
+ ///
+ [JsonProperty("id")]
+ public string id { get; set; }
+ ///
+ /// propertyName
+ ///
+ [JsonProperty("propertyName")]
+ public string propertyName { get; set; }
+ ///
+ /// propertyValue
+ ///
+ [JsonProperty("propertyValue")]
+ public string propertyValue { get; set; }
+ ///
+ /// unit
+ ///
+ [JsonProperty("unit")]
+ public string unit { get; set; }
+ /////
+ ///// createTime
+ /////
+ //[JsonProperty("createTime")]
+ //public DateTime? createTime { get; set; }
+ /////
+ ///// updateTime
+ /////
+ //[JsonProperty("updateTime")]
+ //public DateTime? updateTime { get; set; }
+ /////
+ ///// pwiItemId
+ /////
+ //[JsonProperty("pwiItemId")]
+ //public string pwiItemId { get; set; }
+ /////
+ ///// versionId
+ /////
+ //[JsonProperty("versionId")]
+ //public string versionId { get; set; }
+ /////
+ ///// ownerItemId
+ /////
+ //[JsonProperty("ownerItemId")]
+ //public string ownerItemId { get; set; }
+ }
+
+
+ public partial class IDPPreRunData
+ {
+ public static IDPPreRunData FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject(json, Model.Converter.Settings);
+ }
+ }
+
+}
+
diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj
index 80ef2051..e0ff1c46 100644
--- a/SGGL/Model/Model.csproj
+++ b/SGGL/Model/Model.csproj
@@ -236,6 +236,7 @@
+
diff --git a/SGGL/WebAPI/Controllers/IDP/IDPController.cs b/SGGL/WebAPI/Controllers/IDP/IDPController.cs
index 5558baf5..35676a87 100644
--- a/SGGL/WebAPI/Controllers/IDP/IDPController.cs
+++ b/SGGL/WebAPI/Controllers/IDP/IDPController.cs
@@ -119,7 +119,7 @@ namespace WebAPI.Controllers
var responeData = new Model.ResponeData();
try
{
- IDPDataService.GetIDPProjectMasterData();
+ IDPDataService.GetIDPProjectPreRunData();
}
catch (Exception ex)
{