| | |
| | | |
| | | using AngleSharp.Io; |
| | | using Mapster; |
| | | using Masuit.Tools; |
| | | using WIDESEA_Core.Const; |
| | |
| | | content = await _agingInOrOutInputService.GetOCVOutputAsync(agingOutputDto); |
| | | //ValidateResponse(content); |
| | | var result = JsonConvert.DeserializeObject<BasicResult>(content.Data.ToString()); |
| | | if (!result.Success) |
| | | if (!result.Success || !agingOutputDto.SerialNos[0].SerialNoResult) |
| | | { |
| | | task.Remark = "NG"; |
| | | } |
| | |
| | | await UpdateLocationAsync(loc); |
| | | await DeleteStockInfoAsync(stock.Id); |
| | | await DeleteStockInfoDetailsAsync(stock.StockInfoDetails); |
| | | if (task.Roadway.Contains("FR") || task.Roadway.Contains("GW")) //如果是分容或高温出库 将任务删除 |
| | | await DeleteTaskAsync(task.TaskId); |
| | | //if (task.Roadway.Contains("FR") || task.Roadway.Contains("GW") || task.TaskType == (int)TaskOutboundTypeEnum.OutTray) //如果是分容或高温出库 将任务删除 |
| | | await DeleteTaskAsync(task.TaskId); |
| | | }); |
| | | |
| | | return content.OK("任务完成成功", task.Remark); |
| | |
| | | { |
| | | SlotNo = x.OrderNo.ToInt32(), |
| | | SerialNo = x.SerialNumber, |
| | | SerialNoResult = true, |
| | | SerialNoResult = isNG, |
| | | ParameterInfo = new List<ParameterInfoOutput> { |
| | | new ParameterInfoOutput() { |
| | | Value = outHours.ToString(), |
| | |
| | | throw new Exception("未找到对应位置信息"); |
| | | |
| | | var area = new Dt_AreaInfo(); |
| | | var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.SourceAddress); |
| | | if (station.stationPLC == "1017") |
| | | area = _areaInfoRepository.QueryFirst(x => x.AreaID == Convert.ToInt32(station.stationNGLocation)); |
| | | else |
| | | if (task.Roadway.Contains("FR")) |
| | | { |
| | | area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId); |
| | | if (area == null) |
| | | throw new Exception("未找到对应区域信息"); |
| | | } |
| | | else |
| | | { |
| | | var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.SourceAddress); |
| | | if (station.stationPLC == "1017") |
| | | area = _areaInfoRepository.QueryFirst(x => x.AreaID == Convert.ToInt32(station.stationNGLocation)); |
| | | else |
| | | area = _areaInfoRepository.QueryFirst(x => x.AreaID == loation.AreaId); |
| | | if (area == null) |
| | | throw new Exception("未找到对应区域信息"); |
| | | } |
| | | |
| | | |
| | | var boxDetail = boxing.BoxingInfoDetails.Adapt<List<DtStockInfoDetail>>(); |
| | | boxDetail.ForEach(x => { x.Status = (int)StockStateEmun.已入库; }); |
| | | var stock = new DtStockInfo() |
| | |
| | | EquipmentCode = area.Spare2, |
| | | Software = area.Spare3 |
| | | }; |
| | | |
| | | var result = _agingInOrOutInputService.GetOCVInputAsync(agingInputDto).Result; |
| | | var respone = JsonConvert.DeserializeObject<ResponeAgingInputDto>(result.Data.ToString()); |
| | | stock.LinedProcessFeedbackTime = respone.LinedProcessFeedbackTime; |
| | |
| | | { |
| | | case (int)TaskInboundTypeEnum.Inbound: |
| | | case (int)TaskInboundTypeEnum.InTray: |
| | | case (int)TaskInboundTypeEnum.InNG: |
| | | LogFactory.GetLog("任务完成").InfoFormat(true, "入库任务", ""); |
| | | return await CompleteInboundTaskAsync(task); |
| | | |
| | | case (int)TaskOutboundTypeEnum.OutTray: |
| | | case (int)TaskOutboundTypeEnum.Outbound: |
| | | case (int)TaskOutboundTypeEnum.OutNG: |
| | | LogFactory.GetLog("任务完成").InfoFormat(true, "出库任务", ""); |
| | | return await CompleteStackTaskAsync(task, stock); |
| | | |
| | |
| | | if (result.SerialNos.Count <= 0) |
| | | { |
| | | // 空托盘入库逻辑 |
| | | return await RequestTrayInTaskAsync(input); |
| | | return await RequestTrayInTaskAsync(input); |
| | | } |
| | | |
| | | var boxing = CreateBoxingInfo(result, input.PalletCode); |
| | |
| | | |
| | | } |
| | | |
| | | var stocks = _stockInfoRepository.QueryData(x => x.AreaCode == stock.AreaCode && x.ProductionLine == stock.ProductionLine && x.SpecialParameterDuration != stock.SpecialParameterDuration); |
| | | if (stocks != null && stocks.Count > 0) |
| | | { |
| | | foreach (var item in stocks) |
| | | { |
| | | item.SpecialParameterDuration = stock.SpecialParameterDuration; |
| | | item.ParameterInfos = stock.ParameterInfos; |
| | | item.OutboundTime = Convert.ToDateTime(item.LinedProcessFeedbackTime == null ? item.CreateDate : item.LinedProcessFeedbackTime).AddHours(Convert.ToDouble(stock.SpecialParameterDuration)); |
| | | } |
| | | var isUpdates = await _stockInfoRepository.UpdateDataAsync(stocks); |
| | | } |
| | | |
| | | // 添加历史任务 |
| | | var isTaskHtyAdd = await _task_HtyRepository.AddDataAsync(taskHty) > 0; |
| | | |
| | |
| | | { |
| | | task.TaskId = taskId; |
| | | isResult = await _taskExecuteDetailRepository.AddDetailAsync(task, false, TaskDescription.GetTaskUpdateDescription(input.PalletCode, input.Position, ToAddress, TaskInStatusEnum.InNew.GetIntegralRuleTypeEnumDesc())); |
| | | |
| | | //var location = _locationRepository.QueryFirst(x => x.RoadwayNo == task.Roadway && x.LocationCode == task.TargetAddress); |
| | | //location.LocationStatus = (int)LocationEnum.Lock; |
| | | //var isLocation = _locationRepository.UpdateData(location); |
| | | |
| | | if (isResult) |
| | | { |
| | | // 创建WMS任务 |
| | |
| | | .OrderByDescending(g => g.Count()) // 根据每个组的元素数量排序 |
| | | .ToList(); // 取出数量最多的组 |
| | | |
| | | Dictionary<string,int> result = new Dictionary<string,int>(); |
| | | Dictionary<string, int> result = new Dictionary<string, int>(); |
| | | foreach (var item in minGroup) |
| | | { |
| | | var number = BaseDal.QueryData(x => x.TargetAddress == item.Key).Count(); |