Commit 9739d98c by wqc

大屏条线接口

parent 1cadf7ce
...@@ -61,7 +61,7 @@ public class BigScreenController { ...@@ -61,7 +61,7 @@ public class BigScreenController {
} }
@ApiOperation("获取单个模型数据统计") @ApiOperation("获取单个模型数据统计")
@RequestMapping(value = "/getModelDetails") @GetMapping(value = "/getModelDetails")
public ResultVo getModelDetails(@RequestParam("modelName") String modelName) { public ResultVo getModelDetails(@RequestParam("modelName") String modelName) {
return ResultVo.success(bigScreenService.getModelDetails(modelName)); return ResultVo.success(bigScreenService.getModelDetails(modelName));
} }
...@@ -170,5 +170,11 @@ public class BigScreenController { ...@@ -170,5 +170,11 @@ public class BigScreenController {
return ResultVo.success(bigScreenService.getJswpajlb(diqu,pcNo)); return ResultVo.success(bigScreenService.getJswpajlb(diqu,pcNo));
} }
@ApiOperation("各业务条线案件数量")
@GetMapping(value = "/getGywtxajNum")
public ResultVo getGywtxajNum(@RequestParam String diqu,String pcNo) throws SQLException {
return ResultVo.success(bigScreenService.getGywtxajNum(diqu,pcNo));
}
} }
...@@ -38,7 +38,7 @@ public class ConnectDB implements ApplicationRunner { ...@@ -38,7 +38,7 @@ public class ConnectDB implements ApplicationRunner {
switch (ds.getDbType()) { switch (ds.getDbType()) {
case 1: case 1:
className = "com.mysql.cj.jdbc.Driver"; className = "com.mysql.cj.jdbc.Driver";
url = "jdbc:mysql://" + ds.getDbIp() + ":" + ds.getDbPort() + "/" + ds.getDbName() + "?characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&useOldAliasMetadataBehavior=true"; url = "jdbc:mysql://" + ds.getDbIp() + ":" + ds.getDbPort() + "/" + ds.getDbName() + "?characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8&autoReconnect=true&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true";
break; break;
case 2: case 2:
className = "oracle.jdbc.driver.OracleDriver"; className = "oracle.jdbc.driver.OracleDriver";
...@@ -55,7 +55,17 @@ public class ConnectDB implements ApplicationRunner { ...@@ -55,7 +55,17 @@ public class ConnectDB implements ApplicationRunner {
druidDataSource.setUrl(url); druidDataSource.setUrl(url);
druidDataSource.setUsername(ds.getUsername()); druidDataSource.setUsername(ds.getUsername());
druidDataSource.setPassword(ds.getPassword()); druidDataSource.setPassword(ds.getPassword());
druidDataSource.setQueryTimeout(20 * 1000); druidDataSource.setInitialSize(5);
druidDataSource.setMinIdle(10);
druidDataSource.setMaxActive(1000);
druidDataSource.setMaxWait(60000);
druidDataSource.setTimeBetweenEvictionRunsMillis(60000);
druidDataSource.setMinEvictableIdleTimeMillis(100000);
druidDataSource.setMaxEvictableIdleTimeMillis(300000);
druidDataSource.setTestWhileIdle(true);
druidDataSource.setTestOnBorrow(false);
druidDataSource.setTestOnReturn(false);
druidDataSource.setValidationQuery("SELECT 1 FROM DUAL");
druidDataSource.init(); druidDataSource.init();
DruidPooledConnection connection = druidDataSource.getConnection(); DruidPooledConnection connection = druidDataSource.getConnection();
connectionMap.put(ds.getId(), connection); connectionMap.put(ds.getId(), connection);
......
...@@ -50,4 +50,6 @@ public interface BigScreenService { ...@@ -50,4 +50,6 @@ public interface BigScreenService {
Object getQbajcqwj(String diqu,String pcNo) throws SQLException; Object getQbajcqwj(String diqu,String pcNo) throws SQLException;
Object getJswpajlb(String diqu,String pcNo) throws SQLException; Object getJswpajlb(String diqu,String pcNo) throws SQLException;
Object getGywtxajNum(String diqu, String pcNo) throws SQLException;
} }
...@@ -500,7 +500,7 @@ public class BigScreenServiceImpl implements BigScreenService { ...@@ -500,7 +500,7 @@ public class BigScreenServiceImpl implements BigScreenService {
} }
@Override @Override
public Object getBlqzlxData(String diqu,String pcNo) throws SQLException { public Object getBlqzlxData(String diqu, String pcNo) throws SQLException {
Map<String, Object> body = new HashMap<>(); Map<String, Object> body = new HashMap<>();
body.put("diqu", "'" + diqu + "'"); body.put("diqu", "'" + diqu + "'");
body.put("pcNo", "'" + pcNo + "'"); body.put("pcNo", "'" + pcNo + "'");
...@@ -551,7 +551,7 @@ public class BigScreenServiceImpl implements BigScreenService { ...@@ -551,7 +551,7 @@ public class BigScreenServiceImpl implements BigScreenService {
} }
@Override @Override
public Object getJswpajlb(String diqu,String pcNo) throws SQLException { public Object getJswpajlb(String diqu, String pcNo) throws SQLException {
Map<String, Object> body = new HashMap<>(); Map<String, Object> body = new HashMap<>();
body.put("diqu", "'" + diqu + "'"); body.put("diqu", "'" + diqu + "'");
body.put("pcNo", "'" + pcNo + "'"); body.put("pcNo", "'" + pcNo + "'");
...@@ -566,4 +566,20 @@ public class BigScreenServiceImpl implements BigScreenService { ...@@ -566,4 +566,20 @@ public class BigScreenServiceImpl implements BigScreenService {
return mapList; return mapList;
} }
@Override
public Object getGywtxajNum(String diqu, String pcNo) throws SQLException {
Map<String, Object> body = new HashMap<>();
body.put("diqu", "'" + diqu + "'");
body.put("pcNo", "'" + pcNo + "'");
List<Map<String, Object>> mapList = null;
if (diqu != null && !diqu.equals("")) {
body.put("queryName", "各业务条线案件数量1");
mapList = CommonQuery(body);
} else {
body.put("queryName", "各业务条线案件数量2");
mapList = CommonQuery(body);
}
return mapList;
}
} }
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