提交试车代码

This commit is contained in:
2023-12-25 14:19:31 +08:00
parent 1f08356eb1
commit 726c5116f4
51 changed files with 3545 additions and 599 deletions
@@ -184,7 +184,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
/// </summary>
public void ZxtgdBrid()
{
string strSql = @"select * from PreRun_PropertySysPiping where ProjectId=@ProjectId and SystemId=@SystemId ";
string strSql = @"select * from PreRun_PropertySysPiping where ProjectId=@ProjectId and SystemId=@SystemId order by Sort asc";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@SystemId", this.tvControlItem.SelectedNodeID));
@@ -308,6 +308,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
ShowNotify("Excel模板格式不正确!", MessageBoxIcon.Warning);
return;
}
var sortnum = Funs.DB.PreRun_PropertySysPiping.Count(x => x.SystemId == tvControlItem.SelectedNodeID);
List<PreRun_PropertySysPiping> list = new List<PreRun_PropertySysPiping>();
for (int i = 0; i < ds.Tables.Count; i++)
{
@@ -318,6 +319,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
{
if (string.IsNullOrWhiteSpace(itemTb.Rows[j][1].ToString()) || string.IsNullOrWhiteSpace(itemTb.Rows[j][8].ToString())) continue;
PreRun_PropertySysPiping model = new PreRun_PropertySysPiping();
sortnum++;
model.PropertyId = Guid.NewGuid().ToString();
model.SystemId = tvControlItem.SelectedNodeID;
model.ProjectId = this.CurrUser.LoginProjectId;
@@ -339,7 +341,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
model.Remark = itemTb.Rows[j][53].ToString();
model.AddUser = this.CurrUser.UserId;
model.AddTime = DateTime.Now;
model.Sort = list.Count;
model.Sort = sortnum;
list.Add(model);
}
}
@@ -469,7 +471,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
/// </summary>
public void ZxtgyBrid()
{
string strSql = @"select * from PreRun_TechnologySysPiping where ProjectId=@ProjectId and SystemId=@SystemId ";
string strSql = @"select * from PreRun_TechnologySysPiping where ProjectId=@ProjectId and SystemId=@SystemId order by Sort asc";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@SystemId", this.tvControlItem.SelectedNodeID));
@@ -595,6 +597,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
ShowNotify("Excel模板格式不正确!", MessageBoxIcon.Warning);
return;
}
var sortnum = Funs.DB.PreRun_TechnologySysPiping.Count(x => x.SystemId == tvControlItem.SelectedNodeID);
List<PreRun_TechnologySysPiping> list = new List<PreRun_TechnologySysPiping>();
for (int i = 0; i < ds.Tables.Count; i++)
{
@@ -609,6 +612,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
PreRun_TechnologySysPiping model = new PreRun_TechnologySysPiping();
if (!string.IsNullOrWhiteSpace(itemTb.Rows[j][4].ToString()))
{
sortnum++;
model.TechnologyId = Guid.NewGuid().ToString();
model.SystemId = tvControlItem.SelectedNodeID;
model.ProjectId = this.CurrUser.LoginProjectId;
@@ -623,7 +627,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
model.Remark = itemTb.Rows[j][52].ToString();
model.AddUser = this.CurrUser.UserId;
model.AddTime = DateTime.Now;
model.Sort = i - 1;
model.Sort = sortnum;
list.Add(model);
lastTagNumber = model.TagNumber;
}
@@ -1037,7 +1041,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
{
var datatb = new DataTable();
var addTb = new DataTable();
string strSql = @"select a.PropertyId,a.SystemId,a.ProjectId,a.PipingCode,a.Diameter,a.MaterialLevel,a.AdiabatType,a.AdiabatThickness,a.MediumState,a.DrawingNo,a.PipingStart,a.PipingEnd,a.PipingLevel,a.NormalTemperature,a.NormalPressure,a.DesignTemperature,a.DesignPressure,a.PaintLevel,a.Remark,a.AddUser,a.AddTime,a.Sort from PreRun_PropertySysPiping as a inner join PreRun_SubPropertySelect as b on a.PropertyId=b.PropertyId where 1=1 and a.ProjectId=@ProjectId and b.SubSystemId=@SubSystemId ";
string strSql = @"select a.PropertyId,a.SystemId,a.ProjectId,a.PipingCode,a.Diameter,a.MaterialLevel,a.AdiabatType,a.AdiabatThickness,a.MediumState,a.DrawingNo,a.PipingStart,a.PipingEnd,a.PipingLevel,a.NormalTemperature,a.NormalPressure,a.DesignTemperature,a.DesignPressure,a.PaintLevel,a.Remark,a.AddUser,a.AddTime,a.Sort from PreRun_PropertySysPiping as a inner join PreRun_SubPropertySelect as b on a.PropertyId=b.PropertyId where 1=1 and a.ProjectId=@ProjectId and b.SubSystemId=@SubSystemId order by a.Sort asc ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@SubSystemId", this.tvControlItem.SelectedNodeID));
@@ -1051,7 +1055,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
if (selectPropertys.Count > 0)
{
var addtbRowSql = $"select a.PropertyId,a.SystemId,a.ProjectId,a.PipingCode,a.Diameter,a.MaterialLevel,a.AdiabatType,a.AdiabatThickness,a.MediumState,a.DrawingNo,a.PipingStart,a.PipingEnd,a.PipingLevel,a.NormalTemperature,a.NormalPressure,a.DesignTemperature,a.DesignPressure,a.PaintLevel,a.Remark,a.AddUser,a.AddTime,a.Sort from PreRun_PropertySysPiping as a where 1=1 and a.PropertyId in ('{string.Join("','", selectPropertys)}')";
var addtbRowSql = $"select a.PropertyId,a.SystemId,a.ProjectId,a.PipingCode,a.Diameter,a.MaterialLevel,a.AdiabatType,a.AdiabatThickness,a.MediumState,a.DrawingNo,a.PipingStart,a.PipingEnd,a.PipingLevel,a.NormalTemperature,a.NormalPressure,a.DesignTemperature,a.DesignPressure,a.PaintLevel,a.Remark,a.AddUser,a.AddTime,a.Sort from PreRun_PropertySysPiping as a where 1=1 and a.PropertyId in ('{string.Join("','", selectPropertys)}') order by a.Sort asc ";
addTb = SQLHelper.GetDataTableRunText(addtbRowSql);
}
}
@@ -1175,7 +1179,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
{
var datatb = new DataTable();
var addTb = new DataTable();
string strSql = @"select a.TechnologyId,a.SystemId,a.ProjectId,a.TagNumber,a.NameSpecifications,a.DrawingNo,a.Materials,a.NumOperate,a.NumStandby,a.WeightSingle,a.WeightTotal,a.Remark,a.AddUser,a.AddTime,a.Sort from PreRun_TechnologySysPiping as a inner join PreRun_SubTechnologySelect as b on a.TechnologyId=b.TechnologyId where 1=1 and a.ProjectId=@ProjectId and b.SubSystemId=@SubSystemId ";
string strSql = @"select a.TechnologyId,a.SystemId,a.ProjectId,a.TagNumber,a.NameSpecifications,a.DrawingNo,a.Materials,a.NumOperate,a.NumStandby,a.WeightSingle,a.WeightTotal,a.Remark,a.AddUser,a.AddTime,a.Sort from PreRun_TechnologySysPiping as a inner join PreRun_SubTechnologySelect as b on a.TechnologyId=b.TechnologyId where 1=1 and a.ProjectId=@ProjectId and b.SubSystemId=@SubSystemId order by a.Sort asc";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@SubSystemId", this.tvControlItem.SelectedNodeID));
@@ -1188,7 +1192,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
if (existTechnologyIds.Count > 0) selectTechnologys.RemoveAll(a => existTechnologyIds.Contains(a));
if (selectTechnologys.Count > 0)
{
var addtbRowSql = $"select a.TechnologyId,a.SystemId,a.ProjectId,a.TagNumber,a.NameSpecifications,a.DrawingNo,a.Materials,a.NumOperate,a.NumStandby,a.WeightSingle,a.WeightTotal,a.Remark,a.AddUser,a.AddTime,a.Sort from PreRun_TechnologySysPiping as a where 1=1 and a.TechnologyId in ('{string.Join("','", selectTechnologys)}')";
var addtbRowSql = $"select a.TechnologyId,a.SystemId,a.ProjectId,a.TagNumber,a.NameSpecifications,a.DrawingNo,a.Materials,a.NumOperate,a.NumStandby,a.WeightSingle,a.WeightTotal,a.Remark,a.AddUser,a.AddTime,a.Sort from PreRun_TechnologySysPiping as a where 1=1 and a.TechnologyId in ('{string.Join("','", selectTechnologys)}') order by a.Sort asc";
addTb = SQLHelper.GetDataTableRunText(addtbRowSql);
}
}
@@ -1304,7 +1308,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
{
var datatb = new DataTable();
var addTb = new DataTable();
string strSql = @"select a.InstrumentId,a.SystemId,a.ProjectId,a.InstrumentTag,a.UseTo,a.InstrumentName,a.Supplier,a.InstallationPosition,a.SignalType,a.AssociatedSystem,a.Cp25,a.In11,a.In40,a.Remark,a.AddUser,a.AddTime,a.Sort from PreRun_InstrumentSysPiping as a inner join PreRun_SubInstrumentSelect as b on a.InstrumentId=b.InstrumentId where 1=1 and a.ProjectId=@ProjectId and b.SubSystemId=@SubSystemId ";
string strSql = @"select a.InstrumentId,a.SystemId,a.ProjectId,a.InstrumentTag,a.UseTo,a.InstrumentName,a.Supplier,a.InstallationPosition,a.SignalType,a.AssociatedSystem,a.Cp25,a.In11,a.In40,a.Remark,a.AddUser,a.AddTime,a.Sort from PreRun_InstrumentSysPiping as a inner join PreRun_SubInstrumentSelect as b on a.InstrumentId=b.InstrumentId where 1=1 and a.ProjectId=@ProjectId and b.SubSystemId=@SubSystemId order by a.Sort asc ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@SubSystemId", this.tvControlItem.SelectedNodeID));
@@ -1316,7 +1320,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
if (existInstrumentIdIds.Count > 0) selectInstrumentIds.RemoveAll(a => existInstrumentIdIds.Contains(a));
if (selectInstrumentIds.Count > 0)
{
var addtbRowSql = $"select a.InstrumentId,a.SystemId,a.ProjectId,a.InstrumentTag,a.UseTo,a.InstrumentName,a.Supplier,a.InstallationPosition,a.SignalType,a.AssociatedSystem,a.Cp25,a.In11,a.In40,a.Remark,a.AddUser,a.AddTime,a.Sort from PreRun_InstrumentSysPiping as a where 1=1 and a.InstrumentId in ('{string.Join("','", selectInstrumentIds)}')";
var addtbRowSql = $"select a.InstrumentId,a.SystemId,a.ProjectId,a.InstrumentTag,a.UseTo,a.InstrumentName,a.Supplier,a.InstallationPosition,a.SignalType,a.AssociatedSystem,a.Cp25,a.In11,a.In40,a.Remark,a.AddUser,a.AddTime,a.Sort from PreRun_InstrumentSysPiping as a where 1=1 and a.InstrumentId in ('{string.Join("','", selectInstrumentIds)}') order by a.Sort asc";
addTb = SQLHelper.GetDataTableRunText(addtbRowSql);
}
}
@@ -1485,9 +1489,9 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
if (dt.Rows[3][28].ToString() != "安装位置") result = false;
if (dt.Rows[3][32].ToString() != "信号类型") result = false;
if (dt.Rows[3][36].ToString() != "关联系统") result = false;
if (dt.Rows[4][40].ToString() != "CP25") result = false;
if (dt.Rows[4][44].ToString() != "IN11") result = false;
if (dt.Rows[4][48].ToString() != "IN40") result = false;
if (dt.Rows[3][40].ToString() != "P&ID") result = false;
if (dt.Rows[3][44].ToString() != "数据表") result = false;
if (dt.Rows[3][48].ToString() != "仪表位置图") result = false;
if (dt.Rows[3][52].ToString() != "备注") result = false;
return result;