package com.ruoyi.chargingPile.controller;
|
|
|
import com.ruoyi.account.api.model.*;
|
import com.ruoyi.account.api.vo.GovernmentCloudAccountVO;
|
import com.ruoyi.chargingPile.api.model.*;
|
import com.ruoyi.chargingPile.api.vo.GovernmentCloudChargingPileVO;
|
import com.ruoyi.chargingPile.service.*;
|
import com.ruoyi.common.core.domain.R;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.time.LocalDateTime;
|
import java.util.List;
|
|
/**
|
* <p>
|
* 前端控制器
|
* </p>
|
*
|
* @author luodangjia
|
* @since 2024-08-06
|
*/
|
@RestController
|
@RequestMapping("/governmentCloudChargingPile")
|
public class GovernmentCloudChargingPileController {
|
@Autowired
|
private IPartnerService partnerService;
|
@Autowired
|
private ISiteService siteService;
|
@Autowired
|
private TAccountingStrategyDetailService accountingStrategyDetailService;
|
@Autowired
|
private TAccountingStrategyService accountingStrategyService;
|
@Autowired
|
private TApplyChargingPileService applyChargingPileService;
|
@Autowired
|
private TCarportService carportService;
|
@Autowired
|
private TChargingGunService chargingGunService;
|
@Autowired
|
private TChargingPileNotificationService chargingPileNotificationService;
|
@Autowired
|
private TChargingPileService chargingPileService;
|
@Autowired
|
private TFaultMessageService faultMessageService;
|
@Autowired
|
private TMonitoringEquipmentService monitoringEquipmentService;
|
@Autowired
|
private TParkingLotService parkingLotService;
|
@Autowired
|
private TParkingRecordService parkingRecordService;
|
@Autowired
|
private TPartnerSiteService partnerSiteService;
|
@Autowired
|
private TRepairService repairService;
|
@Autowired
|
private TSiteMenuService siteMenuService;
|
@Autowired
|
private TVehicleRampService vehicleRampService;
|
|
|
/**
|
* 政务云查询数据接口
|
* @return
|
*/
|
@PostMapping("/listAll")
|
R<GovernmentCloudChargingPileVO> listAll() {
|
LocalDateTime end = LocalDateTime.now();
|
LocalDateTime start = LocalDateTime.now().minusDays(1);
|
GovernmentCloudChargingPileVO governmentCloudAccountVO = new GovernmentCloudChargingPileVO();
|
List<Partner> list1 = partnerService.lambdaQuery().between(Partner::getCreateTime, start, end).list();
|
List<Site> list2 = siteService.lambdaQuery().between(Site::getCreateTime, start, end).list();
|
List<TAccountingStrategyDetail> list3 = accountingStrategyDetailService.lambdaQuery().between(TAccountingStrategyDetail::getCreateTime, start, end).list();
|
List<TAccountingStrategy> list4 = accountingStrategyService.lambdaQuery().between(TAccountingStrategy::getCreateTime, start, end).list();
|
List<TApplyChargingPile> list5 = applyChargingPileService.lambdaQuery().between(TApplyChargingPile::getCreateTime, start, end).list();
|
List<TCarport> list6 = carportService.lambdaQuery().between(TCarport::getCreateTime, start, end).list();
|
List<TChargingGun> list7 = chargingGunService.lambdaQuery().between(TChargingGun::getCreateTime, start, end).list();
|
List<TChargingPile> list8 = chargingPileService.lambdaQuery().between(TChargingPile::getCreateTime, start, end).list();
|
List<TChargingPileNotification> list9 = chargingPileNotificationService.lambdaQuery().between(TChargingPileNotification::getCreateTime, start, end).list();
|
List<TFaultMessage> list10 = faultMessageService.lambdaQuery().between(TFaultMessage::getCreateTime, start, end).list();
|
List<TMonitoringEquipment> list11 = monitoringEquipmentService.lambdaQuery().between(TMonitoringEquipment::getCreateTime, start, end).list();
|
List<TParkingLot> list12 = parkingLotService.lambdaQuery().between(TParkingLot::getCreateTime, start, end).list();
|
List<TParkingRecord> list13 = parkingRecordService.lambdaQuery().between(TParkingRecord::getCreateTime, start, end).list();
|
// List<TPartnerSite> list14 = invoiceInformationService.lambdaQuery().between(TPartnerSite::getCreateTime, start, end).list();
|
List<TRepair> list15 = repairService.lambdaQuery().between(TRepair::getCreateTime, start, end).list();
|
List<TVehicleRamp> list16 = vehicleRampService.lambdaQuery().between(TVehicleRamp::getCreateTime, start, end).list();
|
// List<TSiteMenu> list17 = siteMenuService.lambdaQuery().between(TSiteMenu::getCreateTime, start, end).list();
|
|
governmentCloudAccountVO.setPartners(list1);
|
governmentCloudAccountVO.setSites(list2);
|
governmentCloudAccountVO.setAccountingStrategies(list4);
|
governmentCloudAccountVO.setAccountingStrategyDetails(list3);
|
governmentCloudAccountVO.setApplyChargingPiles(list5);
|
governmentCloudAccountVO.setCarports(list6);
|
governmentCloudAccountVO.setChargingGuns(list7);
|
governmentCloudAccountVO.setChargingPiles(list8);
|
governmentCloudAccountVO.setChargingPileNotifications(list9);
|
governmentCloudAccountVO.setFaultMessages(list10);
|
governmentCloudAccountVO.setMonitoringEquipments(list11);
|
governmentCloudAccountVO.setParkingLots(list12);
|
governmentCloudAccountVO.setParkingRecords(list13);
|
// governmentCloudAccountVO.setPartnerSites(list14);
|
governmentCloudAccountVO.setRepairs(list15);
|
governmentCloudAccountVO.setVehicleRamps(list16);
|
// governmentCloudAccountVO.setSiteMenus(list17);
|
return R.ok(governmentCloudAccountVO);
|
}
|
|
|
}
|