| | |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, locationStatus, LocationChangeType.OutboundAssignLocation, stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", taskOut.TaskNum); |
| | | _unitOfWorkManage.CommitTran(); |
| | | //å°ä»»å¡æ¨éå°WCS |
| | | WebResponseContent content = PushTasksToWCS(new List<Dt_Task>() { taskOut }, "AGV"); |
| | | PushTasksToWCS(new List<Dt_Task>() { taskOut }, "AGV"); |
| | | responseContent.OK(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | BaseDal.AddData(taskIn); |
| | | _stockRepository.StockInfoRepository.UpdateData(stockInfo); |
| | | //å°ä»»å¡æ¨éå°WCS |
| | | WebResponseContent content = PushTasksToWCS(new List<Dt_Task>() { taskIn }, "AGV"); ; |
| | | if (!content.Status) |
| | | { |
| | | return responseContent.Error(); |
| | | } |
| | | PushTasksToWCS(new List<Dt_Task>() { taskIn }, "AGV"); ; |
| | | responseContent.OK(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>(); |
| | | foreach (var item in toolScraps.ToolCodes) |
| | | { |
| | | Dt_StockInfo stockInfo = stockInfos.Find(x => x.Details.Any(x => x.BatchNo == item)); |
| | | Dt_StockInfo? stockInfo = stockInfos.FirstOrDefault(x => x.Details.Any(x => x.BatchNo == item)); |
| | | if (stockInfo == null) |
| | | { |
| | | return responseContent.Error($"{item}åºåä¿¡æ¯ä¸åå¨"); |
| | | } |
| | | stockInfoUpdates.Add(stockInfo); |
| | | stockInfoDetails.Add(stockInfo.Details.FirstOrDefault()); |
| | | } |
| | | //æ¸
é¤åºåä¿¡æ¯ |
| | | _unitOfWorkManage.BeginTran(); |
| | | _stockRepository.StockInfoRepository.DeleteAndMoveIntoHty(stockInfoUpdates, OperateTypeEnum.èªå¨å é¤); |
| | | _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfoDetails,OperateTypeEnum.èªå¨å é¤); |
| | | _unitOfWorkManage.CommitTran(); |
| | | responseContent.OK($"æ¥åºæå"); |
| | | } |