提交试车代码
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user