提交试车代码

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
@@ -232,6 +232,7 @@ namespace FineUIPro.Web.TestRun.TestRunManage
};
if (data.Count() > 0)
{
int num = 1;
int i = 1;
foreach (var item in data.OrderBy(p => p.Sort))
{
@@ -241,7 +242,12 @@ namespace FineUIPro.Web.TestRun.TestRunManage
model.SystemId = item.SystemId;
if (string.IsNullOrWhiteSpace(item.WorkPackCode))
{
var num = Funs.DB.TestRun_SubSysWorkPackage.Count(p => p.SystemId == this.SystemId) + i;
var workpackages = Funs.DB.TestRun_SubSysWorkPackage.Where(p => p.SystemId == this.SystemId).ToList();
if (workpackages.Count > 0)
{
num = workpackages.ConvertAll(x => int.Parse(x.WorkPackCode.Replace("WP", ""))).Max(m => m);
}
num = num + i;
model.WorkPackCode = $"WP{string.Format("{0:d3}", num)}";
i++;
}
@@ -249,7 +255,7 @@ namespace FineUIPro.Web.TestRun.TestRunManage
{
model.WorkPackCode = item.WorkPackCode;
}
model.Sort = item.Sort;
model.Sort = num;
model.Remark = item.Remark;
result.Add(model);
}