危险源管理模块接入真实数据库:新增危大/超危工程、风险控制清单、安全验收、安全巡检、临时用电管理(含前端页面、BLL/API服务、WebAPI控制器、Model项、SQL脚本与接口文档)

排除 CreateModel.bat(含明文sa密码与本地服务器名,未入库)
This commit is contained in:
2026-08-24 11:07:59 +08:00
parent 4925a6c4b0
commit 55944d732a
323 changed files with 9806 additions and 922 deletions
@@ -150,7 +150,15 @@ namespace FineUIPro.Web.AttachFile
{
Grid1.DataSource = GetSourceData();
}
Grid1.DataBind();
try
{
Grid1.DataBind();
}
catch (Exception ex)
{
}
}
#endregion
@@ -483,44 +491,61 @@ namespace FineUIPro.Web.AttachFile
/// <returns></returns>
private JArray GetSourceData()
{
if (Session[sessionName] == null && !string.IsNullOrEmpty(ToKeyId))
try
{
Session[sessionName] = new JArray();
Model.AttachFile sour = new Model.AttachFile();
if (this.MenuId == Const.ProjectPunishNoticeMenuId || this.MenuId == Const.ProjectPunishNoticeStatisticsMenuId)
if (Session[sessionName] == null && !string.IsNullOrEmpty(ToKeyId))
{
sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == ToKeyId && x.MenuId == this.MenuId);
}
else
{
sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == ToKeyId);
}
if (sour != null)
{
string url = sour.AttachUrl.Replace('\\', '/');
List<string> list = Funs.GetStrListByStr(url, ',');
if (list.Count() > 0)
Session[sessionName] = new JArray();
Model.AttachFile sour = new Model.AttachFile();
if (this.MenuId == Const.ProjectPunishNoticeMenuId || this.MenuId == Const.ProjectPunishNoticeStatisticsMenuId)
{
int i = 0;
foreach (var item in list)
sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == ToKeyId && x.MenuId == this.MenuId);
}
else
{
sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == ToKeyId);
}
if (sour != null && !string.IsNullOrEmpty(sour.AttachUrl))
{
string url = sour.AttachUrl.Replace('\\', '/');
List<string> list = Funs.GetStrListByStr(url, ',');
if (list.Count() > 0)
{
string atturl = Funs.RootPath + item.Replace(';', ' ').Trim();
if (File.Exists(atturl))
int i = 0;
foreach (var item in list)
{
i += 1;
break;
string relative = item.Replace(';', ' ').Trim();
string atturl = Funs.RootPath + relative;
if (!File.Exists(atturl))
{
string localRoot = System.Configuration.ConfigurationManager.AppSettings["localRoot"];
if (!string.IsNullOrEmpty(localRoot))
{
atturl = localRoot + relative;
}
}
if (File.Exists(atturl))
{
i += 1;
break;
}
}
if (i > 0 && !string.IsNullOrEmpty(sour.AttachSource))
{
Session[sessionName] = JArray.Parse(sour.AttachSource);
}
}
if (i > 0)
{
Session[sessionName] = JArray.Parse(sour.AttachSource);
}
}
}
}
return (JArray)Session[sessionName];
return (JArray)Session[sessionName];
}
catch (Exception ex)
{
ErrLogInfo.WriteLog("webuploader GetSourceData 异常!", ex);
throw;
}
}
/// <summary>