parent
45ed356149
commit
c4f43bee08
|
@ -30,102 +30,72 @@ namespace BLL
|
|||
//private static readonly string IDPApiUrl = "https://idp.cwcec.com/";
|
||||
private static readonly string IDPApiUrl = SysConstSetService.WuHuanIDPPath;
|
||||
|
||||
#region 接口授权认证
|
||||
#region 试车工作包
|
||||
|
||||
/// <summary>
|
||||
/// 加密公钥
|
||||
/// 项目试车工作包
|
||||
/// </summary>
|
||||
private static readonly string publicKey = "<RSAKeyValue><Modulus>g1sk7Xtc1TJouHdY4+FAe5atGCu2n17NhoKVDV57pki1IL+9+S7BY4gxAjmMkUU2/cbCCdbPoUJLBrCBCjX7yI3UJW6FZwQWkn3kVoeulLEwdPCIq/GUjMXaWf3Iaaad5wBUFbfXAzv15VN6z48Nt1IY/O8YEzhIpuZdtEgDdos=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>";
|
||||
//private static readonly string publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQChnc2YD0YzJPx6QTh+/n7XzjR1ugFzrsmPolJhpCfWMKrSGbT7iX/Kgcm1AI+T95K4Jzv3KS42QTecZ1ziJ4Rr9Luzw+9ZCSjMZgrmAUbY5IeBaA6GzaSk8UWHZ4n5PL+GUGq+2f+COL7+KCS2AxEpaqDZVrJrIfg/UektdgNyzwIDAQAB";
|
||||
|
||||
/// <summary>
|
||||
/// 第三方加密认证接口
|
||||
/// </summary>
|
||||
/// 五环IDP系统SessionId有效期30分钟
|
||||
/// <returns></returns>
|
||||
public static SessionItem GetAuthenticationSession()
|
||||
/// <param name="projectId">项目Id</param>
|
||||
/// <param name="startDate">获取指定时间之后到现在的异动数据</param>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加密字符串
|
||||
/// </summary>
|
||||
/// <param name="data">加密信息</param>
|
||||
/// <param name="publicKey">公钥</param>
|
||||
/// <returns></returns>
|
||||
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<Model.PMP_Project> 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 接口授权认证
|
||||
|
||||
/// <summary>
|
||||
/// 获取工作包结构化数据
|
||||
/// 加密公钥
|
||||
/// </summary>
|
||||
public static void GetIDPProjectMasterData()
|
||||
private static readonly string publicKey = "<RSAKeyValue><Modulus>g1sk7Xtc1TJouHdY4+FAe5atGCu2n17NhoKVDV57pki1IL+9+S7BY4gxAjmMkUU2/cbCCdbPoUJLBrCBCjX7yI3UJW6FZwQWkn3kVoeulLEwdPCIq/GUjMXaWf3Iaaad5wBUFbfXAzv15VN6z48Nt1IY/O8YEzhIpuZdtEgDdos=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>";
|
||||
//private static readonly string publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQChnc2YD0YzJPx6QTh+/n7XzjR1ugFzrsmPolJhpCfWMKrSGbT7iX/Kgcm1AI+T95K4Jzv3KS42QTecZ1ziJ4Rr9Luzw+9ZCSjMZgrmAUbY5IeBaA6GzaSk8UWHZ4n5PL+GUGq+2f+COL7+KCS2AxEpaqDZVrJrIfg/UektdgNyzwIDAQAB";
|
||||
|
||||
/// <summary>
|
||||
/// 第三方加密认证接口
|
||||
/// </summary>
|
||||
/// 五环IDP系统SessionId有效期30分钟
|
||||
/// <returns></returns>
|
||||
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<Model.PMP_Project> 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();
|
||||
// }
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 加密字符串
|
||||
/// </summary>
|
||||
/// <param name="data">加密信息</param>
|
||||
/// <param name="publicKey">公钥</param>
|
||||
/// <returns></returns>
|
||||
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
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,16 @@ namespace BLL
|
|||
//private static readonly string PmpApiUrl = "http://mdm.cwcec.com:8020/";
|
||||
private static readonly string PmpApiUrl = SysConstSetService.WuHuanPMPPath;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主项目code获取主项目数据
|
||||
/// </summary>
|
||||
/// <param name="proCode"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.PMP_Project GetPMPProjectByCode(string proCode)
|
||||
{
|
||||
return Funs.DB.PMP_Project.OrderBy(x => x.RealEndDate).FirstOrDefault(e => e.StNum == proCode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取token
|
||||
/// </summary>
|
||||
|
|
|
@ -14,14 +14,22 @@
|
|||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtTotalWeldQuantity" runat="server" Label="总达因数" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
<f:TextBox ID="txtTotalCompleted" runat="server" Label="完成达因数" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
<f:NumberBox ID="txtTotalWeldQuantity" NoDecimal="false" NoNegative="true" MinValue="0" runat="server" Label="总达因数">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="txtTotalCompleted" NoDecimal="false" NoNegative="true" MinValue="0" runat="server" Label="完成达因数">
|
||||
</f:NumberBox>
|
||||
<%-- <f:TextBox ID="txtTotalWeldQuantity" runat="server" Label="总达因数" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
<f:TextBox ID="txtTotalCompleted" runat="server" Label="完成达因数" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtOneTimeFilmAmount" runat="server" Label="总片数" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
<f:TextBox ID="txtOneTimeFilmQualifiedAmount" runat="server" Label="合格片数" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
<f:NumberBox ID="txtOneTimeFilmAmount" NoDecimal="true" NoNegative="true" MinValue="0" runat="server" Label="总片数">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="txtOneTimeFilmQualifiedAmount" NoDecimal="true" NoNegative="true" MinValue="0" runat="server" Label="合格片数">
|
||||
</f:NumberBox>
|
||||
<%-- <f:TextBox ID="txtOneTimeFilmAmount" runat="server" Label="总片数" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
<f:TextBox ID="txtOneTimeFilmQualifiedAmount" runat="server" Label="合格片数" MaxLength="50" Required="true" ShowRedStar="true"></f:TextBox>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
|
@ -30,7 +38,7 @@
|
|||
<Items>
|
||||
<f:HiddenField ID="hdAttachUrl" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click">
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" ToolTip="保存" ValidateForms="SimpleForm1" OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
|
|
|
@ -7,11 +7,13 @@
|
|||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.FL {
|
||||
|
||||
|
||||
public partial class HJGLDataEdit {
|
||||
|
||||
namespace FineUIPro.Web.HJGL.FL
|
||||
{
|
||||
|
||||
|
||||
public partial class HJGLDataEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
|
@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.FL {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
|
@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.FL {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
|
@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.FL {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtTotalWeldQuantity 控件。
|
||||
/// </summary>
|
||||
|
@ -46,8 +48,8 @@ namespace FineUIPro.Web.HJGL.FL {
|
|||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTotalWeldQuantity;
|
||||
|
||||
protected global::FineUIPro.NumberBox txtTotalWeldQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// txtTotalCompleted 控件。
|
||||
/// </summary>
|
||||
|
@ -55,8 +57,8 @@ namespace FineUIPro.Web.HJGL.FL {
|
|||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtTotalCompleted;
|
||||
|
||||
protected global::FineUIPro.NumberBox txtTotalCompleted;
|
||||
|
||||
/// <summary>
|
||||
/// txtOneTimeFilmAmount 控件。
|
||||
/// </summary>
|
||||
|
@ -64,8 +66,8 @@ namespace FineUIPro.Web.HJGL.FL {
|
|||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtOneTimeFilmAmount;
|
||||
|
||||
protected global::FineUIPro.NumberBox txtOneTimeFilmAmount;
|
||||
|
||||
/// <summary>
|
||||
/// txtOneTimeFilmQualifiedAmount 控件。
|
||||
/// </summary>
|
||||
|
@ -73,8 +75,8 @@ namespace FineUIPro.Web.HJGL.FL {
|
|||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtOneTimeFilmQualifiedAmount;
|
||||
|
||||
protected global::FineUIPro.NumberBox txtOneTimeFilmQualifiedAmount;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.FL {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// hdAttachUrl 控件。
|
||||
/// </summary>
|
||||
|
@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.FL {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdAttachUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="项目信息"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true"
|
||||
DataKeyNames="ProjectId" DataIDField="ProjectId" AllowSorting="true" SortField="ProjectCode" SortDirection="DESC"
|
||||
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
OnSort="Grid1_Sort" AllowPaging="false" IsDatabasePaging="false" PageSize="1000" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True" EnableCheckBoxSelect="true" EnableMultiSelect="true" OnRowCommand="Grid1_RowCommand">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
|
|
|
@ -56,15 +56,16 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
|||
/// </summary>
|
||||
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<SqlParameter> listStr = new List<SqlParameter>();
|
||||
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;
|
||||
|
|
|
@ -56,15 +56,16 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
|||
/// </summary>
|
||||
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<SqlParameter> listStr = new List<SqlParameter>();
|
||||
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);
|
||||
|
|
|
@ -57,15 +57,16 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
|||
/// </summary>
|
||||
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<SqlParameter> listStr = new List<SqlParameter>();
|
||||
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);
|
||||
|
|
|
@ -1253,7 +1253,8 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
|
|||
/// </summary>
|
||||
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));
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,176 @@
|
|||
// <auto-generated />
|
||||
//
|
||||
// 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;
|
||||
|
||||
/// <summary>
|
||||
/// 数据结果对象
|
||||
/// </summary>
|
||||
public partial class IDPPreRunData
|
||||
{
|
||||
/// <summary>
|
||||
/// id
|
||||
/// </summary>
|
||||
[JsonProperty("id")]
|
||||
public string id { get; set; }
|
||||
/// <summary>
|
||||
/// categoryName
|
||||
/// </summary>
|
||||
[JsonProperty("categoryName")]
|
||||
public string categoryName { get; set; }
|
||||
/// <summary>
|
||||
/// tag
|
||||
/// </summary>
|
||||
[JsonProperty("tag")]
|
||||
public string tag { get; set; }
|
||||
/// <summary>
|
||||
/// name
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
public string name { get; set; }
|
||||
/// <summary>
|
||||
/// parentId
|
||||
/// </summary>
|
||||
[JsonProperty("parentId")]
|
||||
public string parentId { get; set; }
|
||||
/// <summary>
|
||||
/// projectId
|
||||
/// </summary>
|
||||
[JsonProperty("projectId")]
|
||||
public string projectId { get; set; }
|
||||
/// <summary>
|
||||
/// wbsCode
|
||||
/// </summary>
|
||||
[JsonProperty("wbsCode")]
|
||||
public string wbsCode { get; set; }
|
||||
/// <summary>
|
||||
/// itemType
|
||||
/// </summary>
|
||||
[JsonProperty("itemType")]
|
||||
public string itemType { get; set; }
|
||||
/// <summary>
|
||||
/// versionId
|
||||
/// </summary>
|
||||
[JsonProperty("versionId")]
|
||||
public string versionId { get; set; }
|
||||
/// <summary>
|
||||
/// fileCode
|
||||
/// </summary>
|
||||
[JsonProperty("fileCode")]
|
||||
public string fileCode { get; set; }
|
||||
/// <summary>
|
||||
/// projectCode
|
||||
/// </summary>
|
||||
[JsonProperty("projectCode")]
|
||||
public string projectCode { get; set; }
|
||||
/// <summary>
|
||||
/// workItemCode
|
||||
/// </summary>
|
||||
[JsonProperty("workItemCode")]
|
||||
public string workItemCode { get; set; }
|
||||
/// <summary>
|
||||
/// tagnumber
|
||||
/// </summary>
|
||||
[JsonProperty("tagnumber")]
|
||||
public string tagnumber { get; set; }
|
||||
/// <summary>
|
||||
/// sequence
|
||||
/// </summary>
|
||||
[JsonProperty("sequence")]
|
||||
public string sequence { get; set; }
|
||||
/// <summary>
|
||||
/// version
|
||||
/// </summary>
|
||||
[JsonProperty("version")]
|
||||
public string version { get; set; }
|
||||
/// <summary>
|
||||
/// createTime
|
||||
/// </summary>
|
||||
[JsonProperty("createTime")]
|
||||
public DateTime? createTime { get; set; }
|
||||
/// <summary>
|
||||
/// updateTime
|
||||
/// </summary>
|
||||
[JsonProperty("updateTime")]
|
||||
public DateTime? updateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 返回数据属性对象
|
||||
/// </summary>
|
||||
[JsonProperty("properties")]
|
||||
public System.Collections.Generic.List<Property> properties { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 数据属性对象
|
||||
/// </summary>
|
||||
public partial class Property
|
||||
{
|
||||
/// <summary>
|
||||
/// id
|
||||
/// </summary>
|
||||
[JsonProperty("id")]
|
||||
public string id { get; set; }
|
||||
/// <summary>
|
||||
/// propertyName
|
||||
/// </summary>
|
||||
[JsonProperty("propertyName")]
|
||||
public string propertyName { get; set; }
|
||||
/// <summary>
|
||||
/// propertyValue
|
||||
/// </summary>
|
||||
[JsonProperty("propertyValue")]
|
||||
public string propertyValue { get; set; }
|
||||
/// <summary>
|
||||
/// unit
|
||||
/// </summary>
|
||||
[JsonProperty("unit")]
|
||||
public string unit { get; set; }
|
||||
///// <summary>
|
||||
///// createTime
|
||||
///// </summary>
|
||||
//[JsonProperty("createTime")]
|
||||
//public DateTime? createTime { get; set; }
|
||||
///// <summary>
|
||||
///// updateTime
|
||||
///// </summary>
|
||||
//[JsonProperty("updateTime")]
|
||||
//public DateTime? updateTime { get; set; }
|
||||
///// <summary>
|
||||
///// pwiItemId
|
||||
///// </summary>
|
||||
//[JsonProperty("pwiItemId")]
|
||||
//public string pwiItemId { get; set; }
|
||||
///// <summary>
|
||||
///// versionId
|
||||
///// </summary>
|
||||
//[JsonProperty("versionId")]
|
||||
//public string versionId { get; set; }
|
||||
///// <summary>
|
||||
///// ownerItemId
|
||||
///// </summary>
|
||||
//[JsonProperty("ownerItemId")]
|
||||
//public string ownerItemId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public partial class IDPPreRunData
|
||||
{
|
||||
public static IDPPreRunData FromJson(string json)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<IDPPreRunData>(json, Model.Converter.Settings);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -236,6 +236,7 @@
|
|||
<Compile Include="HSSE\SpResourceCollection.cs" />
|
||||
<Compile Include="HSSE\WorkPostStatisticItem.cs" />
|
||||
<Compile Include="HSSE\HSSE_HazardTemplate.cs" />
|
||||
<Compile Include="IDP\IDPPreRunData.cs" />
|
||||
<Compile Include="IDP\SessionItem.cs" />
|
||||
<Compile Include="IDP\OADesignDrawingData.cs" />
|
||||
<Compile Include="IDP\IDPDesignDrawingResponseData.cs" />
|
||||
|
|
|
@ -119,7 +119,7 @@ namespace WebAPI.Controllers
|
|||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
IDPDataService.GetIDPProjectMasterData();
|
||||
IDPDataService.GetIDPProjectPreRunData();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue