Commit bccd8f11 by liulianglang

资源概况统计

parent 877697e2
...@@ -286,4 +286,6 @@ public class GgfwGjController { ...@@ -286,4 +286,6 @@ public class GgfwGjController {
String appSecret = request.getHeader(AuthorizationInterceptor.appSecret); String appSecret = request.getHeader(AuthorizationInterceptor.appSecret);
return authorizationMapper.getFwidAndXtmc(appId, appSecret); return authorizationMapper.getFwidAndXtmc(appId, appSecret);
} }
} }
...@@ -3,10 +3,7 @@ package com.founder.controller; ...@@ -3,10 +3,7 @@ package com.founder.controller;
import com.founder.common.IpADdress; import com.founder.common.IpADdress;
import com.founder.common.IpADressLock; import com.founder.common.IpADressLock;
import com.founder.common.LogsUtil; import com.founder.common.LogsUtil;
import com.founder.model.HcHbQueryParam; import com.founder.model.*;
import com.founder.model.Result;
import com.founder.model.XyrParam;
import com.founder.model.ZtryParam;
import com.founder.service.GjService; import com.founder.service.GjService;
import com.founder.service.SysGnsyrzOpenApiService; import com.founder.service.SysGnsyrzOpenApiService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
...@@ -78,6 +75,105 @@ public class GjController { ...@@ -78,6 +75,105 @@ public class GjController {
return reslt; return reslt;
} }
@PostMapping("/getBlzz")
public void getBlzz(HttpServletRequest requestIp){
Result reslt = new Result();
HttpServletRequest request = IpADdress.getRequest();
String header = request.getHeader("founder.authorization");
try {
Map<String, Object> mapResult = new HashMap();
mapResult = gjService.getBlzz(request);
}catch (Exception e){
e.printStackTrace();
}
}
@PostMapping("/getLdgjCount")
public R getLdgjCount(@RequestBody ZyfwQueryParam zyfwQueryParam) {
try {
HttpServletRequest request = IpADdress.getRequest();
int total = gjService.getLdgjCount(request,zyfwQueryParam.getIsZl());
System.out.println("ldzs="+total);
return R.ok().data("total", total);
} catch (Exception e) {
return R.error(e.getMessage());
}
}
@PostMapping("/getMhgjCount")
public R getMhgjCount(@RequestBody ZyfwQueryParam zyfwQueryParam) {
try {
HttpServletRequest request = IpADdress.getRequest();
int total = gjService.getMhgjCount(request,zyfwQueryParam.getIsZl());
System.out.println("ldzs="+total);
return R.ok().data("total", total);
} catch (Exception e) {
return R.error(e.getMessage());
}
}
@PostMapping("/getWbgjCount")
public R getWbgjCount(@RequestBody ZyfwQueryParam zyfwQueryParam) {
try {
HttpServletRequest request = IpADdress.getRequest();
int total = gjService.getWbgjCount(request,zyfwQueryParam.getIsZl());
System.out.println("ldzs="+total);
return R.ok().data("total", total);
} catch (Exception e) {
return R.error(e.getMessage());
}
}
@PostMapping("/getTlgjCount")
public R getTlgjCount(@RequestBody ZyfwQueryParam zyfwQueryParam) {
try {
HttpServletRequest request = IpADdress.getRequest();
int total = gjService.getTlgjCount(request,zyfwQueryParam.getIsZl());
System.out.println("ldzs="+total);
return R.ok().data("total", total);
} catch (Exception e) {
return R.error(e.getMessage());
}
}
@PostMapping("/getHydjgjCount")
public R getHydjgjCount(@RequestBody ZyfwQueryParam zyfwQueryParam) {
try {
HttpServletRequest request = IpADdress.getRequest();
int total = gjService.getHydjgjCount(request,zyfwQueryParam.getIsZl());
System.out.println("ldzs="+total);
return R.ok().data("total", total);
} catch (Exception e) {
return R.error(e.getMessage());
}
}
@PostMapping("/getThdjgjCount")
public R getThdjgjCount(@RequestBody ZyfwQueryParam zyfwQueryParam) {
try {
HttpServletRequest request = IpADdress.getRequest();
int total = gjService.getThdjgjCount(request,zyfwQueryParam.getIsZl());
System.out.println("ldzs="+total);
return R.ok().data("total", total);
} catch (Exception e) {
return R.error(e.getMessage());
}
}
@PostMapping("/getClwzgjCount")
public R getClwzgjCount(@RequestBody ZyfwQueryParam zyfwQueryParam) {
try {
HttpServletRequest request = IpADdress.getRequest();
int total = gjService.getClwzgjCount(request,zyfwQueryParam.getIsZl());
System.out.println("ldzs="+total);
return R.ok().data("total", total);
} catch (Exception e) {
return R.error(e.getMessage());
}
}
/** /**
* 车牌号获取车主信息 * 车牌号获取车主信息
* @param xyrParam * @param xyrParam
......
package com.founder.dao; package com.founder.dao;
import com.founder.model.Face;
import com.founder.model.SysGnsyrzOpenApi; import com.founder.model.SysGnsyrzOpenApi;
import com.founder.model.SysLogJccjXxbs; import com.founder.model.SysLogJccjXxbs;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.List;
@Component @Component
@Mapper @Mapper
public interface SysGnsyrzOpenApiDao { public interface SysGnsyrzOpenApiDao {
void saveSysgnsyrz(SysGnsyrzOpenApi var1); void saveSysgnsyrz(SysGnsyrzOpenApi var1);
List<Face> queryList();
void updateList(Face face);
} }
...@@ -6,6 +6,16 @@ package com.founder.model; ...@@ -6,6 +6,16 @@ package com.founder.model;
public class Face { public class Face {
private String id; private String id;
private String identitycard; private String identitycard;
public String getNum() {
return num;
}
public void setNum(String num) {
this.num = num;
}
private String num;
private byte[] facephoto; private byte[] facephoto;
public String getId() { public String getId() {
......
package com.founder.model;
import lombok.Data;
@Data
public class ZyfwQueryParam {
private String isZl;
}
...@@ -10,6 +10,24 @@ import java.util.Map; ...@@ -10,6 +10,24 @@ import java.util.Map;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
public interface GjService { public interface GjService {
int getLdgjCount(HttpServletRequest request,String isZl);
int getMhgjCount(HttpServletRequest request,String isZl);
int getWbgjCount(HttpServletRequest request,String isZl);
int getTlgjCount(HttpServletRequest request,String isZl);
int getHydjgjCount(HttpServletRequest request,String isZl);
int getThdjgjCount(HttpServletRequest request,String isZl);
int getClwzgjCount(HttpServletRequest request,String isZl);
Map<String, Object> getBlzz(HttpServletRequest request) throws Exception;
Map<String, Object> getWbxx(HttpServletRequest request, XyrParam xyrParam) throws Exception; Map<String, Object> getWbxx(HttpServletRequest request, XyrParam xyrParam) throws Exception;
Map<String, Object> getCzxx(HttpServletRequest request, XyrParam xyrParam) throws Exception; Map<String, Object> getCzxx(HttpServletRequest request, XyrParam xyrParam) throws Exception;
Map<String, Object> getMhXx(HttpServletRequest request, XyrParam xyrParam) throws Exception; Map<String, Object> getMhXx(HttpServletRequest request, XyrParam xyrParam) throws Exception;
......
...@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONArray; ...@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.founder.callable.MyCallable; import com.founder.callable.MyCallable;
import com.founder.dao.AuthorizationMapper; import com.founder.dao.AuthorizationMapper;
import com.founder.dao.SysGnsyrzOpenApiDao;
import com.founder.model.Face;
import com.founder.model.HcHbQueryParam; import com.founder.model.HcHbQueryParam;
import com.founder.model.XyrParam; import com.founder.model.XyrParam;
import com.founder.service.GjService; import com.founder.service.GjService;
...@@ -23,6 +25,291 @@ import java.util.stream.Collectors; ...@@ -23,6 +25,291 @@ import java.util.stream.Collectors;
@Service @Service
public class GjServiceImpl implements GjService { public class GjServiceImpl implements GjService {
@Autowired
private SysGnsyrzOpenApiDao sysGnsyrzOpenApiDao;
@Override
public int getLdgjCount(HttpServletRequest request,String isZl) {
if("1".equals(isZl)){
return 0;
}else {
String sql2 = "select count(*) FROM people_trail01 where _type= 'lg' ";
Map<String, Object> map2 = EsUtils.newQueryEs(request, sql2);
//查询全国常口信息
String num = "";
String StrData2 = map2.get("data").toString();
int total2 = (int) map2.get("count");
JSONArray backBodyJson2 = JSONArray.parseArray(StrData2);
System.out.println(backBodyJson2.toJSONString());
// 首先把字符串转成 JSONArray 对象
if (backBodyJson2.size() > 0) {
for (int i = 0; i < backBodyJson2.size(); i++) {
Face mapnr = new Face();
JSONObject job = backBodyJson2.getJSONObject(i); // 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num = job.getString("count"); //总数
}
}
if(StringUtils.isNoneBlank(num)){
return Integer.parseInt(num);
}else {
return 0;
}
}
}
@Override
public int getMhgjCount(HttpServletRequest request,String isZl) {
if("1".equals(isZl)){
return 0;
}else {
String sql2 = "select count(*) FROM people_trail01 where _type= 'mhjcgall' ";
Map<String, Object> map2 = EsUtils.newQueryEs(request, sql2);
//查询全国常口信息
String num = "";
String StrData2 = map2.get("data").toString();
int total2 = (int) map2.get("count");
JSONArray backBodyJson2 = JSONArray.parseArray(StrData2);
System.out.println(backBodyJson2.toJSONString());
// 首先把字符串转成 JSONArray 对象
if (backBodyJson2.size() > 0) {
for (int i = 0; i < backBodyJson2.size(); i++) {
Face mapnr = new Face();
JSONObject job = backBodyJson2.getJSONObject(i); // 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num = job.getString("count"); //总数
}
}
if(StringUtils.isNoneBlank(num)){
return Integer.parseInt(num);
}else {
return 0;
}
}
}
@Override
public int getWbgjCount(HttpServletRequest request,String isZl) {
if("1".equals(isZl)){
return 0;
}else {
String sql2 = "select count(*) FROM people_trail01 where _type= 'wb' ";
Map<String, Object> map2 = EsUtils.newQueryEs(request, sql2);
//查询全国常口信息
String num = "";
String StrData2 = map2.get("data").toString();
int total2 = (int) map2.get("count");
JSONArray backBodyJson2 = JSONArray.parseArray(StrData2);
System.out.println(backBodyJson2.toJSONString());
// 首先把字符串转成 JSONArray 对象
if (backBodyJson2.size() > 0) {
for (int i = 0; i < backBodyJson2.size(); i++) {
Face mapnr = new Face();
JSONObject job = backBodyJson2.getJSONObject(i); // 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num = job.getString("count"); //总数
}
}
if(StringUtils.isNoneBlank(num)){
return Integer.parseInt(num);
}else {
return 0;
}
}
}
@Override
public int getTlgjCount(HttpServletRequest request,String isZl) {
if("1".equals(isZl)){
return 0;
}else {
String sql2 = "select count(*) FROM people_trail01 where GJLX= 'hc' ";
Map<String, Object> map2 = EsUtils.newQueryEs(request, sql2);
//查询全国常口信息
String num = "";
String StrData2 = map2.get("data").toString();
int total2 = (int) map2.get("count");
JSONArray backBodyJson2 = JSONArray.parseArray(StrData2);
System.out.println(backBodyJson2.toJSONString());
// 首先把字符串转成 JSONArray 对象
if (backBodyJson2.size() > 0) {
for (int i = 0; i < backBodyJson2.size(); i++) {
Face mapnr = new Face();
JSONObject job = backBodyJson2.getJSONObject(i); // 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num = job.getString("count"); //总数
}
}
if(StringUtils.isNoneBlank(num)){
return Integer.parseInt(num);
}else {
return 0;
}
}
}
@Override
public int getHydjgjCount(HttpServletRequest request,String isZl) {
if("1".equals(isZl)){
return 0;
}else {
String sql2 = "select count(*) FROM people_type01 where _type= 'mzhydjxx' ";
Map<String, Object> map2 = EsUtils.newQueryEs(request, sql2);
//查询全国常口信息
String num = "";
String StrData2 = map2.get("data").toString();
int total2 = (int) map2.get("count");
JSONArray backBodyJson2 = JSONArray.parseArray(StrData2);
System.out.println(backBodyJson2.toJSONString());
// 首先把字符串转成 JSONArray 对象
if (backBodyJson2.size() > 0) {
for (int i = 0; i < backBodyJson2.size(); i++) {
Face mapnr = new Face();
JSONObject job = backBodyJson2.getJSONObject(i); // 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num = job.getString("count"); //总数
}
}
if(StringUtils.isNoneBlank(num)){
return Integer.parseInt(num);
}else {
return 0;
}
}
}
@Override
public int getThdjgjCount(HttpServletRequest request,String isZl) {
if("1".equals(isZl)){
return 0;
}else {
String sql2 = "select count(*) FROM people_type01 where _type='zaczrkhzls' ";
Map<String, Object> map2 = EsUtils.newQueryEs(request, sql2);
//查询全国常口信息
String num = "";
String StrData2 = map2.get("data").toString();
int total2 = (int) map2.get("count");
JSONArray backBodyJson2 = JSONArray.parseArray(StrData2);
System.out.println(backBodyJson2.toJSONString());
// 首先把字符串转成 JSONArray 对象
if (backBodyJson2.size() > 0) {
for (int i = 0; i < backBodyJson2.size(); i++) {
Face mapnr = new Face();
JSONObject job = backBodyJson2.getJSONObject(i); // 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num = job.getString("count"); //总数
}
}
if(StringUtils.isNoneBlank(num)){
return Integer.parseInt(num);
}else {
return 0;
}
}
}
@Override
public int getClwzgjCount(HttpServletRequest request,String isZl) {
if("1".equals(isZl)){
return 0;
}else {
String sql2 = "select count(*) FROM vehicle_trail03 where _type='dzwz' ";
Map<String, Object> map2 = EsUtils.newQueryEs(request, sql2);
//查询全国常口信息
String num = "";
String StrData2 = map2.get("data").toString();
int total2 = (int) map2.get("count");
JSONArray backBodyJson2 = JSONArray.parseArray(StrData2);
System.out.println(backBodyJson2.toJSONString());
// 首先把字符串转成 JSONArray 对象
if (backBodyJson2.size() > 0) {
for (int i = 0; i < backBodyJson2.size(); i++) {
Face mapnr = new Face();
JSONObject job = backBodyJson2.getJSONObject(i); // 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
num = job.getString("count"); //总数
}
}
if(StringUtils.isNoneBlank(num)){
return Integer.parseInt(num);
}else {
return 0;
}
}
}
@Override
public Map<String, Object> getBlzz(HttpServletRequest request) throws Exception {
List<Face> list=sysGnsyrzOpenApiDao.queryList();
List<Face> result2 = new ArrayList<>();
int hh=0;
for(int yi = 0;yi < list.size(); yi ++){
String sql2=list.get(yi).getIdentitycard();
String xh=list.get(yi).getId();
Map<String, Object> map2 = EsUtils.newQueryEs(request, sql2);
//查询全国常口信息
String StrData2 = map2.get("data").toString();
int total2 = (int) map2.get("count");
JSONArray backBodyJson2 = JSONArray.parseArray(StrData2);
System.out.println(backBodyJson2.toJSONString());
// 首先把字符串转成 JSONArray 对象
if (backBodyJson2.size() > 0) {
for (int i = 0; i < backBodyJson2.size(); i++) {
Face mapnr = new Face();
JSONObject job = backBodyJson2.getJSONObject(i); // 遍历 jsonarray 数组,把每一个对象转成 json 对象
// 得到 每个对象中的属性值
String num = job.getString("count"); //证件号码
mapnr.setNum(num);
mapnr.setId(xh);
try {
hh++;
sysGnsyrzOpenApiDao.updateList(mapnr);
}catch (Exception e){
e.printStackTrace();
System.out.println(mapnr.toString());
}
}
}
}
System.out.println(hh);
return null;
}
@Override @Override
public Map<String, Object> getWbxx(HttpServletRequest request, XyrParam xyrParam) throws Exception { public Map<String, Object> getWbxx(HttpServletRequest request, XyrParam xyrParam) throws Exception {
......
spring: spring:
datasource: datasource:
xzxt: xzxt:
# driver-class-name: com.mysql.cj.jdbc.Driver
# jdbc-url: jdbc:mysql://65.26.10.145:4306/xzxt?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
# username: xzxt
# password: Hn_Xzxt43
# type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
username: xzxt username: xzxt
password: xzxt password: xzxt
jdbc-url: jdbc:mysql://47.92.223.200:3365/xzxt?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true jdbc-url: jdbc:mysql://47.92.223.200:3365/xzxt?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
manager: manager:
driver-class-name: oracle.jdbc.OracleDriver driver-class-name: oracle.jdbc.OracleDriver
username: manager username: manager
......
...@@ -56,5 +56,19 @@ ...@@ -56,5 +56,19 @@
) )
</insert> </insert>
<update id="updateList" parameterType="com.founder.model.Face">
update tb_bjg
set
NUM=#{num, jdbcType=VARCHAR}
where XH = #{id, jdbcType=VARCHAR}
</update>
<select id="queryList" resultType="com.founder.model.Face">
select XH id,SQL_TEXT identitycard from tb_bjg where LX='表名'
</select>
</mapper> </mapper>
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