移交子表补充排序序号SN

This commit is contained in:
2024-12-14 10:27:27 +08:00
parent ea336ebf21
commit 51d20396ea
30 changed files with 381 additions and 26 deletions
@@ -306,6 +306,17 @@ namespace FineUIPro.Web.Transfer
}
string result = string.Empty;
ir = pds.Rows.Count;
int Sn = 0;
//根据项目id查询sn
var snModel = Funs.DB.Transfer_Civil_Structure.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_Civil_Structure> list = new List<Model.Transfer_Civil_Structure>();
@@ -323,6 +334,10 @@ namespace FineUIPro.Web.Transfer
model.Descriptions= pds.Rows[i][1].ToString().Trim();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
Sn += 1;
model.SN = Sn;
model.Civil_Structure = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][2].ToString().Trim();
model.Subsystem = pds.Rows[i][3].ToString().Trim();