Browse Source

取消冗余逻辑

yijia
shanji 2 years ago
parent
commit
1dd7d840dc
  1. 8
      BBWYB.Client/ViewModels/WebVM.cs
  2. 8
      WebTest/MainWindow.xaml.cs

8
BBWYB.Client/ViewModels/WebVM.cs

@ -61,10 +61,10 @@ namespace BBWYB.Client.ViewModels
IList<Department> departmentList = null; IList<Department> departmentList = null;
var response = mdsApiService.GetShopDetailList(); //var response = mdsApiService.GetShopDetailList();
if (!response.Success) //if (!response.Success)
throw new Exception(response.Msg); // throw new Exception(response.Msg);
departmentList = response.Data?.Where(d => d.Name.Contains("供应链")).ToList(); departmentList = allDepartmentList.Where(d => d.Name.Contains("供应链")).ToList();
if (departmentList.Count == 0) if (departmentList.Count == 0)
throw new Exception("缺少有效的部门数据"); throw new Exception("缺少有效的部门数据");

8
WebTest/MainWindow.xaml.cs

@ -145,10 +145,10 @@ private string registerName = "webContext";
IList<Department> departmentList = null; IList<Department> departmentList = null;
var response = mdsApiService.GetShopDetailList(); //var response = mdsApiService.GetShopDetailList();
if (!response.Success) //if (!response.Success)
throw new Exception(response.Msg); // throw new Exception(response.Msg);
departmentList = response.Data?.Where(d => d.Name.Contains("供应链")).ToList(); departmentList = allDepartmentList?.Where(d => d.Name.Contains("供应链")).ToList();
if (departmentList.Count == 0) if (departmentList.Count == 0)
throw new Exception("缺少有效的部门数据"); throw new Exception("缺少有效的部门数据");

Loading…
Cancel
Save