| | |
| | | try |
| | | { |
| | | string stationcode = saveModel.MainData["stationcode"].ToString(); |
| | | string PalletCode = saveModel.MainData["PalletCode"].ToString(); |
| | | //string PalletCode = saveModel.MainData["PalletCode"].ToString(); |
| | | //string toaddress = saveModel.MainData["toaddress"].ToString(); |
| | | if (stationcode == "" || PalletCode == "")//å¼å¸¸è¿åãããããã |
| | | if (stationcode == "")//å¼å¸¸è¿åãããããã |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®ä¸è½ä¸ºç©º"}"); |
| | | } |
| | | Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("KTRHCK") && x.Materialtype == PalletCode && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); |
| | | Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("空æåºå
¥") && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); |
| | | if (endCachePoint == null) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æªæ¾å°ç©ºæåºåºåºä½å¯ç¨ç¼åæ¶"}"); |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æªæ¾å°ç©ºæåºå
¥åºä½å¯ç¨ç¼åæ¶"}"); |
| | | } |
| | | Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.Materialtype == PalletCode); |
| | | Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt()); |
| | | if (point == null) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®å¼å¸¸ï¼æªæ¾å°æ¤ç¼åæ¶æç©æç±»åä¸å¹é
"}"); |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®å¼å¸¸ï¼æªæ¾å°æ¤ç¼åæ¶æå·²ç¦ç¨"}"); |
| | | } |
| | | Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); |
| | | Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt()); |
| | | if (points == null) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®å¼å¸¸ï¼æ¤ç¼åç¹å·²è¢«éå®"}"); |
| | |
| | | TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(), |
| | | TaskType = TaskTypeEnum.AGVCarry.ObjToInt(), |
| | | Depth = 1, |
| | | Materialtype = PalletCode, |
| | | Materialtype = "", |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | Creater = App.User.UserId > 0 ? App.User.UserName : "System", |
| | | }; |
| | |
| | | try |
| | | { |
| | | string stationcode = saveModel.MainData["stationcode"].ToString(); |
| | | string PalletCode = saveModel.MainData["PalletCode"].ToString(); |
| | | //string toaddress = saveModel.MainData["toaddress"].ToString(); |
| | | if (stationcode == "" || PalletCode == "")//å¼å¸¸è¿åãããããã |
| | | //string PalletCode = saveModel.MainData["PalletCode"].ToString(); |
| | | string toaddress = saveModel.MainData["toaddress"].ToString(); |
| | | if (stationcode == "" || toaddress == "")//å¼å¸¸è¿åãããããã |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®ä¸è½ä¸ºç©º"}"); |
| | | } |
| | | Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode.Contains("KTRHCK") && x.Materialtype == PalletCode && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); |
| | | Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointName == toaddress && x.PointStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt()); |
| | | if (endCachePoint == null) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æªæ¾å°ç©ºæåºå
¥åºä½å¯ç¨ç¼åæ¶"}"); |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æªæ¾å°ç»ç¹æ¤åºå空æåºä½å¯ç¨ç¼åæ¶"}"); |
| | | } |
| | | Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.Materialtype == PalletCode); |
| | | Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt()); |
| | | if (point == null) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®å¼å¸¸ï¼æªæ¾å°æ¤ç¼åæ¶æç©æç±»åä¸å¹é
"}"); |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®å¼å¸¸ï¼æªæ¾å°æ¤ç¼åæ¶æå·²ç¦ç¨"}"); |
| | | } |
| | | Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); |
| | | Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.InStock.ObjToInt()); |
| | | if (points == null) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®å¼å¸¸ï¼æ¤ç¼åç¹å·²è¢«éå®"}"); |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®å¼å¸¸ï¼æ¤ç¼åç¹ç¶æä¸æ¯æè´§ç¶æ"}"); |
| | | } |
| | | Dt_Task taskcode = BaseDal.QueryFirst(x => x.SourceAddress == stationcode || x.TargetAddress == stationcode); |
| | | if (taskcode != null) |
| | |
| | | TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(), |
| | | TaskType = TaskTypeEnum.AGVCarry.ObjToInt(), |
| | | Depth = 1, |
| | | Materialtype = PalletCode, |
| | | Materialtype = "", |
| | | TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)), |
| | | Creater = App.User.UserId > 0 ? App.User.UserName : "System", |
| | | }; |
| | |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®ä¸è½ä¸ºç©º"}"); |
| | | } |
| | | Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.Materialtype == PalletCode && x.PointName == toaddress && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); |
| | | Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointName == toaddress && x.PointStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt()); |
| | | if (endCachePoint == null) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æªæ¾å°ç»ç¹åºåå¯ç¨ç¼åæ¶"}"); |
| | | } |
| | | Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.Materialtype == PalletCode); |
| | | Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt().ObjToInt());// && x.Materialtype == PalletCode |
| | | if (point == null) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®å¼å¸¸ï¼æªæ¾å°æ¤ç¼åæ¶æç©æç±»åä¸å¹é
"}"); |
| | | return content = WebResponseContent.Instance.Error($"æ·»å ä»»å¡å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®å¼å¸¸ï¼æªæ¾å°æ¤ç¼åæ¶æå·²ç¦ç¨"}"); |
| | | } |
| | | Dt_CachePoint points = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.PointStatus == LocationStatusEnum.Free.ObjToInt()); |
| | | if (points == null) |
| | |
| | | try |
| | | { |
| | | string stationcode = saveModel.MainData["stationcode"].ToString(); |
| | | string PalletCode = saveModel.MainData["PalletCode"].ToString(); |
| | | if (stationcode == "" || PalletCode == "")//å¼å¸¸è¿åãããããã |
| | | //string PalletCode = saveModel.MainData["PalletCode"].ToString(); |
| | | if (stationcode == "")//å¼å¸¸è¿åãããããã|| PalletCode == "" |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ¶è´§å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®ä¸è½ä¸ºç©º"}"); |
| | | } |
| | | Dt_CachePoint cachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.Materialtype == PalletCode && (x.PointStatus == LocationStatusEnum.Lock.ObjToInt() || x.PointStatus == LocationStatusEnum.InStock.ObjToInt())); |
| | | Dt_CachePoint cachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && (x.PointStatus == LocationStatusEnum.Lock.ObjToInt() || x.PointStatus == LocationStatusEnum.InStock.ObjToInt()));//&& x.Materialtype == PalletCode |
| | | if (cachePoint == null) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ¶è´§å¼å¸¸,é误信æ¯:{"ç¼åä½ä¸æ¯éå®ç¶æ"}"); |
| | | } |
| | | Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode && x.Materialtype == PalletCode); |
| | | Dt_CachePoint point = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == stationcode);// && x.Materialtype == PalletCode |
| | | if (point == null) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ¶è´§å¼å¸¸,é误信æ¯:{"æ«ç æ°æ®å¼å¸¸ï¼æªæ¾å°æ¤ç¼åæ¶æç©æç±»åä¸å¹é
"}"); |
| | | } |
| | | Dt_Task taskcode = BaseDal.QueryFirst(x => x.SourceAddress == stationcode || x.TargetAddress == stationcode); |
| | | Dt_Task taskcode = BaseDal.QueryFirst(x => (x.SourceAddress == stationcode || x.TargetAddress == stationcode)); |
| | | if (taskcode != null) |
| | | { |
| | | return content = WebResponseContent.Instance.Error($"æ¶è´§å¼å¸¸,é误信æ¯:该ç«ç¹å·²åå¨ä»»å¡"); |