46 lines
1.5 KiB
C#
46 lines
1.5 KiB
C#
using AUTS.Domain.Entities;
|
|
using AUTS.Domain.ViewModels;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AUTS.Services.Manager
|
|
{
|
|
public partial class TestLog
|
|
{
|
|
private static string TestLogTbName = "TBL_{0}_{1}_TestLog";//测试记录表名
|
|
|
|
public static ReturnResult<object> GetStation(int ProductID,List<TBL_StationList> stationLists,List<TBL_Project> projects)
|
|
{
|
|
ReturnResult<object> res = new ReturnResult<object>();
|
|
var oIStation = new List<VM_OrderInternalStations>();
|
|
try
|
|
{
|
|
|
|
var entity = stationLists.Where(e => e.ProjectID == ProductID && e.IsValid == 1).ToList();
|
|
foreach (var item in entity)
|
|
{
|
|
oIStation.Add(new VM_OrderInternalStations()
|
|
{
|
|
ID = item.ID,
|
|
StationDesc = item.StationDesc,
|
|
StationName = item.StationName
|
|
});
|
|
}
|
|
res.Message = projects.FirstOrDefault(e => e.ID == ProductID).ProjectName;
|
|
res.Data = oIStation;
|
|
res.Status = 200;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
res.Message = "网络系统繁忙,请稍候再试!";
|
|
Logs.WriteErrorLog(ex);
|
|
|
|
}
|
|
return res;
|
|
}
|
|
}
|
|
}
|