Merge branch 'dev'

This commit is contained in:
wangliwen 2022-12-10 19:59:16 +08:00
commit c43b7d9225
1 changed files with 105 additions and 92 deletions

View File

@ -257,29 +257,29 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
this.lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate(); this.lcJdbcTemplate = JdbcTemplateFactory.getJdbcTemplate();
} }
private static final String getAllsql = "SELECT\n" + private static final String getAllsql = "SELECT " +
"\tCOUNT( BSNUM ) AS \"count\",\n" + " COUNT( BSNUM ) AS \"count\", " +
"\t'yzy' AS \"type\",\n" + " 'yzy' AS \"type\", " +
"\tORG_NAME AS \"deptName\" \n" + " ORG_NAME AS \"deptName\" " +
"FROM\n" + "FROM " +
"\tVIEW_CLOUD_BUSINESS_INDEX \n" + " VIEW_CLOUD_BUSINESS_INDEX " +
"WHERE\n" + "WHERE " +
"\t1 = 1 \n" + " 1 = 1 " +
"\tAND APPLYTYPE = '01'\n" + " AND APPLYTYPE = '01' " +
"\tAND STATUS NOT IN ('00', '07', '99')\n" + " AND STATUS NOT IN ('00', '07', '99') " +
"GROUP BY\n" + "GROUP BY " +
"\tORG_NAME UNION ALL\n" + " ORG_NAME UNION ALL " +
"SELECT\n" + "SELECT " +
"\tCOUNT( BSNUM ) AS \"count\",\n" + " COUNT( BSNUM ) AS \"count\", " +
"\t'ysp' AS \"type\",\n" + " 'ysp' AS \"type\", " +
"\tORG_NAME AS \"deptName\" \n" + " ORG_NAME AS \"deptName\" " +
"FROM\n" + "FROM " +
"\tVIEW_VIDEO_BUSINESS_INDEX \n" + " VIEW_VIDEO_BUSINESS_INDEX " +
"WHERE\n" + "WHERE " +
"\t1 = 1 \n" + " 1 = 1 " +
"\tAND STATUS != '00'\n" + " AND STATUS != '00' " +
"GROUP BY\n" + "GROUP BY " +
"\tORG_NAME"; " ORG_NAME";
@Override @Override
public QueryWrapper<ResourceEntity> getWrapper(Map<String, Object> params) { public QueryWrapper<ResourceEntity> getWrapper(Map<String, Object> params) {
@ -761,8 +761,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
CompletableFuture jcss = CompletableFuture.runAsync(() -> { CompletableFuture jcss = CompletableFuture.runAsync(() -> {
HashMap<String, Object> map = (HashMap<String, Object>) this.selectInfrastructureList(); HashMap<String, Object> map = (HashMap<String, Object>) this.selectInfrastructureList();
final Long[] total = {0L}; final Long[] total = {0L};
map.forEach((k,v) -> { map.forEach((k, v) -> {
total[0] = total[0] + (Integer) v; total[0] = total[0] + (Integer) v;
}); });
re.add(new HashMap<String, Object>() { re.add(new HashMap<String, Object>() {
{ {
@ -1444,9 +1444,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
List<Map<String, Object>> result2; List<Map<String, Object>> result2;
if (Long.parseLong(params.get("id").toString()) == 0) { if (Long.parseLong(params.get("id").toString()) == 0) {
result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName,\n" + "SUM(a.visits) AS resourceVisits \n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '组件服务' AND a.del_flag = 0\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n"); result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName, " + "SUM(a.visits) AS resourceVisits " + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id " + "WHERE a.type = '组件服务' AND a.del_flag = 0 " + "GROUP BY a.dept_id,b.name " + "ORDER BY a.dept_id,b.name ");
} else { } else {
result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName,\n" + "SUM(a.visits) AS resourceVisits \n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '组件服务' AND a.del_flag = 0\n" + "AND (b.ID = ? OR INSTR(b.pids,?))\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n", pas); result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName, " + "SUM(a.visits) AS resourceVisits " + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id " + "WHERE a.type = '组件服务' AND a.del_flag = 0 " + "AND (b.ID = ? OR INSTR(b.pids,?)) " + "GROUP BY a.dept_id,b.name " + "ORDER BY a.dept_id,b.name ", pas);
} }
if (!result2.isEmpty()) { if (!result2.isEmpty()) {
@ -1524,9 +1524,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
List<Map<String, Object>> result2; List<Map<String, Object>> result2;
if (Long.parseLong(params.get("id").toString()) == 0) { if (Long.parseLong(params.get("id").toString()) == 0) {
result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '应用资源' AND a.del_flag = 0\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n"); result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName " + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id " + "WHERE a.type = '应用资源' AND a.del_flag = 0 " + "GROUP BY a.dept_id,b.name " + "ORDER BY a.dept_id,b.name ");
} else { } else {
result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '应用资源' AND a.del_flag = 0\n" + "AND (b.ID = ? OR b.pids LIKE CONCAT(CONCAT('%',?),'%'))\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n", pas); result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName " + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id " + "WHERE a.type = '应用资源' AND a.del_flag = 0 " + "AND (b.ID = ? OR b.pids LIKE CONCAT(CONCAT('%',?),'%')) " + "GROUP BY a.dept_id,b.name " + "ORDER BY a.dept_id,b.name ", pas);
} }
if (!result2.isEmpty()) { if (!result2.isEmpty()) {
@ -1621,9 +1621,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
List<Map<String, Object>> result2; List<Map<String, Object>> result2;
if (Long.parseLong(params.get("id").toString()) == 0) { if (Long.parseLong(params.get("id").toString()) == 0) {
result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '基础设施' AND a.del_flag = 0\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n"); result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName " + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id " + "WHERE a.type = '基础设施' AND a.del_flag = 0 " + "GROUP BY a.dept_id,b.name " + "ORDER BY a.dept_id,b.name ");
} else { } else {
result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '基础设施' AND a.del_flag = 0\n" + "AND (b.ID = ? OR INSTR(b.pids,?))\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n", pas); result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName " + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id " + "WHERE a.type = '基础设施' AND a.del_flag = 0 " + "AND (b.ID = ? OR INSTR(b.pids,?)) " + "GROUP BY a.dept_id,b.name " + "ORDER BY a.dept_id,b.name ", pas);
} }
if (!result2.isEmpty()) { if (!result2.isEmpty()) {
@ -1669,9 +1669,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
List<Map<String, Object>> result2; List<Map<String, Object>> result2;
if (Long.parseLong(params.get("id").toString()) == 0) { if (Long.parseLong(params.get("id").toString()) == 0) {
result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '数据资源' AND a.del_flag = 0\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n"); result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName " + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id " + "WHERE a.type = '数据资源' AND a.del_flag = 0 " + "GROUP BY a.dept_id,b.name " + "ORDER BY a.dept_id,b.name ");
} else { } else {
result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName\n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '数据资源' AND a.del_flag = 0\n" + "AND (b.ID = ? OR INSTR(b.pids,?))\n" + "GROUP BY a.dept_id,b.name\n" + "ORDER BY a.dept_id,b.name\n", pas); result2 = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName " + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id " + "WHERE a.type = '数据资源' AND a.del_flag = 0 " + "AND (b.ID = ? OR INSTR(b.pids,?)) " + "GROUP BY a.dept_id,b.name " + "ORDER BY a.dept_id,b.name ", pas);
} }
@ -1717,9 +1717,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
Object[] pas = {params.get("id"), params.get("id")}; Object[] pas = {params.get("id"), params.get("id")};
if (Long.parseLong(params.get("id").toString()) == 0) { if (Long.parseLong(params.get("id").toString()) == 0) {
result = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,b.name AS deptName\n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '知识库' AND a.del_flag = 0\n" + "GROUP BY b.name\n" + "ORDER BY b.name "); result = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,b.name AS deptName " + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id " + "WHERE a.type = '知识库' AND a.del_flag = 0 " + "GROUP BY b.name " + "ORDER BY b.name ");
} else { } else {
result = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,b.name AS deptName\n" + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id\n" + "WHERE a.type = '知识库' AND a.del_flag = 0\n" + "AND (b.ID = ? OR INSTR(b.pids,?))\n" + "GROUP BY b.name\n" + "ORDER BY b.name ", pas); result = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS resourceNum,b.name AS deptName " + "FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id " + "WHERE a.type = '知识库' AND a.del_flag = 0 " + "AND (b.ID = ? OR INSTR(b.pids,?)) " + "GROUP BY b.name " + "ORDER BY b.name ", pas);
} }
List<List<Map<String, Object>>> partition = Lists.partition(result, pageSize); List<List<Map<String, Object>>> partition = Lists.partition(result, pageSize);
@ -2240,27 +2240,31 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
logger.error("未查询到{}对应的浪潮系统部门", params.get("provideDept").toString()); logger.error("未查询到{}对应的浪潮系统部门", params.get("provideDept").toString());
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
StringBuilder sb = new StringBuilder("SELECT\n" + StringBuilder sb = new StringBuilder("SELECT " +
"\tCOUNT( BSNUM ) AS \"count\",\n" + " COUNT( BSNUM ) AS \"count\", " +
"\t'yzy' AS \"type\" \n" + " 'yzy' AS \"type\" " +
"FROM\n" + "FROM " +
"\tVIEW_CLOUD_BUSINESS_INDEX \n" + " VIEW_CLOUD_BUSINESS_INDEX " +
"WHERE\n" + "WHERE " +
"\t1 = 1 \n" + " 1 = 1 " +
"\tAND ORG_NAME = '"); " AND ORG_NAME = '");
sb.append(lcDept.get("lc_name").toString()) sb.append(lcDept.get("lc_name").toString())
.append("' UNION ALL\n" + .append("' UNION ALL " +
"SELECT\n" + "SELECT " +
"\tCOUNT( BSNUM ) AS \"count\",\n" + " COUNT( BSNUM ) AS \"count\", " +
"\t'ysp' AS \"type\" \n" + " 'ysp' AS \"type\" " +
"FROM\n" + "FROM " +
"\tVIEW_VIDEO_BUSINESS_INDEX \n" + " VIEW_VIDEO_BUSINESS_INDEX " +
"WHERE\n" + "WHERE " +
"\t1 = 1 \n" + " 1 = 1 " +
"\tAND ORG_NAME = '") " AND ORG_NAME = '")
.append(lcDept.get("lc_name").toString()) .append(lcDept.get("lc_name").toString())
.append("'"); .append("'");
zwyCountListByapplyDept.addAll(lcJdbcTemplate.queryForList(sb.toString())); try {
zwyCountListByapplyDept.addAll(lcJdbcTemplate.queryForList(sb.toString()));
} catch (Exception e) {
logger.error(sb.toString(), e);
}
} }
List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params); List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params);
@ -2299,7 +2303,12 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params); List<Map<String, Object>> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params);
if ("250000".equals(params.get("region").toString())) { if ("250000".equals(params.get("region").toString())) {
List<Map<String, Object>> zwyCountListByApplyDept = lcJdbcTemplate.queryForList(getAllsql); List<Map<String, Object>> zwyCountListByApplyDept = new ArrayList<>();
try {
zwyCountListByApplyDept = lcJdbcTemplate.queryForList(getAllsql);
} catch (Exception e) {
logger.error(getAllsql, e);
}
zwyCountListByApplyDept.forEach(x -> { zwyCountListByApplyDept.forEach(x -> {
Map<String, Object> ucsDept = sysDeptDao.selectUCSDeptByLCDeptName(x.get("deptName").toString()); Map<String, Object> ucsDept = sysDeptDao.selectUCSDeptByLCDeptName(x.get("deptName").toString());
@ -2342,8 +2351,12 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
resultList.add(count); resultList.add(count);
return resultList; return resultList;
} else { } else {
List<Map<String, Object>> zwyCountListByApplyDept = new ArrayList<>();
List<Map<String, Object>> zwyCountListByApplyDept = lcJdbcTemplate.queryForList(getAllsql); try {
zwyCountListByApplyDept = lcJdbcTemplate.queryForList(getAllsql);
} catch (Exception e) {
logger.info(getAllsql, e);
}
zwyCountListByApplyDept.forEach(x -> { zwyCountListByApplyDept.forEach(x -> {
Map<String, Object> ucsDept = sysDeptDao.selectUCSDeptByLCDeptName(x.get("deptName").toString()); Map<String, Object> ucsDept = sysDeptDao.selectUCSDeptByLCDeptName(x.get("deptName").toString());
@ -2740,12 +2753,12 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
//根据时间重新排序再分页 //根据时间重新排序再分页
result.stream() result.stream()
.sorted(Comparator.comparing(x -> { .sorted(Comparator.comparing(x -> {
Map map = (Map) x; Map map = (Map) x;
return DateUtils.parse(map.get("createDate").toString(), DateUtils.DATE_TIME_PATTERN); return DateUtils.parse(map.get("createDate").toString(), DateUtils.DATE_TIME_PATTERN);
}).reversed()) }).reversed())
.skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList()); .skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList());
return new PageData(result, total.intValue()); return new PageData(result, total.intValue());
} else if ("云资源".equals(params.get("resourceType").toString()) || "云视频".equals(params.get("resourceType").toString())){ } else if ("云资源".equals(params.get("resourceType").toString()) || "云视频".equals(params.get("resourceType").toString())) {
List<Map> lcApplyDtoList = lcSelectCensusApplyTable(params); List<Map> lcApplyDtoList = lcSelectCensusApplyTable(params);
result.addAll(lcApplyDtoList.stream().skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList())); result.addAll(lcApplyDtoList.stream().skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList()));
return new PageData(result, lcApplyDtoList.size()); return new PageData(result, lcApplyDtoList.size());
@ -2759,38 +2772,38 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
private List<Map> lcSelectCensusApplyTable(Map params) { private List<Map> lcSelectCensusApplyTable(Map params) {
StringBuilder sb = new StringBuilder("SELECT * FROM (\n" + StringBuilder sb = new StringBuilder("SELECT * FROM ( " +
"SELECT\n" + "SELECT " +
"\tvcbi.ORG_NAME AS \"deptName\", bsrel.name AS \"resourceName\", '青岛市大数据发展管理局' AS \"resourceDeptName\",\n" + " vcbi.ORG_NAME AS \"deptName\", bsrel.name AS \"resourceName\", '青岛市大数据发展管理局' AS \"resourceDeptName\", " +
"\tbsrel.SOURCE_TYPE AS \"type\", to_char( vcbi.CREATE_TIME, 'yyyy-mm-dd HH24:MI:SS' ) AS \"createDate\",\n" + " bsrel.SOURCE_TYPE AS \"type\", to_char( vcbi.CREATE_TIME, 'yyyy-mm-dd HH24:MI:SS' ) AS \"createDate\", " +
"\tvcbi.status AS \"approveStatus\", bsrel.BSNUM AS \"applyNumber\" \n" + " vcbi.status AS \"approveStatus\", bsrel.BSNUM AS \"applyNumber\" " +
"FROM\n" + "FROM " +
"\t(\n" + " ( " +
"\t\tSELECT BSNUM, '云主机' AS \"SOURCE_TYPE\", NAME, DISPOSE AS \"INFO\" FROM VIEW_CLOUD_HOST_INFO \n" + " SELECT BSNUM, '云主机' AS \"SOURCE_TYPE\", NAME, DISPOSE AS \"INFO\" FROM VIEW_CLOUD_HOST_INFO " +
"\t\tUNION ALL\n" + " UNION ALL " +
"\t\tSELECT BSNUM, '云数据库' AS \"SOURCE_TYPE\", NAME, (TYPE || '/' || STORAGE_SPACE || 'GB') AS \"INFO\" FROM VIEW_CLOUD_DATABASE_INFO \n" + " SELECT BSNUM, '云数据库' AS \"SOURCE_TYPE\", NAME, (TYPE || '/' || STORAGE_SPACE || 'GB') AS \"INFO\" FROM VIEW_CLOUD_DATABASE_INFO " +
"\t\tUNION ALL\n" + " UNION ALL " +
"\t\tSELECT BSNUM, '对象存储' AS \"SOURCE_TYPE\", NAME, ( DATA_DISK || 'GB' ) AS \"INFO\" FROM VIEW_CLOUD_OBJECTSTORAGE_INFO \n" + " SELECT BSNUM, '对象存储' AS \"SOURCE_TYPE\", NAME, ( DATA_DISK || 'GB' ) AS \"INFO\" FROM VIEW_CLOUD_OBJECTSTORAGE_INFO " +
"\t\tUNION ALL\n" + " UNION ALL " +
"\t\tSELECT BSNUM, '托管服务' AS \"SOURCE_TYPE\", NAME, U_NUM AS \"INFO\" FROM VIEW_TRUSTEESHIPSERVICE_INFO\n" + " SELECT BSNUM, '托管服务' AS \"SOURCE_TYPE\", NAME, U_NUM AS \"INFO\" FROM VIEW_TRUSTEESHIPSERVICE_INFO " +
"\t) bsrel\n" + " ) bsrel " +
"\tLEFT JOIN VIEW_CLOUD_BUSINESS_INDEX vcbi ON bsrel.BSNUM = vcbi.BSNUM \n" + " LEFT JOIN VIEW_CLOUD_BUSINESS_INDEX vcbi ON bsrel.BSNUM = vcbi.BSNUM " +
"WHERE\n" + "WHERE " +
"\tvcbi.APPLYTYPE = '01' \n" + " vcbi.APPLYTYPE = '01' " +
"\tAND vcbi.status IN ( '01', '03', '04', '05', '06', '99' )\n" + " AND vcbi.status IN ( '01', '03', '04', '05', '06', '99' ) " +
"\tUNION ALL\n" + " UNION ALL " +
"\tSELECT vvbi.ORG_NAME AS \"deptName\", vvbr.name AS \"resourceName\", vvbr.ORG_NAME AS \"resourceDeptName\",\n" + " SELECT vvbi.ORG_NAME AS \"deptName\", vvbr.name AS \"resourceName\", vvbr.ORG_NAME AS \"resourceDeptName\", " +
"\t'云视频' AS \"type\", to_char( vvbi.CREATE_TIME, 'yyyy-mm-dd HH24:MI:SS' ) AS \"createDate\", vvbi.status AS \"approveStatus\", \n" + " '云视频' AS \"type\", to_char( vvbi.CREATE_TIME, 'yyyy-mm-dd HH24:MI:SS' ) AS \"createDate\", vvbi.status AS \"approveStatus\", " +
"\tvvbr.BSNUM AS \"applyNumber\" \n" + " vvbr.BSNUM AS \"applyNumber\" " +
"FROM\n" + "FROM " +
"\tVIEW_VIDEO_BUSINESS_RELATION vvbr\n" + " VIEW_VIDEO_BUSINESS_RELATION vvbr " +
"\tLEFT JOIN VIEW_VIDEO_BUSINESS_INDEX vvbi ON vvbr.BSNUM = vvbi.BSNUM \n" + " LEFT JOIN VIEW_VIDEO_BUSINESS_INDEX vvbi ON vvbr.BSNUM = vvbi.BSNUM " +
"WHERE\n" + "WHERE " +
"\tvvbi.STATUS != '00'\n" + " vvbi.STATUS != '00' " +
"\tAND vvbr.ORG_NAME IS NOT NULL \n" + " AND vvbr.ORG_NAME IS NOT NULL " +
"\t) apply \n" + " ) apply " +
"\tWHERE 1 = 1\n" + " WHERE 1 = 1 " +
"\t\n"); " ");
if (params.get("provideDept") != null) { if (params.get("provideDept") != null) {
Map<String, Object> lcDept = sysDeptDao.selectLCDeptByUcsDeptName(params.get("provideDept").toString()); Map<String, Object> lcDept = sysDeptDao.selectLCDeptByUcsDeptName(params.get("provideDept").toString());
@ -2802,7 +2815,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
sb.append(" AND apply.\"resourceDeptName\" = ").append(lcDept.get("lc_name").toString()); sb.append(" AND apply.\"resourceDeptName\" = ").append(lcDept.get("lc_name").toString());
} }
if (params.get("region") != null) { if (params.get("region") != null) {
List<String> deptNames = sysDeptDao.selectLCDeptByRegion((Long)params.get("region")); List<String> deptNames = sysDeptDao.selectLCDeptByRegion((Long) params.get("region"));
logger.error("只查询本区域部门申请,部门列表{}", deptNames); logger.error("只查询本区域部门申请,部门列表{}", deptNames);
sb.append(" AND apply.\"deptName\" IN ( "); sb.append(" AND apply.\"deptName\" IN ( ");
deptNames.forEach(name -> sb.append("'").append(name).append("', ")); deptNames.forEach(name -> sb.append("'").append(name).append("', "));