| | |
| | | string dataJson = wMSReturn.result.ToString(); |
| | | Exists? exists = JsonConvert.DeserializeObject<Exists>(dataJson); |
| | | if (exists == null) throw new Exception($"WMSè¿åç»æçresult转æ¢å¤±è´¥"); |
| | | if (exists.taskExists) return WebResponseContent.Instance.OK(); |
| | | return WebResponseContent.Instance.OK(exists.errorAreaCode); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | throw new NotImplementedException(); |
| | | } |
| | | /// <summary> |
| | | /// å¹³åºè´§ä½ä¸ä¸æ¶å®¹å¨ |
| | | /// </summary> |
| | | /// <param name="wMSUpOrDown"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent UpOrDownContainer(WMSUpOrDownContainerDTO wMSUpOrDown) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_StationInfo stationInfo = _stationInfo.Repository.QueryFirst(x => x.StationCode == wMSUpOrDown.locationCode) ?? throw new Exception($"æªæ¾å°è´§ä½ã{wMSUpOrDown.locationCode}ãä¿¡æ¯"); |
| | | if (wMSUpOrDown.direction == 1) |
| | | { |
| | | stationInfo.StationStatus = LocationStatusEnum.InStock.ObjToInt(); |
| | | stationInfo.PalletCode = wMSUpOrDown.containerCode; |
| | | } |
| | | else |
| | | { |
| | | stationInfo.StationStatus = LocationStatusEnum.Free.ObjToInt(); |
| | | stationInfo.PalletCode = ""; |
| | | } |
| | | _stationInfo.UpdateData(stationInfo); |
| | | content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | _trackloginfoService.AddTrackLog(wMSUpOrDown, content, "å¹³åºè´§ä½ä¸ä¸æ¶å®¹å¨", "", ""); |
| | | } |
| | | return content; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 容卿µå¨è¯·æ± |
| | | /// </summary> |
| | | /// <param name="wMSContainerFlow"></param> |