| | |
| | | { |
| | | throw new NotImplementedException(); |
| | | } |
| | | |
| | | public WebResponseContent InboundElevatorExit(string LocationCode, string containerCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | |
| | | { |
| | | stationManger.IsOccupied = LocationStatusEnum.Free.ObjToInt(); |
| | | stationManger.Remark = ""; |
| | | _stationMangerService.UpdateData(stationManger); |
| | | FOURBOToccupyStation fOURBOToccupyStation = new FOURBOToccupyStation() |
| | | { |
| | | stationCode = wMSContainerFlow.slotCode, |
| | |
| | | FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>(); |
| | | content.OK(data: fOURBOTReturn); |
| | | if (fOURBOTReturn.returnCode != 0) throw new Exception(fOURBOTReturn.returnUserMsg); |
| | | _stationMangerService.UpdateData(stationManger); |
| | | } |
| | | return content.OK(); |
| | | } |
| | |
| | | finally |
| | | { |
| | | _trackloginfoService.AddTrackLog(wMSContainerFlow, content, "容卿µå¨è¯·æ±", "", ""); |
| | | } |
| | | } |
| | | public WebResponseContent UpStationType(UpStationTypeDTO stationTypeDTO) |
| | | { |
| | | try |
| | | { |
| | | Dt_StationManger stationManger = _stationMangerService.Repository.QueryFirst(x => x.StationCode == stationTypeDTO.stationCode) ?? throw new Exception($"æªæ¾å°ç«å°ç¼å·ã{stationTypeDTO.stationCode}ãä¿¡æ¯"); |
| | | stationManger.StationType = stationTypeDTO.stationType; |
| | | _stationMangerService.Repository.UpdateData(stationManger); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | return content.Error($"æ´æ°ç«å°ç¶æå¤±è´¥ï¼{ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// PLCæ¥è¦ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="ErrorMsg"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent PLCAlarmtoWMS(string ErrorMsg) |
| | | { |
| | | PLCAlarmDTO PLCAlarmDTO = new PLCAlarmDTO(); |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_ApiInfo? apiInfo = _apiInfoService.Repository.QueryFirst(x => x.ApiCode == nameof(PLCAlarmDTO)) ?? throw new Exception("æªæ¾å°PLCæ¥è¦ä¿¡æ¯æ¥å£é
置信æ¯ï¼è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | PLCAlarmDTO.errorMsg = ErrorMsg; |
| | | string response = HttpHelper.Post(apiInfo.ApiAddress, PLCAlarmDTO.Serialize()); |
| | | content.OK(data: response); |
| | | WMSReturn wMSReturn = response.DeserializeObject<WMSReturn>(); |
| | | if (wMSReturn == null) throw new Exception("WMSè¿åç»æè½¬æ¢å¤±è´¥ï¼"); |
| | | if (!wMSReturn.success) throw new Exception(wMSReturn.message); |
| | | return content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return content.Error(ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | _trackloginfoService.AddTrackLog(PLCAlarmDTO, content, "PLCæ¥è¦ä¿¡æ¯ä¸æ¥WMS", "", ""); |
| | | } |
| | | } |
| | | } |
| | | } |