|
@ -1,27 +1,17 @@ |
|
|
package com.zc.business.service.impl; |
|
|
package com.zc.business.service.impl; |
|
|
|
|
|
|
|
|
import cn.hutool.core.io.unit.DataUnit; |
|
|
|
|
|
import cn.hutool.core.lang.hash.Hash; |
|
|
|
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
import com.zc.business.domain.DcEventType; |
|
|
import com.zc.business.domain.DcEventType; |
|
|
import com.zc.business.domain.DcWarning; |
|
|
import com.zc.business.domain.DcWarning; |
|
|
import com.zc.business.mapper.DcPerceivedEventsWarningMapper; |
|
|
import com.zc.business.mapper.DcPerceivedEventsWarningMapper; |
|
|
import com.zc.business.service.IDCPerceivedEventsWarningService; |
|
|
import com.zc.business.service.IDCPerceivedEventsWarningService; |
|
|
import lombok.val; |
|
|
|
|
|
import org.checkerframework.framework.qual.FromByteCode; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.ArrayList; |
|
|
import java.util.Calendar; |
|
|
|
|
|
import java.util.Comparator; |
|
|
|
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
|
import java.util.HashMap; |
|
|
import java.util.HashMap; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Map; |
|
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
import java.util.stream.Stream; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @author 王思祥 |
|
|
* @author 王思祥 |
|
@ -217,40 +207,8 @@ public class DcPerceivedEventsWarningServiceImpl implements IDCPerceivedEventsWa |
|
|
} |
|
|
} |
|
|
return numList; |
|
|
return numList; |
|
|
} |
|
|
} |
|
|
// @Override
|
|
|
|
|
|
// public List<HashMap<String, Object>> selectSectionMark(DcWarning dcWarning) {
|
|
|
|
|
|
// List<HashMap<String, Object>> mapList = perceivedEventsWarningMapper.selectSectionMark(dcWarning);
|
|
|
|
|
|
//
|
|
|
|
|
|
// List<HashMap<String, Object>> result = new ArrayList<>();
|
|
|
|
|
|
// for (HashMap<String, Object> list : mapList) {
|
|
|
|
|
|
// String stakeMarkId = list.get("stakeMark").toString();
|
|
|
|
|
|
// dcWarning.setStakeMark(stakeMarkId);
|
|
|
|
|
|
// switch (dcWarning.getType()) {
|
|
|
|
|
|
// case "day":
|
|
|
|
|
|
// result.add(addSectionNumber( stakeMarkId, perceivedEventsWarningMapper.selectWarningMarkDay(dcWarning)));
|
|
|
|
|
|
// break;
|
|
|
|
|
|
// case "month":
|
|
|
|
|
|
// result.add(addSectionNumber( stakeMarkId, perceivedEventsWarningMapper.selectWarningMarkMonth(dcWarning)));
|
|
|
|
|
|
// break;
|
|
|
|
|
|
// case "quarter":
|
|
|
|
|
|
// result.add(addSectionNumber( stakeMarkId, perceivedEventsWarningMapper.selectWarningMarkQuarter(dcWarning)));
|
|
|
|
|
|
// break;
|
|
|
|
|
|
// case "year":
|
|
|
|
|
|
// result.add(addSectionNumber( stakeMarkId, perceivedEventsWarningMapper.selectWarningMarkYear(dcWarning)));
|
|
|
|
|
|
// break;
|
|
|
|
|
|
// default:
|
|
|
|
|
|
// result.add(addSectionNumber(stakeMarkId, ""));
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
// return result;
|
|
|
|
|
|
// }
|
|
|
|
|
|
//
|
|
|
|
|
|
// private HashMap<String, Object> addSectionNumber( String stakeMarkId, Object sectionNumber) {
|
|
|
|
|
|
// HashMap<String, Object> mapNum = new HashMap<>();
|
|
|
|
|
|
// mapNum.put("stakeMarkId", stakeMarkId);
|
|
|
|
|
|
// mapNum.put("sectionNumber", sectionNumber);
|
|
|
|
|
|
// return mapNum;
|
|
|
|
|
|
// }
|
|
|
|
|
|
//预警事件,事件列表 查询状态为上报的感知事件
|
|
|
//预警事件,事件列表 查询状态为上报的感知事件
|
|
|
@Override |
|
|
@Override |
|
|
public List<HashMap<String, Object>> selectWarningEscalation(DcWarning dcWarning) { |
|
|
public List<HashMap<String, Object>> selectWarningEscalation(DcWarning dcWarning) { |
|
|