| | |
| | | public class WmsBasePlaceService : IDynamicApiController, ITransient |
| | | { |
| | | private readonly SqlSugarRepository<WmsBasePlace> _rep; |
| | | public WmsBasePlaceService(SqlSugarRepository<WmsBasePlace> rep) |
| | | private readonly SqlSugarRepository<V_Station_Quan> _V_Station_Quan; |
| | | public WmsBasePlaceService(SqlSugarRepository<WmsBasePlace> rep, |
| | | SqlSugarRepository<V_Station_Quan> V_Station_Quan_Rep) |
| | | { |
| | | _rep = rep; |
| | | _V_Station_Quan = V_Station_Quan_Rep; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | await _rep.InsertRangeAsync(places); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 不分页查询库位信息 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpGet] |
| | | [ApiDescriptionSettings(Name = "ListView")] |
| | | [Description("WmsBasePlace/ListView")] |
| | | public async Task<List<LocationViewOutput>> ListView([FromQuery] WmsBasePlaceInput input) |
| | | { |
| | | var query = await _V_Station_Quan.AsQueryable() |
| | | .WhereIF(!string.IsNullOrWhiteSpace(input.SearchKey), u => |
| | | u.PlaceCode.Contains(input.SearchKey.Trim()) |
| | | // || u.WareContainerCode.Contains(input.SearchKey.Trim()) |
| | | //|| u.Lane==input.Lane |
| | | //|| u.Row==input.Row |
| | | ) |
| | | .OrderBy(u => u.LaneNo) |
| | | //.OrderBy(u => u.Row) |
| | | .OrderBy(u => u.LayerNo) |
| | | .OrderBy(u => u.ColumnNo) |
| | | .Select<LocationViewOutput>().ToListAsync(); |
| | | return query; |
| | | } |
| | | |
| | | } |
| | | |