Commit 09e4faa0 authored by 单奇雲's avatar 单奇雲

Merge branch 'dev_upgrade' of http://172.16.10.76/station/YeeAmosFireAutoSysRoot into dev_upgrade

parents a930110a 65b1a423
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;
}
}
...@@ -12,7 +12,7 @@ public enum StatisticsErrorTypeEum { ...@@ -12,7 +12,7 @@ public enum StatisticsErrorTypeEum {
/** /**
* 巡检异常 * 巡检异常
*/ */
patrol("patrol", "巡检异常"), check("check", "巡检异常"),
/** /**
* 设备故障 * 设备故障
*/ */
......
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;
}
}
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
*/ */
package com.yeejoin.amos.fas.business.constants; 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 { ...@@ -14,7 +15,7 @@ public class FasConstant {
* 构造方法 * 构造方法
*/ */
private FasConstant() { private FasConstant() {
Logger.getLogger(this.getClass()).debug(FasConstant.CONSTRUCTOR); LoggerFactory.getLogger(this.getClass()).debug(FasConstant.CONSTRUCTOR);
} }
/** /**
......
...@@ -103,9 +103,9 @@ public class View3dController extends BaseController { ...@@ -103,9 +103,9 @@ public class View3dController extends BaseController {
return CommonResponseUtil.success(view3dService.getSafetyIndexInfoByDate(orgCode,date)); return CommonResponseUtil.success(view3dService.getSafetyIndexInfoByDate(orgCode,date));
} }
@ApiOperation(value = "今日安全指数详情",notes = "risk-风险异常,check-巡检异常,equipProblem-设备故障") @ApiOperation(value = "今日安全指数详情",notes = "今日安全指数详情")
@GetMapping(value = "/safetyIndex/detail/{type}") @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(); ReginParams reginParams =getSelectedOrgInfo();
String orgCode = this.getOrgCode(reginParams); String orgCode = this.getOrgCode(reginParams);
return CommonResponseUtil.success(view3dService.getSafetyIndexDetail(type,orgCode)); return CommonResponseUtil.success(view3dService.getSafetyIndexDetail(type,orgCode));
......
...@@ -5,7 +5,8 @@ package com.yeejoin.amos.fas.business.dao; ...@@ -5,7 +5,8 @@ package com.yeejoin.amos.fas.business.dao;
import java.util.List; import java.util.List;
import org.apache.log4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** /**
* hql助手类 * hql助手类
...@@ -19,7 +20,7 @@ public class DaoHelper { ...@@ -19,7 +20,7 @@ public class DaoHelper {
* 构造方法 * 构造方法
*/ */
private DaoHelper() { private DaoHelper() {
Logger.getLogger(this.getClass()).debug("constructor"); LoggerFactory.getLogger(this.getClass()).debug("constructor");
} }
/** /**
......
...@@ -4,6 +4,7 @@ import java.util.HashMap; ...@@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; 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.business.bo.RiskPointRpnChangeBo;
import com.yeejoin.amos.fas.dao.entity.RiskSource; import com.yeejoin.amos.fas.dao.entity.RiskSource;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -56,4 +57,11 @@ public interface View3dMapper extends BaseMapper{ ...@@ -56,4 +57,11 @@ public interface View3dMapper extends BaseMapper{
*/ */
HashMap<String, Object> getSafetyIndexWeek(String orgCode); HashMap<String, Object> getSafetyIndexWeek(String orgCode);
/**
* 今日安全指数详情
* @param params orgCode,date
* @return list
*/
List<CheckErrorBo> getAllErrorPatrolPoint(Map<String, Object> params);
} }
...@@ -14,6 +14,7 @@ import java.util.*; ...@@ -14,6 +14,7 @@ import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.yeejoin.amos.fas.business.bo.BindPointBo; 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.bo.RiskPointRpnChangeBo;
import com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper; import com.yeejoin.amos.fas.business.dao.mapper.PatrolMapper;
import com.yeejoin.amos.fas.business.dao.repository.*; import com.yeejoin.amos.fas.business.dao.repository.*;
...@@ -21,6 +22,7 @@ import com.yeejoin.amos.fas.business.service.intfc.IView3dService; ...@@ -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.ErrorContentVo;
import com.yeejoin.amos.fas.business.vo.SafetyIndexDetailVo; import com.yeejoin.amos.fas.business.vo.SafetyIndexDetailVo;
import com.yeejoin.amos.fas.business.vo.TodaySafetyIndexVo; 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.RpnChangeTypeEum;
import com.yeejoin.amos.fas.common.enums.StatisticsErrorTypeEum; import com.yeejoin.amos.fas.common.enums.StatisticsErrorTypeEum;
import com.yeejoin.amos.fas.core.common.request.DateUtil; import com.yeejoin.amos.fas.core.common.request.DateUtil;
...@@ -245,11 +247,11 @@ public class View3dServiceImpl implements IView3dService { ...@@ -245,11 +247,11 @@ public class View3dServiceImpl implements IView3dService {
public List<SafetyIndexDetailVo> getSafetyIndexDetail(String type,String orgCode) { public List<SafetyIndexDetailVo> getSafetyIndexDetail(String type,String orgCode) {
List<SafetyIndexDetailVo> resultList = Lists.newArrayList(); List<SafetyIndexDetailVo> resultList = Lists.newArrayList();
String dateStr = DateUtil.getDateFormat(new Date(),DateUtil.DATE_DEFAULT_FORMAT); String dateStr = DateUtil.getDateFormat(new Date(),DateUtil.DATE_DEFAULT_FORMAT);
Map<String,Object> params = new HashMap<>();
params.put("orgCode",orgCode);
params.put("date",dateStr);
if(StatisticsErrorTypeEum.risk.getCode().equals(type)){ if(StatisticsErrorTypeEum.risk.getCode().equals(type)){
//1.按照日期+机构,查询出所有风险点 //1.按照日期+机构,查询出所有风险点
Map<String,Object> params = new HashMap<>();
params.put("orgCode",orgCode);
params.put("date",dateStr);
List<RiskPointRpnChangeBo> risks = view3dMapper.getAllErrorRiskPoint(params); List<RiskPointRpnChangeBo> risks = view3dMapper.getAllErrorRiskPoint(params);
//2.按照 风险等级id进行分组,加工数据 //2.按照 风险等级id进行分组,加工数据
Map<Long,List<RiskPointRpnChangeBo>> map = risks.stream().collect(Collectors.groupingBy(RiskPointRpnChangeBo::getRiskLevelId)); Map<Long,List<RiskPointRpnChangeBo>> map = risks.stream().collect(Collectors.groupingBy(RiskPointRpnChangeBo::getRiskLevelId));
...@@ -259,19 +261,37 @@ public class View3dServiceImpl implements IView3dService { ...@@ -259,19 +261,37 @@ public class View3dServiceImpl implements IView3dService {
SafetyIndexDetailVo safetyIndexDetailVo = new SafetyIndexDetailVo(); SafetyIndexDetailVo safetyIndexDetailVo = new SafetyIndexDetailVo();
safetyIndexDetailVo.setTypeCode(Long.toString(k)); safetyIndexDetailVo.setTypeCode(Long.toString(k));
safetyIndexDetailVo.setTypeName(riskLevelMap.get(k)); safetyIndexDetailVo.setTypeName(riskLevelMap.get(k));
List<ErrorContentVo> errorContentVoList = new ArrayList<>(); safetyIndexDetailVo.setContent(getErrorContentVos(v));
BeanUtils.copyProperties(v,errorContentVoList); resultList.add(safetyIndexDetailVo);
safetyIndexDetailVo.setContent(errorContentVoList); });
} 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); resultList.add(safetyIndexDetailVo);
}); });
} else if(StatisticsErrorTypeEum.patrol.getCode().equals(type)){
} else if(StatisticsErrorTypeEum.equip.getCode().equals(type)){ } else if(StatisticsErrorTypeEum.equip.getCode().equals(type)){
//TODO:待毛颖确认调整完成后继续
} }
return resultList; 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) { private Long getCheckExceptionNum(String orgCode, String date) {
Map<String,Object> params = new HashMap<>(); Map<String,Object> params = new HashMap<>();
params.put("orgCode", orgCode); params.put("orgCode", orgCode);
......
...@@ -7,7 +7,6 @@ import cn.afterturn.easypoi.excel.entity.ImportParams; ...@@ -7,7 +7,6 @@ import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import com.yeejoin.amos.fas.exception.YeeException; import com.yeejoin.amos.fas.exception.YeeException;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.log4j.Logger;
import org.apache.poi.hssf.usermodel.DVConstraint; import org.apache.poi.hssf.usermodel.DVConstraint;
import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.hssf.usermodel.HSSFCellStyle;
...@@ -29,6 +28,8 @@ import org.jsoup.Jsoup; ...@@ -29,6 +28,8 @@ import org.jsoup.Jsoup;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
import org.jsoup.select.Elements; import org.jsoup.select.Elements;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -75,7 +76,7 @@ import java.util.zip.ZipOutputStream; ...@@ -75,7 +76,7 @@ import java.util.zip.ZipOutputStream;
*/ */
public class FileHelper { public class FileHelper {
private static final Logger log = Logger.getLogger(FileHelper.class); private static final Logger log = LoggerFactory.getLogger(FileHelper.class);
/** /**
* @param file * @param file
......
...@@ -7,7 +7,8 @@ import com.yeejoin.amos.fas.business.util.CacheMap; ...@@ -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.business.vo.Toke;
import com.yeejoin.amos.fas.context.IotContext; 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 org.springframework.beans.factory.annotation.Autowired;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
...@@ -101,7 +102,7 @@ public class RsDataQueue { ...@@ -101,7 +102,7 @@ public class RsDataQueue {
} }
} }
} catch (Exception e) { } catch (Exception e) {
Logger.getLogger(this.getClass()).error(e.getMessage()); LoggerFactory.getLogger(this.getClass()).error(e.getMessage());
e.printStackTrace(); e.printStackTrace();
} }
} }
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
*/ */
package com.yeejoin.amos.fas.context; 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 org.springframework.context.ApplicationContext;
import com.yeejoin.amos.fas.business.constants.FasConstant; import com.yeejoin.amos.fas.business.constants.FasConstant;
...@@ -30,7 +31,7 @@ public class IotContext { ...@@ -30,7 +31,7 @@ public class IotContext {
* 构造方法 * 构造方法
*/ */
private IotContext() { private IotContext() {
Logger.getLogger(this.getClass()).debug(FasConstant.CONSTRUCTOR); LoggerFactory.getLogger(this.getClass()).debug(FasConstant.CONSTRUCTOR);
} }
/** /**
......
package com.yeejoin.amos.fas.core.threadpool; package com.yeejoin.amos.fas.core.threadpool;
import org.apache.log4j.Logger; import org.slf4j.Logger;
import com.yeejoin.amos.fas.business.constants.FasConstant; import com.yeejoin.amos.fas.business.constants.FasConstant;
import org.slf4j.LoggerFactory;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
...@@ -15,8 +16,7 @@ public class AmosThreadPool { ...@@ -15,8 +16,7 @@ public class AmosThreadPool {
/** /**
* 日志记录器 * 日志记录器
*/ */
private static final Logger logger = Logger private static final Logger logger = LoggerFactory.getLogger(AmosThreadPool.class);
.getLogger(AmosThreadPool.class);
/** /**
* 单例 * 单例
......
...@@ -23,15 +23,15 @@ ...@@ -23,15 +23,15 @@
<!-- maven打包时将lib提取到jar同目录,将配置文件提取到jar目录/config/下 --> <!-- maven打包时将lib提取到jar同目录,将配置文件提取到jar目录/config/下 -->
<build> <!-- <build>
<resources> <resources>
<!-- 先指定 src/main/resources下所有文件及文件夹为资源文件 --> 先指定 src/main/resources下所有文件及文件夹为资源文件
<resource> <resource>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<includes> <includes>
<include>**/*</include> <include>**/*</include>
</includes> </includes>
<!-- 过滤不需要引用的文件 --> 过滤不需要引用的文件
<excludes> <excludes>
<exclude>package.xml</exclude> <exclude>package.xml</exclude>
</excludes> </excludes>
...@@ -43,22 +43,22 @@ ...@@ -43,22 +43,22 @@
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<configuration> <configuration>
<archive> <archive>
<!-- 添加index则不从mainfest中读取classpath,而是从Index.list中读取 --> 添加index则不从mainfest中读取classpath,而是从Index.list中读取
<!-- <index>true</index> --> <index>true</index>
<manifest> <manifest>
<mainClass>com.yeejoin.amos.YeeAmosFireAutoSysStart</mainClass> <mainClass>com.yeejoin.amos.YeeAmosFireAutoSysStart</mainClass>
<!-- to create a class path to your dependecies you have to fill true to create a class path to your dependecies you have to fill true
in this field --> in this field
<addClasspath>true</addClasspath> <addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix> <classpathPrefix>lib/</classpathPrefix>
<!--<classpathLayoutType>custom</classpathLayoutType> <customClasspathLayout> <classpathLayoutType>custom</classpathLayoutType> <customClasspathLayout>
lib/ artifact.groupId. {artifact.artifactId}.$${artifact.extension} </customClasspathLayout> --> lib/ artifact.groupId. {artifact.artifactId}.$${artifact.extension} </customClasspathLayout>
</manifest> </manifest>
<manifestEntries> <manifestEntries>
<Class-Path>./</Class-Path> <Class-Path>./</Class-Path>
</manifestEntries> </manifestEntries>
</archive> </archive>
<!-- <excludes> <exclude>config/**</exclude> </excludes> --> <excludes> <exclude>config/**</exclude> </excludes>
<includes> <includes>
<include>**/**.class</include> <include>**/**.class</include>
</includes> </includes>
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<configuration> <configuration>
<!-- not append assembly id in release file name --> not append assembly id in release file name
<appendAssemblyId>false</appendAssemblyId> <appendAssemblyId>false</appendAssemblyId>
<descriptors> <descriptors>
<descriptor>src/main/resources/package.xml</descriptor> <descriptor>src/main/resources/package.xml</descriptor>
...@@ -103,5 +103,41 @@ ...@@ -103,5 +103,41 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </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> </project>
\ No newline at end of file
...@@ -3,8 +3,9 @@ package com.yeejoin.amos; ...@@ -3,8 +3,9 @@ package com.yeejoin.amos;
import java.io.IOException; import java.io.IOException;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import org.apache.log4j.Logger;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
...@@ -55,7 +56,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -55,7 +56,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
public class YeeAmosFireAutoSysStart implements ApplicationContextAware public class YeeAmosFireAutoSysStart implements ApplicationContextAware
{ {
private static final Logger log = Logger.getLogger(YeeAmosFireAutoSysStart.class); private static final Logger log = LoggerFactory.getLogger(YeeAmosFireAutoSysStart.class);
/** /**
* 启动amosop-server * 启动amosop-server
......
...@@ -12,7 +12,7 @@ eureka.client.healthcheck.enabled = true ...@@ -12,7 +12,7 @@ eureka.client.healthcheck.enabled = true
eureka.client.fetchRegistry = true eureka.client.fetchRegistry = true
#DB properties: #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.username=root
spring.datasource.password=yeejoin_1234 spring.datasource.password=yeejoin_1234
spring.datasource.driver-class-name = com.mysql.jdbc.Driver spring.datasource.driver-class-name = com.mysql.jdbc.Driver
......
spring.application.name = Amos-autosys-xkq spring.application.name = AMOS-FIREAUTOSYS
server.port = 8083 server.port = 8083
......
...@@ -234,4 +234,19 @@ ...@@ -234,4 +234,19 @@
and a.org_code = #{orgCode} and a.org_code = #{orgCode}
and DATE_FORMAT(b.create_date,'%Y-%m-%d') = #{date} and DATE_FORMAT(b.create_date,'%Y-%m-%d') = #{date}
</select> </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> </mapper>
\ No newline at end of file
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
<?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
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
<liquibase.version>3.6.3</liquibase.version> <liquibase.version>3.6.3</liquibase.version>
<swagger.version>2.7.0</swagger.version> <swagger.version>2.7.0</swagger.version>
<spring-cloud.version>Greenwich.SR1</spring-cloud.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> <maven-jar-plugin.version>3.0.0</maven-jar-plugin.version>
</properties> </properties>
...@@ -81,31 +79,6 @@ ...@@ -81,31 +79,6 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId> <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>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
...@@ -158,18 +131,6 @@ ...@@ -158,18 +131,6 @@
<artifactId>mapper</artifactId> <artifactId>mapper</artifactId>
<version>3.0.1</version> <version>3.0.1</version>
</dependency> </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> <dependency>
<groupId>com.zaxxer</groupId> <groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId> <artifactId>HikariCP</artifactId>
...@@ -207,11 +168,6 @@ ...@@ -207,11 +168,6 @@
<artifactId>apollo-client</artifactId> <artifactId>apollo-client</artifactId>
<version>0.10.2</version> <version>0.10.2</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<version>2.8.2</version>
</dependency>
<!-- 预案突发事件websocket --> <!-- 预案突发事件websocket -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment