#请假流程 获取请假余额接口 code=99不做异常处理

kangrui
wangjie 2 years ago
parent f71da2b364
commit 245e800a29

@ -61,10 +61,12 @@ public class KqInteractiveServiceImpl extends Service implements KqInteractiveSe
String returnStr = HttpUtil.post(KqGlobal.POST_URL + KqInteractiveEnum.LEAVE_BAL.getPostPath(), postParam); String returnStr = HttpUtil.post(KqGlobal.POST_URL + KqInteractiveEnum.LEAVE_BAL.getPostPath(), postParam);
JSONObject jsonObject = JSONObject.parseObject(returnStr); JSONObject jsonObject = JSONObject.parseObject(returnStr);
String code = jsonObject.getString("code"); String code = jsonObject.getString("code");
returnMap.put("code", code);
if (KqGlobal.SUC_CODE.equals(code)) { if (KqGlobal.SUC_CODE.equals(code)) {
returnMap.put("dayoffBalHours", jsonObject.getString("dayoffBalHours")); returnMap.put("dayoffBalHours", jsonObject.getString("dayoffBalHours"));
} else { } else if(KqGlobal.IGNORE_CODE.equals(code)){
returnMap.put("errormsg", "假期余额获取失败," + jsonObject.getString("msg"));
}else{
throw new CustomizeRunTimeException("假期余额获取失败," + jsonObject.getString("msg")); throw new CustomizeRunTimeException("假期余额获取失败," + jsonObject.getString("msg"));
} }
return returnMap; return returnMap;

Loading…
Cancel
Save