| | |
| | | try |
| | | { |
| | | int containerType = taskDTO.containerCode.Contains("LLM") ? LocationTypeEnum.LargePallet.ObjToInt() : LocationTypeEnum.SmallPallet.ObjToInt(); |
| | | #region ç¹å°ç¹ |
| | | if (!string.IsNullOrEmpty(taskDTO.toLocationCode)) |
| | | { |
| | | var LocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.LocationCode == taskDTO.toLocationCode) ?? throw new Exception($"æªæ¾å°ç»ç¹è´§ä½ã{taskDTO.toLocationCode}ã"); |
| | | if (LocationInfo.LocationStatus != LocationStatusEnum.Free.ObjToInt()) throw new Exception($"ç»ç¹è´§ä½ã{taskDTO.toLocationCode}ãè´§ä½ç¶æä¸ä¸ºç©ºè´§ä½"); |
| | | } |
| | | #endregion |
| | | //è·åè´§ä½ä¿¡æ¯ |
| | | Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.GetFreeLocationInfo(taskDTO.toAreaCode, containerType) ?? throw new Exception($"æªæ¾å°ç»ç¹åºåºã{taskDTO.toAreaCode}ãå¯ç¨ç©ºè´§ä½ï¼"); |
| | | Dt_Task dt_Task = new() |
| | |
| | | Db.Ado.RollbackTran(); |
| | | throw new Exception(ex.Message); |
| | | } |
| | | |
| | | |
| | | return content.OK(data: new |
| | | { |
| | | taskCode = taskDTO.taskCode, |