JobService.java 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. package com.nokia.finance.tasks.service;
  2. import com.nokia.finance.tasks.common.R;
  3. import com.nokia.finance.tasks.jobs.car.CarReportJob;
  4. import com.nokia.finance.tasks.jobs.car.chengben.CarBaoXianJob;
  5. import com.nokia.finance.tasks.jobs.car.chengben.CarDaWeiXiuJob;
  6. import com.nokia.finance.tasks.jobs.car.chengben.CarFuWuFeiJob;
  7. import com.nokia.finance.tasks.jobs.car.chengben.CarLuQiaoJob;
  8. import com.nokia.finance.tasks.jobs.car.chengben.CarNianJianFeiJob;
  9. import com.nokia.finance.tasks.jobs.car.chengben.CarQiTaJob;
  10. import com.nokia.finance.tasks.jobs.car.chengben.CarRanYouJob;
  11. import com.nokia.finance.tasks.jobs.car.chengben.CarSiCheGongYongJob;
  12. import com.nokia.finance.tasks.jobs.car.chengben.CarWeiXiuJob;
  13. import com.nokia.finance.tasks.jobs.car.cxdp.CarCxdpJob;
  14. import com.nokia.finance.tasks.jobs.car.ruixing.CarBaoFeiJob;
  15. import com.nokia.finance.tasks.jobs.car.ruixing.CarBaseDataDayJob;
  16. import com.nokia.finance.tasks.jobs.car.ruixing.CarLiChengDayJob;
  17. import com.nokia.finance.tasks.jobs.car.ruixing.CarLiChengMonthJob;
  18. import com.nokia.finance.tasks.jobs.car.ruixing.CarWuDanYongCheJob;
  19. import com.nokia.finance.tasks.jobs.car.ruixing.CarYongCheJob;
  20. import com.nokia.finance.tasks.jobs.car.ruixing.CarYueJieJob;
  21. import com.nokia.finance.tasks.jobs.car.shujucangku.CarFeeBsJob;
  22. import com.nokia.finance.tasks.jobs.car.shujucangku.CarFeeHbJob;
  23. import com.nokia.finance.tasks.jobs.car.strategy.CarHighFuelConsumptionJob;
  24. import com.nokia.finance.tasks.jobs.car.strategy.CarHighRepairJob;
  25. import com.nokia.finance.tasks.jobs.car.strategy.CarInefficiencyPercentJob;
  26. import com.nokia.finance.tasks.jobs.car.strategy.CarInefficiencyQxJob;
  27. import com.nokia.finance.tasks.jobs.car.strategy.CarRentalRepairJob;
  28. import com.nokia.finance.tasks.jobs.car.strategy.CarViolationUnprocessedJob;
  29. import com.nokia.finance.tasks.jobs.car.strategy.CarWdyjJob;
  30. import com.nokia.finance.tasks.jobs.house.HouseReportJob;
  31. import com.nokia.finance.tasks.jobs.house.chengben.HouseBuildingRepairMonthJob;
  32. import com.nokia.finance.tasks.jobs.house.chengben.HouseRentInRepairMonthJob;
  33. import com.nokia.finance.tasks.jobs.house.fcdp.HouseBuildingAreaStatJob;
  34. import com.nokia.finance.tasks.jobs.house.fcdp.HouseBuildingLandCountJob;
  35. import com.nokia.finance.tasks.jobs.house.fcdp.HouseRentalIncomeJob;
  36. import com.nokia.finance.tasks.jobs.house.strategy.HouseBuildingIdleStrategyJob;
  37. import com.nokia.finance.tasks.pojo.dto.RunJobDto;
  38. import lombok.RequiredArgsConstructor;
  39. import lombok.extern.slf4j.Slf4j;
  40. import org.springframework.stereotype.Service;
  41. @Slf4j
  42. @RequiredArgsConstructor
  43. @Service
  44. public class JobService {
  45. private final CarBaseDataDayJob carBaseDataDayJob;
  46. private final CarYueJieJob carYueJieJob;
  47. private final CarBaoFeiJob carBaoFeiJob;
  48. private final CarLiChengMonthJob carLiChengMonthJob;
  49. private final CarWuDanYongCheJob carWuDanYongCheJob;
  50. private final CarYongCheJob carYongCheJob;
  51. private final CarRanYouJob carRanYouJob;
  52. private final CarDaWeiXiuJob carDaWeiXiuJob;
  53. private final CarWeiXiuJob carWeiXiuJob;
  54. private final CarLuQiaoJob carLuQiaoJob;
  55. private final CarBaoXianJob carBaoXianJob;
  56. private final CarNianJianFeiJob carNianJianFeiJob;
  57. private final CarQiTaJob carQiTaJob;
  58. private final CarFeeHbJob carFeeHbJob;
  59. private final CarFeeBsJob carFeeBsJob;
  60. private final HouseBuildingRepairMonthJob houseBuildingRepairMonthJob;
  61. private final CarLiChengDayJob carLiChengDayJob;
  62. private final CarSiCheGongYongJob carSiCheGongYongJob;
  63. private final CarFuWuFeiJob carFuWuFeiJob;
  64. private final HouseRentInRepairMonthJob houseRentInRepairMonthJob;
  65. private final CarReportJob carReportJob;
  66. private final HouseReportJob houseReportJob;
  67. private final CarCxdpJob carCxdpJob;
  68. private final CarHighFuelConsumptionJob carHighFuelConsumptionJob;
  69. private final CarHighRepairJob carHighRepairJob;
  70. private final CarInefficiencyPercentJob carInefficiencyPercentJob;
  71. private final CarInefficiencyQxJob carInefficiencyQxJob;
  72. private final CarRentalRepairJob carRentalRepairJob;
  73. private final CarViolationUnprocessedJob carViolationUnprocessedJob;
  74. private final CarWdyjJob carWdyjJob;
  75. private final HouseBuildingIdleStrategyJob houseBuildingIdleStrategyJob;
  76. private final HouseBuildingAreaStatJob houseBuildingAreaStatJob;
  77. private final HouseBuildingLandCountJob houseBuildingLandCountJob;
  78. private final HouseRentalIncomeJob houseRentalIncomeJob;
  79. public R<Object> runJob(RunJobDto dto) {
  80. switch (dto.getJobName()) {
  81. case CAR_BASE_DATA_DAY_JOB -> carBaseDataDayJob.runJob();
  82. case CAR_YUE_JIE_JOB -> carYueJieJob.runJob();
  83. case CAR_BAO_FEI_JOB -> carBaoFeiJob.runJob();
  84. case CAR_LI_CHENG_MONTH_JOB -> carLiChengMonthJob.runJob();
  85. case CAR_WU_DAN_YONG_CHE_JOB -> carWuDanYongCheJob.runJob();
  86. case CAR_YONG_CHE_JOB -> carYongCheJob.runJob();
  87. case CAR_RAN_YOU_JOB -> carRanYouJob.runJob();
  88. case CAR_DA_WEI_XIU_JOB -> carDaWeiXiuJob.runJob();
  89. case CAR_WEI_XIU_JOB -> carWeiXiuJob.runJob();
  90. case CAR_LU_QIAO_JOB -> carLuQiaoJob.runJob();
  91. case CAR_BAO_XIAN_JOB -> carBaoXianJob.runJob();
  92. case CAR_NIAN_JIAN_FEI_JOB -> carNianJianFeiJob.runJob();
  93. case CAR_QI_TA_JOB -> carQiTaJob.runJob();
  94. case CAR_FEE_HB_JOB -> carFeeHbJob.runJob();
  95. case CAR_FEE_BS_JOB -> carFeeBsJob.runJob();
  96. case HOUSE_BUILDING_REPAIR_MONTH_JOB -> houseBuildingRepairMonthJob.runJob();
  97. case CAR_LI_CHENG_DAY_JOB -> carLiChengDayJob.runJob();
  98. case CAR_SI_CHE_GONG_YONG_JOB -> carSiCheGongYongJob.runJob();
  99. case CAR_FU_WU_FEI_JOB -> carFuWuFeiJob.runJob();
  100. case HOUSE_RENT_IN_REPAIR_MONTH_JOB -> houseRentInRepairMonthJob.runJob();
  101. case CAR_REPORT_JOB -> carReportJob.runJob();
  102. case HOUSE_REPORT_JOB -> houseReportJob.runJob();
  103. case CAR_CXDP_JOB -> carCxdpJob.runJob();
  104. case CAR_HIGH_FUEL_CONSUMPTION_JOB -> carHighFuelConsumptionJob.runJob();
  105. case CAR_HIGH_REPAIR_JOB -> carHighRepairJob.runJob();
  106. case CAR_INEFFICIENCY_PERCENT_JOB -> carInefficiencyPercentJob.runJob();
  107. case CAR_INEFFICIENCY_QX_JOB -> carInefficiencyQxJob.runJob();
  108. case CAR_RENTAL_REPAIR_JOB -> carRentalRepairJob.runJob();
  109. case CAR_VIOLATION_UNPROCESSED_JOB -> carViolationUnprocessedJob.runJob();
  110. case CAR_WDYJ_JOB -> carWdyjJob.runJob();
  111. case HOUSE_BUILDING_IDLE_STRATEGY_JOB -> houseBuildingIdleStrategyJob.runJob();
  112. case HOUSE_BUILDING_AREA_STAT_JOB -> houseBuildingAreaStatJob.runJob();
  113. case HOUSE_BUILDING_LAND_COUNT_JOB -> houseBuildingLandCountJob.runJob();
  114. case HOUSE_RENTAL_INCOME_JOB -> houseRentalIncomeJob.runJob();
  115. }
  116. return R.ok();
  117. }
  118. }