Compare commits
3 Commits
5c83bfa1da
...
2059a69538
Author | SHA1 | Date |
---|---|---|
dinggang | 2059a69538 | |
dinggang | 1e55d1eade | |
dinggang | 3109a28f06 |
|
@ -11,8 +11,7 @@ CREATE TABLE `t_ucs_lc_dept_rel` (
|
||||||
`district_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地区名称',
|
`district_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地区名称',
|
||||||
`type` int(0) NULL DEFAULT NULL COMMENT '部门类型',
|
`type` int(0) NULL DEFAULT NULL COMMENT '部门类型',
|
||||||
`lc_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浪潮部门名称',
|
`lc_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浪潮部门名称',
|
||||||
`lc_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浪潮部门ID',
|
`lc_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浪潮部门ID'
|
||||||
PRIMARY KEY (`ucs_id`) USING BTREE
|
|
||||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'ucs与浪潮部门名称对应表' ROW_FORMAT = Dynamic;
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'ucs与浪潮部门名称对应表' ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
|
Binary file not shown.
8
pom.xml
8
pom.xml
|
@ -92,6 +92,14 @@
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<version>${mysql.version}</version>
|
<version>${mysql.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--<!– oracle驱动 –>-->
|
||||||
|
<!--<dependency>-->
|
||||||
|
<!-- <groupId>com.oracle</groupId>-->
|
||||||
|
<!-- <artifactId>ojdbc11</artifactId>-->
|
||||||
|
<!-- <scope>system</scope>-->
|
||||||
|
<!-- <systemPath>${project.basedir}/lib/ojdbc11-11.2.0.3.jar</systemPath>-->
|
||||||
|
<!-- <version>${oracle.version}</version>-->
|
||||||
|
<!--</dependency>-->
|
||||||
<!-- oracle驱动 -->
|
<!-- oracle驱动 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.oracle</groupId>
|
<groupId>com.oracle</groupId>
|
||||||
|
|
Binary file not shown.
|
@ -231,6 +231,22 @@
|
||||||
<systemPath>${project.basedir}/lib/yawei-pso-${yawei-pso.version}.jar</systemPath>
|
<systemPath>${project.basedir}/lib/yawei-pso-${yawei-pso.version}.jar</systemPath>
|
||||||
<version>${yawei-pso.version}</version>
|
<version>${yawei-pso.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- oracle驱动 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.oracle</groupId>
|
||||||
|
<artifactId>ojdbc8</artifactId>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${project.basedir}/lib/ojdbc8-11.2.0.3.jar</systemPath>
|
||||||
|
<version>${oracle.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!--<!– oracle驱动 –>-->
|
||||||
|
<!--<dependency>-->
|
||||||
|
<!-- <groupId>com.oracle</groupId>-->
|
||||||
|
<!-- <artifactId>ojdbc6</artifactId>-->
|
||||||
|
<!-- <scope>system</scope>-->
|
||||||
|
<!-- <systemPath>${project.basedir}/lib/ojdbc6-11.2.0.3.jar</systemPath>-->
|
||||||
|
<!-- <version>${oracle.version}</version>-->
|
||||||
|
<!--</dependency>-->
|
||||||
<!-- en ke video -->
|
<!-- en ke video -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>sw.vc3term</groupId>
|
<groupId>sw.vc3term</groupId>
|
||||||
|
@ -333,7 +349,7 @@
|
||||||
<exclude>application-prod.yml</exclude>
|
<exclude>application-prod.yml</exclude>
|
||||||
<exclude>application-show.yml</exclude>
|
<exclude>application-show.yml</exclude>
|
||||||
<exclude>application-test.yml</exclude>
|
<exclude>application-test.yml</exclude>
|
||||||
<exclude>application-xha.yml</exclude>
|
<!--<exclude>application-xha.yml</exclude>-->
|
||||||
<!-- 排除flyway管理的sql -->
|
<!-- 排除flyway管理的sql -->
|
||||||
<exclude>db/*.sql</exclude>
|
<exclude>db/*.sql</exclude>
|
||||||
<exclude>domain/**</exclude>
|
<exclude>domain/**</exclude>
|
||||||
|
@ -370,6 +386,7 @@
|
||||||
<manifestEntries>
|
<manifestEntries>
|
||||||
<Class-Path>. lib/yawei-pso-${yawei-pso.version}.jar
|
<Class-Path>. lib/yawei-pso-${yawei-pso.version}.jar
|
||||||
lib/contingencyplan-${contingencyplan.version}.jar
|
lib/contingencyplan-${contingencyplan.version}.jar
|
||||||
|
lib/ojdbc8-11.2.0.3.jar
|
||||||
</Class-Path>
|
</Class-Path>
|
||||||
</manifestEntries>
|
</manifestEntries>
|
||||||
</archive>
|
</archive>
|
||||||
|
|
|
@ -23,7 +23,7 @@ public class JdbcTemplateFactory {
|
||||||
druidDataSource.setTimeBetweenEvictionRunsMillis(properties.getTimeBetweenEvictionRunsMillis());
|
druidDataSource.setTimeBetweenEvictionRunsMillis(properties.getTimeBetweenEvictionRunsMillis());
|
||||||
druidDataSource.setMinEvictableIdleTimeMillis(properties.getMinEvictableIdleTimeMillis());
|
druidDataSource.setMinEvictableIdleTimeMillis(properties.getMinEvictableIdleTimeMillis());
|
||||||
druidDataSource.setMaxEvictableIdleTimeMillis(properties.getMaxEvictableIdleTimeMillis());
|
druidDataSource.setMaxEvictableIdleTimeMillis(properties.getMaxEvictableIdleTimeMillis());
|
||||||
druidDataSource.setValidationQuery(properties.getValidationQuery());
|
druidDataSource.setValidationQuery("select 1 FROM DUAL");
|
||||||
druidDataSource.setValidationQueryTimeout(properties.getValidationQueryTimeout());
|
druidDataSource.setValidationQueryTimeout(properties.getValidationQueryTimeout());
|
||||||
druidDataSource.setTestOnBorrow(properties.isTestOnBorrow());
|
druidDataSource.setTestOnBorrow(properties.isTestOnBorrow());
|
||||||
druidDataSource.setTestOnReturn(properties.isTestOnReturn());
|
druidDataSource.setTestOnReturn(properties.isTestOnReturn());
|
||||||
|
|
|
@ -12,6 +12,7 @@ import io.renren.common.utils.Result;
|
||||||
import io.renren.modules.activiti.dto.BatchCompleteDTO;
|
import io.renren.modules.activiti.dto.BatchCompleteDTO;
|
||||||
import io.renren.modules.activiti.dto.TaskDTO;
|
import io.renren.modules.activiti.dto.TaskDTO;
|
||||||
import io.renren.modules.activiti.service.ActTaskService;
|
import io.renren.modules.activiti.service.ActTaskService;
|
||||||
|
import io.renren.modules.resource.service.impl.ResourceServiceImpl;
|
||||||
import io.renren.modules.security.user.SecurityUser;
|
import io.renren.modules.security.user.SecurityUser;
|
||||||
import io.renren.modules.security.user.UserDetail;
|
import io.renren.modules.security.user.UserDetail;
|
||||||
import io.renren.modules.sys.dto.SysUserDTO;
|
import io.renren.modules.sys.dto.SysUserDTO;
|
||||||
|
@ -25,6 +26,8 @@ import org.activiti.engine.TaskService;
|
||||||
import org.activiti.engine.repository.ProcessDefinition;
|
import org.activiti.engine.repository.ProcessDefinition;
|
||||||
import org.activiti.engine.repository.ProcessDefinitionQuery;
|
import org.activiti.engine.repository.ProcessDefinitionQuery;
|
||||||
import org.activiti.engine.task.TaskQuery;
|
import org.activiti.engine.task.TaskQuery;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
@ -47,6 +50,8 @@ import java.util.stream.Collectors;
|
||||||
@Api(tags = "任务管理")
|
@Api(tags = "任务管理")
|
||||||
public class ActTaskController {
|
public class ActTaskController {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(ActTaskController.class);
|
||||||
|
|
||||||
private static final Integer CPU_NUM = Runtime.getRuntime().availableProcessors();
|
private static final Integer CPU_NUM = Runtime.getRuntime().availableProcessors();
|
||||||
private static final ExecutorService executor = Executors.newWorkStealingPool(CPU_NUM * 3);
|
private static final ExecutorService executor = Executors.newWorkStealingPool(CPU_NUM * 3);
|
||||||
|
|
||||||
|
@ -61,11 +66,6 @@ public class ActTaskController {
|
||||||
@Autowired
|
@Autowired
|
||||||
protected TaskService taskService;
|
protected TaskService taskService;
|
||||||
|
|
||||||
private JdbcTemplate lcJdbcTemplate;
|
|
||||||
|
|
||||||
public void setLcJdbcTemplate(JdbcTemplate lcJdbcTemplate) {
|
|
||||||
this.lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户任务列表
|
* 获取用户任务列表
|
||||||
|
@ -446,34 +446,34 @@ public class ActTaskController {
|
||||||
@LogOperation("个人中心查询政务云资源申请列表")
|
@LogOperation("个人中心查询政务云资源申请列表")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "name", value = "业务名称", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = "name", value = "业务名称", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = "applyType", value = "申请类型", paramType = "query", dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query", required = true, dataType = "Integer"),
|
@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query", required = true, dataType = "Integer"),
|
||||||
@ApiImplicitParam(name = "pageSize", value = "分页大小", paramType = "query", required = true, dataType = "Integer")
|
@ApiImplicitParam(name = "pageSize", value = "分页大小", paramType = "query", required = true, dataType = "Integer")
|
||||||
|
|
||||||
})
|
})
|
||||||
public Result getZwyBusinessList(String name, String applyType, String status, int pageNum, int pageSize) {
|
public Result getZwyBusinessList(String name, String status, int pageNum, int pageSize) {
|
||||||
UserDetail user = SecurityUser.getUser();
|
UserDetail user = SecurityUser.getUser();
|
||||||
|
JdbcTemplate lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate();
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, BUSINESS_NAME, APPLYTYPE, to_char(CREATE_TIME,'yyyy-mm-dd hh24:mi:ss') AS \"CREATE_TIME\", STATUS " +
|
StringBuilder sql = new StringBuilder("SELECT BSNUM, BUSINESS_NAME, APPLYTYPE, to_char(CREATE_TIME,'yyyy-mm-dd hh24:mi:ss') AS \"CREATE_TIME\", STATUS " +
|
||||||
"FROM VIEW_CLOUD_BUSINESS_INDEX WHERE 1 = 1 AND APPLYTYPE = '01' AND STATUS != '00' AND ACCOUNT = '" + user.getUsername() + "'");
|
"FROM VIEW_CLOUD_BUSINESS_INDEX WHERE 1 = 1 AND APPLYTYPE = '01' AND STATUS != '00' AND ACCOUNT = '" + user.getUsername() + "'");
|
||||||
if (!StringUtils.isEmpty(name)) {
|
if (!StringUtils.isEmpty(name)) {
|
||||||
sql.append(" AND BUSINESS_NAME LIKE CONCAT('%', ").append(name).append(", '%') ");
|
sql.append(" AND BUSINESS_NAME LIKE ('%' || '").append(name).append("' || '%') ");
|
||||||
}
|
|
||||||
if (!StringUtils.isEmpty(applyType)) {
|
|
||||||
sql.append(" AND APPLYTYPE = '").append(applyType).append("'");
|
|
||||||
}
|
}
|
||||||
if (!StringUtils.isEmpty(status)) {
|
if (!StringUtils.isEmpty(status)) {
|
||||||
sql.append(" AND STATUS = '").append(status).append("'");
|
sql.append(" AND STATUS = '").append(status).append("'");
|
||||||
}
|
}
|
||||||
sql.append(" ORDER BY CREATE_TIME DESC");
|
sql.append(" ORDER BY CREATE_TIME DESC");
|
||||||
|
logger.error("--->查询语句{}", sql);
|
||||||
try {
|
try {
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
||||||
resultMap.put("total", list.size());
|
resultMap.put("total", list.isEmpty() ? 0 : list.size());
|
||||||
List<Map<String, Object>> result = list.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
|
list = list.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
|
||||||
resultMap.put("list", result);
|
resultMap.put("list", list);
|
||||||
return new Result().ok(resultMap);
|
return new Result().ok(resultMap);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
logger.error("浪潮数据查询异常", e);
|
||||||
|
|
||||||
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,6 +490,7 @@ public class ActTaskController {
|
||||||
|
|
||||||
})
|
})
|
||||||
public Result getZwyVideoList(String name, String status, int pageNum, int pageSize) {
|
public Result getZwyVideoList(String name, String status, int pageNum, int pageSize) {
|
||||||
|
JdbcTemplate lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate();
|
||||||
UserDetail user = SecurityUser.getUser();
|
UserDetail user = SecurityUser.getUser();
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, BUSINESS_NAME, to_char(CREATE_TIME,'yyyy-mm-dd hh24:mi:ss') AS \"CREATE_TIME\", STATUS " +
|
StringBuilder sql = new StringBuilder("SELECT BSNUM, BUSINESS_NAME, to_char(CREATE_TIME,'yyyy-mm-dd hh24:mi:ss') AS \"CREATE_TIME\", STATUS " +
|
||||||
"FROM VIEW_VIDEO_BUSINESS_INDEX WHERE 1 = 1 AND STATUS != '00' AND ACCOUNT = '" + user.getUsername() + "'");
|
"FROM VIEW_VIDEO_BUSINESS_INDEX WHERE 1 = 1 AND STATUS != '00' AND ACCOUNT = '" + user.getUsername() + "'");
|
||||||
|
@ -500,14 +501,16 @@ public class ActTaskController {
|
||||||
sql.append(" AND STATUS = '").append(status).append("'");
|
sql.append(" AND STATUS = '").append(status).append("'");
|
||||||
}
|
}
|
||||||
sql.append(" ORDER BY CREATE_TIME DESC");
|
sql.append(" ORDER BY CREATE_TIME DESC");
|
||||||
|
logger.error("--->查询语句{}", sql);
|
||||||
try {
|
try {
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
||||||
resultMap.put("total", list.size());
|
resultMap.put("total", list.isEmpty() ? 0 : list.size());
|
||||||
List<Map<String, Object>> result = list.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
|
list = list.stream().skip((pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
|
||||||
resultMap.put("list", result);
|
resultMap.put("list", list);
|
||||||
return new Result().ok(resultMap);
|
return new Result().ok(resultMap);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
logger.error("浪潮数据查询异常", e);
|
||||||
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -521,6 +524,7 @@ public class ActTaskController {
|
||||||
@ApiImplicitParam(name = "id", value = "业务ID", paramType = "query", required = true, dataType = "String")
|
@ApiImplicitParam(name = "id", value = "业务ID", paramType = "query", required = true, dataType = "String")
|
||||||
})
|
})
|
||||||
public Result getZwyBusinessInfoById(String id) {
|
public Result getZwyBusinessInfoById(String id) {
|
||||||
|
JdbcTemplate lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate();
|
||||||
try {
|
try {
|
||||||
ArrayList<Map> arrayList = new ArrayList<>();
|
ArrayList<Map> arrayList = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -530,6 +534,7 @@ public class ActTaskController {
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, '云主机' AS \"SOURCE_TYPE\", NAME, DISPOSE AS \"INFO\" " +
|
StringBuilder sql = new StringBuilder("SELECT BSNUM, '云主机' AS \"SOURCE_TYPE\", NAME, DISPOSE AS \"INFO\" " +
|
||||||
" FROM VIEW_CLOUD_HOST_INFO WHERE 1 = 1 AND BSNUM = '");
|
" FROM VIEW_CLOUD_HOST_INFO WHERE 1 = 1 AND BSNUM = '");
|
||||||
sql.append(id).append("'");
|
sql.append(id).append("'");
|
||||||
|
logger.error("--->查询语句{}", sql);
|
||||||
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
||||||
arrayList.addAll(list);
|
arrayList.addAll(list);
|
||||||
|
|
||||||
|
@ -541,6 +546,7 @@ public class ActTaskController {
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, '云数据库' AS \"SOURCE_TYPE\", NAME, (TYPE || '/' || STORAGE_SPACE || 'GB') AS \"INFO\" " +
|
StringBuilder sql = new StringBuilder("SELECT BSNUM, '云数据库' AS \"SOURCE_TYPE\", NAME, (TYPE || '/' || STORAGE_SPACE || 'GB') AS \"INFO\" " +
|
||||||
" FROM VIEW_CLOUD_DATABASE_INFO WHERE 1 = 1 AND BSNUM = '");
|
" FROM VIEW_CLOUD_DATABASE_INFO WHERE 1 = 1 AND BSNUM = '");
|
||||||
sql.append(id).append("'");
|
sql.append(id).append("'");
|
||||||
|
logger.error("--->查询语句{}", sql);
|
||||||
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
||||||
arrayList.addAll(list);
|
arrayList.addAll(list);
|
||||||
|
|
||||||
|
@ -552,6 +558,7 @@ public class ActTaskController {
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, '对象存储' AS \"SOURCE_TYPE\", NAME, (DATA_DISK || 'GB') AS \"INFO\" " +
|
StringBuilder sql = new StringBuilder("SELECT BSNUM, '对象存储' AS \"SOURCE_TYPE\", NAME, (DATA_DISK || 'GB') AS \"INFO\" " +
|
||||||
" FROM VIEW_CLOUD_OBJECTSTORAGE_INFO WHERE 1 = 1 AND BSNUM = '");
|
" FROM VIEW_CLOUD_OBJECTSTORAGE_INFO WHERE 1 = 1 AND BSNUM = '");
|
||||||
sql.append(id).append("'");
|
sql.append(id).append("'");
|
||||||
|
logger.error("--->查询语句{}", sql);
|
||||||
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
||||||
arrayList.addAll(list);
|
arrayList.addAll(list);
|
||||||
|
|
||||||
|
@ -562,6 +569,7 @@ public class ActTaskController {
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, '托管服务' AS \"SOURCE_TYPE\", NAME, (U_NUM || 'U') AS \"INFO\" " +
|
StringBuilder sql = new StringBuilder("SELECT BSNUM, '托管服务' AS \"SOURCE_TYPE\", NAME, (U_NUM || 'U') AS \"INFO\" " +
|
||||||
" FROM VIEW_TRUSTEESHIPSERVICE_INFO WHERE 1 = 1 AND BSNUM = '");
|
" FROM VIEW_TRUSTEESHIPSERVICE_INFO WHERE 1 = 1 AND BSNUM = '");
|
||||||
sql.append(id).append("'");
|
sql.append(id).append("'");
|
||||||
|
logger.error("--->查询语句{}", sql);
|
||||||
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
||||||
arrayList.addAll(list);
|
arrayList.addAll(list);
|
||||||
|
|
||||||
|
@ -571,6 +579,8 @@ public class ActTaskController {
|
||||||
all.join();
|
all.join();
|
||||||
return new Result().ok(arrayList);
|
return new Result().ok(arrayList);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
logger.error("浪潮数据查询异常", e);
|
||||||
|
|
||||||
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -583,14 +593,17 @@ public class ActTaskController {
|
||||||
@ApiImplicitParam(name = "id", value = "业务ID", paramType = "query", required = true, dataType = "String")
|
@ApiImplicitParam(name = "id", value = "业务ID", paramType = "query", required = true, dataType = "String")
|
||||||
})
|
})
|
||||||
public Result getZwyVideoInfoById(String id) {
|
public Result getZwyVideoInfoById(String id) {
|
||||||
|
JdbcTemplate lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate();
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, CAMERATYPE, NAME, ORG_NAME " +
|
StringBuilder sql = new StringBuilder("SELECT BSNUM, CAMERATYPE, NAME, ORG_NAME " +
|
||||||
"FROM VIEW_VIDEO_BUSINESS_RELATION WHERE 1 = 1 AND BSNUM = '");
|
"FROM VIEW_VIDEO_BUSINESS_RELATION WHERE 1 = 1 AND BSNUM = '");
|
||||||
sql.append(id).append("'");
|
sql.append(id).append("'");
|
||||||
|
logger.error("--->查询语句{}", sql);
|
||||||
try {
|
try {
|
||||||
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
List<Map<String, Object>> list = lcJdbcTemplate.queryForList(sql.toString());
|
||||||
return new Result().ok(list);
|
return new Result().ok(list);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
logger.error("浪潮数据查询异常", e);
|
||||||
|
|
||||||
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
return new Result().error("数据查询异常,请联系云资源数据库管理人员!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ import io.renren.modules.devtools.config.query.AbstractQuery;
|
||||||
import io.renren.modules.devtools.entity.TableFieldEntity;
|
import io.renren.modules.devtools.entity.TableFieldEntity;
|
||||||
import io.renren.modules.devtools.entity.TableInfoEntity;
|
import io.renren.modules.devtools.entity.TableInfoEntity;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import oracle.jdbc.OracleConnection;
|
|
||||||
|
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -34,7 +33,7 @@ public class DbUtils {
|
||||||
|
|
||||||
Connection connection = DriverManager.getConnection(info.getConnUrl(), info.getUsername(), info.getPassword());
|
Connection connection = DriverManager.getConnection(info.getConnUrl(), info.getUsername(), info.getPassword());
|
||||||
if (info.getDbType() == DbType.Oracle) {
|
if (info.getDbType() == DbType.Oracle) {
|
||||||
((OracleConnection) connection).setRemarksReporting(true);
|
//((OracleConnection) connection).setRemarksReporting(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return connection;
|
return connection;
|
||||||
|
|
|
@ -251,35 +251,29 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
@Autowired
|
@Autowired
|
||||||
private TDemandDataDao tDemandDataDao;
|
private TDemandDataDao tDemandDataDao;
|
||||||
|
|
||||||
private JdbcTemplate lcJdbcTemplate;
|
private static final String getAllsql = "SELECT\n" +
|
||||||
|
"\tCOUNT( BSNUM ) AS \"count\",\n" +
|
||||||
public void setLcJdbcTemplate(JdbcTemplate lcJdbcTemplate) {
|
"\t'yzy' AS \"type\",\n" +
|
||||||
this.lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate();
|
"\tORG_NAME AS \"deptName\" \n" +
|
||||||
}
|
"FROM\n" +
|
||||||
|
"\tVIEW_CLOUD_BUSINESS_INDEX \n" +
|
||||||
private static final String getAllsql = "SELECT " +
|
"WHERE\n" +
|
||||||
" COUNT( BSNUM ) AS \"count\", " +
|
"\t1 = 1 \n" +
|
||||||
" 'yzy' AS \"type\", " +
|
"\tAND APPLYTYPE = '01'\n" +
|
||||||
" ORG_NAME AS \"deptName\" " +
|
"\tAND STATUS NOT IN ('00', '07', '99')\n" +
|
||||||
"FROM " +
|
"GROUP BY\n" +
|
||||||
" VIEW_CLOUD_BUSINESS_INDEX " +
|
"\tORG_NAME UNION ALL\n" +
|
||||||
"WHERE " +
|
"SELECT\n" +
|
||||||
" 1 = 1 " +
|
"\tCOUNT( BSNUM ) AS \"count\",\n" +
|
||||||
" AND APPLYTYPE = '01' " +
|
"\t'ysp' AS \"type\",\n" +
|
||||||
" AND STATUS NOT IN ('00', '07', '99') " +
|
"\tORG_NAME AS \"deptName\" \n" +
|
||||||
"GROUP BY " +
|
"FROM\n" +
|
||||||
" ORG_NAME UNION ALL " +
|
"\tVIEW_VIDEO_BUSINESS_INDEX \n" +
|
||||||
"SELECT " +
|
"WHERE\n" +
|
||||||
" COUNT( BSNUM ) AS \"count\", " +
|
"\t1 = 1 \n" +
|
||||||
" 'ysp' AS \"type\", " +
|
"\tAND STATUS != '00'\n" +
|
||||||
" ORG_NAME AS \"deptName\" " +
|
"GROUP BY\n" +
|
||||||
"FROM " +
|
"\tORG_NAME";
|
||||||
" VIEW_VIDEO_BUSINESS_INDEX " +
|
|
||||||
"WHERE " +
|
|
||||||
" 1 = 1 " +
|
|
||||||
" AND STATUS != '00' " +
|
|
||||||
"GROUP BY " +
|
|
||||||
" ORG_NAME";
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public QueryWrapper<ResourceEntity> getWrapper(Map<String, Object> params) {
|
public QueryWrapper<ResourceEntity> getWrapper(Map<String, Object> params) {
|
||||||
|
@ -2223,6 +2217,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object selectApplyDeptDetailTypeCountList(Map params) {
|
public Object selectApplyDeptDetailTypeCountList(Map params) {
|
||||||
|
JdbcTemplate lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate();
|
||||||
UserDetail user = SecurityUser.getUser();
|
UserDetail user = SecurityUser.getUser();
|
||||||
SysDeptDTO sysDeptDTO = deptService.get(user.getDeptId());
|
SysDeptDTO sysDeptDTO = deptService.get(user.getDeptId());
|
||||||
if (user.getSuperAdmin() == SuperAdminEnum.YES.value() || bigDataDeptName.equals(sysDeptDTO.getName())) {
|
if (user.getSuperAdmin() == SuperAdminEnum.YES.value() || bigDataDeptName.equals(sysDeptDTO.getName())) {
|
||||||
|
|
|
@ -11,8 +11,7 @@ CREATE TABLE `t_ucs_lc_dept_rel` (
|
||||||
`district_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地区名称',
|
`district_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地区名称',
|
||||||
`type` int(0) NULL DEFAULT NULL COMMENT '部门类型',
|
`type` int(0) NULL DEFAULT NULL COMMENT '部门类型',
|
||||||
`lc_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浪潮部门名称',
|
`lc_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浪潮部门名称',
|
||||||
`lc_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浪潮部门ID',
|
`lc_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浪潮部门ID'
|
||||||
PRIMARY KEY (`ucs_id`) USING BTREE
|
|
||||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'ucs与浪潮部门名称对应表' ROW_FORMAT = Dynamic;
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'ucs与浪潮部门名称对应表' ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
|
Binary file not shown.
|
@ -16,6 +16,14 @@
|
||||||
<artifactId>renren-common</artifactId>
|
<artifactId>renren-common</artifactId>
|
||||||
<version>2.9.0</version>
|
<version>2.9.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- oracle驱动 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.oracle</groupId>
|
||||||
|
<artifactId>ojdbc6</artifactId>
|
||||||
|
<scope>system</scope>
|
||||||
|
<systemPath>${project.basedir}/lib/ojdbc6-11.2.0.3.jar</systemPath>
|
||||||
|
<version>${oracle.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue