2023-08-04
This commit is contained in:
@@ -327,6 +327,20 @@ namespace BLL
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 得到本单位信息
|
||||
/// <summary>
|
||||
/// 得到本单位信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static Model.Base_Unit GetIsThisUnit()
|
||||
{
|
||||
string thisUnitId = BLL.Const.UnitId_SEDIN;
|
||||
var base_Unit = BLL.UnitService.GetUnitByUnitId(thisUnitId);
|
||||
return base_Unit;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否赛鼎或分公司
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace BLL
|
||||
using System;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class Const
|
||||
{
|
||||
@@ -62,6 +64,10 @@
|
||||
/// 微信订阅模板ID
|
||||
/// </summary>
|
||||
public const string WX_TemplateID = "hKFrcahyXEjGSrLM4qBPpjXAkFldnrqxU_mARd1IF4o";
|
||||
/// <summary>
|
||||
/// 时间书签(用于筛选数据范围)
|
||||
/// </summary>
|
||||
public static DateTime DtmarkTime = DateTime.Parse("2023-01-01");
|
||||
#endregion
|
||||
|
||||
#region 按钮描述
|
||||
@@ -4803,6 +4809,13 @@
|
||||
/// 实业数据
|
||||
/// </summary>
|
||||
public const string SYHSEData_SYHSEMenuId = "64EE5EC2-F725-4656-9110-5AF83C18FB6C";
|
||||
|
||||
/// <summary>
|
||||
/// 接口设置
|
||||
/// </summary>
|
||||
public const string InterFaceSetMenuId = "FFD221D7-AE05-447F-8727-80058A04F401";
|
||||
public const string InterFaceTaskMenuId = "FFD221D7-AE05-447F-8727-80058A04F402";
|
||||
public const string IFLogListMenuId = "FFD221D7-AE05-447F-8727-80058A04F404";
|
||||
#endregion
|
||||
|
||||
#region 数据同步状态
|
||||
|
||||
@@ -92,6 +92,15 @@ namespace BLL
|
||||
{
|
||||
return Funs.DB.Sys_Const.FirstOrDefault(e => e.ConstValue == constValue && e.GroupId == groupId);
|
||||
}
|
||||
public static void DeleteConstValueBygroupId(string groupId)
|
||||
{
|
||||
var q = Funs.DB.Sys_Const.Where(x => x.GroupId == groupId);
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Sys_Const.DeleteAllOnSubmit(q.ToList());
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
#region 根据多ID得到名称字符串
|
||||
/// <summary>
|
||||
@@ -376,6 +385,14 @@ namespace BLL
|
||||
/// 作业状态 -危大工程清单 组id
|
||||
/// </summary>
|
||||
public const string Group_WorkStates = "WorkStates";
|
||||
/// <summary>
|
||||
/// 子公司弹窗界面
|
||||
/// </summary>
|
||||
public const string Group_InterfacePopup = "InterfacePopup";
|
||||
/// <summary>
|
||||
/// 穿透界面Referer白名单
|
||||
/// </summary>
|
||||
public const string Group_SafeReferer = "SafeReferer";
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+35
-1
@@ -3,12 +3,15 @@ namespace BLL
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Quartz;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
@@ -33,7 +36,11 @@ namespace BLL
|
||||
return dataBaseLinkList;
|
||||
}
|
||||
}
|
||||
|
||||
public static IScheduler ScheduledTasks
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据库连接字符串
|
||||
@@ -1311,7 +1318,34 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
}
|
||||
public static string RequestGet(string Baseurl, string Token)
|
||||
{
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
||||
var client = new RestClient(Baseurl);
|
||||
client.Timeout = -1;
|
||||
var request = new RestRequest(Method.GET);
|
||||
request.AddHeader("token", Token);
|
||||
IRestResponse response = client.Execute(request);
|
||||
Console.WriteLine(response.Content);
|
||||
return response.Content;
|
||||
}
|
||||
public static string RequestPost(string Baseurl, string Token, string JsonBody)
|
||||
{
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
||||
var client = new RestClient(Baseurl);
|
||||
client.Timeout = -1;
|
||||
var request = new RestRequest(Method.POST);
|
||||
request.AddHeader("token", Token);
|
||||
if (!string.IsNullOrEmpty(JsonBody))
|
||||
{
|
||||
request.AddJsonBody(JsonBody);
|
||||
}
|
||||
|
||||
IRestResponse response = client.Execute(request);
|
||||
return response.Content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user