Merge branch 'master' of https://gitee.com/frane-yang/SGGL_SeDin_New
This commit is contained in:
@@ -376,7 +376,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
from unitwork in unitworkJoin.DefaultIfEmpty()
|
||||
join mater in db.Base_Material on pipe.MaterialId equals mater.MaterialId into materJoin
|
||||
from mater in materJoin.DefaultIfEmpty()
|
||||
where com.QRCode != "" & com.PipelineId == PipelineId
|
||||
where com.QRCode != "" & com.PipelineId == PipelineId
|
||||
orderby com.PipelineComponentCode
|
||||
select new
|
||||
{
|
||||
com.PipelineComponentId,
|
||||
|
||||
@@ -113,6 +113,15 @@
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="70% 25% 5%">
|
||||
<Items>
|
||||
<f:TextBox ID="txtESBSerVerUrl" runat="server" Label="集团ESB地址" LabelWidth="230px"></f:TextBox>
|
||||
<f:TextBox ID="txtClientId" runat="server" Label="ClientId" LabelWidth="230px"></f:TextBox>
|
||||
<f:Button ID="txtTestPost" Icon="SystemSave" Text="测试对接" runat="server" ValidateForms="SimpleForm1"
|
||||
OnClick="txtTestPost_OnClick">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea runat="server" ID="txtRefererWhitelist" Label="数据穿透白名单"></f:TextArea>
|
||||
|
||||
@@ -134,6 +134,16 @@ namespace FineUIPro.Web.SysManage
|
||||
{
|
||||
txtSerVerUrl.Text = sysSet9.ConstValue;
|
||||
}
|
||||
var sysSet10 = (from x in Funs.DB.Sys_Const where x.ConstText == "集团ESB地址" select x).ToList().FirstOrDefault();
|
||||
if (sysSet10 != null)
|
||||
{
|
||||
txtESBSerVerUrl.Text = sysSet10.ConstValue;
|
||||
}
|
||||
var sysSet11 = (from x in Funs.DB.Sys_Const where x.ConstText == "ClientId" select x).ToList().FirstOrDefault();
|
||||
if (sysSet11 != null)
|
||||
{
|
||||
txtClientId.Text = sysSet11.ConstValue;
|
||||
}
|
||||
var sysSet18 = BLL.ConstValue.drpConstItemList(BLL.ConstValue.Group_SafeReferer).Select(x => new { x.ConstText, x.ConstValue }).ToList();
|
||||
var txtReferer = "";
|
||||
foreach (var item in sysSet18)
|
||||
@@ -343,6 +353,48 @@ namespace FineUIPro.Web.SysManage
|
||||
Funs.DB.Sys_Const.InsertOnSubmit(newSysSet9);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
Model.Sys_Const sysSet10 = db.Sys_Const.FirstOrDefault(x => x.ConstText == "集团ESB地址");
|
||||
if (sysSet10 != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtESBSerVerUrl.Text.Trim()))
|
||||
{
|
||||
sysSet10.ConstValue = this.txtESBSerVerUrl.Text.Trim();
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Sys_Const newSysSet10 = new Model.Sys_Const();
|
||||
newSysSet10.ID = SQLHelper.GetNewID();
|
||||
if (!string.IsNullOrEmpty(this.txtESBSerVerUrl.Text.Trim()))
|
||||
{
|
||||
newSysSet10.ConstValue = this.txtESBSerVerUrl.Text.Trim();
|
||||
}
|
||||
newSysSet10.ConstText = "集团ESB地址";
|
||||
Funs.DB.Sys_Const.InsertOnSubmit(newSysSet10);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
Model.Sys_Const sysSet11 = db.Sys_Const.FirstOrDefault(x => x.ConstText == "ClientId");
|
||||
if (sysSet11 != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.txtClientId.Text.Trim()))
|
||||
{
|
||||
sysSet11.ConstValue = this.txtClientId.Text.Trim();
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Sys_Const newSysSet11 = new Model.Sys_Const();
|
||||
newSysSet11.ID = SQLHelper.GetNewID();
|
||||
if (!string.IsNullOrEmpty(this.txtClientId.Text.Trim()))
|
||||
{
|
||||
newSysSet11.ConstValue = this.txtClientId.Text.Trim();
|
||||
}
|
||||
newSysSet11.ConstText = "ClientId";
|
||||
Funs.DB.Sys_Const.InsertOnSubmit(newSysSet11);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
ConstValue.DeleteConstValueBygroupId(BLL.ConstValue.Group_SafeReferer);
|
||||
var q = txtRefererWhitelist.Text.Split('&');
|
||||
foreach (var item in q)
|
||||
@@ -1100,5 +1152,25 @@ namespace FineUIPro.Web.SysManage
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void txtTestPost_OnClick(object sender, EventArgs e)
|
||||
{
|
||||
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
|
||||
string CncecEsbPath = SysConstSetService.CncecEsbPath;
|
||||
string ClientId = SysConstSetService.ClientId;
|
||||
|
||||
string baseurl = CncecEsbPath + "/cn.cncec.group.qhsePROD.common.GetToken";
|
||||
var client = new RestClient(baseurl);
|
||||
client.Timeout = -1;
|
||||
var request = new RestRequest(Method.POST);
|
||||
var thisUnit = BLL.UnitService.GetUnitByUnitId(BLL.Const.UnitId_SEDIN);
|
||||
request.AddHeader("ClientId", ClientId);
|
||||
request.AddHeader("OperationCode", "cn.cncec.group.qhsePROD.common.GetToken");
|
||||
request.AddParameter("UnitName", thisUnit.UnitName);
|
||||
request.AddParameter("CollCropCode", thisUnit.CollCropCode);
|
||||
IRestResponse response = client.Execute(request);
|
||||
|
||||
Alert.Show(response.Content);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -311,6 +311,33 @@ namespace FineUIPro.Web.SysManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnApply;
|
||||
|
||||
/// <summary>
|
||||
/// txtESBSerVerUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtESBSerVerUrl;
|
||||
|
||||
/// <summary>
|
||||
/// txtClientId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtClientId;
|
||||
|
||||
/// <summary>
|
||||
/// txtTestPost 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button txtTestPost;
|
||||
|
||||
/// <summary>
|
||||
/// txtRefererWhitelist 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user