|
@@ -1,7 +1,14 @@
|
|
|
package vip.xiaonuo.biz.modular.passenger.service.impl;
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import vip.xiaonuo.biz.modular.passenger.entity.*;
|
|
|
+import vip.xiaonuo.biz.modular.passenger.enums.PassengerStatisticsEnum;
|
|
|
+import vip.xiaonuo.biz.modular.passenger.param.PassengerStatisticsParam;
|
|
|
import vip.xiaonuo.biz.modular.passenger.service.PassengerStatisticsService;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
@Service
|
|
|
/**
|
|
|
* 旅客统计分析Service接口实现类
|
|
@@ -11,4 +18,105 @@ import vip.xiaonuo.biz.modular.passenger.service.PassengerStatisticsService;
|
|
|
**/
|
|
|
public class PassengerStatisticsServiceImpl implements PassengerStatisticsService {
|
|
|
|
|
|
+ @Override
|
|
|
+ public Object queryChart(PassengerStatisticsParam param) {
|
|
|
+ Integer type = param.getType();
|
|
|
+ if (PassengerStatisticsEnum.OFFSHORE_TOURISTS.getValue().equals(type)){
|
|
|
+ OffshoreTourists offshoreTourists = OffshoreTourists.builder()
|
|
|
+ .totalTourists(100092L)
|
|
|
+ .mlTourists(33743L)
|
|
|
+ .fhTourists(12778L)
|
|
|
+ .baTourists(18744L)
|
|
|
+ .xhTourists(5277L)
|
|
|
+ .xyTourists(18050L)
|
|
|
+ .bsTourists(11500L)
|
|
|
+ .build();
|
|
|
+ return offshoreTourists;
|
|
|
+ }else if (PassengerStatisticsEnum.DAY_TOURISTS.getValue().equals(type)){
|
|
|
+ List<TimeAndTourists> list = new ArrayList<>();
|
|
|
+ list.add(TimeAndTourists.builder().time("1").number(2923L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("2").number(2581L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("3").number(2029L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("4").number(3977L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("5").number(4119L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("6").number(4165L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("7").number(3874L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("8").number(4212L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("9").number(3825L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("10").number(4023L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("11").number(3970L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("12").number(4065L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("13").number(4776L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("14").number(5659L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("15").number(5921L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("16").number(4017L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("17").number(3869L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("18").number(4114L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("19").number(3823L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("20").number(4062L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("21").number(3968L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("22").number(4016L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("23").number(3915L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("24").number(3773L).build());
|
|
|
+ return list;
|
|
|
+ }else if (PassengerStatisticsEnum.MONTH_TOURISTS.getValue().equals(type)){
|
|
|
+ List<TimeAndTourists> list = new ArrayList<>();
|
|
|
+ list.add(TimeAndTourists.builder().time("1").number(16234L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("2").number(17546L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("3").number(19876L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("4").number(15632L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("5").number(18459L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("6").number(17021L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("7").number(20123L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("8").number(21098L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("9").number(14987L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("10").number(13201L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("11").number(19765L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("12").number(16354L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("13").number(15987L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("14").number(16745L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("15").number(18231L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("16").number(14876L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("17").number(19324L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("18").number(17658L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("19").number(13492L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("20").number(20567L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("21").number(12879L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("22").number(19123L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("23").number(16045L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("24").number(18765L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("25").number(15321L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("26").number(17984L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("27").number(14678L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("28").number(19543L).build());
|
|
|
+ list.add(TimeAndTourists.builder().time("29").number(16457L).build());
|
|
|
+ return list;
|
|
|
+ }else if (PassengerStatisticsEnum.PASSING_RATE.getValue().equals(type)){
|
|
|
+ return ResultsAndTourists.builder().success("95.5%").failure("4.5%").build();
|
|
|
+ }else if (PassengerStatisticsEnum.INSPECTION_TIME.getValue().equals(type)){
|
|
|
+ InspectionTime inspectionTime = InspectionTime.builder()
|
|
|
+ .mlInspectionTime(15)
|
|
|
+ .fhInspectionTime(19)
|
|
|
+ .baInspectionTime(14)
|
|
|
+ .xhInspectionTime(17)
|
|
|
+ .xyInspectionTime(13)
|
|
|
+ .bsInspectionTime(18)
|
|
|
+ .build();
|
|
|
+ return inspectionTime;
|
|
|
+ }else if (PassengerStatisticsEnum.INTERCEPTION_SUCCESS_RATE.getValue().equals(type)){
|
|
|
+ return ResultsAndTourists.builder().success("98.4%").failure("1.6%").build();
|
|
|
+ }else if (PassengerStatisticsEnum.RISK_TRENDS.getValue().equals(type)){
|
|
|
+ RiskTrends riskTrends = RiskTrends.builder()
|
|
|
+ .haveContraband("34%")
|
|
|
+ .falseDeclaration("30.9%")
|
|
|
+ .identityError("20.2%")
|
|
|
+ .RefusalOfEntry("5.4%")
|
|
|
+ .barredFromLeaving("3.1%")
|
|
|
+ .criminalRecord("1.3%")
|
|
|
+ .suspiciousBehavior("5.1%")
|
|
|
+ .build();
|
|
|
+ return riskTrends;
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|