| | |
| | | List<CachePointGroupDTO> cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.Free); |
| | | if (cachePointGroups != null && cachePointGroups.Count > 0) |
| | | { |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusB == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == EnableStatusEnum.Normal.ObjToInt()); |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusB == StatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == EnableStatusEnum.Normal.ObjToInt()); |
| | | int id = pointGroupDTO?.IdB ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.Free, LocationStatusEnum.Free); |
| | | if (cachePointGroups != null && cachePointGroups.Count > 0) |
| | | { |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusA == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == EnableStatusEnum.Normal.ObjToInt()); |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusA == StatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == EnableStatusEnum.Normal.ObjToInt()); |
| | | int id = pointGroupDTO?.IdA ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | |
| | | return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy); |
| | | return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == StatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy); |
| | | } |
| | | |
| | | public Dt_CachePoint? EmptyCachePoint(string toaddress) |
| | |
| | | List<CachePointGroupDTO> cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.Free); |
| | | if (cachePointGroups != null && cachePointGroups.Count > 0) |
| | | { |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusA == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatusA == EnableStatusEnum.Normal.ObjToInt()); |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusA == StatusEnum.OnlyOut.ObjToInt() || x.EnableStatusA == EnableStatusEnum.Normal.ObjToInt()); |
| | | int id = pointGroupDTO?.IdA ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.InStock); |
| | | if (cachePointGroups != null && cachePointGroups.Count > 0) |
| | | { |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusB == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatusB == EnableStatusEnum.Normal.ObjToInt()); |
| | | CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusB == StatusEnum.OnlyOut.ObjToInt() || x.EnableStatusB == EnableStatusEnum.Normal.ObjToInt()); |
| | | int id = pointGroupDTO?.IdB ?? 0; |
| | | return BaseDal.QueryFirst(x => x.Id == id); |
| | | } |
| | | |
| | | return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy); |
| | | return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == StatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy); |
| | | } |
| | | |
| | | public WebResponseContent GetEndPoints() |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | List<Dt_CachePoint> cachePoints = BaseDal.QueryData(x => x.PointName.Contains("åº")); |
| | | List<object> list = new List<object>(); |
| | | for (int i = 0; i < cachePoints.Count; i++) |
| | | Dt_CachePoint cachePoints = BaseDal.QueryFirst(x => x.PointCode == stationcode); |
| | | if (cachePoints == null) |
| | | { |
| | | object option = new { value = cachePoints[i].PointName, text = cachePoints[i].PointName }; |
| | | list.Add(option); |
| | | content = WebResponseContent.Instance.Error("为æ¾å°æ¤ç¼åæ¶"); |
| | | } |
| | | content = WebResponseContent.Instance.OK(data: list); |
| | | content = WebResponseContent.Instance.OK(data: cachePoints); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | public WebResponseContent UpdateHCJStaue(SaveModel saveModel) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | string stationcode = saveModel.MainData["stationcode"].ToString(); |
| | | string palletCode = saveModel.MainData["palletCode"].ToString(); |
| | | int toaddress = saveModel.MainData["toaddress"].ObjToInt(); |
| | | |
| | | Dt_CachePoint cachePoint = BaseDal.QueryFirst(x => x.PointCode == stationcode); |
| | | if (cachePoint == null) |
| | | { |
| | | content = WebResponseContent.Instance.Error("为æ¾å°æ¤ç¼åæ¶"); |
| | | } |
| | | cachePoint.Materialtype = palletCode; |
| | | cachePoint.PointStatus = toaddress; |
| | | BaseDal.UpdateData(cachePoint); |
| | | content = WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content = WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | public WebResponseContent PrintStatusUp(string pointCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_CachePoint cachePoint = BaseDal.QueryFirst(x => x.PointCode == pointCode); |
| | | if (cachePoint == null) |
| | | { |
| | | return content.Error("æå°ä¿¡æ¯ä¸åå¨"); |
| | | } |
| | | //cachePoint.Status = PrintEnum.Printed.ObjToInt(); |
| | | //BaseDal.UpdateData(cachePoint); |
| | | return content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error("é误:" + ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |