20240423 综合管理导入
This commit is contained in:
@@ -126,7 +126,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL(ds.Tables[0], 10);
|
||||
AddDatasetToSQL(ds.Tables[0], 11);
|
||||
hdCheckResult.Text = "1";
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -166,7 +166,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
|
||||
where y.ProjectId == this.CurrUser.LoginProjectId && (y.UnitType == Const.ProjectUnitType_1 || y.UnitType == Const.ProjectUnitType_2)
|
||||
select x;
|
||||
var ins = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var ins = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperUnitWork == null orderby x.UnitWorkCode select x;
|
||||
var cns = from x in Funs.DB.Base_CNProfessional select x;
|
||||
|
||||
for (int i = 0; i < ir; i++)
|
||||
@@ -212,7 +212,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
var in1 = ins.Where(x => x.UnitWorkName == row4.Trim()).FirstOrDefault();
|
||||
if (in1 == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "装置" + "," + "[" + row4 + "]不存在!" + "|";
|
||||
result += (i + 2).ToString() + "," + "单位工程" + "," + "[" + row4 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,6 +238,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
result += (i + 2).ToString() + "," + "签证时间" + "," + "[" + row6 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row10 = pds.Rows[i][10].ToString();
|
||||
if (string.IsNullOrEmpty(row10))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "标志编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
@@ -343,7 +349,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL2(ds.Tables[0], 4);
|
||||
AddDatasetToSQL2(ds.Tables[0], 11);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -377,13 +383,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
select x;
|
||||
|
||||
var cns = from x in Funs.DB.Base_CNProfessional select x;
|
||||
var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var ins = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperUnitWork == null select x;
|
||||
var oldViewInfos = from x in Funs.DB.Comprehensive_SiteVisaManagement
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
var oldViewInfo = oldViewInfos.Where(x => x.VisaCode == pds.Rows[i][1].ToString().Trim()).FirstOrDefault();
|
||||
var oldViewInfo = oldViewInfos.Where(x => x.RemarkCode == pds.Rows[i][10].ToString().Trim()).FirstOrDefault();
|
||||
if (oldViewInfo == null)
|
||||
{
|
||||
Model.Comprehensive_SiteVisaManagement Ins = new Model.Comprehensive_SiteVisaManagement();
|
||||
@@ -397,7 +403,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
Ins.ProcessingState = pds.Rows[i][3].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim()))
|
||||
{
|
||||
Ins.UnitWorkId = Funs.DB.WBS_UnitWork.First(e => e.UnitWorkName == pds.Rows[i][4].ToString().Trim()).UnitWorkId;
|
||||
Ins.UnitWorkId = ins.FirstOrDefault(x => x.UnitWorkName == pds.Rows[i][4].ToString().Trim()).UnitWorkId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim()))
|
||||
{
|
||||
@@ -410,6 +416,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
Ins.SignMan = pds.Rows[i][7].ToString().Trim();
|
||||
Ins.AuditMan = pds.Rows[i][8].ToString().Trim();
|
||||
Ins.Remark = pds.Rows[i][9].ToString().Trim();
|
||||
Ins.RemarkCode = pds.Rows[i][10].ToString().Trim();
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.Status = BLL.Const.Comprehensive_Compile;
|
||||
Ins.VisaId = SQLHelper.GetNewID();
|
||||
|
||||
Reference in New Issue
Block a user