| | |
| | | import com.trafficaudit.dataimport.entity.ScaleSplitTransport; |
| | | import com.trafficaudit.dataimport.entity.TransportAuthVehicle; |
| | | import com.trafficaudit.dataimport.entity.VehicleTrackMileage; |
| | | import com.trafficaudit.dataimport.entity.InvestmentMonthly; |
| | | import com.trafficaudit.dataimport.entity.InvestmentProject; |
| | | import com.trafficaudit.dataimport.entity.InvestmentSystem; |
| | | import com.trafficaudit.dataimport.entity.EnergyVehicleQuarterly; |
| | | import com.trafficaudit.dataimport.entity.EnergyAuthVehicle; |
| | | import com.trafficaudit.dataimport.entity.PassengerIndividualMonthly; |
| | | import com.trafficaudit.dataimport.entity.WycOrderMonthly; |
| | | import com.trafficaudit.dataimport.entity.WycTotalMonthly; |
| | | import com.trafficaudit.common.util.RegionUtil; |
| | | import com.trafficaudit.dataimport.mapper.FreightTurnoverImportMapper; |
| | | import com.trafficaudit.dataimport.mapper.H2032EnterpriseMonthlyMapper; |
| | | import com.trafficaudit.dataimport.mapper.PassengerAuthVehicleMapper; |
| | |
| | | import com.trafficaudit.dataimport.mapper.ScaleSplitTransportMapper; |
| | | import com.trafficaudit.dataimport.mapper.TransportAuthVehicleMapper; |
| | | import com.trafficaudit.dataimport.mapper.VehicleTrackMileageMapper; |
| | | import com.trafficaudit.dataimport.mapper.InvestmentMonthlyMapper; |
| | | import com.trafficaudit.dataimport.mapper.InvestmentProjectMapper; |
| | | import com.trafficaudit.dataimport.mapper.InvestmentSystemMapper; |
| | | import com.trafficaudit.dataimport.mapper.EnergyVehicleQuarterlyMapper; |
| | | import com.trafficaudit.dataimport.mapper.EnergyAuthVehicleMapper; |
| | | import com.trafficaudit.dataimport.mapper.PassengerIndividualMonthlyMapper; |
| | | import com.trafficaudit.dataimport.mapper.WycOrderMonthlyMapper; |
| | | import com.trafficaudit.dataimport.mapper.WycTotalMonthlyMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | private CityTaxiMonthlyMapper cityTaxiMapper; |
| | | @Resource |
| | | private CityTaxiAuthMapper cityTaxiAuthMapper; |
| | | @Resource |
| | | private InvestmentMonthlyMapper investmentMonthlyMapper; |
| | | @Resource |
| | | private InvestmentProjectMapper investmentProjectMapper; |
| | | @Resource |
| | | private InvestmentSystemMapper investmentSystemMapper; |
| | | @Resource |
| | | private EnergyVehicleQuarterlyMapper energyVehicleMapper; |
| | | @Resource |
| | | private EnergyAuthVehicleMapper energyAuthMapper; |
| | | @Resource |
| | | private PassengerIndividualMonthlyMapper passengerIndividualMapper; |
| | | @Resource |
| | | private WycOrderMonthlyMapper wycOrderMapper; |
| | | @Resource |
| | | private WycTotalMonthlyMapper wycTotalMapper; |
| | | |
| | | @GetMapping("/list") |
| | | public Result<Map<String, Object>> list(@RequestParam("type") String type, |
| | |
| | | fillPage(result, r); |
| | | break; |
| | | } |
| | | case "investmentMonthly": { |
| | | java.util.List<Long> pids = new ArrayList<>(); |
| | | if (!kw.isEmpty()) { |
| | | for (InvestmentProject ip : investmentProjectMapper.selectList( |
| | | new LambdaQueryWrapper<InvestmentProject>().like(InvestmentProject::getProjectName, kw))) { |
| | | pids.add(ip.getId()); |
| | | } |
| | | if (pids.isEmpty()) { |
| | | result.put("records", new ArrayList<>()); |
| | | result.put("total", 0L); |
| | | result.put("current", safePage); |
| | | result.put("size", safeSize); |
| | | break; |
| | | } |
| | | } |
| | | LambdaQueryWrapper<InvestmentMonthly> w = new LambdaQueryWrapper<InvestmentMonthly>() |
| | | .eq(notEmpty(period), InvestmentMonthly::getReportPeriod, period) |
| | | .in(!pids.isEmpty(), InvestmentMonthly::getProjectId, pids) |
| | | .orderByAsc(InvestmentMonthly::getProjectId) |
| | | .orderByAsc(InvestmentMonthly::getId); |
| | | Page<InvestmentMonthly> p = new Page<>(safePage, safeSize); |
| | | Page<InvestmentMonthly> r = investmentMonthlyMapper.selectPage(p, w); |
| | | result.put("records", toMaps(r.getRecords(), propsOf(INVEST_MONTHLY_COLUMNS))); |
| | | fillPage(result, r); |
| | | break; |
| | | } |
| | | case "investmentProject": { |
| | | LambdaQueryWrapper<InvestmentProject> w = new LambdaQueryWrapper<InvestmentProject>() |
| | | .like(!kw.isEmpty(), InvestmentProject::getProjectName, kw) |
| | | .orderByAsc(InvestmentProject::getCity) |
| | | .orderByAsc(InvestmentProject::getId); |
| | | Page<InvestmentProject> p = new Page<>(safePage, safeSize); |
| | | Page<InvestmentProject> r = investmentProjectMapper.selectPage(p, w); |
| | | result.put("records", toMaps(r.getRecords(), propsOf(INVEST_PROJECT_COLUMNS))); |
| | | fillPage(result, r); |
| | | break; |
| | | } |
| | | case "investmentSystem": { |
| | | LambdaQueryWrapper<InvestmentSystem> w = new LambdaQueryWrapper<InvestmentSystem>() |
| | | .eq(notEmpty(period), InvestmentSystem::getReportPeriod, period) |
| | | .like(!kw.isEmpty(), InvestmentSystem::getProjectName, kw) |
| | | .orderByDesc(InvestmentSystem::getId); |
| | | Page<InvestmentSystem> p = new Page<>(safePage, safeSize); |
| | | Page<InvestmentSystem> r = investmentSystemMapper.selectPage(p, w); |
| | | result.put("records", toMaps(r.getRecords(), propsOf(INVEST_SYSTEM_COLUMNS))); |
| | | fillPage(result, r); |
| | | break; |
| | | } |
| | | case "energyVehicle": { |
| | | LambdaQueryWrapper<EnergyVehicleQuarterly> w = new LambdaQueryWrapper<EnergyVehicleQuarterly>() |
| | | .eq(notEmpty(period), EnergyVehicleQuarterly::getReportPeriod, period) |
| | | .like(!kw.isEmpty(), EnergyVehicleQuarterly::getEnterpriseName, kw) |
| | | .orderByDesc(EnergyVehicleQuarterly::getId); |
| | | Page<EnergyVehicleQuarterly> p = new Page<>(safePage, safeSize); |
| | | Page<EnergyVehicleQuarterly> r = energyVehicleMapper.selectPage(p, w); |
| | | result.put("records", toMaps(r.getRecords(), propsOf(ENERGY_VEHICLE_COLUMNS))); |
| | | fillPage(result, r); |
| | | break; |
| | | } |
| | | case "energyAuth": { |
| | | LambdaQueryWrapper<EnergyAuthVehicle> w = new LambdaQueryWrapper<EnergyAuthVehicle>() |
| | | .eq(notEmpty(period), EnergyAuthVehicle::getReportPeriod, period) |
| | | .like(!kw.isEmpty(), EnergyAuthVehicle::getPlateNo, kw) |
| | | .orderByDesc(EnergyAuthVehicle::getId); |
| | | Page<EnergyAuthVehicle> p = new Page<>(safePage, safeSize); |
| | | Page<EnergyAuthVehicle> r = energyAuthMapper.selectPage(p, w); |
| | | result.put("records", toMaps(r.getRecords(), propsOf(ENERGY_AUTH_COLUMNS))); |
| | | fillPage(result, r); |
| | | break; |
| | | } |
| | | case "passengerIndividual": { |
| | | LambdaQueryWrapper<PassengerIndividualMonthly> w = new LambdaQueryWrapper<PassengerIndividualMonthly>() |
| | | .eq(notEmpty(period), PassengerIndividualMonthly::getReportPeriod, period) |
| | | .like(!kw.isEmpty(), PassengerIndividualMonthly::getEnterpriseName, kw) |
| | | .orderByDesc(PassengerIndividualMonthly::getId); |
| | | Page<PassengerIndividualMonthly> p = new Page<>(safePage, safeSize); |
| | | Page<PassengerIndividualMonthly> r = passengerIndividualMapper.selectPage(p, w); |
| | | List<Map<String, Object>> rows = toMaps(r.getRecords(), propsOf(PAX_INDIVIDUAL_COLUMNS)); |
| | | for (Map<String, Object> row : rows) { |
| | | Object rc = row.get("regionCode"); |
| | | String cityName = rc == null ? null : RegionUtil.cityByCode(String.valueOf(rc)); |
| | | row.put("city", cityName == null ? "" : cityName); |
| | | } |
| | | result.put("records", rows); |
| | | fillPage(result, r); |
| | | break; |
| | | } |
| | | case "wycTotal": { |
| | | LambdaQueryWrapper<WycTotalMonthly> w = new LambdaQueryWrapper<WycTotalMonthly>() |
| | | .eq(notEmpty(period), WycTotalMonthly::getReportPeriod, period) |
| | | .orderByDesc(WycTotalMonthly::getId); |
| | | Page<WycTotalMonthly> p = new Page<>(safePage, safeSize); |
| | | Page<WycTotalMonthly> r = wycTotalMapper.selectPage(p, w); |
| | | result.put("records", toMaps(r.getRecords(), propsOf(WYC_TOTAL_COLUMNS))); |
| | | fillPage(result, r); |
| | | break; |
| | | } |
| | | case "wycOrder": { |
| | | LambdaQueryWrapper<WycOrderMonthly> w = new LambdaQueryWrapper<WycOrderMonthly>() |
| | | .eq(notEmpty(period), WycOrderMonthly::getReportPeriod, period) |
| | | .orderByDesc(WycOrderMonthly::getId); |
| | | Page<WycOrderMonthly> p = new Page<>(safePage, safeSize); |
| | | Page<WycOrderMonthly> r = wycOrderMapper.selectPage(p, w); |
| | | result.put("records", toMaps(r.getRecords(), propsOf(WYC_ORDER_COLUMNS))); |
| | | fillPage(result, r); |
| | | break; |
| | | } |
| | | default: |
| | | result.put("records", new ArrayList<>()); |
| | | result.put("total", 0L); |
| | |
| | | case "cityTaxi": return TAXI_COLUMNS; |
| | | case "cityTaxiAuth": return TAXI_AUTH_COLUMNS; |
| | | case "passengerAuth": return PAUTH_COLUMNS; |
| | | case "investmentMonthly": return INVEST_MONTHLY_COLUMNS; |
| | | case "investmentProject": return INVEST_PROJECT_COLUMNS; |
| | | case "investmentSystem": return INVEST_SYSTEM_COLUMNS; |
| | | case "energyVehicle": return ENERGY_VEHICLE_COLUMNS; |
| | | case "energyAuth": return ENERGY_AUTH_COLUMNS; |
| | | case "passengerIndividual": return PAX_INDIVIDUAL_COLUMNS; |
| | | case "wycTotal": return WYC_TOTAL_COLUMNS; |
| | | case "wycOrder": return WYC_ORDER_COLUMNS; |
| | | default: return new ArrayList<>(); |
| | | } |
| | | } |
| | |
| | | private static final List<Map<String, Object>> BUS_COLUMNS = new ArrayList<>(); |
| | | private static final List<Map<String, Object>> TAXI_COLUMNS = new ArrayList<>(); |
| | | private static final List<Map<String, Object>> TAXI_AUTH_COLUMNS = new ArrayList<>(); |
| | | private static final List<Map<String, Object>> INVEST_MONTHLY_COLUMNS = new ArrayList<>(); |
| | | private static final List<Map<String, Object>> INVEST_PROJECT_COLUMNS = new ArrayList<>(); |
| | | private static final List<Map<String, Object>> INVEST_SYSTEM_COLUMNS = new ArrayList<>(); |
| | | private static final List<Map<String, Object>> ENERGY_VEHICLE_COLUMNS = new ArrayList<>(); |
| | | private static final List<Map<String, Object>> ENERGY_AUTH_COLUMNS = new ArrayList<>(); |
| | | private static final List<Map<String, Object>> PAX_INDIVIDUAL_COLUMNS = new ArrayList<>(); |
| | | private static final List<Map<String, Object>> WYC_TOTAL_COLUMNS = new ArrayList<>(); |
| | | private static final List<Map<String, Object>> WYC_ORDER_COLUMNS = new ArrayList<>(); |
| | | |
| | | static { |
| | | H2032_COLUMNS.add(col("reportPeriod", "报表期", 100)); |
| | |
| | | PAUTH_COLUMNS.add(col("enterpriseName", "企业名称", 240)); |
| | | PAUTH_COLUMNS.add(col("vehicleCount", "车辆数", 100)); |
| | | PAUTH_COLUMNS.add(col("seatCount", "载客位数", 100)); |
| | | INVEST_MONTHLY_COLUMNS.add(col("reportPeriod", "报表期", 100)); |
| | | INVEST_MONTHLY_COLUMNS.add(col("projectId", "项目ID", 80)); |
| | | INVEST_MONTHLY_COLUMNS.add(col("yearPlan", "本年计划投资(万元)", 140)); |
| | | INVEST_MONTHLY_COLUMNS.add(col("yearCum", "自年初累计完成(万元)", 160)); |
| | | INVEST_MONTHLY_COLUMNS.add(col("monthDone", "本月完成投资(万元)", 150)); |
| | | INVEST_MONTHLY_COLUMNS.add(col("startCum", "自开始建设累计完成(万元)", 180)); |
| | | INVEST_MONTHLY_COLUMNS.add(col("progressStage", "建设阶段", 120)); |
| | | INVEST_MONTHLY_COLUMNS.add(col("progressDesc", "形象进度", 320)); |
| | | INVEST_MONTHLY_COLUMNS.add(col("buildingArea", "建筑面积", 110)); |
| | | INVEST_PROJECT_COLUMNS.add(col("projectName", "项目名称", 260)); |
| | | INVEST_PROJECT_COLUMNS.add(col("category", "类别", 100)); |
| | | INVEST_PROJECT_COLUMNS.add(col("city", "市州", 90)); |
| | | INVEST_PROJECT_COLUMNS.add(col("county", "县(市、区)", 120)); |
| | | INVEST_PROJECT_COLUMNS.add(col("builderName", "建设单位", 200)); |
| | | INVEST_PROJECT_COLUMNS.add(col("constructNature", "建设性质", 100)); |
| | | INVEST_PROJECT_COLUMNS.add(col("startTime", "开工年", 90)); |
| | | INVEST_PROJECT_COLUMNS.add(col("endTime", "完工年", 90)); |
| | | INVEST_PROJECT_COLUMNS.add(col("totalInvestment", "总投资(万元)", 130)); |
| | | INVEST_PROJECT_COLUMNS.add(col("buildingArea", "建筑面积", 110)); |
| | | INVEST_PROJECT_COLUMNS.add(col("approvalGk", "工可或核准批复文号", 200)); |
| | | INVEST_PROJECT_COLUMNS.add(col("approvalCs", "初设或施工图批复文号", 200)); |
| | | INVEST_PROJECT_COLUMNS.add(col("source", "来源", 100)); |
| | | INVEST_SYSTEM_COLUMNS.add(col("reportPeriod", "报表期", 100)); |
| | | INVEST_SYSTEM_COLUMNS.add(col("projectName", "项目名称", 260)); |
| | | INVEST_SYSTEM_COLUMNS.add(col("totalInvestment", "总投资(万元)", 130)); |
| | | INVEST_SYSTEM_COLUMNS.add(col("startCum", "自开始建设累计完成(万元)", 180)); |
| | | INVEST_SYSTEM_COLUMNS.add(col("yearPlan", "本年计划投资(万元)", 140)); |
| | | INVEST_SYSTEM_COLUMNS.add(col("yearCum", "自年初累计完成(万元)", 160)); |
| | | INVEST_SYSTEM_COLUMNS.add(col("monthDone", "本月完成投资(万元)", 150)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("reportPeriod", "报表期", 100)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("regionCode", "所属地区", 100)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("enterpriseName", "企业名称", 220)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("plateNo", "车牌号", 110)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("vehicleType", "车辆类型", 130)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("fuelType", "燃料类型", 110)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("manufactureYear", "出厂年份", 100)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("markedTonnage", "标记吨位", 100)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("totalMileage", "总行驶里程(公里)", 150)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("loadedMileage", "重载里程(公里)", 140)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("emptyMileage", "空载里程(公里)", 140)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("freight", "货运量(吨)", 120)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("turnover", "周转量(吨公里)", 140)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("tripCount", "车次", 90)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("fuelUnit", "燃料单位", 100)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("fuelConsumption", "燃料消耗量", 120)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("avgDistance", "平均运距", 110)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("avgLoadedTonnage", "平均载重吨位", 130)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("avgTripMileage", "平均车次里程", 130)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("fuelPer100km", "百公里油耗", 120)); |
| | | ENERGY_VEHICLE_COLUMNS.add(col("turnoverFuel", "周转量油耗", 120)); |
| | | ENERGY_AUTH_COLUMNS.add(col("reportPeriod", "报表期", 100)); |
| | | ENERGY_AUTH_COLUMNS.add(col("plateNo", "车牌号", 110)); |
| | | ENERGY_AUTH_COLUMNS.add(col("vehicleType", "车辆类型", 130)); |
| | | ENERGY_AUTH_COLUMNS.add(col("fuelType", "燃料类型", 110)); |
| | | ENERGY_AUTH_COLUMNS.add(col("markedTonnage", "标记吨位", 100)); |
| | | ENERGY_AUTH_COLUMNS.add(col("tractionQuality", "牵引质量", 110)); |
| | | |
| | | PAX_INDIVIDUAL_COLUMNS.add(col("reportPeriod", "报表期", 100)); |
| | | PAX_INDIVIDUAL_COLUMNS.add(col("regionCode", "所属地区", 110)); |
| | | PAX_INDIVIDUAL_COLUMNS.add(col("city", "市州", 110)); |
| | | PAX_INDIVIDUAL_COLUMNS.add(col("enterpriseCode", "企业代码", 130)); |
| | | PAX_INDIVIDUAL_COLUMNS.add(col("enterpriseName", "企业名称", 220)); |
| | | PAX_INDIVIDUAL_COLUMNS.add(col("passengerCount", "个体客运量", 130)); |
| | | PAX_INDIVIDUAL_COLUMNS.add(col("turnover", "个体旅客周转量", 150)); |
| | | |
| | | WYC_TOTAL_COLUMNS.add(col("reportPeriod", "报表期", 100)); |
| | | WYC_TOTAL_COLUMNS.add(col("pinK", "全省网约车客运量(万人次)", 210)); |
| | | WYC_TOTAL_COLUMNS.add(col("pinCK", "其中城市内客运量(万人次)", 210)); |
| | | WYC_TOTAL_COLUMNS.add(col("pinZ", "全省网约车周转量(万人公里)", 220)); |
| | | WYC_TOTAL_COLUMNS.add(col("pinCZ", "其中城市内周转量(万人公里)", 220)); |
| | | |
| | | WYC_ORDER_COLUMNS.add(col("reportPeriod", "报表期", 100)); |
| | | WYC_ORDER_COLUMNS.add(col("pinK", "全省客运量(万人次)", 170)); |
| | | WYC_ORDER_COLUMNS.add(col("pinCK", "其中城市内客运量", 170)); |
| | | WYC_ORDER_COLUMNS.add(col("pinZ", "全省周转量(万人公里)", 180)); |
| | | WYC_ORDER_COLUMNS.add(col("pinCZ", "其中城市内周转量", 170)); |
| | | WYC_ORDER_COLUMNS.add(col("orderSum", "订单合计(单)", 130)); |
| | | String[] wycOrderCityProps = { "orderWuhan", "orderHuangshi", "orderShiyan", "orderYichang", "orderXiangyang", |
| | | "orderEzhou", "orderJingmen", "orderXiaogan", "orderJingzhou", "orderHuanggang", "orderXianning", |
| | | "orderSuizhou", "orderEnshi", "orderXiantao", "orderQianjiang", "orderTianmen", "orderShennong" }; |
| | | String[] wycOrderCityNames = { "武汉", "黄石", "十堰", "宜昌", "襄阳", "鄂州", "荆门", "孝感", "荆州", "黄冈", |
| | | "咸宁", "随州", "恩施", "仙桃", "潜江", "天门", "神农架" }; |
| | | for (int i = 0; i < wycOrderCityProps.length; i++) { |
| | | WYC_ORDER_COLUMNS.add(col(wycOrderCityProps[i], wycOrderCityNames[i] + "订单(单)", 120)); |
| | | } |
| | | |
| | | } |
| | | } |