schema工具更新了下判断无效sql的逻辑
This commit is contained in:
parent
26e699c05e
commit
0a1f2c458d
22
.gitignore
vendored
22
.gitignore
vendored
@ -1077,3 +1077,25 @@ bin/release/
|
||||
/newFront/c#前端/.vs/SWS.CAD/v17/DocumentLayout.json
|
||||
/newFront/c#前端/.vs/SWS.CAD/v17/fileList.bin
|
||||
/.vs/VSWorkspaceState.json
|
||||
/Learun.Application.Organization/bin/Debug/Learun.Util.xml
|
||||
/Learun.Application.Web/.vs/Learun.Application.Web.csproj.dtbcache.json
|
||||
/Learun.Application.Web/bin/XmlConfig/log4net.config
|
||||
/Learun.Application.Web/bin/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Application.Module/Learun.Application.AppMagager/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Base/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Application.Module/Learun.Application.IM/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Message/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Report/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Scheduler/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WeChat/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Db/Learun.DataBase/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Db/Learun.DataBase.Repository/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Util/Learun.Util/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Workflow/Learun.Workflow.Engine/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Util/Learun.Util.Operat/bin/Debug/Learun.Util.xml
|
||||
/Learun.Framework.Module/Learun.Util/Learun.Util/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -160,7 +160,7 @@ namespace Learun.Application.Web.AppApi
|
||||
RES.AddRange(
|
||||
pubObjs.Where(y => y.FileRevision == DETAIL.DataItemName
|
||||
&&
|
||||
dwgs.Select(x => x.DrawingFileID).Contains(y.DrawingFileID)).OrderBy(X=>X.DrawingFileID).OrderBy(X=>X.CreateTime));
|
||||
dwgs.Select(x => x.DrawingFileID).Contains(y.DrawingFileID)).OrderBy(X => X.DrawingFileID).OrderBy(X => X.CreateTime));
|
||||
}
|
||||
|
||||
}
|
||||
@ -607,8 +607,7 @@ namespace Learun.Application.Web.AppApi
|
||||
{
|
||||
try
|
||||
{
|
||||
string queryJson = "{\"DrawingFileID\":\"" + drawingFileID + "\",\"ProjectId\":\"" + projectId + "\"}";
|
||||
var listDrawingSyn = ec_drawing_synIBLL.GetList(queryJson);
|
||||
var listDrawingSyn = ec_drawing_synIBLL.GetList(projectId, drawingFileID, null);
|
||||
return Success(listDrawingSyn);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -628,8 +627,7 @@ namespace Learun.Application.Web.AppApi
|
||||
{
|
||||
try
|
||||
{
|
||||
string queryJson = "{\"DrawingFileID\":\"" + drawingFileID + "\",\"ProjectId\":\"" + projectId + "\"}";
|
||||
var listDrawingPublish = ec_drawing_publishIBLL.GetList(queryJson);
|
||||
var listDrawingPublish = ec_drawing_publishIBLL.GetList(projectId, drawingFileID);
|
||||
return Success(listDrawingPublish);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -648,9 +646,8 @@ namespace Learun.Application.Web.AppApi
|
||||
public IHttpActionResult GetOperateLog(string projectId, string drawingFileID)
|
||||
{
|
||||
try
|
||||
{
|
||||
string queryJson = "{\"OwnerID\":\"" + drawingFileID + "\",\"ProjectId\":\"" + projectId + "\"}";
|
||||
var listlog = ec_operate_logIBLL.GetList(queryJson);
|
||||
{
|
||||
var listlog = ec_operate_logIBLL.GetList(projectId,drawingFileID);
|
||||
return Success(listlog);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -93,8 +93,7 @@ namespace Learun.Application.Web.AppApi
|
||||
logEntity.F_ExecuteResult = 1;
|
||||
logEntity.F_ExecuteResultJson = "登录成功";
|
||||
logEntity.WriteLog();
|
||||
var X= log4net.LogManager.GetLogger("INFO");
|
||||
X.Info("登录成功!");
|
||||
|
||||
OperatorHelper.Instance.ClearCurrentErrorNum(); //成功了 就可以重置了
|
||||
bool isFirstLogin = false;
|
||||
if (userEntity.PasswordUpdateTime == null)//没有修改密码
|
||||
|
@ -39,7 +39,7 @@ namespace Learun.Application.Web.AppApi
|
||||
[HandlerApiLogin(FilterMode.Enforce)]
|
||||
public IHttpActionResult Add(string ProjectId, string Users, string DrawingID)
|
||||
{
|
||||
var synRecord = new ec_drawing_synBLL().GetList("{DrawingFileID:\"" + DrawingID + "\",ProjectId:\"" + ProjectId + "\"}");
|
||||
var synRecord = new ec_drawing_synBLL().GetList(ProjectId, DrawingID, null);
|
||||
var LatestSyn = synRecord.OrderByDescending(x => x.CreateTime).FirstOrDefault();
|
||||
if (LatestSyn != null)
|
||||
{
|
||||
@ -111,9 +111,8 @@ namespace Learun.Application.Web.AppApi
|
||||
public IHttpActionResult GetCheckInLogNeedApprove(string projectId)
|
||||
{
|
||||
try
|
||||
{
|
||||
string queryJson = "{\"IsProcess\":\"" + "1" + "\",\"ProjectId\":\"" + projectId + "\"}";
|
||||
var listDrawingSyn = new ec_drawing_synBLL().GetList(queryJson);
|
||||
{
|
||||
var listDrawingSyn = new ec_drawing_synBLL().GetList(projectId, "", 1);
|
||||
|
||||
return Success(listDrawingSyn.GroupBy(x => x.DrawingFileID).ToList());
|
||||
}
|
||||
|
@ -1,16 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Description;
|
||||
using Learun.Application.Base.SystemModule;
|
||||
using Learun.Application.Base.SystemModule;
|
||||
using Learun.Application.TwoDevelopment.ZZDT_EC;
|
||||
using Learun.Util;
|
||||
using Learun.Util.SqlSugar;
|
||||
using log4net.Config;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.POIFS.Properties;
|
||||
using Pipelines.Sockets.Unofficial.Arenas;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Description;
|
||||
|
||||
namespace Learun.Application.Web.AppApi
|
||||
{
|
||||
@ -47,6 +48,10 @@ namespace Learun.Application.Web.AppApi
|
||||
{
|
||||
var res = ec_CircuitBreakerBLL.GetBreakersUnderPDB(projId, PDBId);
|
||||
res2.Breakers = res;
|
||||
var settings = new JsonSerializerSettings
|
||||
{
|
||||
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
|
||||
};
|
||||
return Success(res2);
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,10 @@ namespace Learun.Application.Web
|
||||
{
|
||||
static Log _logger = LogFactory.GetLogger("Info");
|
||||
private const string Key = "__action_duration__";
|
||||
/// <summary>
|
||||
/// 开始执行某个接口
|
||||
/// </summary>
|
||||
/// <param name="actionContext"></param>
|
||||
public override void OnActionExecuting(HttpActionContext actionContext)
|
||||
{
|
||||
var controllerName = actionContext.ControllerContext.ControllerDescriptor.ControllerName;
|
||||
@ -60,6 +64,10 @@ namespace Learun.Application.Web
|
||||
stopWatch.Start();
|
||||
base.OnActionExecuting(actionContext);
|
||||
}
|
||||
/// <summary>
|
||||
/// 某个接口执行完成
|
||||
/// </summary>
|
||||
/// <param name="actionExecutedContext"></param>
|
||||
public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
|
||||
{
|
||||
base.OnActionExecuted(actionExecutedContext);
|
||||
|
@ -2,6 +2,7 @@
|
||||
using Learun.Loger;
|
||||
using Learun.Util;
|
||||
using Learun.Util.Operat;
|
||||
using Newtonsoft.Json;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Results;
|
||||
using System.Web.Mvc;
|
||||
@ -29,7 +30,10 @@ namespace Learun.Application.Web
|
||||
/// <returns></returns>
|
||||
protected new JsonResult<T> Json<T>(T content)
|
||||
{
|
||||
return Json<T>(content, GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings, System.Text.Encoding.UTF8);
|
||||
var SET = GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings;
|
||||
SET.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;//25 09 03,getbreaker,避免循环引用 remoteCB
|
||||
|
||||
return Json<T>(content, SET, System.Text.Encoding.UTF8);
|
||||
}
|
||||
|
||||
#region 日志操作
|
||||
|
@ -1,5 +1,8 @@
|
||||
using Learun.Application.TwoDevelopment.ZZDT_EC;
|
||||
using Learun.Util;
|
||||
using Learun.Util.Json;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Data;
|
||||
using System.Web.Mvc;
|
||||
|
||||
@ -25,7 +28,7 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers
|
||||
[HttpGet]
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
return View();
|
||||
}
|
||||
/// <summary>
|
||||
/// 表单页
|
||||
@ -34,7 +37,7 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers
|
||||
[HttpGet]
|
||||
public ActionResult Form()
|
||||
{
|
||||
return View();
|
||||
return View();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -48,29 +51,17 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers
|
||||
[AjaxOnly]
|
||||
public ActionResult GetList(string queryJson)
|
||||
{
|
||||
var data = ec_drawing_publishIBLL.GetList(queryJson);
|
||||
dynamic info = JsonHelper.Str2Dynamic(queryJson);
|
||||
|
||||
// 按键取值(注意:动态对象无编译时检查,属性名写错会运行报错)
|
||||
string drawingFileId = info.DrawingFileID;
|
||||
string projectId = info.ProjectId;
|
||||
|
||||
|
||||
var data = ec_drawing_publishIBLL.GetList(projectId, drawingFileId);
|
||||
return Success(data);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取列表分页数据
|
||||
/// <param name="pagination">分页参数</param>
|
||||
/// <summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AjaxOnly]
|
||||
public ActionResult GetPageList(string pagination, string queryJson)
|
||||
{
|
||||
Pagination paginationobj = pagination.ToObject<Pagination>();
|
||||
var data = ec_drawing_publishIBLL.GetList(queryJson, paginationobj);
|
||||
var jsonData = new
|
||||
{
|
||||
rows = data,
|
||||
total = paginationobj.total,
|
||||
page = paginationobj.page,
|
||||
records = paginationobj.records
|
||||
};
|
||||
return Success(jsonData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取表单数据
|
||||
/// <param name="keyValue">主键</param>
|
||||
@ -111,7 +102,7 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
[AjaxOnly]
|
||||
public ActionResult SaveForm(string keyValue,string strEntity, string ProjectId)
|
||||
public ActionResult SaveForm(string keyValue, string strEntity, string ProjectId)
|
||||
{
|
||||
ec_drawing_publishEntity entity = strEntity.ToObject<ec_drawing_publishEntity>();
|
||||
ec_drawing_publishIBLL.SaveEntity(keyValue, entity, ProjectId);
|
||||
|
@ -1,5 +1,8 @@
|
||||
using Learun.Application.TwoDevelopment.ZZDT_EC;
|
||||
using Learun.Util;
|
||||
using Learun.Util.Json;
|
||||
using Microsoft.AspNet.SignalR.Json;
|
||||
using Newtonsoft.Json;
|
||||
using System.Data;
|
||||
using System.Web.Mvc;
|
||||
|
||||
@ -25,7 +28,7 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers
|
||||
[HttpGet]
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
return View();
|
||||
}
|
||||
/// <summary>
|
||||
/// 表单页
|
||||
@ -34,7 +37,7 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers
|
||||
[HttpGet]
|
||||
public ActionResult Form()
|
||||
{
|
||||
return View();
|
||||
return View();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -48,29 +51,16 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers
|
||||
[AjaxOnly]
|
||||
public ActionResult GetList(string queryJson)
|
||||
{
|
||||
var data = ec_drawing_synIBLL.GetList(queryJson);
|
||||
// 反序列化为动态对象(dynamic)
|
||||
dynamic info = JsonHelper.Str2Dynamic(queryJson);
|
||||
|
||||
// 按键取值(注意:动态对象无编译时检查,属性名写错会运行报错)
|
||||
string drawingFileId = info.DrawingFileID;
|
||||
string projectId = info.ProjectId;
|
||||
var data = ec_drawing_synIBLL.GetList(projectId, drawingFileId, null);
|
||||
return Success(data);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取列表分页数据
|
||||
/// <param name="pagination">分页参数</param>
|
||||
/// <summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AjaxOnly]
|
||||
public ActionResult GetPageList(string pagination, string queryJson)
|
||||
{
|
||||
Pagination paginationobj = pagination.ToObject<Pagination>();
|
||||
var data = ec_drawing_synIBLL.GetList(queryJson, paginationobj);
|
||||
var jsonData = new
|
||||
{
|
||||
rows = data,
|
||||
total = paginationobj.total,
|
||||
page = paginationobj.page,
|
||||
records = paginationobj.records
|
||||
};
|
||||
return Success(jsonData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取表单数据
|
||||
/// <param name="keyValue">主键</param>
|
||||
@ -111,7 +101,7 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
[AjaxOnly]
|
||||
public ActionResult SaveForm(string keyValue,string strEntity, string ProjectId)
|
||||
public ActionResult SaveForm(string keyValue, string strEntity, string ProjectId)
|
||||
{
|
||||
ec_drawing_synEntity entity = strEntity.ToObject<ec_drawing_synEntity>();
|
||||
ec_drawing_synIBLL.SaveEntity(keyValue, entity, ProjectId);
|
||||
|
@ -1,5 +1,6 @@
|
||||
using Learun.Application.TwoDevelopment.ZZDT_EC;
|
||||
using Learun.Util;
|
||||
using Learun.Util.Json;
|
||||
using System.Data;
|
||||
using System.Web.Mvc;
|
||||
|
||||
@ -25,7 +26,7 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers
|
||||
[HttpGet]
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
return View();
|
||||
}
|
||||
/// <summary>
|
||||
/// 表单页
|
||||
@ -34,7 +35,7 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers
|
||||
[HttpGet]
|
||||
public ActionResult Form()
|
||||
{
|
||||
return View();
|
||||
return View();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -48,29 +49,12 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers
|
||||
[AjaxOnly]
|
||||
public ActionResult GetList(string queryJson)
|
||||
{
|
||||
var data = ec_operate_logIBLL.GetList(queryJson);
|
||||
var info = JsonHelper.Str2JObject(queryJson);
|
||||
var projId = info["ProjectId"].ToString();
|
||||
var OwnerId = info["OwnerID"].ToString();
|
||||
var data = ec_operate_logIBLL.GetList(projId, OwnerId);
|
||||
return Success(data);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取列表分页数据
|
||||
/// <param name="pagination">分页参数</param>
|
||||
/// <summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
[AjaxOnly]
|
||||
public ActionResult GetPageList(string pagination, string queryJson)
|
||||
{
|
||||
Pagination paginationobj = pagination.ToObject<Pagination>();
|
||||
var data = ec_operate_logIBLL.GetList(queryJson, paginationobj);
|
||||
var jsonData = new
|
||||
{
|
||||
rows = data,
|
||||
total = paginationobj.total,
|
||||
page = paginationobj.page,
|
||||
records = paginationobj.records
|
||||
};
|
||||
return Success(jsonData);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取表单数据
|
||||
/// <param name="keyValue">主键</param>
|
||||
@ -111,7 +95,7 @@ namespace Learun.Application.Web.Areas.ZZDT_EC.Controllers
|
||||
[HttpPost]
|
||||
[ValidateAntiForgeryToken]
|
||||
[AjaxOnly]
|
||||
public ActionResult SaveForm(string keyValue,string strEntity, string ProjectId)
|
||||
public ActionResult SaveForm(string keyValue, string strEntity, string ProjectId)
|
||||
{
|
||||
ec_operate_logEntity entity = strEntity.ToObject<ec_operate_logEntity>();
|
||||
ec_operate_logIBLL.SaveEntity(keyValue, entity, ProjectId);
|
||||
|
@ -30,6 +30,8 @@ namespace Learun.Application.Web
|
||||
GlobalConfiguration.Configure(WebApiConfig.Register);
|
||||
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
||||
|
||||
|
||||
|
||||
////一天执行一次备份
|
||||
Timer timer = new Timer(86400000);
|
||||
//timer.Elapsed += Timer_Elapsed;
|
||||
|
@ -15,7 +15,7 @@
|
||||
<!--错误 Error.log。type为:以回滚文件的形式记录日志-->
|
||||
<appender name="ErrorLog" type="log4net.Appender.RollingFileAppender">
|
||||
<!--目录路径,可以是相对路径或绝对路径-->
|
||||
<param name="File" value="C:\learun_log"/>
|
||||
<param name="File" value="C:\new-learun-log"/>
|
||||
<!--文件名,按日期生成文件夹-->
|
||||
<param name="DatePattern" value="/yyyy-MM-dd/"Error.log""/>
|
||||
<!--追加到文件-->
|
||||
@ -42,7 +42,7 @@
|
||||
<!--警告 Warn.log-->
|
||||
<appender name="WarnLog" type="log4net.Appender.RollingFileAppender">
|
||||
<!--目录路径,可以是相对路径或绝对路径-->
|
||||
<param name="File" value="C:\learun_log"/>
|
||||
<param name="File" value="C:\new-learun-log"/>
|
||||
<!--文件名,按日期生成文件夹-->
|
||||
<param name="DatePattern" value="/yyyy-MM-dd/"Warn.log""/>
|
||||
<!--追加到文件-->
|
||||
@ -68,7 +68,7 @@
|
||||
<!--信息 Info.log-->
|
||||
<appender name="InfoLog" type="log4net.Appender.RollingFileAppender">
|
||||
<!--目录路径,可以是相对路径或绝对路径-->
|
||||
<param name="File" value="C:\learun_log"/>
|
||||
<param name="File" value="C:\new-learun-log"/>
|
||||
<!--文件名,按日期生成文件夹-->
|
||||
<param name="DatePattern" value="/yyyy-MM-dd/"Info.log""/>
|
||||
<!--追加到文件-->
|
||||
@ -94,7 +94,7 @@
|
||||
<!--调试 Debug.log-->
|
||||
<appender name="DebugLog" type="log4net.Appender.RollingFileAppender">
|
||||
<!--目录路径,可以是相对路径或绝对路径-->
|
||||
<param name="File" value="C:\learun_log"/>
|
||||
<param name="File" value="C:\new-learun-log"/>
|
||||
<!--文件名,按日期生成文件夹-->
|
||||
<param name="DatePattern" value="/yyyy-MM-dd/"Debug.log""/>
|
||||
<!--追加到文件-->
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,158 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<log4net>
|
||||
<!--根配置-->
|
||||
<root>
|
||||
<!--日志级别:可选值: ERROR > WARN > INFO > DEBUG-->
|
||||
<level value="ERROR"/>
|
||||
<level value="WARN"/>
|
||||
<level value="INFO"/>
|
||||
<level value="DEBUG"/>
|
||||
<appender-ref ref="ErrorLog" />
|
||||
<appender-ref ref="WarnLog" />
|
||||
<appender-ref ref="InfoLog" />
|
||||
<appender-ref ref="DebugLog" />
|
||||
</root>
|
||||
<!--错误 Error.log。type为:以回滚文件的形式记录日志-->
|
||||
<appender name="ErrorLog" type="log4net.Appender.RollingFileAppender">
|
||||
<!--目录路径,可以是相对路径或绝对路径-->
|
||||
<param name="File" value="C:\learun_log"/>
|
||||
<!--文件名,按日期生成文件夹-->
|
||||
<param name="DatePattern" value="/yyyy-MM-dd/"Error.log""/>
|
||||
<!--追加到文件-->
|
||||
<appendToFile value="true"/>
|
||||
<!--创建日志文件的方式,可选值:Date[日期],文件大小[Size],混合[Composite]-->
|
||||
<rollingStyle value="Composite"/>
|
||||
<!--写到一个文件-->
|
||||
<staticLogFileName value="false"/>
|
||||
<!--单个文件大小。单位:KB|MB|GB-->
|
||||
<maximumFileSize value="200MB"/>
|
||||
<!--最多保留的文件数,设为"-1"则不限-->
|
||||
<maxSizeRollBackups value="-1"/>
|
||||
<!--日志格式-->
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%datetime, %message"/>
|
||||
</layout>
|
||||
<!--日志等级在指定范围内的事件才被记录-->
|
||||
<filter type="log4net.Filter.LevelRangeFilter">
|
||||
<param name="LevelMin" value="ERROR" />
|
||||
<param name="LevelMax" value="ERROR" />
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!--警告 Warn.log-->
|
||||
<appender name="WarnLog" type="log4net.Appender.RollingFileAppender">
|
||||
<!--目录路径,可以是相对路径或绝对路径-->
|
||||
<param name="File" value="C:\learun_log"/>
|
||||
<!--文件名,按日期生成文件夹-->
|
||||
<param name="DatePattern" value="/yyyy-MM-dd/"Warn.log""/>
|
||||
<!--追加到文件-->
|
||||
<appendToFile value="true"/>
|
||||
<!--创建日志文件的方式,可选值:Date[日期],文件大小[Size],混合[Composite]-->
|
||||
<rollingStyle value="Composite"/>
|
||||
<!--写到一个文件-->
|
||||
<staticLogFileName value="false"/>
|
||||
<!--单个文件大小。单位:KB|MB|GB-->
|
||||
<maximumFileSize value="200MB"/>
|
||||
<!--最多保留的文件数,设为"-1"则不限-->
|
||||
<maxSizeRollBackups value="-1"/>
|
||||
<!--日志格式-->
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%message"/>
|
||||
</layout>
|
||||
<filter type="log4net.Filter.LevelRangeFilter">
|
||||
<param name="LevelMin" value="WARN" />
|
||||
<param name="LevelMax" value="WARN" />
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!--信息 Info.log-->
|
||||
<appender name="InfoLog" type="log4net.Appender.RollingFileAppender">
|
||||
<!--目录路径,可以是相对路径或绝对路径-->
|
||||
<param name="File" value="C:\learun_log"/>
|
||||
<!--文件名,按日期生成文件夹-->
|
||||
<param name="DatePattern" value="/yyyy-MM-dd/"Info.log""/>
|
||||
<!--追加到文件-->
|
||||
<appendToFile value="true"/>
|
||||
<!--创建日志文件的方式,可选值:Date[日期],文件大小[Size],混合[Composite]-->
|
||||
<rollingStyle value="Composite"/>
|
||||
<!--写到一个文件-->
|
||||
<staticLogFileName value="false"/>
|
||||
<!--单个文件大小。单位:KB|MB|GB-->
|
||||
<maximumFileSize value="200MB"/>
|
||||
<!--最多保留的文件数,设为"-1"则不限-->
|
||||
<maxSizeRollBackups value="-1"/>
|
||||
<!--日志格式-->
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%message"/>
|
||||
</layout>
|
||||
<filter type="log4net.Filter.LevelRangeFilter">
|
||||
<param name="LevelMin" value="INFO" />
|
||||
<param name="LevelMax" value="INFO" />
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!--调试 Debug.log-->
|
||||
<appender name="DebugLog" type="log4net.Appender.RollingFileAppender">
|
||||
<!--目录路径,可以是相对路径或绝对路径-->
|
||||
<param name="File" value="C:\learun_log"/>
|
||||
<!--文件名,按日期生成文件夹-->
|
||||
<param name="DatePattern" value="/yyyy-MM-dd/"Debug.log""/>
|
||||
<!--追加到文件-->
|
||||
<appendToFile value="true"/>
|
||||
<!--创建日志文件的方式,可选值:Date[日期],文件大小[Size],混合[Composite]-->
|
||||
<rollingStyle value="Composite"/>
|
||||
<!--写到一个文件-->
|
||||
<staticLogFileName value="false"/>
|
||||
<!--单个文件大小。单位:KB|MB|GB-->
|
||||
<maximumFileSize value="200MB"/>
|
||||
<!--最多保留的文件数,设为"-1"则不限-->
|
||||
<maxSizeRollBackups value="-1"/>
|
||||
<!--日志格式-->
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%message"/>
|
||||
</layout>
|
||||
<filter type="log4net.Filter.LevelRangeFilter">
|
||||
<param name="LevelMin" value="DEBUG" />
|
||||
<param name="LevelMax" value="DEBUG" />
|
||||
</filter>
|
||||
</appender>
|
||||
<!--yxh 2022 09 14 Logger是直接和应用程序交互的组件-->
|
||||
<!--<logger name="Test">
|
||||
<level value="ALL"/>
|
||||
<appender-ref ref="ErrorLog"/>
|
||||
</logger>-->
|
||||
</log4net>
|
||||
|
||||
|
||||
<!--<log4net>
|
||||
--><!-- 控制台日志配置 --><!--
|
||||
<appender name="Console" type="log4net.Appender.ConsoleAppender">
|
||||
--><!-- 日志输出格式 --><!--
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%5level [%thread] (%file:%line) - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
--><!-- 文件存储日志配置 --><!--
|
||||
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
|
||||
--><!-- 保存文件的名称 --><!--
|
||||
<file value="D:\log.log" />
|
||||
<appendToFile value="true" />
|
||||
--><!-- 文件的编码方式 --><!--
|
||||
<param name="Encoding" value="UTF-8"/>
|
||||
--><!-- 每个文件的大小 --><!--
|
||||
<maximumFileSize value="100KB" />
|
||||
--><!-- 保存文件数量 --><!--
|
||||
<maxSizeRollBackups value="2" />
|
||||
--><!-- 日志输出格式 --><!--
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%level %thread %logger - %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<root>
|
||||
<level value="ALL" />
|
||||
<appender-ref ref="Console" />
|
||||
<appender-ref ref="RollingFile" />
|
||||
</root>
|
||||
</log4net>-->
|
@ -100,6 +100,12 @@ var bootstrap = function ($, learun) {
|
||||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "是否同时显示英文", name: "ShowEN", width: 50, align: "center",
|
||||
formatter: function (cellvalue) {
|
||||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "是否允许编辑", name: "IsAllowEdit", width: 90, align: "center", ishide: ProjectId ? true : false,
|
||||
formatter: function (cellvalue) {
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -82,9 +82,9 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
||||
if (property != null && property.CanWrite)
|
||||
{
|
||||
property.SetValue(CB, Convert.ChangeType(item.PropertyValue, property.PropertyType));
|
||||
}
|
||||
} //属性要怎么来,从property来了,然后通过反射,填充到 cb 类的属性里
|
||||
}
|
||||
//属性要怎么来,从property来了
|
||||
|
||||
|
||||
|
||||
//所有在一端是开关的关联关系
|
||||
|
@ -22,16 +22,13 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
||||
#region 获取数据
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表数据
|
||||
/// 图纸的发布记录
|
||||
/// <summary>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<ec_drawing_publishEntity> GetList(string queryJson, Pagination pagination = null)
|
||||
public IEnumerable<ec_drawing_publishEntity> GetList(string ProjectId,string DrawingFileID, Pagination pagination = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var queryParam = queryJson.ToJObject();
|
||||
var ProjectId = queryParam["ProjectId"]?.ToString();
|
||||
var DrawingFileID = queryParam["DrawingFileID"]?.ToString();
|
||||
{
|
||||
|
||||
var tableName = TableName<ec_drawing_publishEntity>(ProjectId);
|
||||
var query = Db.Queryable<ec_drawing_publishEntity>().AS(tableName)
|
||||
|
@ -19,7 +19,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
||||
/// 获取列表数据
|
||||
/// <summary>
|
||||
/// <returns></returns>
|
||||
IEnumerable<ec_drawing_publishEntity> GetList(string queryJson, Pagination pagination = null);
|
||||
IEnumerable<ec_drawing_publishEntity> GetList(string ProjectId, string DrawingFileID, Pagination pagination = null);
|
||||
/// <summary>
|
||||
/// 获取实体数据
|
||||
/// <param name="keyValue">主键</param>
|
||||
|
@ -20,24 +20,24 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
||||
private ec_drawing_synService ec_drawing_synService = new ec_drawing_synService();
|
||||
|
||||
#region 获取数据
|
||||
|
||||
/// <summary>
|
||||
/// 获取列表数据
|
||||
/// <summary>
|
||||
/// 获取单个图纸的检入记录
|
||||
/// </summary>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <param name="DrawingFileID"></param>
|
||||
/// <param name="IsProcess">是否影响生产设计。1代表影响,然后需要生产主管去确认</param>
|
||||
/// <param name="pagination"></param>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<ec_drawing_synEntity> GetList(string queryJson, Pagination pagination = null)
|
||||
public IEnumerable<ec_drawing_synEntity> GetList(string ProjectId, string DrawingFileID, int? IsProcess,
|
||||
Pagination pagination = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var queryParam = queryJson.ToJObject();
|
||||
var ProjectId = queryParam["ProjectId"]?.ToString();
|
||||
var DrawingFileID = queryParam["DrawingFileID"]?.ToString();
|
||||
var NeedApprove = queryParam["IsProcess"]?.ToString();
|
||||
|
||||
var tableName = TableName<ec_drawing_synEntity>(ProjectId);
|
||||
var query = Db.Queryable<ec_drawing_synEntity>().AS(tableName)
|
||||
.WhereIF(!string.IsNullOrEmpty(DrawingFileID), x => x.DrawingFileID == DrawingFileID)
|
||||
.WhereIF(!string.IsNullOrEmpty(NeedApprove), x => x.IsProcess == 1)
|
||||
.WhereIF(IsProcess != null, x => x.IsProcess == 1)
|
||||
.OrderByDescending(x => x.CreateTime);
|
||||
List<ec_drawing_synEntity> list;
|
||||
if (pagination == null)
|
||||
|
@ -18,7 +18,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
||||
/// 获取列表数据
|
||||
/// <summary>
|
||||
/// <returns></returns>
|
||||
IEnumerable<ec_drawing_synEntity> GetList(string queryJson, Pagination pagination = null);
|
||||
IEnumerable<ec_drawing_synEntity> GetList(string ProjectId, string DrawingFileID, int? IsProcess, Pagination pagination = null);
|
||||
/// <summary>
|
||||
/// 获取实体数据
|
||||
/// <param name="keyValue">主键</param>
|
||||
|
@ -25,13 +25,10 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
||||
/// 获取列表数据
|
||||
/// <summary>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<ec_operate_logEntity> GetList(string queryJson, Pagination pagination = null)
|
||||
public IEnumerable<ec_operate_logEntity> GetList(string ProjectId, string OwnerID, Pagination pagination = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var queryParam = queryJson.ToJObject();
|
||||
var ProjectId = queryParam["ProjectId"]?.ToString();
|
||||
var OwnerID = queryParam["OwnerID"]?.ToString();
|
||||
{
|
||||
|
||||
var tableName = TableName<ec_operate_logEntity>(ProjectId);
|
||||
var query = Db.Queryable<ec_operate_logEntity>().AS(tableName)
|
||||
|
@ -18,7 +18,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
||||
/// 获取列表数据
|
||||
/// <summary>
|
||||
/// <returns></returns>
|
||||
IEnumerable<ec_operate_logEntity> GetList(string queryJson, Pagination pagination = null);
|
||||
IEnumerable<ec_operate_logEntity> GetList(string ProjectId, string OwnerID, Pagination pagination = null);
|
||||
/// <summary>
|
||||
/// 获取实体数据
|
||||
/// <param name="keyValue">主键</param>
|
||||
|
@ -273,7 +273,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
||||
//创建操作日志表
|
||||
baseDAL.Create<ec_operate_logEntity>(sqlitePath);
|
||||
//添加操作日志表数据
|
||||
baseDAL.Add(new ec_operate_logBLL().GetList(queryJson).ToList(), sqlitePath);
|
||||
baseDAL.Add(new ec_operate_logBLL().GetList(ProjectId, "").ToList(), sqlitePath);
|
||||
continue;
|
||||
}
|
||||
if (table == "ec_drawing_publish")
|
||||
@ -281,7 +281,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
||||
//创建图纸发布表
|
||||
baseDAL.Create<ec_drawing_publishEntity>(sqlitePath);
|
||||
//添加图纸发布表数据
|
||||
baseDAL.Add(new ec_drawing_publishBLL().GetList(queryJson).ToList(), sqlitePath);
|
||||
baseDAL.Add(new ec_drawing_publishBLL().GetList(ProjectId, "").ToList(), sqlitePath);
|
||||
continue;
|
||||
}
|
||||
if (table == "ec_drawing_syn")
|
||||
@ -289,7 +289,7 @@ namespace Learun.Application.TwoDevelopment.ZZDT_EC
|
||||
//创建图纸同步表
|
||||
baseDAL.Create<ec_drawing_synEntity>(sqlitePath);
|
||||
//添加图纸同步表数据
|
||||
baseDAL.Add(new ec_drawing_synBLL().GetList(queryJson).ToList(), sqlitePath);
|
||||
baseDAL.Add(new ec_drawing_synBLL().GetList(ProjectId, "", null).ToList(), sqlitePath);
|
||||
continue;
|
||||
}
|
||||
if (table == "ec_drawing_file")
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,38 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data;
|
||||
using System.Data.SQLite;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
namespace Learun.Util.Json
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class JsonHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 字符串转为动态对象。然后直接用点操作符取值。如 res.DrawingFileID;
|
||||
/// </summary>
|
||||
/// <param name="queryJson"></param>
|
||||
/// <returns></returns>
|
||||
public static dynamic Str2Dynamic(string queryJson)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<dynamic>(queryJson);
|
||||
}
|
||||
/// <summary>
|
||||
/// 字符串转为JObject对象。然后用["DrawingFileID"]取值。
|
||||
/// </summary>
|
||||
/// <param name="queryJson"></param>
|
||||
/// <returns></returns>
|
||||
public static JObject Str2JObject(string queryJson)
|
||||
{
|
||||
return JObject.Parse(queryJson);
|
||||
}
|
||||
}
|
||||
}
|
@ -139,6 +139,7 @@
|
||||
<Compile Include="DataBase\FieldValueParam.cs" />
|
||||
<Compile Include="DataBase\DbWhere.cs" />
|
||||
<Compile Include="Extensions\DataTableExtensions.cs" />
|
||||
<Compile Include="Json\JsonHelper.cs" />
|
||||
<Compile Include="Mail\Model\MailAccount .cs" />
|
||||
<Compile Include="Mail\Model\MailFile.cs" />
|
||||
<Compile Include="Mail\Model\MailModel.cs" />
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -533,6 +533,10 @@ WHERE
|
||||
int patternType;//1是create,0是update
|
||||
foreach (var sqlstr in subsql)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(sqlstr))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// 匹配表名
|
||||
Match match = Regex.Match(sqlstr, pattern);
|
||||
if (string.IsNullOrEmpty(sqlstr))
|
||||
@ -550,7 +554,7 @@ WHERE
|
||||
if (match.Length == 0 )
|
||||
{
|
||||
//无效的sql
|
||||
LogInfo(baseDirectory + logFileName, $"无法从{SQLFILENAME}.sql文件中解析出正确的create table 或 update table。确保只有一条sql。");
|
||||
LogInfo(baseDirectory + logFileName, $"无法从{SQLFILENAME}.sql文件中解析出正确的create table 或 update table。确保是有效的sql。文本为 {sqlstr}");
|
||||
continue;
|
||||
}
|
||||
var groupMatch = Regex.Matches(sqlstr, pattern);
|
||||
|
Loading…
x
Reference in New Issue
Block a user