/// <summary> /// 获取人员信息 /// </summary> /// <param name="reqPerson"></param> /// <returns></returns> public static ResPersonInfo_DS GetPersonInfo(ReqPersonInfo reqPerson) { ResPersonInfo_DS ds = new ResPersonInfo_DS(); int pint = TryInit(); try { Login(pint); TryStart(pint, InterfaceHNConst.FUN_BIZC131101); TryPutData <ReqPersonInfo>(pint, 1, reqPerson, InterfaceHNConst.FUN_BIZC131101); long ret = TryRun(pint, InterfaceHNConst.FUN_BIZC131101); List <ResPersonInfo> personList = TrySetData <ResPersonInfo>(pint, InterfaceHNConst.DS_PERSONINFO); // 多个PersonInfo,只返回PersonInfo数据 if (personList.Count == 1) { ResPersonInfo personInfo = TrySetData <ResPersonInfo>(pint); ds.PersonInfoList.Add(personInfo); List <ResSpInfo> spList = TrySetData <ResSpInfo>(pint, InterfaceHNConst.DS_SPINFO); ds.SpInfoList = spList; List <ResElseInfo> elseList = TrySetData <ResElseInfo>(pint, InterfaceHNConst.DS_ELSEINFO); ds.ElseInfoList = elseList; List <ResLastBizInfo> lastBizList = TrySetData <ResLastBizInfo>(pint, InterfaceHNConst.DS_LASTBIZINFO); ds.LastBizInfoList = lastBizList; List <ResFreezeInfo> freezeList = TrySetData <ResFreezeInfo>(pint, InterfaceHNConst.DS_FREEZEINFO); ds.FreezeInfoList = freezeList; List <ResTotalBizInfo> totalbizList = TrySetData <ResTotalBizInfo>(pint, InterfaceHNConst.DS_TOTALBIZINFO); ds.TotalBizInfoList = totalbizList; } //else if (ret <= -1) //{ // StringBuilder msg = new StringBuilder(1024); // getmessage(pint, msg); // throw new InterfaceHNException($"接口执行失败-run!{ InterfaceHNConst.FUN_BIZC131101}!\r\n{msg.ToString()}"); //} return(ds); } catch (Exception) { throw; } finally { DestoryPint(pint); } }
public IActionResult GetPersonInfo([FromBody] ReqPersonInfo req) { var validator = new ReqPersonInfoValidator(); string validInfo = CommonUtil.Validate(req, validator); ResPersonInfo_DS data = InterfaceHNUtil.GetPersonInfo(req); return(RetData.SuccessData(data)); }
public JsonResult GetPersonInfo() { try { ReqPersonInfo req = GetReqObj <ReqPersonInfo>(this.HttpContext.Request.InputStream); var validator = new ReqPersonInfoValidator(); string validInfo = CommonUtil.Validate(req, validator); ResPersonInfo_DS data = InterfaceHNUtil.GetPersonInfo(req); return(RetUtil.SuccessData(data)); } catch (Exception ex) { return(RetUtil.ExceptionErr(ex.Message)); } }