|
@@ -1686,7 +1686,7 @@ public class DataFaced {
|
|
|
boatWarningService.saveBatch(boatWarningList);
|
|
|
}
|
|
|
|
|
|
- private void generateCxWarning(DataReq data, WarningType warningType, String name)
|
|
|
+ public void generateCxWarning(DataReq data, WarningType warningType, String name)
|
|
|
throws ParseException {
|
|
|
List<BoatWarningCxDict> cxDictList = boatWarningCxDictService.list();
|
|
|
log.warn("超限列表为:"+cxDictList);
|
|
@@ -1702,8 +1702,8 @@ public class DataFaced {
|
|
|
&& !Objects.isNull(boatInfo.getLength())
|
|
|
&& !Objects.isNull(boatInfo.getWidth())
|
|
|
&& !Objects.isNull(bayonetName)) {
|
|
|
- if (boatInfo.getLength().compareTo(new BigDecimal(cxDict.getCcLimit())) > 0
|
|
|
- || boatInfo.getWidth().compareTo(new BigDecimal(cxDict.getCkLimit())) > 0) {
|
|
|
+ if (boatInfo.getLength().compareTo(cxDict.getCcLimit()) > 0
|
|
|
+ || boatInfo.getWidth().compareTo(cxDict.getCkLimit()) > 0) {
|
|
|
generateBoatWarning(warningType, data, "超限。");
|
|
|
}
|
|
|
}
|
|
@@ -1715,23 +1715,6 @@ public class DataFaced {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void generateCzWarning(DataReq data, WarningType warningType, String name)
|
|
|
- throws ParseException {
|
|
|
- List<BoatWarningCxDict> cxDictList = boatWarningCxDictService.list();
|
|
|
- if (org.springframework.util.StringUtils.hasLength(name)) {
|
|
|
- ShipIdentificationVo vo = boatWarningCxDictService.selectPageDataByName(name).get(0);
|
|
|
- for (BoatWarningCxDict cxDict : cxDictList) {
|
|
|
- if (!Objects.isNull(vo) && cxDict.getName().equals(vo.getBayonetName()) && !Objects.isNull(
|
|
|
- vo.getLength())
|
|
|
- && !Objects.isNull(vo.getWidth())) {
|
|
|
- if (vo.getLength() > cxDict.getCcLimit() || vo.getWidth() > cxDict.getCkLimit()) {
|
|
|
- generateBoatWarning(warningType, data, "超限。");
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
private void generateKeyTrackWarning(DataReq data, WarningType warningType, String name)
|
|
|
throws ParseException {
|
|
|
List<KeyTrackShipRealtime> keyTrackShipRealtimeList = keyTrackShipRealtimeService.list(
|