dengjunjie
9 小时以前 a8367fa42d18c40407408c79e8a5fd32cd09f05c
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/ApiInfoService.cs
@@ -10,6 +10,7 @@
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO;
using WIDESEAWCS_DTO.RGV.FOURBOT;
using WIDESEAWCS_DTO.WMS;
using WIDESEAWCS_IBasicInfoService;
using WIDESEAWCS_Model.Models;
@@ -55,15 +56,24 @@
                }
                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();
            }