|
|
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
public class ZbmxJcpgyjServiceImpl implements IZbmxJcpgyjService {
|
|
|
@@ -129,7 +130,7 @@ public class ZbmxJcpgyjServiceImpl implements IZbmxJcpgyjService {
|
|
|
ZbmxZbjczDTO hbfx = zbmxJcpgyjMapper.SelectHBFX(page.getXzqdm(), page.getZbbh(), jcsj);
|
|
|
//监测值(目标对比)
|
|
|
String timejczmbdb = "";
|
|
|
- if (page.getYear() == null || page.getYear() == "") {
|
|
|
+ if (page.getYear() == null || Objects.equals(page.getYear(), "")) {
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
timejczmbdb = Integer.toString(cal.get(Calendar.YEAR));
|
|
|
} else {
|
|
|
@@ -240,7 +241,8 @@ public class ZbmxJcpgyjServiceImpl implements IZbmxJcpgyjService {
|
|
|
List<ZbmxJcpgyjDTO> jcz = zbmxJcpgyjMapper.SelectJCZ(newidsList, page.getXzqdm(), page.getYear());
|
|
|
//规划值
|
|
|
List<ZbmxJcpgyjDTO> ghz = zbmxJcpgyjMapper.SelectGHZ(newidsList, page.getXzqdm());
|
|
|
-
|
|
|
+ // 城市监测用地特殊处理, 101006 城市监测用地bsm
|
|
|
+ String symbol = "101006".equals(page.getTxbsm()) ? "<" : ">=";
|
|
|
for (ZbmxJcpgyjViewDTO item : dataZB) {
|
|
|
|
|
|
ZbmxJcpgyjDTO b = GetJcpgyjClass(jcz, item.getZbbh());
|
|
|
@@ -257,9 +259,13 @@ public class ZbmxJcpgyjServiceImpl implements IZbmxJcpgyjService {
|
|
|
if (c != null) {
|
|
|
item.setGhmbz(new KeyValuePair().init(c.key, c.value != null ? c.value.toString() + c.dw : null));
|
|
|
}
|
|
|
-
|
|
|
- item.setStatus(GHSSHelper.RarlyWarning(b.value == null ? 0 : b.value, c.value == null ? 0 : c.value, ">="));
|
|
|
-
|
|
|
+ String status = GHSSHelper.RarlyWarning(b.value == null ? 0 : b.value, c.value == null ? 0 : c.value, symbol);
|
|
|
+ item.setStatus(status);
|
|
|
+ }
|
|
|
+ String status = page.getStatus();
|
|
|
+ if (status != null && !(status = status.trim()).isEmpty()) {
|
|
|
+ String flag = "0".equals(status) ? "预警" : "正常";
|
|
|
+ return dataZB.stream().filter(item -> flag.equals(item.getStatus())).collect(Collectors.toList());
|
|
|
}
|
|
|
return dataZB;
|
|
|
} catch (Exception e) {
|