This commit is contained in:
dinggang 2022-12-12 08:37:22 +08:00
parent 3109a28f06
commit 1e55d1eade
5 changed files with 8 additions and 26 deletions

View File

@ -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;

View File

@ -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());

View File

@ -66,13 +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();
}
/** /**
* 获取用户任务列表 * 获取用户任务列表
@ -453,27 +446,23 @@ 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(); 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); logger.error("--->查询语句{}", sql);
try { try {
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
@ -511,7 +500,7 @@ public class ActTaskController {
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); logger.error("--->查询语句{}", sql);
try { try {
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();

View File

@ -251,12 +251,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Autowired @Autowired
private TDemandDataDao tDemandDataDao; private TDemandDataDao tDemandDataDao;
private JdbcTemplate lcJdbcTemplate;
public void setLcJdbcTemplate(JdbcTemplate lcJdbcTemplate) {
this.lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate();
}
private static final String getAllsql = "SELECT\n" + private static final String getAllsql = "SELECT\n" +
"\tCOUNT( BSNUM ) AS \"count\",\n" + "\tCOUNT( BSNUM ) AS \"count\",\n" +
"\t'yzy' AS \"type\",\n" + "\t'yzy' AS \"type\",\n" +
@ -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())) {

View File

@ -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;