| | |
| | | { |
| | | var agingOutputDto = MapToAgingOutputDto(stock); |
| | | content = await _agingInOrOutInputService.GetOCVOutputAsync(agingOutputDto); |
| | | ValidateResponse(content); |
| | | //ValidateResponse(content); |
| | | var result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString()); |
| | | if (!result.Success) |
| | | { |
| | | task.Remark = "NG"; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | await UpdateLocationAsync(loc); |
| | | await DeleteStockInfoAsync(stock.Id); |
| | | await DeleteStockInfoDetailsAsync(stock.StockInfoDetails); |
| | | if (task.Roadway.Contains("FR")) //如果是分容 将任务删除 |
| | | if (task.Roadway.Contains("FR") || task.Roadway.Contains("GW")) //如果是分容或高温出库 将任务删除 |
| | | await DeleteTaskAsync(task.TaskId); |
| | | }); |
| | | |
| | | return content.OK("任务完成成功"); |
| | | return content.OK("任务完成成功", task.Remark); |
| | | } |
| | | catch (Exception err) |
| | | { |
| | |
| | | |
| | | var outHours = (DateTime.Now - stock.OutboundTime.Value).TotalHours; |
| | | var isNG = outHours > parameterInfo.LowerSpecificationsLimit.ToDouble() && outHours < parameterInfo.UpperSpecificationsLimit.ToDouble(); |
| | | |
| | | var defectCode = string.Empty; |
| | | if (!isNG) defectCode = "TQCK"; |
| | | return new AgingOutputDto |
| | | { |
| | | OpFlag = 1, |
| | |
| | | TargetValue = parameterInfo.TargetValue, |
| | | LowerLomit = parameterInfo.LowerSpecificationsLimit, |
| | | UpperLimit = parameterInfo.UpperSpecificationsLimit, |
| | | DefectCode = defectCode |
| | | } |
| | | } |
| | | }).ToList() |
| | |
| | | |
| | | private void ValidateResponse(WebResponseContent content) |
| | | { |
| | | var result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString()); |
| | | if (!result.Success) |
| | | { |
| | | throw new Exception(result.MOMMessage); |
| | | } |
| | | |
| | | } |
| | | |
| | | private (DtLocationInfo, Dt_Task) UpdateStockAndTaskStatus(DtStockInfo stock, Dt_Task task) |
| | |
| | | |
| | | // 获取装箱信息和目标位置信息 |
| | | var boxing = await _boxingInfoRepository.QueryFirstNavAsync(x => x.PalletCode == task.PalletCode); |
| | | var locationInf = await _locationRepository.QueryFirstAsync(x => x.LocationCode == task.TargetAddress); |
| | | var locationInf = await _locationRepository.QueryFirstAsync(x => x.LocationCode == task.TargetAddress && x.RoadwayNo == task.Roadway); |
| | | |
| | | // 更新目标位置状态为库存中 |
| | | locationInf.LocationStatus = (int)LocationEnum.InStock; |