| | |
| | | |
| | | #endregion éåæ¹æ³ |
| | | |
| | | |
| | | #region |
| | | public WebResponseContent UpWheelsFlow(SaveModel saveModel) |
| | | { |
| | | WebResponseContent webResponse = new WebResponseContent(); |
| | | try |
| | | { |
| | | string CZTM = saveModel.MainData["CZTM"].ToString(); |
| | | string TargetAddress = saveModel.MainData["TargetAddress"].ToString(); |
| | | List<Dt_Task> taskt = BaseDal.QueryData(x => x.task_CZInfo == CZTM).ToList(); |
| | | if (taskt.Count() == 0) |
| | | return webResponse.Error($"æªæ¾å°å¯¹åºè½¦è½´ï¼{CZTM}ç车轮åºåºä¿¡æ¯"); |
| | | foreach (var item in taskt) |
| | | { |
| | | item.Towhereabouts = TargetAddress; |
| | | } |
| | | BaseDal.UpdateData(taskt); |
| | | return webResponse.OK("ä¿®æ¹æåï¼"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // 妿åçå¼å¸¸ï¼åè°ç¨content.Erroræ¹æ³ï¼è®°å½é误信æ¯ï¼å¹¶è¾åºéè¯¯ä¿¡æ¯ |
| | | webResponse.Error(ex.Message); |
| | | return webResponse; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | //读åç³è¯·ï¼ç»agvä¸åä»»å¡ |
| | | public WebResponseContent GetAGVTaskdistribution(string TargetAddress) |
| | | public WebResponseContent GetAGVTaskdistribution(string TargetAddress,string Number) |
| | | { |
| | | |
| | | WebResponseContent content = new WebResponseContent(); |
| | |
| | | { |
| | | throw new InvalidOperationException("WMS IP æªé
ç½®"); |
| | | } |
| | | var wmsIpAddress = wmsBase + completeTask; |
| | | var taskDto = new RequestTaskDto() |
| | | IDevice? device = Storage.Devices.FirstOrDefault(x => x.DeviceCode == "1000"); |
| | | CommonConveyorLine conveyorLine = (CommonConveyorLine)device; |
| | | DeviceProDTO? deviceProDTOt = conveyorLine.DeviceProDTOs.Find(x => x.DeviceChildCode == TargetAddress && x.DeviceProParamName == "ConveyorLineSingal"); |
| | | if (conveyorLine.Communicator.Read<short>(deviceProDTOt.DeviceProAddress) == 1) |
| | | { |
| | | RequestType = "999", |
| | | Position = TargetAddress, |
| | | }; |
| | | |
| | | |
| | | var result = HttpHelper.PostAsync(wmsIpAddress, taskDto.ToJsonString()).Result; |
| | | content = JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | var wmsIpAddress = wmsBase + completeTask; |
| | | var taskDto = new RequestTaskDto() |
| | | { |
| | | RequestType = "999", |
| | | Position = TargetAddress, |
| | | }; |
| | | |
| | | |
| | | var result = HttpHelper.PostAsync(wmsIpAddress, taskDto.ToJsonString()).Result; |
| | | content = JsonConvert.DeserializeObject<WebResponseContent>(result); |
| | | if (content.Status) |
| | | { |
| | | List<Dt_Task> tasks = BaseDal.QueryData(x => x.axle_czh == Number); |
| | | if (tasks.Count > 0) |
| | | { |
| | | foreach (var task in tasks) |
| | | { |
| | | task.Towhereabouts = TargetAddress; |
| | | } |
| | | BaseDal.UpdateData(tasks); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | content.Error(); |
| | | } |
| | | |
| | | return content; |
| | | } |
| | | catch (Exception ex) |