Commit 28ed52cd by wang_jiaxing

全国在逃人员查询接口

parent 4c26173a
......@@ -8,6 +8,7 @@ import com.founder.common.IpADdress;
import com.founder.common.IpADressLock;
import com.founder.common.LogsUtil;
import com.founder.model.*;
import com.founder.service.QgztryService;
import com.founder.service.SysGnsyrzOpenApiService;
import com.founder.service.XxcxService;
import org.apache.commons.lang3.StringUtils;
......@@ -16,10 +17,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import javax.servlet.http.HttpServletRequest;
......@@ -56,6 +54,8 @@ public class GgfwXxcxController {
private RestTemplate restTemplate;
@Autowired
private AuthorizationMapper authorizationMapper;
@Autowired
private QgztryService qgztryService;
@RequestMapping("/AsjApiByAsjbh")
public R AsjApiByAsjbh(HttpServletRequest request, @RequestBody AsjRyRelateVoBzpt asjbl){
......@@ -428,6 +428,20 @@ public class GgfwXxcxController {
"","","430000000000",map.get("XTMC"),"", ipADressLock.getAddressIp(request),"1", map.get("FWID"));
return R.ok().data(mapResult).message(map.get("FWMC") + "查询成功");
}
@PostMapping("/isQgZtry")
public R isQgZtry(@RequestBody XyrParam xyr) {
HttpServletRequest request = IpADdress.getRequest();
if(StringUtils.isEmpty(xyr.getZjhm()) ){
return R.error("没有传入身份证号,不能查询!");
}
int count = qgztryService.isQgZtry(xyr.getZjhm());
Map<String, String> map = getFwidAndXtmc(request);
sysGnsyrzOpenApiService.insertGNSYRZOPENAPI("01",map.get("FWMC"), LogsUtil.getNotEmptyFiled(xyr).toString(),
"","","430000000000",map.get("XTMC"),"", ipADressLock.getAddressIp(request),"1", map.get("FWID"));
return R.ok().data("isQgZtry", count > 0 ? "true" : "false").message(map.get("FWMC") + "查询成功");
}
public HttpHeaders getHeaders(AsjRyRelateVoBzpt asj) {
HttpHeaders hearders = new HttpHeaders();
......
......@@ -7,4 +7,6 @@ package com.founder.service;
*/
public interface QgztryService {
int getQgztryCount(String isZl);
int isQgZtry(String zjhm);
}
......@@ -19,4 +19,9 @@ public class QgztryServiceImpl implements QgztryService {
public int getQgztryCount(String isZl) {
return ztryMapper.getQgztryCount(isZl);
}
@Override
public int isQgZtry(String zjhm) {
return ztryMapper.selectCountByZjhm(zjhm);
}
}
......@@ -13,4 +13,6 @@ import org.springframework.stereotype.Repository;
@Repository
public interface ZtryMapper {
int getQgztryCount(@Param("isZl") String isZl);
int selectCountByZjhm(@Param("zjhm") String zjhm);
}
......@@ -7,4 +7,7 @@
where xxrsksj >= DATE_FORMAT(NOW(),'%Y-%m-%d 00:00:00')
</if>
</select>
<select id="selectCountByZjhm" resultType="java.lang.Integer">
select count(*) from tb_yw_ztry where zjhm = #{zjhm}
</select>
</mapper>
\ No newline at end of file
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