Compare commits
12 Commits
e090c4fd8a
...
d1b6ae5e14
Author | SHA1 | Date |
---|---|---|
wangliwen | d1b6ae5e14 | |
dinggang | db03b24e76 | |
wangliwen | 9598af3564 | |
wangliwen | 45c5bf7489 | |
liyongbo2 | 47e19db5de | |
liyongbo2 | 413f62c395 | |
wangliwen | 0aac656f83 | |
wangliwen | b165e91663 | |
liyongbo2 | e6b17da32a | |
wangliwen | e1edb302f5 | |
wangliwen | 0063546e5e | |
wangliwen | 5b66808e7c |
|
@ -0,0 +1 @@
|
|||
ALTER TABLE `share_platform`.`tb_data_resource` ADD COLUMN `info_list` json NULL COMMENT '属性信息';
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE `share_platform`.`tb_work_dynamics`
|
||||
MODIFY COLUMN `note1` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '摘要';
|
|
@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
|
@ -55,7 +56,7 @@ public class CensusControllerV2 {
|
|||
@GetMapping(value = "/whole_amount")
|
||||
@ApiOperation("平台概览")
|
||||
public Result<List<Map<String, Object>>> wholeAmount() {
|
||||
List<Map<String, Object>> result = Collections.synchronizedList(new ArrayList<>());
|
||||
List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
|
||||
|
||||
CompletableFuture<Void> userAmount = CompletableFuture.supplyAsync(() -> { // 获取平台用户总数
|
||||
return sysUserService.countAllUser();
|
||||
|
@ -102,7 +103,7 @@ public class CensusControllerV2 {
|
|||
@ApiOperation("应用资源数量统计")
|
||||
@LogOperation("应用资源数量统计")
|
||||
public Result<List<Map<String, Object>>> applicationNum() {
|
||||
List<Map<String, Object>> result = Collections.synchronizedList(new ArrayList<>());
|
||||
List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
|
||||
|
||||
CompletableFuture<Void> allApplicationAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总应用数目
|
||||
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='应用资源';", Long.class);
|
||||
|
@ -156,7 +157,7 @@ public class CensusControllerV2 {
|
|||
}
|
||||
|
||||
private List<Map<String, Object>> resourceRank(Integer type) {
|
||||
List<Map<String, Object>> result = Collections.synchronizedList(new ArrayList<>());
|
||||
List<Map<String, Object>> result;
|
||||
List<Map<String, Object>> district = jdbcTemplate.queryForList("SELECT * FROM sys_dept WHERE type = " + type);
|
||||
List<Map<String, Long>> listMap =
|
||||
district.stream().map(index -> {
|
||||
|
@ -203,7 +204,7 @@ public class CensusControllerV2 {
|
|||
@ApiOperation("组件服务简况")
|
||||
@LogOperation("组件服务简况")
|
||||
public Result<List<Map<String, Object>>> assemblerInfo() {
|
||||
List<Map<String, Object>> result = Collections.synchronizedList(new ArrayList<>());
|
||||
List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
|
||||
CompletableFuture<Void> allAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总组件服务数目
|
||||
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='组件服务' AND del_flag = 0;", Long.class);
|
||||
}).thenAccept(sum -> {
|
||||
|
@ -263,7 +264,7 @@ public class CensusControllerV2 {
|
|||
@ApiOperation("知识库简况")
|
||||
@LogOperation("知识库简况")
|
||||
public Result<List<Map<String, Object>>> knowledgeInfo() {
|
||||
List<Map<String, Object>> result = Collections.synchronizedList(new ArrayList<>());
|
||||
List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
|
||||
CompletableFuture<Void> allKnowledgeAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总知识库数目
|
||||
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='知识库' AND del_flag = 0;", Long.class);
|
||||
}).thenAccept(sum -> {
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
/**
|
||||
* 操作日志
|
||||
|
@ -42,7 +43,7 @@ public class SysLogOperationServiceImpl extends BaseServiceImpl<SysLogOperationD
|
|||
return ConvertUtils.sourceToTarget(entityList, SysLogOperationDTO.class);
|
||||
}
|
||||
|
||||
private QueryWrapper<SysLogOperationEntity> getWrapper(Map<String, Object> params){
|
||||
private QueryWrapper<SysLogOperationEntity> getWrapper(Map<String, Object> params) {
|
||||
String status = (String) params.get("status");
|
||||
|
||||
QueryWrapper<SysLogOperationEntity> wrapper = new QueryWrapper<>();
|
||||
|
@ -54,7 +55,9 @@ public class SysLogOperationServiceImpl extends BaseServiceImpl<SysLogOperationD
|
|||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(SysLogOperationEntity entity) {
|
||||
CompletableFuture.runAsync(() -> {
|
||||
insert(entity);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
|
@ -210,7 +210,7 @@ public class ResourceController {
|
|||
@ApiOperation("导入")
|
||||
@LogOperation("导入")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "source", value = "请求来源", paramType = "string", dataType = "string")
|
||||
@ApiImplicitParam(name = "file", value = "数据文件文件", paramType = "file", dataType = "file")
|
||||
})
|
||||
public Result importResource(@RequestParam("file") MultipartFile uploadFile, HttpServletRequest request) {
|
||||
List<Map<String, Object>> dept =
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
package io.renren.modules.resource.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import io.renren.common.entity.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 资源表
|
||||
|
@ -130,4 +134,7 @@ public class ResourceEntity extends BaseEntity {
|
|||
* 提起下架人员
|
||||
*/
|
||||
private String undercarriageUserName;
|
||||
|
||||
@TableField(value = "info_list", typeHandler = FastjsonTypeHandler.class)
|
||||
private List<AttrEntity> infoList;
|
||||
}
|
|
@ -36,7 +36,7 @@ public class WorkDynamicsDTO implements Serializable {
|
|||
private Long updater;
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private Date updateDate;
|
||||
@ApiModelProperty(value = "备用字段1")
|
||||
@ApiModelProperty(value = "摘要")
|
||||
private String note1;
|
||||
@ApiModelProperty(value = "备用字段2")
|
||||
private String note2;
|
||||
|
|
|
@ -59,7 +59,7 @@ public class WorkDynamicsEntity {
|
|||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date updateDate;
|
||||
/**
|
||||
* 备用字段1
|
||||
* 摘要
|
||||
*/
|
||||
private String note1;
|
||||
/**
|
||||
|
|
|
@ -36,7 +36,7 @@ public class WorkDynamicsExcel {
|
|||
private Long updater;
|
||||
@ExcelProperty(value = "修改时间", index = 8)
|
||||
private Date updateDate;
|
||||
@ExcelProperty(value = "备用字段1", index = 9)
|
||||
@ExcelProperty(value = "摘要", index = 9)
|
||||
private String note1;
|
||||
@ExcelProperty(value = "备用字段2", index = 10)
|
||||
private String note2;
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
server:
|
||||
port: 8888
|
||||
spring:
|
||||
datasource:
|
||||
druid:
|
||||
#MySQL
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://10.10.30.10:3306/nlpt?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&useSSL=false
|
||||
username: nlpt
|
||||
password: Nlpt@2022
|
||||
initial-size: 10
|
||||
max-active: 100
|
||||
min-idle: 10
|
||||
max-wait: 10
|
||||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
#Oracle需要打开注释
|
||||
validation-query: SELECT 1
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
filter:
|
||||
stat:
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: false
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
|
||||
#上传的静态资源配置
|
||||
resource:
|
||||
root_url: 10.10.30.9
|
||||
pic-host: http://${resource.root_url}:${server.port}${server.servlet.context-path}
|
||||
path: /data1/services/nengli/files/
|
||||
devModelFilePath: /data1/services/nengli/files/devModelFile
|
||||
|
||||
# 大数据部门相关配置
|
||||
big_date:
|
||||
name: 青岛市大数据发展管理局
|
||||
assignee_role_name: 部门审批人
|
||||
|
||||
hisense:
|
||||
gateway:
|
||||
url: http://devtest-security-app.hismarttv.com:8080
|
||||
|
||||
#调用青岛应急局-查询青岛地区天气信息接口
|
||||
qdyjj:
|
||||
ipAndPort: 15.2.21.238:9015
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
server:
|
||||
port: 8888
|
||||
spring:
|
||||
datasource:
|
||||
druid:
|
||||
#MySQL
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://10.10.30.10:3306/nlpt?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&useSSL=false
|
||||
username: nlpt
|
||||
password: Nlpt@2022
|
||||
initial-size: 10
|
||||
max-active: 100
|
||||
min-idle: 10
|
||||
max-wait: 10
|
||||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
#Oracle需要打开注释
|
||||
validation-query: SELECT 1
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
filter:
|
||||
stat:
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: false
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
|
||||
#上传的静态资源配置
|
||||
resource:
|
||||
root_url: 10.10.30.9
|
||||
pic-host: http://${resource.root_url}:${server.port}${server.servlet.context-path}
|
||||
path: /data1/services/nengli/files/
|
||||
devModelFilePath: /data1/services/nengli/files/devModelFile
|
||||
|
||||
# 大数据部门相关配置
|
||||
big_date:
|
||||
name: 青岛市大数据发展管理局
|
||||
assignee_role_name: 部门审批人
|
||||
|
||||
hisense:
|
||||
gateway:
|
||||
url: http://devtest-security-app.hismarttv.com:8080
|
||||
|
||||
#调用青岛应急局-查询青岛地区天气信息接口
|
||||
qdyjj:
|
||||
ipAndPort: 15.2.21.238:9015
|
||||
|
|
@ -93,7 +93,7 @@ system:
|
|||
yawei:
|
||||
enable: true
|
||||
|
||||
#知识库
|
||||
#对接知识库相关配置
|
||||
zsk:
|
||||
url:
|
||||
sign: https://cms.qingdao.gov.cn:9020/api-gateway/jpaas-jags-server/interface/createsign.do
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE `share_platform`.`tb_data_resource` ADD COLUMN `info_list` json NULL COMMENT '属性信息';
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE `share_platform`.`tb_work_dynamics`
|
||||
MODIFY COLUMN `note1` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '摘要';
|
|
@ -33,6 +33,8 @@
|
|||
<result property="enclosure" column="enclosure"/>
|
||||
<result property="undercarriageReason" column="undercarriage_reason"/>
|
||||
<result property="undercarriageUserName" column="undercarriage_user_name"/>
|
||||
<result property="infoList" column="info_list"
|
||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="resourceDTO" type="io.renren.modules.resource.dto.ResourceDTO">
|
||||
|
@ -103,7 +105,7 @@
|
|||
|
||||
<select id="selectWithAttrs" resultMap="resourceDTO">
|
||||
SELECT
|
||||
tdr.*,
|
||||
DISTINCT tdr.*,
|
||||
IFNULL(taa2.approve_status, '未申请') AS "applyState",
|
||||
IFNULL(trs.score, 0 ) AS "score",
|
||||
IFNULL(taa.applyCount, 0 ) AS "applyCount",
|
||||
|
@ -215,34 +217,34 @@
|
|||
</select>
|
||||
|
||||
<select id="selectDTOById" resultMap="resourceDTO">
|
||||
<!-- SELECT-->
|
||||
<!-- tdr.*,-->
|
||||
<!--<!– tda.*,–>-->
|
||||
<!-- IFNULL(trs.score, 0 ) AS "score",-->
|
||||
<!-- IFNULL(taa.applyCount, 0 ) AS "applyCount",-->
|
||||
<!-- IFNULL(trc.collectCount, 0) AS "collectCount",-->
|
||||
<!-- sd.name as "deptName",-->
|
||||
<!-- IFNULL(trc2.isCollect, 'false') AS "isCollect",-->
|
||||
<!-- IFNULL(taa2.approve_status, '未申请') AS "applyState"-->
|
||||
<!-- FROM-->
|
||||
<!-- tb_data_resource tdr-->
|
||||
<!--<!– LEFT JOIN tb_data_attr tda ON tdr.id = tda.data_resource_id–>-->
|
||||
<!-- LEFT JOIN ( SELECT resource_id, AVG(score) AS "score" FROM tb_resource_score WHERE 1 = 1 AND del_flag = 0 GROUP-->
|
||||
<!-- BY resource_id ) trs ON tdr.id = trs.resource_id-->
|
||||
<!-- LEFT JOIN ( SELECT resource_id, COUNT(id) AS "applyCount" FROM t_ability_application WHERE 1 = 1 AND del_flag =-->
|
||||
<!-- 0 GROUP BY resource_id ) taa ON tdr.id = taa.resource_id-->
|
||||
<!-- LEFT JOIN ( SELECT resource_id, COUNT(id) AS "collectCount" FROM tb_resource_collection WHERE 1 = 1 AND del_flag-->
|
||||
<!-- = 0 GROUP BY resource_id ) trc ON tdr.id = trc.resource_id-->
|
||||
<!-- LEFT JOIN ( SELECT resource_id, user_id, ( CASE COUNT( id ) WHEN 1 THEN 'true' ELSE 'false' END ) AS "isCollect"-->
|
||||
<!-- FROM tb_resource_collection WHERE-->
|
||||
<!-- 1 = 1 AND del_flag = 0 AND user_id = #{userId}-->
|
||||
<!-- GROUP BY resource_id) trc2 ON tdr.id = trc2.resource_id-->
|
||||
<!-- LEFT JOIN ( SELECT resource_id, approve_status FROM t_ability_application WHERE-->
|
||||
<!-- 1 = 1 AND del_flag = 0 AND user_id = #{userId}-->
|
||||
<!-- GROUP BY id LIMIT 1) taa2 ON tdr.id = taa2.resource_id-->
|
||||
<!-- LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id-->
|
||||
<!-- WHERE 1 = 1-->
|
||||
<!-- AND tdr.id = #{id}-->
|
||||
<!-- SELECT-->
|
||||
<!-- tdr.*,-->
|
||||
<!--<!– tda.*,–>-->
|
||||
<!-- IFNULL(trs.score, 0 ) AS "score",-->
|
||||
<!-- IFNULL(taa.applyCount, 0 ) AS "applyCount",-->
|
||||
<!-- IFNULL(trc.collectCount, 0) AS "collectCount",-->
|
||||
<!-- sd.name as "deptName",-->
|
||||
<!-- IFNULL(trc2.isCollect, 'false') AS "isCollect",-->
|
||||
<!-- IFNULL(taa2.approve_status, '未申请') AS "applyState"-->
|
||||
<!-- FROM-->
|
||||
<!-- tb_data_resource tdr-->
|
||||
<!--<!– LEFT JOIN tb_data_attr tda ON tdr.id = tda.data_resource_id–>-->
|
||||
<!-- LEFT JOIN ( SELECT resource_id, AVG(score) AS "score" FROM tb_resource_score WHERE 1 = 1 AND del_flag = 0 GROUP-->
|
||||
<!-- BY resource_id ) trs ON tdr.id = trs.resource_id-->
|
||||
<!-- LEFT JOIN ( SELECT resource_id, COUNT(id) AS "applyCount" FROM t_ability_application WHERE 1 = 1 AND del_flag =-->
|
||||
<!-- 0 GROUP BY resource_id ) taa ON tdr.id = taa.resource_id-->
|
||||
<!-- LEFT JOIN ( SELECT resource_id, COUNT(id) AS "collectCount" FROM tb_resource_collection WHERE 1 = 1 AND del_flag-->
|
||||
<!-- = 0 GROUP BY resource_id ) trc ON tdr.id = trc.resource_id-->
|
||||
<!-- LEFT JOIN ( SELECT resource_id, user_id, ( CASE COUNT( id ) WHEN 1 THEN 'true' ELSE 'false' END ) AS "isCollect"-->
|
||||
<!-- FROM tb_resource_collection WHERE-->
|
||||
<!-- 1 = 1 AND del_flag = 0 AND user_id = #{userId}-->
|
||||
<!-- GROUP BY resource_id) trc2 ON tdr.id = trc2.resource_id-->
|
||||
<!-- LEFT JOIN ( SELECT resource_id, approve_status FROM t_ability_application WHERE-->
|
||||
<!-- 1 = 1 AND del_flag = 0 AND user_id = #{userId}-->
|
||||
<!-- GROUP BY id LIMIT 1) taa2 ON tdr.id = taa2.resource_id-->
|
||||
<!-- LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id-->
|
||||
<!-- WHERE 1 = 1-->
|
||||
<!-- AND tdr.id = #{id}-->
|
||||
|
||||
SELECT
|
||||
tdr.*,
|
||||
|
@ -567,7 +569,8 @@
|
|||
tdav.data_resource_id AS resourceId
|
||||
FROM
|
||||
tb_data_attr tdav
|
||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value, ';', '' ) ) + 1 )
|
||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value,
|
||||
';', '' ) ) + 1 )
|
||||
WHERE
|
||||
1 = 1
|
||||
AND tdav.attr_type = '应用领域'
|
||||
|
@ -830,7 +833,8 @@
|
|||
COUNT( tdav.data_resource_id ) AS "count"
|
||||
FROM
|
||||
tb_data_attr tdav
|
||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value, ';', '' ) ) + 1 )
|
||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value,
|
||||
';', '' ) ) + 1 )
|
||||
WHERE
|
||||
1 = 1
|
||||
AND tdav.attr_type = '应用领域'
|
||||
|
@ -850,7 +854,8 @@
|
|||
COUNT( tdav.data_resource_id ) AS "count"
|
||||
FROM
|
||||
tb_data_attr tdav
|
||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value, ';', '' ) ) + 1 )
|
||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value,
|
||||
';', '' ) ) + 1 )
|
||||
WHERE
|
||||
1 = 1
|
||||
AND tdav.attr_type = '应用领域'
|
||||
|
@ -883,7 +888,8 @@
|
|||
COUNT( tdav.data_resource_id ) AS "total"
|
||||
FROM
|
||||
tb_data_attr tdav
|
||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value, ';', '' ) ) + 1 )
|
||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value,
|
||||
';', '' ) ) + 1 )
|
||||
WHERE
|
||||
1 = 1
|
||||
AND tdav.attr_type = '应用领域'
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue