Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
station
YeeAmosFireAutoSysRoot
Commits
09e4faa0
Commit
09e4faa0
authored
Apr 23, 2020
by
单奇雲
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_upgrade' of
http://172.16.10.76/station/YeeAmosFireAutoSysRoot
into dev_upgrade
parents
a930110a
65b1a423
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
312 additions
and
105 deletions
+312
-105
CheckStatusEnum.java
...va/com/yeejoin/amos/fas/common/enums/CheckStatusEnum.java
+88
-0
StatisticsErrorTypeEum.java
...yeejoin/amos/fas/common/enums/StatisticsErrorTypeEum.java
+1
-1
CheckErrorBo.java
...n/java/com/yeejoin/amos/fas/business/bo/CheckErrorBo.java
+47
-0
FasConstant.java
.../com/yeejoin/amos/fas/business/constants/FasConstant.java
+3
-2
View3dController.java
...eejoin/amos/fas/business/controller/View3dController.java
+2
-2
DaoHelper.java
...ain/java/com/yeejoin/amos/fas/business/dao/DaoHelper.java
+3
-2
View3dMapper.java
...om/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
+8
-0
View3dServiceImpl.java
...oin/amos/fas/business/service/impl/View3dServiceImpl.java
+28
-8
FileHelper.java
...n/java/com/yeejoin/amos/fas/business/util/FileHelper.java
+3
-2
RsDataQueue.java
.../java/com/yeejoin/amos/fas/client/invoke/RsDataQueue.java
+3
-2
IotContext.java
...rc/main/java/com/yeejoin/amos/fas/context/IotContext.java
+3
-2
AmosThreadPool.java
.../com/yeejoin/amos/fas/core/threadpool/AmosThreadPool.java
+3
-3
pom.xml
YeeAmosFireAutoSysStart/pom.xml
+49
-12
YeeAmosFireAutoSysStart.java
...c/main/java/com/yeejoin/amos/YeeAmosFireAutoSysStart.java
+3
-2
application-docker.properties
...SysStart/src/main/resources/application-docker.properties
+1
-1
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+1
-1
dbTemplate_view3d.xml
...sStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
+16
-0
log4j.properties
YeeAmosFireAutoSysStart/src/main/resources/log4j.properties
+0
-21
logback.xml
YeeAmosFireAutoSysStart/src/main/resources/logback.xml
+50
-0
pom.xml
pom.xml
+0
-44
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/CheckStatusEnum.java
0 → 100644
View file @
09e4faa0
package
com
.
yeejoin
.
amos
.
fas
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author suhg
*/
public
enum
CheckStatusEnum
{
QUALIFIED
(
"合格"
,
"1"
,
""
),
UNQUALIFIED
(
"不合格"
,
"2"
,
"#DF7400"
),
OMISSION
(
"漏检"
,
"3"
,
"#FF0000"
);
/**
* 名称,描述
*/
private
String
name
;
/**
* 编码
*/
private
String
code
;
/**
* 颜色
*/
private
String
color
;
private
CheckStatusEnum
(
String
name
,
String
code
,
String
color
){
this
.
name
=
name
;
this
.
code
=
code
;
this
.
color
=
color
;
}
public
static
CheckStatusEnum
getEnum
(
String
code
)
{
CheckStatusEnum
checkStatusEnum
=
null
;
for
(
CheckStatusEnum
type:
CheckStatusEnum
.
values
())
{
if
(
type
.
getCode
().
equals
(
code
))
{
checkStatusEnum
=
type
;
break
;
}
}
return
checkStatusEnum
;
}
public
static
List
<
Map
<
String
,
String
>>
getEnumList
()
{
List
<
Map
<
String
,
String
>>
nameList
=
new
ArrayList
<>();
for
(
CheckStatusEnum
c:
CheckStatusEnum
.
values
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"name"
,
c
.
getName
());
map
.
put
(
"code"
,
c
.
getCode
());
map
.
put
(
"color"
,
c
.
getColor
());
nameList
.
add
(
map
);
}
return
nameList
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getColor
()
{
return
color
;
}
public
void
setColor
(
String
color
)
{
this
.
color
=
color
;
}
}
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/StatisticsErrorTypeEum.java
View file @
09e4faa0
...
...
@@ -12,7 +12,7 @@ public enum StatisticsErrorTypeEum {
/**
* 巡检异常
*/
patrol
(
"patrol
"
,
"巡检异常"
),
check
(
"check
"
,
"巡检异常"
),
/**
* 设备故障
*/
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/bo/CheckErrorBo.java
0 → 100644
View file @
09e4faa0
package
com
.
yeejoin
.
amos
.
fas
.
business
.
bo
;
/**
* @author suhg
*/
public
class
CheckErrorBo
{
private
String
status
;
private
String
changeDate
;
private
Long
id
;
private
String
name
;
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getChangeDate
()
{
return
changeDate
;
}
public
void
setChangeDate
(
String
changeDate
)
{
this
.
changeDate
=
changeDate
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/constants/FasConstant.java
View file @
09e4faa0
...
...
@@ -3,7 +3,8 @@
*/
package
com
.
yeejoin
.
amos
.
fas
.
business
.
constants
;
import
org.apache.log4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* 常量
...
...
@@ -14,7 +15,7 @@ public class FasConstant {
* 构造方法
*/
private
FasConstant
()
{
Logger
.
getLogger
(
this
.
getClass
()).
debug
(
FasConstant
.
CONSTRUCTOR
);
Logger
Factory
.
getLogger
(
this
.
getClass
()).
debug
(
FasConstant
.
CONSTRUCTOR
);
}
/**
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/View3dController.java
View file @
09e4faa0
...
...
@@ -103,9 +103,9 @@ public class View3dController extends BaseController {
return
CommonResponseUtil
.
success
(
view3dService
.
getSafetyIndexInfoByDate
(
orgCode
,
date
));
}
@ApiOperation
(
value
=
"今日安全指数详情"
,
notes
=
"
risk-风险异常,check-巡检异常,equipProblem-设备故障
"
)
@ApiOperation
(
value
=
"今日安全指数详情"
,
notes
=
"
今日安全指数详情
"
)
@GetMapping
(
value
=
"/safetyIndex/detail/{type}"
)
public
CommonResponse
getSafetyIndexDetail
(
@PathVariable
String
type
){
public
CommonResponse
getSafetyIndexDetail
(
@
ApiParam
(
value
=
"risk-风险异常,check-巡检异常,equip-设备故障"
)
@
PathVariable
String
type
){
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
this
.
getOrgCode
(
reginParams
);
return
CommonResponseUtil
.
success
(
view3dService
.
getSafetyIndexDetail
(
type
,
orgCode
));
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/DaoHelper.java
View file @
09e4faa0
...
...
@@ -5,7 +5,8 @@ package com.yeejoin.amos.fas.business.dao;
import
java.util.List
;
import
org.apache.log4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* hql助手类
...
...
@@ -19,7 +20,7 @@ public class DaoHelper {
* 构造方法
*/
private
DaoHelper
()
{
Logger
.
getLogger
(
this
.
getClass
()).
debug
(
"constructor"
);
Logger
Factory
.
getLogger
(
this
.
getClass
()).
debug
(
"constructor"
);
}
/**
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/View3dMapper.java
View file @
09e4faa0
...
...
@@ -4,6 +4,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.fas.business.bo.CheckErrorBo
;
import
com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo
;
import
com.yeejoin.amos.fas.dao.entity.RiskSource
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -56,4 +57,11 @@ public interface View3dMapper extends BaseMapper{
*/
HashMap
<
String
,
Object
>
getSafetyIndexWeek
(
String
orgCode
);
/**
* 今日安全指数详情
* @param params orgCode,date
* @return list
*/
List
<
CheckErrorBo
>
getAllErrorPatrolPoint
(
Map
<
String
,
Object
>
params
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/View3dServiceImpl.java
View file @
09e4faa0
...
...
@@ -14,6 +14,7 @@ import java.util.*;
import
java.util.stream.Collectors
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.fas.business.bo.BindPointBo
;
import
com.yeejoin.amos.fas.business.bo.CheckErrorBo
;
import
com.yeejoin.amos.fas.business.bo.RiskPointRpnChangeBo
;
import
com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper
;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
...
...
@@ -21,6 +22,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IView3dService;
import
com.yeejoin.amos.fas.business.vo.ErrorContentVo
;
import
com.yeejoin.amos.fas.business.vo.SafetyIndexDetailVo
;
import
com.yeejoin.amos.fas.business.vo.TodaySafetyIndexVo
;
import
com.yeejoin.amos.fas.common.enums.CheckStatusEnum
;
import
com.yeejoin.amos.fas.common.enums.RpnChangeTypeEum
;
import
com.yeejoin.amos.fas.common.enums.StatisticsErrorTypeEum
;
import
com.yeejoin.amos.fas.core.common.request.DateUtil
;
...
...
@@ -245,11 +247,11 @@ public class View3dServiceImpl implements IView3dService {
public
List
<
SafetyIndexDetailVo
>
getSafetyIndexDetail
(
String
type
,
String
orgCode
)
{
List
<
SafetyIndexDetailVo
>
resultList
=
Lists
.
newArrayList
();
String
dateStr
=
DateUtil
.
getDateFormat
(
new
Date
(),
DateUtil
.
DATE_DEFAULT_FORMAT
);
if
(
StatisticsErrorTypeEum
.
risk
.
getCode
().
equals
(
type
)){
//1.按照日期+机构,查询出所有风险点
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"orgCode"
,
orgCode
);
params
.
put
(
"date"
,
dateStr
);
if
(
StatisticsErrorTypeEum
.
risk
.
getCode
().
equals
(
type
)){
//1.按照日期+机构,查询出所有风险点
List
<
RiskPointRpnChangeBo
>
risks
=
view3dMapper
.
getAllErrorRiskPoint
(
params
);
//2.按照 风险等级id进行分组,加工数据
Map
<
Long
,
List
<
RiskPointRpnChangeBo
>>
map
=
risks
.
stream
().
collect
(
Collectors
.
groupingBy
(
RiskPointRpnChangeBo:
:
getRiskLevelId
));
...
...
@@ -259,19 +261,37 @@ public class View3dServiceImpl implements IView3dService {
SafetyIndexDetailVo
safetyIndexDetailVo
=
new
SafetyIndexDetailVo
();
safetyIndexDetailVo
.
setTypeCode
(
Long
.
toString
(
k
));
safetyIndexDetailVo
.
setTypeName
(
riskLevelMap
.
get
(
k
));
List
<
ErrorContentVo
>
errorContentVoList
=
new
ArrayList
<>();
BeanUtils
.
copyProperties
(
v
,
errorContentVoList
);
safetyIndexDetailVo
.
setContent
(
errorContentVoList
);
safetyIndexDetailVo
.
setContent
(
getErrorContentVos
(
v
));
resultList
.
add
(
safetyIndexDetailVo
);
});
}
else
if
(
StatisticsErrorTypeEum
.
check
.
getCode
().
equals
(
type
)){
//1.按照日期+机构,查询出异常巡检
List
<
CheckErrorBo
>
checkErrorBoList
=
view3dMapper
.
getAllErrorPatrolPoint
(
params
);
//2.按照状态进行分组,加工返回数据
Map
<
String
,
List
<
CheckErrorBo
>>
map
=
checkErrorBoList
.
stream
().
collect
(
Collectors
.
groupingBy
(
CheckErrorBo:
:
getStatus
));
map
.
forEach
((
k
,
v
)->{
SafetyIndexDetailVo
safetyIndexDetailVo
=
new
SafetyIndexDetailVo
();
safetyIndexDetailVo
.
setTypeCode
(
k
);
safetyIndexDetailVo
.
setTypeName
(
CheckStatusEnum
.
getEnum
(
k
).
getName
());
safetyIndexDetailVo
.
setContent
(
getErrorContentVos
(
v
));
resultList
.
add
(
safetyIndexDetailVo
);
});
}
else
if
(
StatisticsErrorTypeEum
.
patrol
.
getCode
().
equals
(
type
)){
}
else
if
(
StatisticsErrorTypeEum
.
equip
.
getCode
().
equals
(
type
)){
//TODO:待毛颖确认调整完成后继续
}
return
resultList
;
}
private
List
<
ErrorContentVo
>
getErrorContentVos
(
List
<?>
v
)
{
List
<
ErrorContentVo
>
errorContentVoList
=
new
ArrayList
<>();
errorContentVoList
=
v
.
stream
().
map
(
e
->{
ErrorContentVo
errorContentVo
=
new
ErrorContentVo
();
BeanUtils
.
copyProperties
(
e
,
errorContentVo
);
return
errorContentVo
;
}).
collect
(
Collectors
.
toList
());
return
errorContentVoList
;
}
private
Long
getCheckExceptionNum
(
String
orgCode
,
String
date
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"orgCode"
,
orgCode
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/util/FileHelper.java
View file @
09e4faa0
...
...
@@ -7,7 +7,6 @@ import cn.afterturn.easypoi.excel.entity.ImportParams;
import
cn.afterturn.easypoi.excel.entity.enmus.ExcelType
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.log4j.Logger
;
import
org.apache.poi.hssf.usermodel.DVConstraint
;
import
org.apache.poi.hssf.usermodel.HSSFCell
;
import
org.apache.poi.hssf.usermodel.HSSFCellStyle
;
...
...
@@ -29,6 +28,8 @@ import org.jsoup.Jsoup;
import
org.jsoup.nodes.Document
;
import
org.jsoup.nodes.Element
;
import
org.jsoup.select.Elements
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -75,7 +76,7 @@ import java.util.zip.ZipOutputStream;
*/
public
class
FileHelper
{
private
static
final
Logger
log
=
Logger
.
getLogger
(
FileHelper
.
class
);
private
static
final
Logger
log
=
Logger
Factory
.
getLogger
(
FileHelper
.
class
);
/**
* @param file
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/client/invoke/RsDataQueue.java
View file @
09e4faa0
...
...
@@ -7,7 +7,8 @@ import com.yeejoin.amos.fas.business.util.CacheMap;
import
com.yeejoin.amos.fas.business.vo.Toke
;
import
com.yeejoin.amos.fas.context.IotContext
;
import
org.apache.log4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.concurrent.BlockingQueue
;
...
...
@@ -101,7 +102,7 @@ public class RsDataQueue {
}
}
}
catch
(
Exception
e
)
{
Logger
.
getLogger
(
this
.
getClass
()).
error
(
e
.
getMessage
());
Logger
Factory
.
getLogger
(
this
.
getClass
()).
error
(
e
.
getMessage
());
e
.
printStackTrace
();
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/context/IotContext.java
View file @
09e4faa0
...
...
@@ -3,7 +3,8 @@
*/
package
com
.
yeejoin
.
amos
.
fas
.
context
;
import
org.apache.log4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.context.ApplicationContext
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
...
...
@@ -30,7 +31,7 @@ public class IotContext {
* 构造方法
*/
private
IotContext
()
{
Logger
.
getLogger
(
this
.
getClass
()).
debug
(
FasConstant
.
CONSTRUCTOR
);
Logger
Factory
.
getLogger
(
this
.
getClass
()).
debug
(
FasConstant
.
CONSTRUCTOR
);
}
/**
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/core/threadpool/AmosThreadPool.java
View file @
09e4faa0
package
com
.
yeejoin
.
amos
.
fas
.
core
.
threadpool
;
import
org.
apache.log
4j.Logger
;
import
org.
slf
4j.Logger
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
org.slf4j.LoggerFactory
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
...
...
@@ -15,8 +16,7 @@ public class AmosThreadPool {
/**
* 日志记录器
*/
private
static
final
Logger
logger
=
Logger
.
getLogger
(
AmosThreadPool
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AmosThreadPool
.
class
);
/**
* 单例
...
...
YeeAmosFireAutoSysStart/pom.xml
View file @
09e4faa0
...
...
@@ -23,15 +23,15 @@
<!-- maven打包时将lib提取到jar同目录,将配置文件提取到jar目录/config/下 -->
<build>
<!--
<build>
<resources>
<!-- 先指定 src/main/resources下所有文件及文件夹为资源文件 -->
先指定 src/main/resources下所有文件及文件夹为资源文件
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
<!-- 过滤不需要引用的文件 -->
过滤不需要引用的文件
<excludes>
<exclude>package.xml</exclude>
</excludes>
...
...
@@ -43,22 +43,22 @@
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<!-- 添加index则不从mainfest中读取classpath,而是从Index.list中读取 -->
<
!-- <index>true</index> --
>
添加index则不从mainfest中读取classpath,而是从Index.list中读取
<
index>true</index
>
<manifest>
<mainClass>com.yeejoin.amos.YeeAmosFireAutoSysStart</mainClass>
<!--
to create a class path to your dependecies you have to fill true
in this field
-->
to create a class path to your dependecies you have to fill true
in this field
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<
!--<
classpathLayoutType>custom</classpathLayoutType> <customClasspathLayout>
lib/ artifact.groupId. {artifact.artifactId}.$${artifact.extension} </customClasspathLayout>
-->
<classpathLayoutType>custom</classpathLayoutType> <customClasspathLayout>
lib/ artifact.groupId. {artifact.artifactId}.$${artifact.extension} </customClasspathLayout>
</manifest>
<manifestEntries>
<Class-Path>./</Class-Path>
</manifestEntries>
</archive>
<
!-- <excludes> <exclude>config/**</exclude> </excludes> --
>
<
excludes> <exclude>config/**</exclude> </excludes
>
<includes>
<include>**/**.class</include>
</includes>
...
...
@@ -67,7 +67,7 @@
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<!-- not append assembly id in release file name -->
not append assembly id in release file name
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/resources/package.xml</descriptor>
...
...
@@ -103,5 +103,41 @@
</plugin>
</plugins>
</build>
-->
<build>
<resources>
<!-- 先指定 src/main/resources下所有文件及文件夹为资源文件 -->
<resource>
<directory>
src/main/resources
</directory>
<includes>
<include>
**/*
</include>
</includes>
<!-- 过滤不需要引用的文件 -->
<excludes>
<exclude>
config/*
</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
1.8
</source>
<target>
1.8
</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/java/com/yeejoin/amos/YeeAmosFireAutoSysStart.java
View file @
09e4faa0
...
...
@@ -3,8 +3,9 @@ package com.yeejoin.amos;
import
java.io.IOException
;
import
java.net.URISyntaxException
;
import
org.apache.log4j.Logger
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeansException
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
...
...
@@ -55,7 +56,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
public
class
YeeAmosFireAutoSysStart
implements
ApplicationContextAware
{
private
static
final
Logger
log
=
Logger
.
getLogger
(
YeeAmosFireAutoSysStart
.
class
);
private
static
final
Logger
log
=
Logger
Factory
.
getLogger
(
YeeAmosFireAutoSysStart
.
class
);
/**
* 启动amosop-server
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-docker.properties
View file @
09e4faa0
...
...
@@ -12,7 +12,7 @@ eureka.client.healthcheck.enabled = true
eureka.client.fetchRegistry
=
true
#DB properties:
spring.datasource.url
=
jdbc:mysql://amos-mysql:3306/
91-safety-
business?serverTimezone=UTC&&useSSL=false&&allowMultiQueries=true&serverTimezone=GMT&characterEncoding=utf8
spring.datasource.url
=
jdbc:mysql://amos-mysql:3306/
yeejoin_safety_
business?serverTimezone=UTC&&useSSL=false&&allowMultiQueries=true&serverTimezone=GMT&characterEncoding=utf8
spring.datasource.username
=
root
spring.datasource.password
=
yeejoin_1234
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
...
...
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
09e4faa0
spring.application.name
=
A
mos-autosys-xkq
spring.application.name
=
A
MOS-FIREAUTOSYS
server.port
=
8083
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_view3d.xml
View file @
09e4faa0
...
...
@@ -234,4 +234,19 @@
and a.org_code = #{orgCode}
and DATE_FORMAT(b.create_date,'%Y-%m-%d') = #{date}
</select>
<select
id=
"getAllErrorPatrolPoint"
resultType=
"com.yeejoin.amos.fas.business.bo.CheckErrorBo"
>
SELECT
a.id,
b.`name`,
a.`is_ok` as status,
a.check_time as changeDate
FROM
p_check a,
p_point b
WHERE
a.`is_ok` IN ('2', '3')
AND a.point_id = b.id
and DATE_FORMAT(a.check_time,'%Y-%m-%d') = #{date}
and a.org_code = #{orgCode}
</select>
</mapper>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/log4j.properties
deleted
100644 → 0
View file @
a930110a
log4j.rootLogger
=
info, stdout, logfile
log4j.logger.io.netty
=
info
log4j.logger.org.hibernate
=
info
log4j.logger.com.mchange
=
info
log4j.logger.org.springframework
=
info
log4j.logger.com.mangofactory
=
info
log4j.logger.com.yeejoin.amos.fas.business.dao.mapper
=
debug
log4j.logger.org.apache
=
info
log4j.logger.com.zaxxer.hikari.pool
=
info
log4j.appender.stdout
=
org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout
=
org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern
=
%d %t %-5p [%c{1}:%L] %m%n
log4j.appender.logfile
=
org.apache.log4j.RollingFileAppender
log4j.appender.logfile.File
=
logs/FireAutoSystem.log
log4j.appender.logfile.MaxFileSize
=
10240KB
log4j.appender.logfile.MaxBackupIndex
=
30
log4j.appender.logfile.layout
=
org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern
=
%d %t %-5p [%c{1}:%L] %m%n
YeeAmosFireAutoSysStart/src/main/resources/logback.xml
0 → 100644
View file @
09e4faa0
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
>
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property
name=
"LOG_HOME"
value=
"log"
/>
<!-- 按照每天生成日志文件 -->
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_HOME}/fas.log.%d{yyyy-MM-dd}.log
</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>
30
</MaxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"
>
<MaxFileSize>
30mb
</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 控制台输出 -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger
name=
"com.apache.ibatis"
level=
"DEBUG"
/>
<logger
name=
"org.mybatis"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Connection"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Statement"
level=
"DEBUG"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"DEBUG"
/>
<logger
name=
"org.springframework"
level=
"DEBUG"
/>
<!-- 日志输出级别 -->
<root
level=
"DEBUG"
>
<appender-ref
ref=
"FILE"
/>
<appender-ref
ref=
"STDOUT"
/>
</root>
</configuration>
\ No newline at end of file
pom.xml
View file @
09e4faa0
...
...
@@ -27,8 +27,6 @@
<liquibase.version>
3.6.3
</liquibase.version>
<swagger.version>
2.7.0
</swagger.version>
<spring-cloud.version>
Greenwich.SR1
</spring-cloud.version>
<YeeSecurity.version>
2.1.0
</YeeSecurity.version>
<YeeOp.version>
2.0.1
</YeeOp.version>
<maven-jar-plugin.version>
3.0.0
</maven-jar-plugin.version>
</properties>
...
...
@@ -81,31 +79,6 @@
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-logging
</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<artifactId>log4j-over-slf4j</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency> -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-log4j
</artifactId>
<version>
1.3.8.RELEASE
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
...
...
@@ -158,18 +131,6 @@
<artifactId>
mapper
</artifactId>
<version>
3.0.1
</version>
</dependency>
<!-- 添加commons-lang依赖包 -->
<!-- <dependency>-->
<!-- <groupId>commons-lang</groupId>-->
<!-- <artifactId>commons-lang</artifactId>-->
<!-- <version>2.4</version>-->
<!-- <scope>compile</scope>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.commons</groupId>-->
<!-- <artifactId>commons-lang3</artifactId>-->
<!-- <version>3.3.1</version>-->
<!-- </dependency>-->
<dependency>
<groupId>
com.zaxxer
</groupId>
<artifactId>
HikariCP
</artifactId>
...
...
@@ -207,11 +168,6 @@
<artifactId>
apollo-client
</artifactId>
<version>
0.10.2
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-1.2-api
</artifactId>
<version>
2.8.2
</version>
</dependency>
<!-- 预案突发事件websocket -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment