数据库变更CNPC_XJYJ
This commit is contained in:
@@ -9,7 +9,7 @@ namespace BLL
|
||||
{
|
||||
public static class AttachFileService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 添加附件存储信息
|
||||
@@ -99,7 +99,7 @@ namespace BLL
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string res = "";
|
||||
var list = db.AttachFile.Where(p => p.ToKeyId == toKeyId).ToList();
|
||||
@@ -124,7 +124,7 @@ namespace BLL
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string res = "";
|
||||
var list = db.AttachFile.Where(p => p.ToKeyId == toKeyId&& p.MenuId== menuId).ToList();
|
||||
@@ -289,7 +289,7 @@ namespace BLL
|
||||
fileDir = "Solution";
|
||||
break;
|
||||
}
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var query = from f in db.AttachFile
|
||||
where f.ToKeyId == toKeyId
|
||||
@@ -317,7 +317,7 @@ namespace BLL
|
||||
}
|
||||
else
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (var db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var query = from f in db.AttachFile
|
||||
where f.ToKeyId == toKeyId
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static string ReturnCodeByMenuIdProjectId(string menuId, string projectId, string unitId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
string code = string.Empty;
|
||||
string ruleCodes = string.Empty;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace BLL
|
||||
/// <returns>是否具有权限</returns>
|
||||
public static List<string> GetSystemPowerList(string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var getUser = db.Sys_User.FirstOrDefault(x => x.UserId == userId);
|
||||
if (getUser != null)
|
||||
@@ -100,7 +100,7 @@ namespace BLL
|
||||
/// <returns>是否具有权限</returns>
|
||||
public static List<string> GetAllMenuList(string projectId, string userId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
/// 启用且末级菜单
|
||||
var getMenus = from x in db.Sys_Menu
|
||||
@@ -193,7 +193,7 @@ namespace BLL
|
||||
/// <returns>是否具有权限</returns>
|
||||
public static List<string> GetAllButtonList(string projectId, string userId, string menuId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
List<string> buttonList = new List<string>();
|
||||
try
|
||||
{
|
||||
@@ -264,7 +264,7 @@ namespace BLL
|
||||
/// <returns>是否具有权限</returns>
|
||||
public static bool GetAllButtonPowerList(string projectId, string userId, string menuId, string buttonName)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
bool isPower = false; ////定义是否具备按钮权限
|
||||
if (userId == Const.sedinId)
|
||||
{
|
||||
@@ -384,7 +384,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static bool IsHaveSystemPower(string userId,string menuType, string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
bool isHave = false;
|
||||
var getUser = db.Sys_User.FirstOrDefault(x => x.UserId == userId);
|
||||
@@ -447,7 +447,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationId"></param>
|
||||
public static void DeleteAttachFileById(string menuId, string id)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.AttachFile attachFile = db.AttachFile.FirstOrDefault(e => e.MenuId == menuId && e.ToKeyId == id);
|
||||
if (attachFile != null)
|
||||
{
|
||||
@@ -469,7 +469,7 @@ namespace BLL
|
||||
/// <param name="lawRegulationId"></param>
|
||||
public static void DeleteFlowOperateByID(string id)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
var flowOperateList = from x in db.Sys_FlowOperate where x.DataId == id select x;
|
||||
if (flowOperateList.Count() > 0)
|
||||
|
||||
@@ -1352,6 +1352,10 @@ namespace BLL
|
||||
|
||||
/*项目*/
|
||||
/// <summary>
|
||||
/// 员工
|
||||
/// </summary>
|
||||
public const string Menu_Staff = "Menu_Staff";
|
||||
/// <summary>
|
||||
/// 项目设置
|
||||
/// </summary>
|
||||
public const string Menu_ProjectSet = "Menu_ProjectSet";
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 维护一个DB集合
|
||||
/// </summary>
|
||||
private static Dictionary<int, Model.SGGLDB> dataBaseLinkList = new System.Collections.Generic.Dictionary<int, Model.SGGLDB>();
|
||||
private static Dictionary<int, Model.CNPCDB> dataBaseLinkList = new System.Collections.Generic.Dictionary<int, Model.CNPCDB>();
|
||||
public static IScheduler ScheduledTasks
|
||||
{
|
||||
get;
|
||||
@@ -30,7 +30,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 维护一个DB集合
|
||||
/// </summary>
|
||||
public static System.Collections.Generic.Dictionary<int, Model.SGGLDB> DBList
|
||||
public static System.Collections.Generic.Dictionary<int, Model.CNPCDB> DBList
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -130,7 +130,7 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 数据库上下文。
|
||||
/// </summary>
|
||||
public static SGGLDB DB
|
||||
public static CNPCDB DB
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -139,7 +139,7 @@ namespace BLL
|
||||
{
|
||||
if (!DBList.ContainsKey(System.Threading.Thread.CurrentThread.ManagedThreadId))
|
||||
{
|
||||
DBList.Add(System.Threading.Thread.CurrentThread.ManagedThreadId, new SGGLDB(connString));
|
||||
DBList.Add(System.Threading.Thread.CurrentThread.ManagedThreadId, new CNPCDB(connString));
|
||||
}
|
||||
|
||||
// DBList[System.Threading.Thread.CurrentThread.ManagedThreadId].CommandTimeout = 1200;
|
||||
@@ -147,7 +147,7 @@ namespace BLL
|
||||
}
|
||||
catch
|
||||
{
|
||||
var db = new SGGLDB(connString);
|
||||
var db = new CNPCDB(connString);
|
||||
if (DBList.ContainsKey(System.Threading.Thread.CurrentThread.ManagedThreadId))
|
||||
{
|
||||
DBList[System.Threading.Thread.CurrentThread.ManagedThreadId] = db;
|
||||
|
||||
@@ -1401,7 +1401,7 @@
|
||||
/// <returns></returns>
|
||||
public static string GetTestRecordHtml(string testRecordId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
var getTestRecord = TestRecordService.GetTestRecordById(testRecordId);
|
||||
if (getTestRecord != null)
|
||||
@@ -1605,7 +1605,7 @@
|
||||
/// <returns></returns>
|
||||
public static string GetSendCardHtml(string personIds)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("<meta http-equiv=\"content-type\" content=\"application/word; charset=UTF-8\"/>");
|
||||
sb.Append("<table width=\"100% \" cellspacing=\"0\" rules=\"all\" border=\"0\" style=\"border-collapse:collapse;\">");
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/// </summary>
|
||||
public static class ProjectDataFlowSetService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 记录数
|
||||
/// </summary>
|
||||
@@ -85,7 +85,7 @@
|
||||
/// <param name="def"></param>
|
||||
public static void AddProjectData_FlowOperate(Model.ProjectData_FlowOperate flowSet)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.ProjectData_FlowOperate newFlowOperate =new Model.ProjectData_FlowOperate
|
||||
{
|
||||
FlowOperateId = SQLHelper.GetNewID(typeof(Model.ProjectData_FlowOperate)),
|
||||
@@ -109,7 +109,7 @@
|
||||
/// <param name="flowSetId"></param>
|
||||
public static void DeleteFlowSetByFlowSetId(string flowSetId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.ProjectData_FlowOperate flowSet = db.ProjectData_FlowOperate.FirstOrDefault(e => e.FlowOperateId == flowSetId);
|
||||
if (flowSet != null)
|
||||
{
|
||||
@@ -124,7 +124,7 @@
|
||||
/// <param name="flowSetId"></param>
|
||||
public static void DeleteFlowSetByDataId(string dataId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var flowSets = from x in db.ProjectData_FlowOperate where x.DataId == dataId select x;
|
||||
if (flowSets.Count() > 0)
|
||||
{
|
||||
@@ -169,7 +169,7 @@
|
||||
/// <param name="upFlowOperate"></param>
|
||||
public static void UpdateFlowOperateOpinion(Model.ProjectData_FlowOperate flowOperate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
var upFlowOperate = from x in db.ProjectData_FlowOperate
|
||||
where x.MenuId == flowOperate.MenuId && x.DataId == flowOperate.DataId && (x.IsClosed == false || !x.IsClosed.HasValue)
|
||||
select x;
|
||||
@@ -307,7 +307,7 @@
|
||||
/// <param name="upFlowOperate"></param>
|
||||
public static Model.ProjectData_FlowOperate GetFlowOperateOpinion(string menuId, string dataId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
return (from x in db.ProjectData_FlowOperate
|
||||
where x.MenuId == menuId && x.DataId == dataId && (x.IsClosed == false || !x.IsClosed.HasValue)
|
||||
select x).FirstOrDefault();
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace BLL
|
||||
/// <param name="opUserShowColumns"></param>
|
||||
public static void AddUserShowColumns(Model.Sys_UserShowColumns showColumns)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Sys_UserShowColumns newShowColumns = new Model.Sys_UserShowColumns();
|
||||
|
||||
newShowColumns.ShowColumnId = SQLHelper.GetNewID(typeof(Model.Sys_UserShowColumns));
|
||||
@@ -40,7 +40,7 @@ namespace BLL
|
||||
/// <param name="def"></param>
|
||||
public static void UpdateUserShowColumns(Model.Sys_UserShowColumns showColumns)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Sys_UserShowColumns newShowColumns = db.Sys_UserShowColumns.First(e => e.ShowColumnId == showColumns.ShowColumnId);
|
||||
newShowColumns.Columns = showColumns.Columns;
|
||||
newShowColumns.ShowType = showColumns.ShowType;
|
||||
@@ -53,7 +53,7 @@ namespace BLL
|
||||
/// <param name="roleId"></param>
|
||||
public static void DeleteUserShowColumns(string showColumnId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Sys_UserShowColumns newShowColumns = db.Sys_UserShowColumns.First(e => e.ShowColumnId == showColumnId);
|
||||
db.Sys_UserShowColumns.DeleteOnSubmit(newShowColumns);
|
||||
db.SubmitChanges();
|
||||
|
||||
@@ -9,10 +9,10 @@ namespace BLL
|
||||
/// </summary>
|
||||
public class WeatherService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
public static Model.CNPCDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取SGGLDB
|
||||
/// 根据主键获取CNPCDB
|
||||
/// </summary>
|
||||
/// <param name="weatherId"></param>
|
||||
/// <returns></returns>
|
||||
@@ -27,7 +27,7 @@ namespace BLL
|
||||
/// <param name="weather"></param>
|
||||
public static void AddWeather(Model.Weather weather)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Weather newWeather = new Model.Weather
|
||||
{
|
||||
@@ -49,7 +49,7 @@ namespace BLL
|
||||
/// <param name="weatherId"></param>
|
||||
public static void DeleteWeatherById(string weatherId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.CNPCDB db = Funs.DB;
|
||||
Model.Weather weather = db.Weather.FirstOrDefault(e => e.WeatherId == weatherId);
|
||||
if (weather != null)
|
||||
{
|
||||
@@ -65,7 +65,7 @@ namespace BLL
|
||||
{
|
||||
try
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
using (Model.CNPCDB db = new Model.CNPCDB(Funs.ConnString))
|
||||
{
|
||||
Model.Weather getWeather = new Model.Weather();
|
||||
string appkey = "7416f4dd68c9352e02be31b12f15d74f"; //配置您申请的appkey
|
||||
|
||||
Reference in New Issue
Block a user