| | |
| | | using WIDESEA_Comm; |
| | | using WIDESEA_Core.EFDbContext; |
| | | using WIDESEA_Core.Extensions; |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_Entity.DomainModels; |
| | | using WIDESEA_WCS.IRepositories; |
| | | using WIDESEA_WCS.Repositories; |
| | | using WIDESEA_WMS.IRepositories; |
| | |
| | | return Ok(dataList); |
| | | } |
| | | #endregion |
| | | |
| | | [HttpPost("dt_stationinfolist")] |
| | | public WebResponseContent dt_stationinfolist() |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | VOLContext volContext = new VOLContext(); |
| | | Idt_stationinfoRepository dsta = new dt_stationinfoRepository(volContext); |
| | | string[] stationCodes = { "W", "A", "B", "C", "D01" }; |
| | | List<Tuple<List<dt_stationinfo>, int>> responseData = new List<Tuple<List<dt_stationinfo>, int>>(); |
| | | foreach (string code in stationCodes) |
| | | { |
| | | var data = dsta.Find(_ => true).Where(a => a.stationCode.Contains(code)).OrderBy(a => a.stationCode).ToList(); |
| | | int inst = dsta.Find(_ => true).Where(a => a.stationCode.Contains(code)).GroupBy(a => a.line).Count(); |
| | | responseData.Add(Tuple.Create(data, inst)); |
| | | } |
| | | content.Data = responseData; |
| | | return content; |
| | | } |
| | | [HttpPost("pcs_dt_stationinfolist")] |
| | | public WebResponseContent pcs_dt_stationinfolist() |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | VOLContext volContext = new VOLContext(); |
| | | Idt_stationinfoRepository dsta = new dt_stationinfoRepository(volContext); |
| | | string[] stationCodes = { "X01", "X02", "X03", "S", "DD001" }; |
| | | List<Tuple<List<dt_stationinfo>>> responseData = new List<Tuple<List<dt_stationinfo>>>(); |
| | | foreach (string code in stationCodes) |
| | | { |
| | | var data = dsta.Find(_ => true).Where(a => a.stationCode.Contains(code)).OrderBy(a => a.stationCode).ToList(); |
| | | responseData.Add(Tuple.Create(data)); |
| | | } |
| | | content.Data = responseData; |
| | | return content; |
| | | } |
| | | } |
| | | } |