1
This commit is contained in:
+41
-12
@@ -1601,18 +1601,6 @@ namespace BLL
|
||||
|
||||
#endregion
|
||||
|
||||
#region 企业安全大检查
|
||||
/// <summary>
|
||||
/// 安全监督检查报告
|
||||
/// </summary>
|
||||
public const string SuperviseCheckReportMenuId = "40387C48-95A0-435C-82FB-57AF0A81B9D4";
|
||||
|
||||
/// <summary>
|
||||
/// 安全监督检查整改
|
||||
/// </summary>
|
||||
public const string SuperviseCheckRectifyMenuId = "55976B16-2C33-406E-B514-2FE42D031071";
|
||||
#endregion
|
||||
|
||||
#region 集团安全监督
|
||||
/// <summary>
|
||||
/// 企业上报监督检查报告
|
||||
@@ -3354,6 +3342,10 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string CheckSpecialTemplateUrl = "File\\Excel\\DataIn\\专项检查导入模板.xls";
|
||||
/// <summary>
|
||||
/// 专项检查明细导入模板
|
||||
/// </summary>
|
||||
public const string CheckSpecialDetailTemplateUrl = "File\\Excel\\DataIn\\专项检查明细导入模板.xls";
|
||||
/// <summary>
|
||||
/// 综合检查导入模板
|
||||
/// </summary>
|
||||
public const string CheckColligationTemplateUrl = "File\\Excel\\DataIn\\综合检查导入模板.xls";
|
||||
@@ -5280,5 +5272,42 @@ namespace BLL
|
||||
/// 重点工程项目质量专项整治行动开展情况台账
|
||||
/// </summary>
|
||||
public const string DCGLKeyProjectRectificationSituationLedgerMenuId = "35BA8E89-4575-4A3F-9C22-98B323E67DA1";
|
||||
|
||||
/// <summary>
|
||||
/// 临时用电
|
||||
/// </summary>
|
||||
public const string ProjectTemporaryElectricityListMenuId = "09B2A0A6-A693-4F1D-A4F5-D5DEA803D771";
|
||||
|
||||
#region 企业安全大检查
|
||||
/// <summary>
|
||||
/// 安全监督检查报告
|
||||
/// </summary>
|
||||
public const string SuperviseCheckReportMenuId = "40387C48-95A0-435C-82FB-57AF0A81B9D4";
|
||||
|
||||
/// <summary>
|
||||
/// 安全监督检查整改
|
||||
/// </summary>
|
||||
public const string SuperviseCheckRectifyMenuId = "A02E0365-383C-49A0-BF1A-B3E42052959B";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 企业安全检查菜单ID
|
||||
/// </summary>
|
||||
public const string UnitHazardRegisterMenu_Safety = "C46C007E-A100-4A52-9317-3B885442E130";
|
||||
/// <summary>
|
||||
/// 企业质量检查菜单ID
|
||||
/// </summary>
|
||||
public const string UnitHazardRegisterMenu_Quality = "FDA7722C-383E-4BB1-B29D-BB0BF87AA942";
|
||||
/// <summary>
|
||||
/// 企业安全检查菜单记录ID
|
||||
/// </summary>
|
||||
public const string UnitHazardRegisterMenuRecord_Safety = "73283863-CF67-44CA-9DF8-67071734A528";
|
||||
|
||||
/// <summary>
|
||||
/// 企业质量检查菜单记录ID
|
||||
/// </summary>
|
||||
public const string UnitHazardRegisterMenuRecord_Quality = "15511354-9822-4A21-AB24-2483D889FDB8";
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据合并清理
|
||||
/// </summary>
|
||||
public class DataCleanupMergeHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据合并清理
|
||||
/// </summary>
|
||||
/// <param name="exTable">排除操作数据表</param>
|
||||
/// <param name="columType">替换字段(模糊匹配)</param>
|
||||
/// <param name="mergeDataIds">需要替换的数据值</param>
|
||||
/// <param name="dataId">新的字段数据值</param>
|
||||
/// <returns></returns>
|
||||
public static bool DataCleanupMerge(string exTable, string columType, List<string> mergeDataIds, string dataId, ref string msg)
|
||||
{
|
||||
bool result = false;
|
||||
try
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var clist = db.DataIdMove.Where(x => x.ColumType == columType && x.NewIds == dataId).ToList();
|
||||
db.DataIdMove.DeleteAllOnSubmit(clist);
|
||||
db.SubmitChanges();
|
||||
List<Model.DataIdMove> list = new List<Model.DataIdMove>();
|
||||
foreach (var mergeId in mergeDataIds)
|
||||
{
|
||||
list.Add(new Model.DataIdMove { OldId = mergeId.Trim(), NewIds = dataId.Trim(), ColumType = columType });
|
||||
}
|
||||
|
||||
db.DataIdMove.InsertAllOnSubmit(list);
|
||||
db.SubmitChanges();
|
||||
|
||||
|
||||
//SP_DataIdMove[排除操作数据表,替换字段(模糊匹配),字段数据值]
|
||||
string strSql = $"exec SP_DataIdMove '{exTable}','{columType}','{dataId}'";
|
||||
result = BLL.SQLHelper.ExecuteSql(strSql);
|
||||
|
||||
//SqlParameter[] parameters = {
|
||||
// new SqlParameter("@exTable", exTable),
|
||||
// new SqlParameter("@colums", columType),
|
||||
// new SqlParameter("@trueId", dataId),
|
||||
// new SqlParameter("@returnVal", SqlDbType.Int)
|
||||
//};
|
||||
//BLL.SQLHelper.ExecuteNonQueryStoredProcedure("SP_DataIdMove", parameters);
|
||||
//int succ = BLL.SQLHelper.ExecuteProcedure("SP_DataIdMove", parameters);
|
||||
//Thread.Sleep(30000); // 等待30秒,30000毫秒等于30秒
|
||||
if (result)
|
||||
{
|
||||
db.DataIdMove.DeleteAllOnSubmit(list);
|
||||
db.SubmitChanges();
|
||||
msg = "数据合并成功!";
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = "数据合并失败,请稍后再试!";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
msg = ex.Message;
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user