无关风月
2025-05-06 6f19ee6018f82cf981135fd81b1608faea53ce7e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
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);
    }
 
 
}