| | |
| | | if (_Task != null) return content.Error($"璐т綅缂栧彿:{Locatask}鐨勬祬璐т綅搴撳凡鏈変换鍔★紝涓嶅彲杩涜绉诲簱"); |
| | | |
| | | //杩涜鑾峰彇鏂扮殑搴撲綅 |
| | | Dt_LocationInfo? Nextlocation = _basicService.LocationInfoService.AssignLocation(DeepLocation.RoadwayNo, 0, "");//鑾峰彇鍒版柊搴撲綅 |
| | | Dt_LocationInfo? Nextlocation = _basicService.LocationInfoService.GetLocation(DeepLocation.RoadwayNo);//鑾峰彇鍒版柊搴撲綅 |
| | | if (Nextlocation == null) |
| | | { |
| | | return content.Error($"璐т綅鍒嗛厤澶辫触,鏈壘鍒板彲鍒嗛厤璐т綅"); |
| | |
| | | //鍒犻櫎浠诲姟娣诲姞鍘嗗彶 |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.浜哄伐瀹屾垚 : OperateTypeEnum.鑷姩瀹屾垚); |
| | | |
| | | WebResponseContent content = TaskCompletionFeedback(task); |
| | | |
| | | /*WebResponseContent content = TaskCompletionFeedback(task); |
| | | if (!content.Status) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content; |
| | | } |
| | | }*/ |
| | | |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | |
| | | stockInfo.StockStatus = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt(); |
| | | |
| | | int beforeStatus = locationInfo.LocationStatus; |
| | | locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | locationInfo.LocationStatus =(int)LocationStatusEnum.Free; |
| | | task.TaskStatus = TaskOutStatusEnum.OutFinish.ObjToInt(); |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | _stockRepository.DeleteData(stockInfo); |
| | | _locationInfoRepository.UpdateData(locationInfo); //淇敼鎴愮┖璐т綅 |
| | | |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateTypeEnum.鑷姩瀹屾垚 : OperateTypeEnum.浜哄伐瀹屾垚); |
| | | _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum); |
| | | WebResponseContent content = TaskCompletionFeedback(task); |
| | | _locationStatusChangeRecordService.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt(), "1", task.TaskNum); |
| | | /*WebResponseContent content = TaskCompletionFeedback(task); |
| | | if (!content.Status) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return content; |
| | | } |
| | | }*/ |
| | | |
| | | _unitOfWorkManage.CommitTran(); |
| | | return webResponse.OK(); |
| | |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return webResponse.Error($"绉诲簱浠诲姟瀹屾垚澶辫触锛屼换鍔d锛歿task.TaskNum},閿欒鍘熷洜锛歿ex.Message}"); |
| | | return webResponse.Error($"鍑哄簱浠诲姟瀹屾垚澶辫触锛屼换鍔d锛歿task.TaskNum},閿欒鍘熷洜锛歿ex.Message}"); |
| | | throw; |
| | | } |
| | | |