Commit 77030466 authored by zhoumaotao's avatar zhoumaotao

oa接口调整2

parent 8e291bdc
......@@ -335,26 +335,24 @@ public class KmesBoardServiceImpl extends BaseEditServiceImpl implements KmesBoa
String body = exchange.getBody();
logger.info("返回信息:"+body);
JSONObject jsonObject = JSONObject.parseObject(body);
int ydrs =0;
int sdrs = 0;
if(StringUtils.isNotEmpty(body) && !StringUtils.equals(jsonObject.getString("status"),"0")){
JSONArray jsonArray = jsonObject.getJSONArray("result");
for (int j= 0;j<jsonArray.size();j++){
JSONObject jsonObjectOne=jsonArray.getJSONObject(j);
int ydrs =0;
int sdrs = 0;
Integer ydrs1 = jsonObjectOne.getJSONObject("mainTable").getInteger("ydrs");
Integer sdrs1 = jsonObjectOne.getJSONObject("mainTable").getInteger("sdrs");
if(ydrs1 != null ){
ydrs = ydrs1 ;
}
if(sdrs1 != null ){
sdrs = sdrs1 ;
}
kqtjVO.setYdrs(ydrs);
kqtjVO.setSdrs(sdrs);
}
}
kqtjVO.setYdrs(ydrs);
kqtjVO.setSdrs(sdrs);
} catch (Exception e) {
logger.error("错误信息:",e);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment