|
@ -1,18 +1,22 @@ |
|
|
package com.zc.business.service.impl; |
|
|
package com.zc.business.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.ruoyi.common.constant.HttpStatus; |
|
|
import com.ruoyi.common.constant.HttpStatus; |
|
|
import com.ruoyi.common.exception.ServiceException; |
|
|
import com.ruoyi.common.exception.ServiceException; |
|
|
import com.ruoyi.common.utils.PageUtils; |
|
|
import com.ruoyi.common.utils.PageUtils; |
|
|
import com.zc.business.domain.DcNoStakeWarningTable; |
|
|
import com.zc.business.domain.DcNoStakeWarningTable; |
|
|
|
|
|
import com.zc.business.enums.UniversalEnum; |
|
|
import com.zc.business.mapper.DcNoStakeWarningTableMapper; |
|
|
import com.zc.business.mapper.DcNoStakeWarningTableMapper; |
|
|
import com.zc.business.service.IDcNoStakeWarningTableService; |
|
|
import com.zc.business.service.IDcNoStakeWarningTableService; |
|
|
|
|
|
import com.zc.business.utils.WeatherTrafficProposeUtil; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Objects; |
|
|
import java.util.Objects; |
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 无桩号预警Service业务层处理 |
|
|
* 无桩号预警Service业务层处理 |
|
@ -98,9 +102,27 @@ public class DcNoStakeWarningTableServiceImpl extends ServiceImpl<DcNoStakeWarni |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<DcNoStakeWarningTable> pageDcNoStakeWarningTable(DcNoStakeWarningTable dcNoStakeWarningTable, Date endTime, Date startTime) { |
|
|
public List<DcNoStakeWarningTable> pageDcNoStakeWarningTable(DcNoStakeWarningTable dcNoStakeWarningTable, Date endTime, Date startTime) { |
|
|
// 分页
|
|
|
// 启动分页
|
|
|
PageUtils.startPage(); |
|
|
PageUtils.startPage(); |
|
|
return list(noStakeWarningTableQueryWrapper(dcNoStakeWarningTable,endTime,startTime)); |
|
|
|
|
|
|
|
|
// 获取分页后的数据
|
|
|
|
|
|
List<DcNoStakeWarningTable> resultList = list(noStakeWarningTableQueryWrapper(dcNoStakeWarningTable, endTime, startTime)); |
|
|
|
|
|
|
|
|
|
|
|
// 处理数据
|
|
|
|
|
|
resultList.forEach(warningTable -> { |
|
|
|
|
|
if ("2".equals(warningTable.getWarningType())) { |
|
|
|
|
|
JSONObject otherConfig = JSONObject.parseObject(warningTable.getOtherConfig()); |
|
|
|
|
|
String earlyWorningSignal = otherConfig.getString("earlyWorningSignal"); |
|
|
|
|
|
String[] split = earlyWorningSignal.split(UniversalEnum.YJ_STRING.getValue()); |
|
|
|
|
|
String content = WeatherTrafficProposeUtil.content( |
|
|
|
|
|
Integer.parseInt(split[UniversalEnum.ONE.getNumber()]), |
|
|
|
|
|
split[UniversalEnum.ZERO.getNumber()] |
|
|
|
|
|
); |
|
|
|
|
|
warningTable.setWarningDescription(warningTable.getWarningDescription() + "\n" + content); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return resultList; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|