Commit 16ef8398 authored by chenzhao's avatar chenzhao

Merge branch 'develop_dl_plan6_temp' of…

Merge branch 'develop_dl_plan6_temp' of http://39.98.45.134:8090/moa/amos-boot-biz into develop_dl_plan6_temp
parents 23a7b027 7476bc50
......@@ -137,4 +137,8 @@ public class Video extends BaseEntity {
@ApiModelProperty(value = "机构/部门名称")
@TableField(value = "biz_org_name", updateStrategy = FieldStrategy.IGNORED)
private String bizOrgName;
@ApiModelProperty(value = "视频格式")
@TableField(value = "video_type")
private String videoType;
}
......@@ -25,6 +25,8 @@ public class AlamVideoVO {
private String vedioFormat;
private String videoType;
/**
* 是否绑定设备
*/
......
......@@ -45,4 +45,7 @@ public class BuildingVideoVO {
@ApiModelProperty("视频转码")
private String vedioFormat;
@ApiModelProperty("视频类型")
private String videoType;
}
package com.yeejoin.equipmanage.common.enums;
/**
* 一天内不同时段个数
*/
public enum DayHourEnum {
hour("小时", 24),
hafHour("半小时个数", 48),
twoHour("两小时个数", 12),
fourHour("四小时个数", 6);
private String name;
private int number;
DayHourEnum(String name, int number ){
this.name = name;
this.number = number;
}
public String getName() {
return name;
}
public int getNumber() {
return number;
}
}
......@@ -473,9 +473,10 @@ public class DateUtils {
* @throws ParseException
*/
public static int dateBetweenNew(Date startDate, Date endDate) throws ParseException {
Date dateStart = dateParse(dateFormat(startDate, DATE_PATTERN), DATE_PATTERN);
Date dateEnd = dateParse(dateFormat(endDate, DATE_PATTERN), DATE_PATTERN);
return (int) ((dateEnd.getTime() - dateStart.getTime()) / 1000 / 60 / 60);
Date dateStart = dateParse(dateFormat(startDate, DATE_TIME_PATTERN), DATE_TIME_PATTERN);
Date dateEnd = dateParse(dateFormat(endDate, DATE_TIME_PATTERN), DATE_TIME_PATTERN);
double ceil = Math.ceil((dateEnd.getTime() - dateStart.getTime()) * 1.0 / 1000 / 60 / 60);
return new Double(ceil).intValue() ;
}
/**
......@@ -487,9 +488,10 @@ public class DateUtils {
* @throws ParseException
*/
public static int dateBetweenNew1(Date startDate, Date endDate) throws ParseException {
Date dateStart = dateParse(dateFormat(startDate, DATE_PATTERN), DATE_PATTERN);
Date dateEnd = dateParse(dateFormat(endDate, DATE_PATTERN), DATE_PATTERN);
return (int) ((dateEnd.getTime() - dateStart.getTime()) / 1000 / 60 / 30);
Date dateStart = dateParse(dateFormat(startDate, DATE_TIME_PATTERN), DATE_TIME_PATTERN);
Date dateEnd = dateParse(dateFormat(endDate, DATE_TIME_PATTERN), DATE_TIME_PATTERN);
double ceil = Math.ceil((dateEnd.getTime() - dateStart.getTime()) * 1.0 / 1000 / 60 / 30);
return new Double(ceil).intValue() ;
}
/**
......@@ -501,9 +503,10 @@ public class DateUtils {
* @throws ParseException
*/
public static int dateBetweenNew2(Date startDate, Date endDate) throws ParseException {
Date dateStart = dateParse(dateFormat(startDate, DATE_PATTERN), DATE_PATTERN);
Date dateEnd = dateParse(dateFormat(endDate, DATE_PATTERN), DATE_PATTERN);
return (int) ((dateEnd.getTime() - dateStart.getTime()) / 1000 / 60 / 120);
Date dateStart = dateParse(dateFormat(startDate, DATE_TIME_PATTERN), DATE_TIME_PATTERN);
Date dateEnd = dateParse(dateFormat(endDate, DATE_TIME_PATTERN), DATE_TIME_PATTERN);
double ceil = Math.ceil((dateEnd.getTime() - dateStart.getTime()) * 1.0 / 1000 / 60 / 120);
return new Double(ceil).intValue() ;
}
/**
......@@ -515,9 +518,10 @@ public class DateUtils {
* @throws ParseException
*/
public static int dateBetweenNew3(Date startDate, Date endDate) throws ParseException {
Date dateStart = dateParse(dateFormat(startDate, DATE_PATTERN), DATE_PATTERN);
Date dateEnd = dateParse(dateFormat(endDate, DATE_PATTERN), DATE_PATTERN);
return (int) ((dateEnd.getTime() - dateStart.getTime()) / 1000 / 60 / 240);
Date dateStart = dateParse(dateFormat(startDate, DATE_TIME_PATTERN), DATE_TIME_PATTERN);
Date dateEnd = dateParse(dateFormat(endDate, DATE_TIME_PATTERN), DATE_TIME_PATTERN);
double ceil = Math.ceil((dateEnd.getTime() - dateStart.getTime()) * 1.0 / 1000 / 60 / 240);
return new Double(ceil).intValue() ;
}
/**
......
......@@ -135,6 +135,7 @@ public class Check extends BasicEntity {
@Column(name="route_name")
private String routeName;
/**
* 评分
*/
......@@ -412,4 +413,38 @@ public class Check extends BasicEntity {
this.routeName = routeName;
}
@Override
public String toString() {
return "Check{" +
"address='" + address + '\'' +
", checkMode='" + checkMode + '\'' +
", checkTime=" + checkTime +
", deviceId='" + deviceId + '\'' +
", error='" + error + '\'' +
", isOk='" + isOk + '\'' +
", latitude='" + latitude + '\'' +
", longitude='" + longitude + '\'' +
", orgCode='" + orgCode + '\'' +
", planId=" + planId +
", planName='" + planName + '\'' +
", planTaskId=" + planTaskId +
", planTaskDetailId=" + planTaskDetailId +
", pointId=" + pointId +
", pointName='" + pointName + '\'' +
", remark='" + remark + '\'' +
", routeId=" + routeId +
", routeName='" + routeName + '\'' +
", score=" + score +
", shotNumber=" + shotNumber +
", uploadTime=" + uploadTime +
", userId='" + userId + '\'' +
", userName='" + userName + '\'' +
", depId='" + depId + '\'' +
", depName='" + depName + '\'' +
", errorClassify='" + errorClassify + '\'' +
", checkInput=" + checkInput +
", checkShot=" + checkShot +
'}';
}
}
\ No newline at end of file
......@@ -577,7 +577,7 @@ public class EmergencyController extends AbstractBaseController {
@PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getPressurePumpStatusChart")
@ApiOperation(httpMethod = "GET", value = "四横八纵-稳压泵启停状态图", notes = "四横八纵-稳压泵启停状态图")
@ApiOperation(httpMethod = "GET", value = "四横八纵-稳压泵启停状态图", notes = "四横八纵-稳压泵启停状态图,取舍补点")
public ResponseModel getPressurePumpStatusChart(@RequestParam String startTime, @RequestParam String endTime,
@RequestParam(required = false) String bizOrgCode) {
if(StringUtils.isEmpty(bizOrgCode)) {
......@@ -595,6 +595,25 @@ public class EmergencyController extends AbstractBaseController {
@PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getPressurePumpStatusDetailChart")
@ApiOperation(httpMethod = "GET", value = "四横八纵-稳压泵启停状态图", notes = "四横八纵-稳压泵启停状态图,分钟级补点")
public ResponseModel getPressurePumpStatusDetailChart(@RequestParam String startTime, @RequestParam String endTime,
@RequestParam(required = false) String bizOrgCode) {
if(StringUtils.isEmpty(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo();
ReginParams.PersonIdentity personIdentity = reginParams.getPersonIdentity();
if (!ValidationUtil.isEmpty(personIdentity)) {
bizOrgCode = personIdentity.getBizOrgCode();
if (bizOrgCode == null) {
return CommonResponseUtil.success(Collections.EMPTY_MAP);
}
}
}
return CommonResponseUtil.success(iEmergencyService.getPressurePumpStatusDetailChart(startTime, endTime, bizOrgCode));
}
@PersonIdentify
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getPressurePumpDiagnosticAnalysis")
@ApiOperation(httpMethod = "GET", value = "四横八纵-稳压泵诊断分析", notes = "四横八纵-稳压泵诊断分析")
public ResponseModel getPressurePumpDiagnosticAnalysis(@RequestParam(required = false) String bizOrgCode) {
......
......@@ -57,6 +57,8 @@ public interface IEmergencyService {
Map<String, Object> getPressurePumpStatusChart(String startTime, String endTime, String bizOrgCode);
Map<String, Object> getPressurePumpStatusDetailChart(String startTime, String endTime, String bizOrgCode);
List<Map<String, Object>> getPressurePumpDiagnosticAnalysis(String bizOrgCode);
Page<Map<String, Object>> alarmList(Page<Map<String, Object>> page,String bizOrgCode, List<String> types, List<String> emergencyLevels, String name, Integer cleanStatus, Integer handleStatus);
......
......@@ -178,4 +178,11 @@ public interface IPressurePumpService {
* @return
*/
List<OrgUsrDto> getOrgUsrDtoInfo(Map<String, String> map);
/**
* 获取公司顶级bizOrgCode
* @param bizOrgCode
* @return
*/
String getCompanyBizOrgCode(String bizOrgCode);
}
......@@ -770,7 +770,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
x.setLocation(x.getAddress());
}
}
x.setVedioFormat(vedioFormat);
x.setVedioFormat(x.getVideoType());
x.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode()));
});
return pages;
......@@ -1032,7 +1032,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
x.setLocation(x.getAddress());
}
}
x.setVedioFormat(vedioFormat);
x.setVedioFormat(x.getVideoType());
x.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode()));
});
return pages;
......
......@@ -139,7 +139,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
if (videoType.equals(type)) {
List<AlamVideoVO> video = videoMapper.getVideoBySpeId(Long.valueOf(equipId));
video.forEach(action -> {
action.setVedioFormat(vedioFormat);
action.setVedioFormat(action.getVideoType());
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
});
res.put("video", video);
......@@ -159,7 +159,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
videoBySpeId.forEach(action -> {
action.setVedioFormat(vedioFormat);
action.setVedioFormat(action.getVideoType());
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
});
res.put("data", specificAlarm);
......@@ -353,7 +353,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
// 设备关联的摄像头
List<AlamVideoVO> video = videoMapper.getVideoBySpeId(equipmentSpecificId);
video.forEach(action -> {
action.setVedioFormat(vedioFormat);
action.setVedioFormat(action.getVideoType());
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
});
res.put("video", video);
......
......@@ -341,7 +341,7 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
video.setName(x.getName());
video.setTokens(x.getToken());
video.setUrl(x.getUrl());
video.setVedioFormat(vedioFormat);
video.setVedioFormat(x.getVideoType());
video.setUrl(videoService.getVideoUrl(x.getName(), x.getPresetPosition(), x.getUrl(), x.getCode()));
video.setIp(x.getIp());
video.setPort(x.getPort());
......@@ -812,20 +812,13 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
// 计算平均每小时打压频率
try {
int hour = DateUtils.dateBetweenNew(DateUtils.dateParse(startTime, null),DateUtils.dateParse(endTime, null));
int hour = DateUtils.dateBetweenNew(DateUtils.dateParse(startTime, DateUtils.DATE_TIME_PATTERN),DateUtils.dateParse(endTime, DateUtils.DATE_TIME_PATTERN));
int hafHour = DateUtils.dateBetweenNew1(DateUtils.dateParse(startTime, null),DateUtils.dateParse(endTime, null));
int hafHour = DateUtils.dateBetweenNew1(DateUtils.dateParse(startTime, DateUtils.DATE_TIME_PATTERN),DateUtils.dateParse(endTime, DateUtils.DATE_TIME_PATTERN));
int twoHour = DateUtils.dateBetweenNew2(DateUtils.dateParse(startTime, null),DateUtils.dateParse(endTime, null));
int twoHour = DateUtils.dateBetweenNew2(DateUtils.dateParse(startTime, DateUtils.DATE_TIME_PATTERN),DateUtils.dateParse(endTime, DateUtils.DATE_TIME_PATTERN));
int fourHour = DateUtils.dateBetweenNew3(DateUtils.dateParse(startTime, null),DateUtils.dateParse(endTime, null));
// 开始时间与结束时间为同一天时 给默认值
if (hour == 0){
hour = DayHourEnum.hour.getNumber();
hafHour = DayHourEnum.hafHour.getNumber();
twoHour = DayHourEnum.twoHour.getNumber();
fourHour = DayHourEnum.fourHour.getNumber();
}
int fourHour = DateUtils.dateBetweenNew3(DateUtils.dateParse(startTime, DateUtils.DATE_TIME_PATTERN),DateUtils.dateParse(endTime, DateUtils.DATE_TIME_PATTERN));
if(allNum/hour > 15) {
retMap.put("status","异常");
} else {
......
......@@ -1065,7 +1065,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
if (!ObjectUtils.isEmpty(video)) {
video.setUrl(videoService.getVideoUrl(video.getName(), video.getPresetPosition(), video.getUrl(), video.getCode()));
video.setId(id);
video.setVedioFormat(vedioFormat);
video.setVedioFormat(video.getVideoType());
}
return video;
} else {
......
......@@ -58,13 +58,8 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
@Async
public void saveDataToRedis(List<IotDataVO> iotDatalist, String iotCode, String bizOrgCode) {
// 获取公司顶级bizOrgCode
Map<String, String> params = new HashMap<>();
params.put("bizOrgType", PressurePumpRelateEnum.BIZ_ORG_TYPE_COMPANY.getValue());
params.put("bizOrgCode", bizOrgCode);
List<OrgUsrDto> orgUsrDtoList = getOrgUsrDtoInfo(params);
if (CollectionUtils.isNotEmpty(orgUsrDtoList)) {
bizOrgCode = orgUsrDtoList.get(0).getBizOrgCode();
if (StringUtils.isNotBlank(bizOrgCode)) {
bizOrgCode = getCompanyBizOrgCode(bizOrgCode);
if (StringUtils.isNotBlank(bizOrgCode)) {
String pressurePumpValue = PressurePumpRelateEnum.PRESSURE_PUMP.getValue();
// 获取配置JSON信息集合
List<Map> list = getNameKeyInfoList(pressurePumpValue);
......@@ -84,6 +79,17 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
}
}
}
@Override
public String getCompanyBizOrgCode(String bizOrgCode) {
Map<String, String> params = new HashMap<>();
params.put("bizOrgType", PressurePumpRelateEnum.BIZ_ORG_TYPE_COMPANY.getValue());
params.put("bizOrgCode", bizOrgCode);
List<OrgUsrDto> orgUsrDtoList = getOrgUsrDtoInfo(params);
if (CollectionUtils.isNotEmpty(orgUsrDtoList)) {
bizOrgCode = orgUsrDtoList.get(orgUsrDtoList.size() - 1).getBizOrgCode();
}
return bizOrgCode;
}
@Override
......@@ -303,6 +309,8 @@ public class PressurePumpServiceImpl implements IPressurePumpService {
PressurePumpCountVo countVo = new PressurePumpCountVo();
countVo.setTime(time);
countVo.setValue(dataMap.get(time).size());
// 获取公司顶级bizOrgCode
bizOrgCode = getCompanyBizOrgCode(bizOrgCode);
// 获取的数据存储到redis
String topic = String.join(":", infoCode, bizOrgCode, countRedisKey, fieldKey, iotCode, time);
countVo.setIotCode(topic);
......
......@@ -58,7 +58,7 @@ public class SupervisionVideoServiceImpl extends ServiceImpl<SupervisionVideoMap
public List<AlamVideoVO> queryVideoList(String bizOrgCode) {
List<AlamVideoVO> list = supervisionVideoMapper.getVideoByCompany(bizOrgCode);
list.forEach(action -> {
action.setVedioFormat(vedioFormat);
action.setVedioFormat(action.getVideoType());
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
});
return list;
......
......@@ -163,19 +163,6 @@ public class CheckController extends AbstractBaseController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "保存巡检记录<font color='blue'>手机app</font>", notes = "保存巡检记录<font color='blue'>手机app</font>")
@RequestMapping(value = "/saveRecordNew", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
......@@ -188,6 +175,10 @@ public class CheckController extends AbstractBaseController {
int statu = -1;
PlanTask planTask =null;
if(requestParam.getPlanTaskId()!=null && requestParam.getPlanTaskId() !=0){
Map<String, Object> map = checkService.selectCheckById(requestParam.getPlanTaskId());
if (!ObjectUtils.isEmpty(map)) {
checkService.delCheckByTaskId(requestParam.getPlanTaskId(), Long.valueOf((String) map.get("id")));
}
planTask = planTaskService.selectPlanTaskStatus(requestParam.getPlanTaskId());
}
AgencyUserModel user = getUserInfo();
......
......@@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.patrol.dao.entity.Check;
import org.apache.ibatis.annotations.Param;
import com.yeejoin.amos.patrol.business.entity.mybatis.CheckDetailBo;
......@@ -282,4 +283,10 @@ public interface CheckMapper extends BaseMapper {
//Map<String, String> queryUserInfoByIds(@Param(value = "userIds") String userIds);
int delCheckByTaskId(@Param(value = "taskId") Long taskId);
int delCheckInputByCheckId(@Param(value = "checkId") Long checkId);
Map<String, Object> selectCheckById(@Param(value = "taskId") Long taskId);
}
......@@ -27,6 +27,8 @@ import com.yeejoin.amos.patrol.dao.entity.Plan;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.assertj.core.util.Sets;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cglib.beans.BeanMap;
......@@ -155,6 +157,8 @@ public class CheckServiceImpl implements ICheckService {
@Autowired
private CheckInputMapper checkInputMapper;
public static final Logger log = LoggerFactory.getLogger(CheckServiceImpl.class);
@Override
public Page<CheckInfoVo> getCheckInfo(String toke,String product,String appKey,CheckInfoPageParam param) {
long total = checkMapper.getCheckInfoCount(param);
......@@ -606,6 +610,7 @@ public class CheckServiceImpl implements ICheckService {
}
// check = checkDao.save(check);
try {
log.error("手机app保存巡检记录++++++++++++++++++++++" + check.toString() + "<Over><Over><Over><Over>");
check = checkDao.save(check);
} catch (Exception e) {
e.printStackTrace();
......@@ -733,6 +738,17 @@ public class CheckServiceImpl implements ICheckService {
checkDao.deleteBatch(list);
}
@Override
public Map<String, Object> selectCheckById(Long id) {
return checkMapper.selectCheckById(id);
}
@Override
public void delCheckByTaskId(Long id, Long checkId) {
checkMapper.delCheckByTaskId(id);
checkMapper.delCheckInputByCheckId(checkId);
}
private CheckInput paraseText(CheckInput checkInput, String json, CheckInputParam item, String isScore) {
JSONObject jsonObject = JSONObject.parseObject(json);
String checkType = jsonObject.getString("CheckType");
......
......@@ -52,8 +52,13 @@ public interface ICheckService {
* @param ids
*/
@Transactional(rollbackFor = {YeeException.class, Exception.class})
void delCheckById(List<Long> ids);
void delCheckByTaskId(Long id, Long checkId);
Map<String, Object> selectCheckById(Long id);
/**
* 获取检查结果中所有不合格检查项
*
......
......@@ -741,4 +741,16 @@
</sql>
</changeSet>
<changeSet author="litengwei" id="20230303-12322-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="wl_video" columnName="video_type"/>
</not>
</preConditions>
<comment>新增属性字段 video_type</comment>
<sql>
alter table `wl_video` add column `video_type` varchar(100) DEFAULT 'flv' COMMENT '视频格式: 1.flv,2.rtsp,3.hls,4.other';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -193,7 +193,7 @@
<select id="selectOilDrainage" resultType="java.util.Map">
SELECT
wes.id,
'1' as type ,
'1' as type,
(SELECT wei.emergency_level FROM wl_equipment_index wei LEFT JOIN wl_equipment_specific_index wesi on wei.id = wesi.equipment_index_id
WHERE wesi.equipment_specific_id = wes.id AND wesi.equipment_index_key = wes.realtime_iot_index_key) as level,
wes.equipment_code as code ,
......
......@@ -168,6 +168,7 @@
`name`,
token,
`code`,
video_type as videoType,
preset_position
FROM wl_video wlv
LEFT JOIN wl_video_equipment_specific wlves ON wlv.id = wlves.video_id
......
......@@ -64,8 +64,9 @@
biz_org_type = #{bizOrgType}
</if>
<if test="bizOrgCode != null and bizOrgCode != ''">
AND locate( #{bizOrgCode}, biz_org_code ) > 0
AND locate( biz_org_code, #{bizOrgCode} ) > 0
</if>
</where>
ORDER BY sequence_nbr
</select>
</mapper>
......@@ -9,6 +9,7 @@
wv.name as name,
wv.url,
wv.code,
wv.video_type as videoType,
wv.preset_position as presetPosition
from wl_supervision_video wsv left join wl_video wv on wsv.camera_id = wv.id
where wsv.biz_org_code like concat(#{bizOrgCode},'%');
......
......@@ -99,6 +99,7 @@
v.name AS name,
v.token AS token,
v.url AS url,
v.video_type as videoType,
v.code AS code,
v.address,
v.preset_position as presetPosition
......@@ -175,6 +176,7 @@
vid.name as name,
vid.url,
vid.code,
vid.video_type as videoType,
vid.preset_position as presetPosition,
vid.name
from wl_video_equipment_specific as ves
......@@ -187,6 +189,7 @@
v.`code`,
v.url,
v.token,
v.video_type as videoType,
CONCAT_WS(' ', ws.full_name, v.address) AS address,
v.img,
v.preset_position as presetPosition,
......@@ -367,6 +370,7 @@
v.name AS name,
v.token AS token,
v.url AS url,
v.video_type AS videoType,
v.code AS code,
v.address,
v.preset_position as presetPosition
......@@ -418,6 +422,7 @@
v.id AS id,
v.name AS name,
v.token AS token,
v.video_type AS videoType,
v.url AS url,
v.code AS code,
v.address,
......
......@@ -17,6 +17,7 @@ import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
......@@ -53,9 +54,8 @@ public class AmosJcsApplication {
String port = env.getProperty("server.port");
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
GlobalExceptionHandler.setAlwaysOk(true);
logger.info("\n----------------------------------------------------------\n\t"
+ "Application Amos-Biz-Boot is running! Access URLs:\n\t" + "Swagger文档: \thttp://" + ip + ":" + port
+ path + "/doc.html\n" + "----------------------------------------------------------");
String logs=String.format("%n----------------------------------------------------------%n Application Amos-Biz-Boot is running! Access URLs:%n Swagger文档: http:// %c : %c %c /doc.html%n----------------------------------------------------------",ip,port,path);
logger.info( logs);
}
/**
......@@ -71,12 +71,18 @@ public class AmosJcsApplication {
RedisTemplate redisTemplate = context.getBean("redisTemplate", RedisTemplate.class);
RedisConnection redisConnection = null;
try {
redisConnection = redisTemplate.getConnectionFactory().getConnection();
redisConnection.flushAll();
RedisConnectionFactory redisConnectionFactory=redisTemplate.getConnectionFactory();
if(redisConnectionFactory!=null){
redisConnection = redisConnectionFactory.getConnection();
redisConnection.flushAll();
}
} catch (Exception e) {
logger.info("删除redis 缓存的key 失败");
} finally {
redisConnection.close();
if(redisConnection!=null){
redisConnection.close();
}
}
}
......
......@@ -2159,4 +2159,23 @@
d.date
</select>
<select id="delCheckByTaskId" resultType="int">
DELETE FROM
p_check pc
WHERE pc.plan_task_id = #{taskId}
</select>
<select id="delCheckInputByCheckId" resultType="int">
DELETE FROM
p_check_input pci
WHERE pci.check_id = #{checkId}
</select>
<select id="selectCheckById" resultType="java.util.HashMap">
SELECT *
FROM
p_check pc
WHERE pc.plan_task_id = #{taskId}
</select>
</mapper>
\ No newline at end of file
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