| | |
| | | .ToList().Select(x => x.DeviceCode).ToList(); |
| | | |
| | | var result = await _stockInfoRepository.Db.Queryable<DtStockInfo>() |
| | | .Where(x => x.ProductionLine == station.productLine) |
| | | .WhereIF(!station.Roadway.Contains("JZSC"), x => x.ProductionLine == station.productLine) |
| | | .Where(x => x.AreaCode == areaCode && x.IsFull == false) |
| | | .Includes(x=>x.StockInfoDetails) |
| | | .Includes(x => x.StockInfoDetails) |
| | | .Where(x => x.StockInfoDetails.Any(y => y.MaterielCode == "空托盘")) |
| | | .Includes(x=>x.LocationInfo) |
| | | .Includes(x => x.LocationInfo) |
| | | .WhereIF(!deviceCode.IsNullOrEmpty(), x => deviceCode.Contains(x.LocationInfo.RoadwayNo)) |
| | | .Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // 过滤条件 |
| | | .OrderBy(x => x.CreateDate) // 排序 |
| | |
| | | { |
| | | return new Dt_Task |
| | | { |
| | | Grade = tag == 104 ? (stockInfo.LocationInfo.RoadwayNo.Contains("CWSC") ? 1 : 2) : (stockInfo.LocationInfo.RoadwayNo.Contains("CWSC") ? 2 : 1), |
| | | Grade = tag == 104 ? (stockInfo.LocationInfo.RoadwayNo.Contains("CWSC")|| stockInfo.LocationInfo.RoadwayNo.Contains("JZSC") ? 1 : 2) : (stockInfo.LocationInfo.RoadwayNo.Contains("CWSC") || stockInfo.LocationInfo.RoadwayNo.Contains("JZSC") ? 2 : 1), |
| | | Roadway = stockInfo.LocationInfo.RoadwayNo, |
| | | TargetAddress = position, |
| | | Dispatchertime = DateTime.Now, |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 查询静置空闲库位 |
| | | public WebResponseContent QueryLocationFreeJZ(string RoadwayNo) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var result = _locationRepository.QueryData(x => x.EnalbeStatus != (int)EnableEnum.Disable && x.LocationStatus == (int)LocationEnum.Free && x.RoadwayNo.Contains("JZSC")); |
| | | LogFactory.GetLog($"静置{RoadwayNo}查询空闲库位").Info(true, $"{JsonConvert.SerializeObject(result)}"); |
| | | if (result.Count > 5) |
| | | { |
| | | return content.OK(); |
| | | } |
| | | return content.Error("库位已满"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 大屏接口 |
| | | |
| | | /// <summary> |