修改服务项目状态检索

optimize
jianghaiqing 1 year ago
parent 0092cb5382
commit ebe4205944

@ -2299,6 +2299,9 @@ namespace Myshipping.Application
}
else
{
if (model.ProjectCodes == null || (model.ProjectCodes != null && model.ProjectCodes.Length == 0))
throw Oops.Oh($"服务项目代码不能为空");
model.TenantId = UserManager.TENANT_ID;
result = await _serviceWorkFlowManageService.GetEnableStatusListByProject(model);
}

@ -1923,13 +1923,13 @@ namespace Myshipping.Application
dto.SubStatusList = currList.Select(e => {
var skuInfo = statusSKUList.FirstOrDefault(e => e.PK_ID == act.STATUS_SKU_ID);
var skuInfo = statusSKUList.FirstOrDefault(t => t.PK_ID == e.Act.STATUS_SKU_ID);
var itemDto = new ServiceProjectStatusDto
{
SkuPKId = act.STATUS_SKU_ID,
ActPKId = act.PK_ID,
ShowName = act.SHOW_NAME,
SkuPKId = e.Act.STATUS_SKU_ID,
ActPKId = e.Act.PK_ID,
ShowName = e.Act.SHOW_NAME,
ActSortNo = e.Rela.SORT_NO,
WFPKId = wf.PK_ID,
StatusSKUCode = skuInfo.STATUS_SKU_CODE,

@ -1290,13 +1290,26 @@ namespace Myshipping.Application
try
{
var statuList = await _serviceWorkFlowBaseService.GetEnableProjectWithStatusList(model.TenantId.ToString());
var statuList = await _serviceWorkFlowBaseService.GetEnableProjectWithStatusList(model.TenantId.ToString());
var resultList = statuList.Where(a => model.ProjectCodes.Contains(a.ProjectCode))
.OrderBy(a => a.SortNo)
.SelectMany(a => a.StatusList.OrderBy(b=>b.SortNo))
.SelectMany(a =>
a.StatusList.SelectMany(b => {
List<ServiceProjectStatusDto> currList = new List<ServiceProjectStatusDto>();
currList.Add(b);
if (b.SubStatusList != null && b.SubStatusList.Count > 0)
{
currList.AddRange(b.SubStatusList.OrderBy(e=>e.ActSortNo));
}
return currList;
}
)).ToList()
.ToList();
result.succ = true;
result.ext = resultList;
}

Loading…
Cancel
Save