移交,管道和仪表数据导入顺序不变

This commit is contained in:
2024-12-10 14:31:15 +08:00
parent f419dd641d
commit 1439da7cd6
12 changed files with 128 additions and 3 deletions
@@ -302,6 +302,17 @@ namespace FineUIPro.Web.Transfer
}
string result = string.Empty;
ir = pds.Rows.Count;
int Sn = 0;
//根据项目id查询sn
var snModel = Funs.DB.Transfer_Piping.Where(x => x.ProjectId == CurrUser.LoginProjectId).OrderByDescending(x => x.SN).FirstOrDefault();
if (snModel == null && Sn == 0)
{
Sn = 1000;
}
else
{
Sn = snModel.SN;
}
if (pds != null && ir > 0)
{
List<Model.Transfer_Piping> list = new List<Model.Transfer_Piping>();
@@ -315,6 +326,10 @@ namespace FineUIPro.Web.Transfer
Model.Transfer_Piping model = new Model.Transfer_Piping();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
Sn += 1;
model.SN = Sn;
model.PIPINGLINENUMBER = pds.Rows[i][0].ToString().Trim();
model.Descriptions = pds.Rows[i][1].ToString().Trim();
model.SYSTEM = pds.Rows[i][1 + 1].ToString().Trim();