Commit 1f308332 by wuchengwu

人员查询接口

parent 8edfa122
......@@ -3,6 +3,7 @@ package com.founder.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.founder.amsis.client.afis.AMSISClient;
import com.founder.amsis.client.afis.AMSISPortType;
import com.founder.login.service.LoginService;
......@@ -25,6 +26,7 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.codehaus.xfire.client.Client;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
......@@ -4450,4 +4452,44 @@ public class TbXwRycjController {
return null;
}
@RequestMapping("/getYthcjryxxByRybh")
@ResponseBody
public String getYthcjryxxByRybh(String rybh){
ResultDto resultDto =null;
try {
AutoTbStRy ryxxByRybh = rycjService.getRyxxByRybh(rybh);
if (ryxxByRybh.getRybh() == null){
resultDto = new ResultDto(false,"该人员编号未查询到数据",2000,null);
return JSONObject.toJSONString(resultDto, SerializerFeature.WriteNullStringAsEmpty);
}else {
AutoTbStRyDto tbStRyDto = new AutoTbStRyDto();
BeanUtils.copyProperties(ryxxByRybh,tbStRyDto);
Map<String,Object> map = new HashMap<>();
map.put("rybh",ryxxByRybh.getRybh());
List<AutoTbRyZp> tbRyRyzpByRybh = tbRyRyzpService.getTbRyRyzpByRybh(map, ryxxByRybh.getLrdwdm());
tbRyRyzpByRybh.stream().forEach((p) ->{
if("2".equals(p.getZpbw())){
tbStRyDto.setZmzpStr64(GetImageStrsByByte(p.getDzwjnr()));
}else if ("3".equals(p.getZpbw())){
tbStRyDto.setCmzpStr64(GetImageStrsByByte(p.getDzwjnr()));
}else if ("4".equals(p.getZpbw())){
tbStRyDto.setYcmzpStr64(GetImageStrsByByte(p.getDzwjnr()));
}
});
if (StringUtils.isBlank(tbStRyDto.getSzzwbh())){
tbStRyDto.setSzzwbh(tbStRyDto.getRybh().substring(1));
}
resultDto = new ResultDto(true,"查询成功",1000,tbStRyDto);
}
}catch (Exception e){
e.printStackTrace();
log.error("人员查询报错 ,查询人员编号:"+rybh);
resultDto = new ResultDto(false,"未知失败",9999,null);
}
return JSONObject.toJSONString(resultDto, SerializerFeature.WriteNullStringAsEmpty);
}
}
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