| | |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_DTO; |
| | | using WIDESEAWCS_DTO.RGV.FOURBOT; |
| | | using WIDESEAWCS_DTO.WMS; |
| | | using WIDESEAWCS_IBasicInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | |
| | | } |
| | | else if (apiInfo.Remark.Contains("å¯ä¹å£«")) |
| | | { |
| | | |
| | | GALAXISReturn gALAXISReturn = response.DeserializeObject<GALAXISReturn>(); |
| | | if (gALAXISReturn == null) throw new Exception($"{apiInfo.Remark}ååºå
容转æ¢å®ä½å¤±è´¥"); |
| | | if (gALAXISReturn.data.returnStatus != 0) throw new Exception(gALAXISReturn.data.returnInfo); |
| | | content.Data = gALAXISReturn; |
| | | } |
| | | else if (apiInfo.Remark.Contains("海康")) |
| | | { |
| | | |
| | | HIKROBOTReturn hIKROBOTReturn = response.DeserializeObject<HIKROBOTReturn>(); |
| | | if (hIKROBOTReturn == null) throw new Exception($"{apiInfo.Remark}ååºå
容转æ¢å®ä½å¤±è´¥"); |
| | | if (hIKROBOTReturn.code != "SUCCESS") throw new Exception(hIKROBOTReturn.message); |
| | | content.Data = hIKROBOTReturn; |
| | | } |
| | | else if (apiInfo.Remark.Contains("WMS")) |
| | | { |
| | | |
| | | WMSReturn wMSReturn = response.DeserializeObject<WMSReturn>(); |
| | | if (wMSReturn == null) throw new Exception($"{apiInfo.Remark}ååºå
容转æ¢å®ä½å¤±è´¥"); |
| | | if (wMSReturn.code != 200) throw new Exception(wMSReturn.message); |
| | | content.Data = wMSReturn; |
| | | } |
| | | content.OK(); |
| | | } |
| | |
| | | |
| | | namespace WIDESEAWCS_DTO.WMS |
| | | { |
| | | public class UpLocationStatusDTO |
| | | public class UpStationTypeDTO |
| | | { |
| | | |
| | | /// <summary> |
| | | /// ä»åºid |
| | | /// ç«å°ç±»å |
| | | /// 1å
¥åºç«å°ï¼2åºåºç«å°ï¼3åºå
¥åºç«å° |
| | | /// </summary> |
| | | public int WarehouseId { get; set; } |
| | | public int stationType { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// ç¦ç¨ç¶æï¼0 å¯ç¨ï¼3 ç¦ç¨ï¼ |
| | | /// ç«å°ç¼å· |
| | | /// </summary> |
| | | public int EnableStatus { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ç¼å·å表 |
| | | /// </summary> |
| | | public string[] LocationNubList { get; set; } |
| | | public string stationCode { get; set; } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEAWCS_DTO.WMS |
| | | { |
| | | public class UpLocationStatusDTO |
| | | { |
| | | |
| | | /// <summary> |
| | | /// ä»åºid |
| | | /// </summary> |
| | | public int WarehouseId { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// ç¦ç¨ç¶æï¼0 å¯ç¨ï¼3 ç¦ç¨ï¼ |
| | | /// </summary> |
| | | public int EnableStatus { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// è´§ä½ç¼å·å表 |
| | | /// </summary> |
| | | public string[] LocationNubList { get; set; } |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | WebResponseContent PLCAlarmtoWMS(string ErrorMsg); |
| | | |
| | | |
| | | |
| | | |
| | | WebResponseContent UpStationType(UpStationTypeDTO stationTypeDTO); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¿®æ¹åºå
¥å£ç«å°ç±»å |
| | | /// </summary> |
| | | /// <param name="taskDTOs"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("UpStationType"), AllowAnonymous] |
| | | public WMSReturn UpStationType([FromBody] UpStationTypeDTO stationTypeDTO) |
| | | { |
| | | WebResponseContent content = _taskService.UpStationType(stationTypeDTO); |
| | | return WMSReturnMethod.ReturnWMS(content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å¹³åºè´§ä½ä¸ä¸æ¶å®¹å¨ |
| | | /// </summary> |
| | | /// <param name="taskDTOs"></param> |
| | |
| | | "WMS": { |
| | | "ReceiveTask": "WMSä¸åä»»å¡", |
| | | "ContainerRequest": "容卿µå¨è¯·æ±", |
| | | "UpStationType": "ä¿®æ¹åºå
¥å£ç«å°ç±»å", |
| | | "UpOrDownContainer": "å¹³åºè´§ä½ä¸ä¸æ¶å®¹å¨", |
| | | "CancelWMSTask": "WMSåæ¶ä»»å¡", |
| | | "IQCResult": "夿£ç»æåé¦", |
| | |
| | | _trackloginfoService.AddTrackLog(wMSContainerFlow, content, "容卿µå¨è¯·æ±", "", ""); |
| | | } |
| | | } |
| | | public WebResponseContent UpStationType(UpStationTypeDTO stationTypeDTO) |
| | | { |
| | | try |
| | | { |
| | | if (stationTypeDTO.stationType < 1 || stationTypeDTO.stationType > 3) throw new Exception($"æªå®ä¹çç«å°ç±»åã{stationTypeDTO.stationType}ãï¼1å
¥åºç«å°ï¼2åºåºç«å°ï¼3åºå
¥åºç«å°"); |
| | | 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> |
| | | /// è´¨æ£ç»æåé¦ |
| | | /// </summary> |
| | |
| | | WMSReturn wMSReturn = response.DeserializeObject<WMSReturn>(); |
| | | if (wMSReturn == null) throw new Exception("WMSè¿åç»æè½¬æ¢å¤±è´¥ï¼"); |
| | | if (!wMSReturn.success) throw new Exception(wMSReturn.message); |
| | | return content.OK(); |
| | | return content.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |