瀏覽代碼

修改预警弹窗下发通知接口

tags/v1.2.0^2
chengwang 1 年之前
父節點
當前提交
49c6169e11
共有 3 個檔案被更改,包括 18 行新增3 行删除
  1. +9
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/AccidentNoticeService.java
  2. +2
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/TimeAxisService.java
  3. +7
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/accident/AccidentTimeAxisVo.java

+ 9
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/AccidentNoticeService.java 查看文件

@@ -44,8 +44,10 @@ public class AccidentNoticeService {
*/
public JsonResult notice() {
//当前登录用户
String tenantId = CurrentUserUtil.getTenantId();
String userId = CurrentUserUtil.getUserId();
// String tenantId = CurrentUserUtil.getTenantId();
// String userId = CurrentUserUtil.getUserId();
String userId = "e1df76387f28b93a523c97a3e0cf27f9";
String tenantId = "0";
if(StringUtils.isEmpty(userId)){
throw new ServiceException("当前用户id为空");
}
@@ -83,7 +85,11 @@ public class AccidentNoticeService {
}
List<String> accidentIdList = oldList.stream().map(o -> o.getId()).collect(Collectors.toList());
newList = accidentMapper.selectList(Wrappers.<Accident>lambdaQuery()
.notIn(Accident::getId, accidentIdList));
.notIn(Accident::getId, accidentIdList)
.eq(Accident::getTenantId, tenantId)
.eq(Accident::getStatus, AccidentStatusEnum.UNTREATED.getCode())
.eq(Accident::getFlag, FlagEnum.INSPECTION_ACCIDENT.getCode())
.eq(Accident::getMark, MarkEnum.VALID.getCode()));

//对应list集合排序
newList = newList.stream().sorted(Comparator.comparing(Accident::getCreateTime)).collect(Collectors.toList());

+ 2
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/TimeAxisService.java 查看文件

@@ -80,6 +80,8 @@ public class TimeAxisService {
if(accident.getReportTime() != null){
vo.setReportTime(accident.getReportTime());
}
//忽略时间

//无事故时间
if(accident.getNoAccidentTime() != null){
vo.setNoAccidentTime(accident.getNoAccidentTime());

+ 7
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/accident/AccidentTimeAxisVo.java 查看文件

@@ -33,6 +33,13 @@ public class AccidentTimeAxisVo {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date verificationTime;

/**
* 忽略时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date ignoreTime;

/**
* 上报时间
*/

Loading…
取消
儲存