Merge branch 'master' into docker_package
This commit is contained in:
commit
3195fdb885
|
@ -442,8 +442,8 @@ public class ActTaskController {
|
||||||
public Result getZwyBusinessList(String name, String applyType, String status, int pageNum, int pageSize) {
|
public Result getZwyBusinessList(String name, String applyType, String status, int pageNum, int pageSize) {
|
||||||
UserDetail user = SecurityUser.getUser();
|
UserDetail user = SecurityUser.getUser();
|
||||||
JdbcTemplate jdbcTemplate = getJDBCTemplate();
|
JdbcTemplate jdbcTemplate = getJDBCTemplate();
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, BUSINESS_NAME, APPLYTYPE, 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 ACCOUNT = " + user.getUsername());
|
"FROM VIEW_CLOUD_BUSINESS_INDEX WHERE 1 = 1 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 CONCAT('%', ").append(name).append(", '%') ");
|
||||||
}
|
}
|
||||||
|
@ -480,8 +480,8 @@ 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) {
|
||||||
UserDetail user = SecurityUser.getUser();
|
UserDetail user = SecurityUser.getUser();
|
||||||
JdbcTemplate jdbcTemplate = getJDBCTemplate();
|
JdbcTemplate jdbcTemplate = getJDBCTemplate();
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, BUSINESS_NAME, 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 ACCOUNT = " + user.getUsername());
|
"FROM VIEW_VIDEO_BUSINESS_INDEX WHERE 1 = 1 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 CONCAT('%', ").append(name).append(", '%') ");
|
||||||
}
|
}
|
||||||
|
@ -518,7 +518,7 @@ public class ActTaskController {
|
||||||
//云主机
|
//云主机
|
||||||
CompletableFuture<Void> yzj = CompletableFuture.runAsync(() -> {
|
CompletableFuture<Void> yzj = CompletableFuture.runAsync(() -> {
|
||||||
|
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, SOURCE_TYPE, NAME, DISPOSE " +
|
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);
|
sql.append(id);
|
||||||
|
|
||||||
|
@ -530,7 +530,7 @@ public class ActTaskController {
|
||||||
//云数据库
|
//云数据库
|
||||||
CompletableFuture<Void> ysjk = CompletableFuture.runAsync(() -> {
|
CompletableFuture<Void> ysjk = CompletableFuture.runAsync(() -> {
|
||||||
|
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, SOURCE_TYPE, NAME, DISPOSE " +
|
StringBuilder sql = new StringBuilder("SELECT BSNUM, '云数据库' AS \"SOURCE_TYPE\", NAME, (TYPE || '/' || STORAGE_SPACE || 'GB') 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);
|
sql.append(id);
|
||||||
|
|
||||||
|
@ -542,7 +542,7 @@ public class ActTaskController {
|
||||||
//对象存储
|
//对象存储
|
||||||
CompletableFuture<Void> dxcc = CompletableFuture.runAsync(() -> {
|
CompletableFuture<Void> dxcc = CompletableFuture.runAsync(() -> {
|
||||||
|
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, SOURCE_TYPE, NAME, DISPOSE " +
|
StringBuilder sql = new StringBuilder("SELECT BSNUM, '对象存储' AS \"SOURCE_TYPE\", NAME, (DATA_DISK || 'GB') 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);
|
sql.append(id);
|
||||||
|
|
||||||
|
@ -555,7 +555,7 @@ public class ActTaskController {
|
||||||
//托管服务
|
//托管服务
|
||||||
CompletableFuture<Void> tgfw = CompletableFuture.runAsync(() -> {
|
CompletableFuture<Void> tgfw = CompletableFuture.runAsync(() -> {
|
||||||
|
|
||||||
StringBuilder sql = new StringBuilder("SELECT BSNUM, SOURCE_TYPE, NAME, DISPOSE " +
|
StringBuilder sql = new StringBuilder("SELECT BSNUM, '托管服务' AS \"SOURCE_TYPE\", NAME, U_NUM 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);
|
sql.append(id);
|
||||||
|
|
||||||
|
|
|
@ -524,7 +524,7 @@ public class ResourceController {
|
||||||
|
|
||||||
SysUserEntity sysUser = sysUserDao.getById(userId);
|
SysUserEntity sysUser = sysUserDao.getById(userId);
|
||||||
if (sysUser == null || sysUser.getGuid() == null) {
|
if (sysUser == null || sysUser.getGuid() == null) {
|
||||||
return new Result<>().error("该账号没有权限");
|
return new Result<>().error("该账号没有权限获取资源列表");
|
||||||
}
|
}
|
||||||
|
|
||||||
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx?op=ZySPPort";
|
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx?op=ZySPPort";
|
||||||
|
@ -553,8 +553,13 @@ public class ResourceController {
|
||||||
|
|
||||||
return new Result().ok(result);
|
return new Result().ok(result);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
logger.error("资源列表转发异常", e);
|
||||||
return new Result().ok(new ArrayList(0));
|
Map<String, Object> result = new LinkedHashMap<String, Object>() {{
|
||||||
|
put("PageCount", "0");
|
||||||
|
put("data", new ArrayList<>());
|
||||||
|
put("rows", "0");
|
||||||
|
}};
|
||||||
|
return new Result().ok(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2122,7 +2122,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
List<Map> resultList = new CopyOnWriteArrayList<>();
|
List<Map> resultList = new CopyOnWriteArrayList<>();
|
||||||
Boolean nonChinese_ = BooleanUtils.toBoolean(nonChinese.toLowerCase());// 不传默认为中文走全文索引
|
Boolean nonChinese_ = BooleanUtils.toBoolean(nonChinese.toLowerCase());// 不传默认为中文走全文索引
|
||||||
CompletableFuture<Void> DBresourceCount = CompletableFuture.runAsync(() -> resultList.addAll(resourceDao.selectTypeCountByName(keyWorld, nonChinese_)));
|
CompletableFuture<Void> DBresourceCount = CompletableFuture.runAsync(() -> resultList.addAll(resourceDao.selectTypeCountByName(keyWorld, nonChinese_)));
|
||||||
final Integer[] meetCountNew = new Integer[1];
|
final Integer[] meetCountNew = new Integer[2];
|
||||||
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
|
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
|
||||||
case TSINGTAO: {
|
case TSINGTAO: {
|
||||||
|
|
||||||
|
@ -2156,7 +2156,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
//统计增加会客厅搜索结果
|
//统计增加会客厅搜索结果
|
||||||
CompletableFuture<Void> meetingRoomCount = CompletableFuture.runAsync(() -> meetCountNew[0] = tMeetingroomMapper.selectByName(keyWorld).size(), executor);
|
CompletableFuture<Void> meetingRoomCount = CompletableFuture.runAsync(() -> meetCountNew[0] = tMeetingroomMapper.selectByName(keyWorld).size(), executor);
|
||||||
|
|
||||||
CompletableFuture<Void> all = CompletableFuture.allOf(DBresourceCount, dataResourceCount, meetingRoomCount);
|
//增加政务云资源搜索结果
|
||||||
|
CompletableFuture<Void> zwyRes = CompletableFuture.runAsync(() -> meetCountNew[1] = resourceDao.selectPolicyCloudServiceCountByName(keyWorld), executor);
|
||||||
|
|
||||||
|
CompletableFuture<Void> all = CompletableFuture.allOf(DBresourceCount, dataResourceCount, meetingRoomCount, zwyRes);
|
||||||
all.join();
|
all.join();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2181,7 +2184,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
});
|
});
|
||||||
resultList.forEach(map -> {
|
resultList.forEach(map -> {
|
||||||
if ("基础设施".equals(map.get("type").toString())) {
|
if ("基础设施".equals(map.get("type").toString())) {
|
||||||
int num = meetCountNew[0] + Integer.parseInt(map.get("count").toString());
|
int num = meetCountNew[0] + meetCountNew[1] + Integer.parseInt(map.get("count").toString());
|
||||||
map.replace("count", num);
|
map.replace("count", num);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1921,18 +1921,29 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCensusResourceTable" resultType="java.util.Map">
|
<select id="selectCensusResourceTable" resultType="java.util.Map">
|
||||||
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, DATE_FORMAT(tdr.create_date,'%Y-%m-%d %T') AS
|
SELECT
|
||||||
createDate,
|
sd.name AS deptName,
|
||||||
CASE WHEN (tdr.del_flag=0 OR tdr.del_flag=5) THEN '通过' WHEN tdr.del_flag=6 THEN '不通过' ELSE '审核中' END AS
|
tdr.name AS resourceName,
|
||||||
approveStatus, trma.instance_id AS applyNumber
|
tdr.type,
|
||||||
FROM (SELECT IF(d.type='组件服务', a.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date,
|
DATE_FORMAT(tdr.create_date,'%Y-%m-%d %T') AS createDate,
|
||||||
|
CASE WHEN (tdr.del_flag = 0 OR tdr.del_flag = 5) THEN '通过' WHEN tdr.del_flag = 6 THEN '不通过' ELSE '审核中' END AS approveStatus,
|
||||||
|
trma.instance_id AS applyNumber
|
||||||
|
FROM
|
||||||
|
(SELECT
|
||||||
|
IF(d.type = '组件服务', a.attr_value, d.type) AS type,
|
||||||
|
d.id,
|
||||||
|
d.del_flag,
|
||||||
|
d.dept_id,
|
||||||
|
d.create_date,
|
||||||
d.name
|
d.name
|
||||||
FROM tb_data_resource d LEFT JOIN tb_data_attr a ON d.id=a.data_resource_id AND a.attr_type='组件类型' AND
|
FROM tb_data_resource d
|
||||||
a.del_flag=0
|
LEFT JOIN tb_data_attr a ON d.id = a.data_resource_id AND a.attr_type = '组件类型' AND a.del_flag = 0
|
||||||
WHERE d.type NOT IN ('知识库','基础设施','数据资源')) tdr
|
WHERE d.type IN ('应用资源','组件服务')
|
||||||
|
) tdr
|
||||||
LEFT JOIN t_resource_mount_apply trma on tdr.id = trma.resource_id,
|
LEFT JOIN t_resource_mount_apply trma on tdr.id = trma.resource_id,
|
||||||
sys_dept sd
|
sys_dept sd
|
||||||
WHERE 1=1 AND tdr.dept_id=sd.id
|
WHERE 1 = 1
|
||||||
|
AND tdr.dept_id = sd.id
|
||||||
<choose>
|
<choose>
|
||||||
<when test="approveStatus != null and approveStatus == '通过'">
|
<when test="approveStatus != null and approveStatus == '通过'">
|
||||||
AND tdr.del_flag = 0
|
AND tdr.del_flag = 0
|
||||||
|
|
Loading…
Reference in New Issue