diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/NoticeRemindSoundController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/NoticeRemindSoundController.java index 8c844e332..267cf98a7 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/NoticeRemindSoundController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/NoticeRemindSoundController.java @@ -21,11 +21,11 @@ import java.util.List; import java.util.Map; - /** +/** * @Title: Controller * @Description: 通知提示音 * @author: pds - * @date: 2021-11-08 + * @date: 2021-11-08 * @version: V1.0 */ @RestController @@ -33,93 +33,111 @@ import java.util.Map; @Slf4j @Api(tags = "通知提示音") public class NoticeRemindSoundController { - @Autowired - private INoticeRemindSoundService noticeRemindSoundService; + @Autowired + private INoticeRemindSoundService noticeRemindSoundService; - /** - * 分页列表查询 - * @return - */ - @ApiOperation(value = "列表查询通知提示音信息", notes = "列表查询通知提示音信息", httpMethod="POST") - @ApiImplicitParams({ - @ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"), - }) - @PostMapping(value = "/list") - public Result> selectList(@RequestBody Map map) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.lambda().eq(NoticeRemindSound::getProjectSn, MapUtils.getString(map,"projectSn")); - List list = noticeRemindSoundService.list(queryWrapper); - return Result.success(list); - } + /** + * 分页列表查询 + * + * @return + */ + @ApiOperation(value = "列表查询通知提示音信息", notes = "列表查询通知提示音信息", httpMethod = "POST") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"), + }) + @PostMapping(value = "/list") + public Result> selectList(@RequestBody Map map) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(NoticeRemindSound::getProjectSn, MapUtils.getString(map, "projectSn")); + List list = noticeRemindSoundService.list(queryWrapper); + return Result.success(list); + } - /** - * 添加 - * @param noticeRemindSound - * @return - */ - @ApiOperation(value = "添加通知提示音信息", notes = "添加通知提示音信息", httpMethod = "POST") - @PostMapping(value = "/add") - public Result add(@RequestBody NoticeRemindSound noticeRemindSound) { + /** + * 添加 + * + * @param noticeRemindSound + * @return + */ + @ApiOperation(value = "添加通知提示音信息", notes = "添加通知提示音信息", httpMethod = "POST") + @PostMapping(value = "/add") + public Result add(@RequestBody NoticeRemindSound noticeRemindSound) { noticeRemindSoundService.saveNoticeRemindSound(noticeRemindSound); - return Result.ok(); - } + return Result.ok(); + } - /** - * 编辑 - * @param noticeRemindSound - * @return - */ - @ApiOperation(value = "编辑通知提示音信息", notes = "编辑通知提示音信息" , httpMethod="POST") - @PostMapping(value = "/edit") - public Result edit(@RequestBody NoticeRemindSound noticeRemindSound) { + /** + * 编辑 + * + * @param noticeRemindSound + * @return + */ + @ApiOperation(value = "编辑通知提示音信息", notes = "编辑通知提示音信息", httpMethod = "POST") + @PostMapping(value = "/edit") + public Result edit(@RequestBody NoticeRemindSound noticeRemindSound) { noticeRemindSoundService.editNoticeRemindSound(noticeRemindSound); return Result.ok(); - } + } - /** - * 通过id删除 - * @param id - * @return - */ - @ApiOperation(value = "删除通知提示音信息", notes = "删除通知提示音信息", httpMethod = "POST") - @ApiImplicitParam(name = "id", value = "通知提示音ID", paramType = "body", required = true, dataType = "Integer") - @PostMapping(value = "/delete") - public Result delete(@RequestBody Map map) { - Result result = new Result(); - NoticeRemindSound noticeRemindSound = noticeRemindSoundService.getById(MapUtils.getString(map,"id")); - if(noticeRemindSound==null) { + /** + * 通过id删除 + * + * @return + */ + @ApiOperation(value = "删除通知提示音信息", notes = "删除通知提示音信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "通知提示音ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/delete") + public Result delete(@RequestBody Map map) { + Result result = new Result(); + NoticeRemindSound noticeRemindSound = noticeRemindSoundService.getById(MapUtils.getString(map, "id")); + if (noticeRemindSound == null) { result.error500(MessageUtil.get("notFindErr")); - }else { - boolean ok = noticeRemindSoundService.removeById(MapUtils.getString(map,"id")); - if(ok) { + } else { + boolean ok = noticeRemindSoundService.removeById(MapUtils.getString(map, "id")); + if (ok) { result.successMsg(MessageUtil.get("deleteSucess")); - } - } + } + } + return result; + } - return result; - } - - - /** - * 通过id查询 - * @param - * @return - */ - @ApiOperation(value = "通过id查询通知提示音信息", notes = "通过id查询通知提示音信息", httpMethod = "POST") - @ApiImplicitParam(name = "id", value = "通知提示音ID", paramType = "body", required = true, dataType = "Integer") - @PostMapping(value = "/queryById") - public Result queryById(@RequestBody Map map) { - Result result = new Result(); - NoticeRemindSound noticeRemindSound = noticeRemindSoundService.getById(MapUtils.getString(map,"id")); - if(noticeRemindSound==null) { + /** + * 通过id查询 + * + * @param + * @return + */ + @ApiOperation(value = "通过id查询通知提示音信息", notes = "通过id查询通知提示音信息", httpMethod = "POST") + @ApiImplicitParam(name = "id", value = "通知提示音ID", paramType = "body", required = true, dataType = "Integer") + @PostMapping(value = "/queryById") + public Result queryById(@RequestBody Map map) { + Result result = new Result(); + NoticeRemindSound noticeRemindSound = noticeRemindSoundService.getById(MapUtils.getString(map, "id")); + if (noticeRemindSound == null) { result.error500(MessageUtil.get("notFindErr")); - }else { - result.setResult(noticeRemindSound); - result.setSuccess(true); - } - return result; - } - + } else { + result.setResult(noticeRemindSound); + result.setSuccess(true); + } + return result; + } + @ApiOperation(value = "保存通知提示音信息", notes = "保存通知提示音信息", httpMethod = "POST") + @PostMapping(value = "/saveSound") + public Result saveSound(@RequestBody NoticeRemindSound noticeRemindSound) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda() + .eq(NoticeRemindSound::getProjectSn, noticeRemindSound.getProjectSn()) + .eq(NoticeRemindSound::getRiskLevel, noticeRemindSound.getRiskLevel()) + .eq(NoticeRemindSound::getType, noticeRemindSound.getType()); + NoticeRemindSound soundDb = noticeRemindSoundService.getOne(queryWrapper); + if (soundDb == null) { + noticeRemindSoundService.save(noticeRemindSound); + } else { + noticeRemindSound.setId(soundDb.getId()); + noticeRemindSoundService.updateById(noticeRemindSound); + } + return Result.success(noticeRemindSound); + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/Notice.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/Notice.java index 22fce1e2f..82597c7a2 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/Notice.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/Notice.java @@ -28,7 +28,7 @@ public class Notice implements Serializable { @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "消息通知") private java.lang.Long id; - @ApiModelProperty(value = "类型,1考勤提醒,2人员报警,3车辆,4混凝土监测,5卸料平台,6配电箱,7扬尘,8视频,9标养室,10安全检查,11质量检查,12塔吊,13升降机," + + @ApiModelProperty(value = "类型,1考勤提醒,2人员报警,3车辆,4混凝土监测,5卸料平台,6配电箱,7扬尘,8AI视频,9标养室,10安全检查,11质量检查,12塔吊,13升降机," + "14电表,15水表,16访客,17,防疫人员通知,18访客通知,19巡检点,20人员的资质证书即将到期,21人员的合同信息即将到期,22人员的保险信息即将到期," + "23同步人员到海康isc,24同步车辆到海康isc,25同步组织到海康isc 30工作流审批通知,31大屏的安全和质量,32大屏的危大,33应急处置,34车辆不安全行为识别监测") private java.lang.String type; diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/NoticeRemindSound.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/NoticeRemindSound.java index 840f5a942..1c71aee88 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/NoticeRemindSound.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/entity/NoticeRemindSound.java @@ -1,51 +1,73 @@ package com.zhgd.xmgl.modules.basicdata.entity; -import java.io.Serializable; - import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; -import lombok.Data; -import org.jeecgframework.poi.excel.annotation.Excel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + /** * @Description: 通知提示音 * @author: pds - * @date: 2021-11-08 + * @date: 2021-11-08 * @version: V1.0 */ @Data @TableName("notice_remind_sound") -@ApiModel(value="NoticeRemindSound实体类",description="NoticeRemindSound") +@ApiModel(value = "NoticeRemindSound实体类", description = "NoticeRemindSound") public class NoticeRemindSound implements Serializable { private static final long serialVersionUID = 1L; - - /**id*/ - @TableId(type = IdType.ASSIGN_ID) - @ApiModelProperty(value="id") - private Long id ; - /**项目sn*/ - @Excel(name = "项目sn", width = 15) - @ApiModelProperty(value="项目sn") - private String projectSn ; - /**类型,1考勤提醒,2人员报警,3车辆,4混凝土监测,5卸料平台,6配电箱,7扬尘,8视频,9标养室,10安全检查,11质量检查,12塔吊,13升降机,14电表,15水表,16访客*/ - @Excel(name = "类型,1考勤提醒,2人员报警,3车辆,4混凝土监测,5卸料平台,6配电箱,7扬尘,8视频,9标养室,10安全检查,11质量检查,12塔吊,13升降机,14电表,15水表,16访客", width = 15) - @ApiModelProperty(value="类型,1考勤提醒,2人员报警,3车辆,4混凝土监测,5卸料平台,6配电箱,7扬尘,8视频,9标养室,10安全检查,11质量检查,12塔吊,13升降机,14电表,15水表,16访客") - private Integer type ; - /**文件名称*/ - @Excel(name = "文件名称", width = 15) - @ApiModelProperty(value="文件名称") - private String fileName ; - /**文件路径*/ - @Excel(name = "文件路径", width = 15) - @ApiModelProperty(value="文件路径") - private String fileUrl ; - /**播放类型,1播放一次,2循环播放*/ - @Excel(name = "播放类型,1播放一次,2循环播放", width = 15) - @ApiModelProperty(value="播放类型,1播放一次,2循环播放") - private Integer playType ; + /** + * id + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "id") + private Long id; + /** + * 项目sn + */ + @ApiModelProperty(value = "项目sn") + private String projectSn; + /** + * 类型,1考勤提醒,2人员报警,3车辆,4混凝土监测,5卸料平台,6配电箱,7扬尘,8AI视频,9标养室,10安全检查,11质量检查,12塔吊,13升降机,14电表,15水表,16访客 + */ + @ApiModelProperty(value = "类型,1考勤提醒,2人员报警,3车辆,4混凝土监测,5卸料平台,6配电箱,7扬尘,8AI视频,9标养室,10安全检查,11质量检查,12塔吊,13升降机,14电表,15水表,16访客") + private Integer type; + /** + * 文件名称 + */ + @ApiModelProperty(value = "文件名称") + private String fileName; + /** + * 文件路径 + */ + @ApiModelProperty(value = "文件路径") + private String fileUrl; + + /** + * 播放类型,1播放一次,2循环播放 + */ + @ApiModelProperty(value = "播放类型,1播放一次,2循环播放") + private Integer playType; + /** + * 播放次数 + */ + @ApiModelProperty(value = "播放次数") + private Integer playNum; + /** + * 是否开启1开启0不开启 + */ + @ApiModelProperty(value = "是否开启1开启0不开启") + private Integer enable; + + /** + * 风险等级:1、2、3、4级 + */ + @ApiModelProperty(value = "风险等级:1、2、3、4级") + private Integer riskLevel; + } diff --git a/src/main/java/com/zhgd/xmgl/modules/project/entity/MessageConfigV2.java b/src/main/java/com/zhgd/xmgl/modules/project/entity/MessageConfigV2.java index 92907a28b..b5e1a62e8 100644 --- a/src/main/java/com/zhgd/xmgl/modules/project/entity/MessageConfigV2.java +++ b/src/main/java/com/zhgd/xmgl/modules/project/entity/MessageConfigV2.java @@ -113,5 +113,20 @@ public class MessageConfigV2 implements Serializable { */ @ApiModelProperty(value = "腾讯云登录短信模板id") private java.lang.String loginTemplateId; + /** + * 腾讯云扬尘短信模板 + */ + @ApiModelProperty(value = "腾讯云扬尘短信模板") + private java.lang.String dustTemplate; + /** + * 腾讯云AI报警短信模板 + */ + @ApiModelProperty(value = "腾讯云AI报警短信模板") + private java.lang.String aiTemplate; + /** + * 腾讯云登录短信模板 + */ + @ApiModelProperty(value = "腾讯云登录短信模板") + private java.lang.String loginTemplate; } diff --git a/src/main/java/com/zhgd/xmgl/modules/video/entity/bo/AiAnalyseHardWareAlarmRecordNoticeBo.java b/src/main/java/com/zhgd/xmgl/modules/video/entity/bo/AiAnalyseHardWareAlarmRecordNoticeBo.java new file mode 100644 index 000000000..e166b28df --- /dev/null +++ b/src/main/java/com/zhgd/xmgl/modules/video/entity/bo/AiAnalyseHardWareAlarmRecordNoticeBo.java @@ -0,0 +1,13 @@ +package com.zhgd.xmgl.modules.video.entity.bo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class AiAnalyseHardWareAlarmRecordNoticeBo { + /** + * 问题等级,1一级,2二级,3三级,4四级 + */ + @ApiModelProperty(value = "问题等级,1一级,2二级,3三级,4四级") + private Integer level; +} diff --git a/src/main/java/com/zhgd/xmgl/modules/video/service/impl/AiAnalyseHardWareAlarmRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/video/service/impl/AiAnalyseHardWareAlarmRecordServiceImpl.java index 2d24a0584..6a6a7879f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/video/service/impl/AiAnalyseHardWareAlarmRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/video/service/impl/AiAnalyseHardWareAlarmRecordServiceImpl.java @@ -5,10 +5,8 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.DateUtil; import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.StrUtil; -import cn.hutool.http.HttpRequest; import cn.xuyanwu.spring.file.storage.FileInfo; import cn.xuyanwu.spring.file.storage.FileStorageService; -import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -17,7 +15,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.zhgd.jeecg.common.api.vo.Result; +import com.gexin.fastjson.JSON; import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.xmgl.async.AsyncAiAnalyse; import com.zhgd.xmgl.base.entity.vo.SectorOneVo; @@ -43,6 +41,7 @@ import com.zhgd.xmgl.modules.project.service.ProjectJqmDevService; import com.zhgd.xmgl.modules.video.entity.AiAnalyseHardWareAlarmRecord; import com.zhgd.xmgl.modules.video.entity.AiAnalyseHardWareRecord; import com.zhgd.xmgl.modules.video.entity.WorkerInfoToAiAnalyseHardWareAlarmRecord; +import com.zhgd.xmgl.modules.video.entity.bo.AiAnalyseHardWareAlarmRecordNoticeBo; import com.zhgd.xmgl.modules.video.entity.vo.AiAnalyseHardWareAlarmTotalVo; import com.zhgd.xmgl.modules.video.entity.vo.AiAnalyseHardWareAlarmTrendVo; import com.zhgd.xmgl.modules.video.enums.AiAnalyseHardWareAlarmRecordHandleResultEnum; @@ -74,7 +73,6 @@ import javax.annotation.Resource; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.*; -import java.util.concurrent.CompletableFuture; import java.util.function.Function; import java.util.stream.Collectors; @@ -534,17 +532,8 @@ public class AiAnalyseHardWareAlarmRecordServiceImpl extends ServiceImpl() - .eq(XzAiDeductRule::getProjectSn, projectSn) - .eq(XzAiDeductRule::getDictionaryItemId, dict.getId()) - ); - if (rule == null) { - return; - } + XzAiDeductRule rule = getAiDeductRuleByProjectSnAndAlarmType(projectSn, alarmRecord.getAlarmType()); + if (rule == null) return; //扣分 Double deductScore = rule.getDeductScore(); if (deductScore == null || deductScore == 0) { @@ -576,9 +565,10 @@ public class AiAnalyseHardWareAlarmRecordServiceImpl extends ServiceImpl noticeUserIds = aiAnalyseHardWareRecordService.getUserIdsByAiAnalyseHardId(alarmRecord.getHardwareId()); for (String noticeUserId : noticeUserIds) { - noticeService.addUserNotice(Long.valueOf(noticeUserId), "Al违章扣分通知", vo.getDeductReason(), "8"); + noticeService.addUserNotice(Long.valueOf(noticeUserId), "Al违章扣分通知", vo.getDeductReason(), "8", payload); } } } catch (Exception e) { @@ -588,6 +578,24 @@ public class AiAnalyseHardWareAlarmRecordServiceImpl extends ServiceImpl() + .eq(XzAiDeductRule::getProjectSn, projectSn) + .eq(XzAiDeductRule::getDictionaryItemId, dict.getId()) + ); + } + @Override public List violatorListSort(Map map) { return baseMapper.violatorListSort(map); @@ -643,21 +651,41 @@ public class AiAnalyseHardWareAlarmRecordServiceImpl extends ServiceImpl noticeUserIds = aiAnalyseHardWareRecordService.getUserIdsByAiAnalyseHardId(record.getHardwareId()); for (String noticeUserId : noticeUserIds) { - noticeService.addUserNotice(Long.valueOf(noticeUserId), "AI预警通知", "您有一条AI预警数据需要处置,请及时查看。", "8"); + noticeService.addUserNotice(Long.valueOf(noticeUserId), "AI预警通知", "您有一条AI预警数据需要处置,请及时查看。", "8", payload); } } } + /** + * 获取推送Ai报警通知的载荷(用来判断是否发出声音) + * + * @param record + * @return + */ + private String getNoticePayLoad(AiAnalyseHardWareAlarmRecord record) { + XzAiDeductRule rule = getAiDeductRuleByProjectSnAndAlarmType(record.getProjectSn(), record.getAlarmType()); + String payload = null; + if (rule != null) { + AiAnalyseHardWareAlarmRecordNoticeBo bo = new AiAnalyseHardWareAlarmRecordNoticeBo(); + bo.setLevel(rule.getLevel()); + payload = JSON.toJSONString(bo); + } + return payload; + } + @Override public void falsePositiveDeletion(Long id) { AiAnalyseHardWareAlarmRecord record = baseMapper.selectById(id); diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/entity/XzAiDeductRule.java b/src/main/java/com/zhgd/xmgl/modules/xz/entity/XzAiDeductRule.java index 5452e3cc8..d90a74265 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/entity/XzAiDeductRule.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/entity/XzAiDeductRule.java @@ -1,18 +1,14 @@ package com.zhgd.xmgl.modules.xz.entity; -import java.io.Serializable; -import java.util.Date; - import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import com.fasterxml.jackson.annotation.JsonFormat; -import org.springframework.format.annotation.DateTimeFormat; -import org.jeecgframework.poi.excel.annotation.Excel; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; /** * @Description: 星纵-AI扣分规则 @@ -35,19 +31,16 @@ public class XzAiDeductRule implements Serializable { /** * 所属项目SN */ - @Excel(name = "所属项目SN", width = 15) @ApiModelProperty(value = "所属项目SN") private java.lang.String projectSn; /** * AI预警类型id */ - @Excel(name = "AI预警类型id", width = 15) @ApiModelProperty(value = "AI预警类型id") private java.lang.Long dictionaryItemId; /** * 扣分分值 */ - @Excel(name = "扣分分值", width = 15) @ApiModelProperty(value = "扣分分值") private java.lang.Double deductScore; /** @@ -60,7 +53,33 @@ public class XzAiDeductRule implements Serializable { */ @ApiModelProperty(value = "更新时间") private java.util.Date updateDate; + /** + * 整改要求 + */ + @ApiModelProperty(value = "整改要求") + private String remark; + /** + * 问题描述 + */ + @ApiModelProperty(value = "问题描述") + private String dangerItemContent; + /** + * 问题子项ID + */ + @ApiModelProperty(value = "问题子项ID") + private Long dangerItemId; + /** + * 问题所属大项ID + */ + @ApiModelProperty(value = "问题所属大项ID") + private Long dangerTypeId; + + /** + * 问题等级,1一级,2二级,3三级,4四级 + */ + @ApiModelProperty(value = "问题等级,1一级,2二级,3三级,4四级") + private Integer level; @TableField(exist = false) private String data; } diff --git a/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java b/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java index 434cdfb34..e1d03b8c7 100644 --- a/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java +++ b/src/main/java/com/zhgd/xmgl/security/WebSecurityConfig.java @@ -1,7 +1,6 @@ package com.zhgd.xmgl.security; import com.zhgd.xmgl.util.EnvironmentUtil; -import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; @@ -16,7 +15,6 @@ import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.http.SessionCreationPolicy; -import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; @@ -80,6 +78,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { http.authorizeRequests() //请求路径允许访问 + .antMatchers("/xmgl/appVersion/list").permitAll() .antMatchers("/xmgl/carMeasureSpeedData/add").permitAll() .antMatchers("/xmgl/callBack/icc/subscribeCall").permitAll() .antMatchers("/xmgl/hat/httpAlarmServer").permitAll()