修改配置文件

This commit is contained in:
wanggeng 2021-10-16 15:59:13 +08:00
parent 73716e8963
commit 652bd70a4a
5 changed files with 62 additions and 16 deletions

View File

@ -11,7 +11,7 @@
<groupId>com.cm</groupId> <groupId>com.cm</groupId>
<artifactId>system-inspection</artifactId> <artifactId>system-inspection</artifactId>
<version>2.0.0-SNAPSHOT</version> <version>2.1.0-SNAPSHOT</version>
<name>system-inspection</name> <name>system-inspection</name>
<description>隐患排查系统</description> <description>隐患排查系统</description>

View File

@ -4,6 +4,10 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import java.io.Serializable;
/** /**
* @ClassName: Check2LogDTO * @ClassName: Check2LogDTO
@ -15,8 +19,9 @@ import lombok.ToString;
@ApiModel @ApiModel
@Data @Data
@ToString @ToString
public class Check2LogDTO { public class Check2LogDTO implements Serializable, Comparable {
private static final long serialVersionUID = -2847837147021551774L;
@ApiModelProperty(name = "time", value = "时间") @ApiModelProperty(name = "time", value = "时间")
private String time; private String time;
@ApiModelProperty(name = "startTime", value = "开始时间") @ApiModelProperty(name = "startTime", value = "开始时间")
@ -38,4 +43,17 @@ public class Check2LogDTO {
@ApiModelProperty(name = "description", value = "描述") @ApiModelProperty(name = "description", value = "描述")
private String description; private String description;
@Override
public int compareTo(Object o) {
final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS";
Check2LogDTO checkLogDTO = (Check2LogDTO) o;
DateTime checkLogTimeDateTime = DateTime.parse(checkLogDTO.getTime(), DateTimeFormat.forPattern(DATE_FORMAT));
DateTime thisTimeDateTime = DateTime.parse(this.getTime(), DateTimeFormat.forPattern(DATE_FORMAT));
if (thisTimeDateTime.isBefore(checkLogTimeDateTime)) {
return -1;
} else if (thisTimeDateTime.isAfter(checkLogTimeDateTime)) {
return 1;
}
return 0;
}
} }

View File

@ -487,7 +487,8 @@ public class Check2ServiceImpl extends BaseService implements ICheck2Service {
check2LogDTOs.add(check2LogDTO); check2LogDTOs.add(check2LogDTO);
check2LogDTO.setName(historicTaskInstance.getName()); check2LogDTO.setName(historicTaskInstance.getName());
check2LogDTO.setDescription(historicTaskInstance.getDescription()); check2LogDTO.setDescription(historicTaskInstance.getDescription());
check2LogDTO.setTime(DateUtil.sdfTime.format(historicTaskInstance.getTime())); String time = new DateTime(historicTaskInstance.getTime()).toString("yyyy-MM-dd HH:mm:ss.SSS");
check2LogDTO.setTime(time);
check2LogDTO.setStartTime(DateUtil.sdfTime.format(historicTaskInstance.getStartTime())); check2LogDTO.setStartTime(DateUtil.sdfTime.format(historicTaskInstance.getStartTime()));
if (historicTaskInstance.getEndTime() != null) { if (historicTaskInstance.getEndTime() != null) {
check2LogDTO.setEndTime(DateUtil.sdfTime.format(historicTaskInstance.getEndTime())); check2LogDTO.setEndTime(DateUtil.sdfTime.format(historicTaskInstance.getEndTime()));
@ -515,6 +516,7 @@ public class Check2ServiceImpl extends BaseService implements ICheck2Service {
} }
} }
} }
Collections.sort(check2LogDTOs);
return check2LogDTOs; return check2LogDTOs;
} }
@ -822,7 +824,7 @@ public class Check2ServiceImpl extends BaseService implements ICheck2Service {
updateCheckIsCompleteInfo(token, checkId, 1); updateCheckIsCompleteInfo(token, checkId, 1);
} }
processService.completeByTaskId(task.getId(), params); processService.completeByTaskId(task.getId(), params);
updateProcessInstanceId(checkId, task.getProcessInstanceId()); updateProcessInstanceId(checkId, processInstanceId);
} }
/** /**

View File

@ -45,6 +45,17 @@ spring:
slow-sql-millis: 2000 slow-sql-millis: 2000
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
use-global-data-source-stat: true use-global-data-source-stat: true
activiti:
database-schema-update: true
db-history-used: true
history-level: full
check-process-definitions: false
rest-api-enabled: true
rest-api-servlet-name: activiti-swagger-document
SpringProcessEngineConfiguration:
activityFontName: 宋体
labelFontName: 宋体
dataSource: datasource
# 数据库 # 数据库
mybatis: mybatis:
@ -61,7 +72,7 @@ swagger:
# 文件 # 文件
file: file:
uploadPath: /root/develop/projects_test/uploadFiles/ uploadPath: /root/projects_test/uploadFiles/
imageTypes: png,jpg,jpeg,gif,blob imageTypes: png,jpg,jpeg,gif,blob
videoTypes: mp4,rmvb videoTypes: mp4,rmvb
audioTypes: mp3,wmv audioTypes: mp3,wmv
@ -76,19 +87,23 @@ security:
client: client:
client-id: 32ec344a5fd04fd9911586df5d1dc36b client-id: 32ec344a5fd04fd9911586df5d1dc36b
client-secret: a2NORTAyZmthdTNtVHNwLytGVVo0ckFhNktHQU9JWVFmUks0TGw5L2hQRW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg== client-secret: a2NORTAyZmthdTNtVHNwLytGVVo0ckFhNktHQU9JWVFmUks0TGw5L2hQRW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg==
user-authorization-uri: ${security.oauth2.oauth-server}/oauth/authorize user-authorization-uri: ${security.oauth2.oauth-server}/oauth_client/authorize
access-token-uri: ${security.oauth2.oauth-server}/oauth/token access-token-uri: ${security.oauth2.oauth-server}/oauth_client/token
grant-type: authorization_code grant-type: authorization_code
resource: resource:
jwt: jwt:
key-uri: ${security.oauth2.oauth-server}/oauth/token_key key-uri: ${security.oauth2.oauth-server}/oauth_client/token_key
token-info-uri: ${security.oauth2.oauth-server}/oauth/check_token token-info-uri: ${security.oauth2.oauth-server}/oauth_client/check_token
user-info-uri: ${security.oauth2.oauth-server}/user user-info-uri: ${security.oauth2.oauth-server}/user
authorization: authorization:
check-token-access: ${security.oauth2.oauth-server}/oauth/token_key check-token-access: ${security.oauth2.oauth-server}/oauth_client/token_key
api-path: api-path:
user-center: ${security.oauth2.oauth-server} user-center: ${security.oauth2.oauth-server}
notice-url: ${security.oauth2.oauth-server}
version: 1
report-form:
check-detail: true
# 访问控制 # 访问控制
access-control: access-control:
@ -116,7 +131,7 @@ access-control:
# 日志 # 日志
logging: logging:
file: /root/develop/projects_test/logs/system-inspection/inspection-logs.log file: /root/projects_test/logs/inspection/inspection-logs.log
level: level:
root: error root: error
com.cm: debug com.cm: debug

View File

@ -45,6 +45,17 @@ spring:
slow-sql-millis: 2000 slow-sql-millis: 2000
connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
use-global-data-source-stat: true use-global-data-source-stat: true
activiti:
database-schema-update: true
db-history-used: true
history-level: full
check-process-definitions: false
rest-api-enabled: true
rest-api-servlet-name: activiti-swagger-document
SpringProcessEngineConfiguration:
activityFontName: 宋体
labelFontName: 宋体
dataSource: datasource
# 数据库 # 数据库
mybatis: mybatis:
@ -76,16 +87,16 @@ security:
client: client:
client-id: 32ec344a5fd04fd9911586df5d1dc36b client-id: 32ec344a5fd04fd9911586df5d1dc36b
client-secret: a2NORTAyZmthdTNtVHNwLytGVVo0ckFhNktHQU9JWVFmUks0TGw5L2hQRW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg== client-secret: a2NORTAyZmthdTNtVHNwLytGVVo0ckFhNktHQU9JWVFmUks0TGw5L2hQRW1ac2wwZTJHWk5NbXh3L3h3U2c4Rg==
user-authorization-uri: ${security.oauth2.oauth-server}/oauth/authorize user-authorization-uri: ${security.oauth2.oauth-server}/oauth_client/authorize
access-token-uri: ${security.oauth2.oauth-server}/oauth/token access-token-uri: ${security.oauth2.oauth-server}/oauth_client/token
grant-type: authorization_code grant-type: authorization_code
resource: resource:
jwt: jwt:
key-uri: ${security.oauth2.oauth-server}/oauth/token_key key-uri: ${security.oauth2.oauth-server}/oauth_client/token_key
token-info-uri: ${security.oauth2.oauth-server}/oauth/check_token token-info-uri: ${security.oauth2.oauth-server}/oauth_client/check_token
user-info-uri: ${security.oauth2.oauth-server}/user user-info-uri: ${security.oauth2.oauth-server}/user
authorization: authorization:
check-token-access: ${security.oauth2.oauth-server}/oauth/token_key check-token-access: ${security.oauth2.oauth-server}/oauth_client/token_key
api-path: api-path:
user-center: ${security.oauth2.oauth-server} user-center: ${security.oauth2.oauth-server}