提交试车代码

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
@@ -246,6 +246,7 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
};
if (data.Count() > 0)
{
int num = 1;
int i = 1;
foreach (var item in data.OrderBy(p => p.Sort))
{
@@ -255,7 +256,12 @@ namespace FineUIPro.Web.TestRun.BeforeTestRun
model.SystemId = item.SystemId;
if (string.IsNullOrWhiteSpace(item.WorkPackCode))
{
var num = Funs.DB.PreRun_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++;
}