From 8b48244257eaa19bfd8a761b3d2309cea25a8aaa Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期三, 16 七月 2025 16:20:48 +0800 Subject: [PATCH] 政务云数据上传bug修改 --- ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/GovernmentCloudAccountController.java | 61 ++++++- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/GovernmentCloudOrderController.java | 77 +++++++-- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GovernmentCloudOtherController.java | 71 ++++++-- ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/GovernmentCloudSystemController.java | 22 ++ ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/GovernmentCloudChargingPileController.java | 68 ++++++-- ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java | 133 ++++++++------- 6 files changed, 293 insertions(+), 139 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/GovernmentCloudSystemController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/GovernmentCloudSystemController.java index 93b81f5..653e5a4 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/GovernmentCloudSystemController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/GovernmentCloudSystemController.java @@ -1,6 +1,7 @@ package com.ruoyi.system.controller; +import com.ruoyi.chargingPile.api.model.Site; import com.ruoyi.common.core.domain.R; import com.ruoyi.system.api.domain.SysLoginLog; import com.ruoyi.system.api.domain.SysOperLog; @@ -16,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.time.LocalDate; import java.time.LocalDateTime; import java.util.List; @@ -46,13 +48,21 @@ */ @PostMapping("/listAll") R<GovernmentCloudSystemVO> listAll() { - LocalDateTime end = LocalDateTime.now(); - LocalDateTime start = LocalDateTime.now().minusDays(1); + String start = LocalDate.now().minusDays(1)+" 00:00:00"; + String end = LocalDate.now().minusDays(1)+" 23:59:59"; GovernmentCloudSystemVO governmentCloudAccountVO = new GovernmentCloudSystemVO(); - List<SysLoginLog> list1 = sysLoginLogService.lambdaQuery().between(SysLoginLog::getCreateTime, start, end).list(); - List<SysOperLog> list2 = sysOperLogService.lambdaQuery().between(SysOperLog::getOperTime, start, end).list(); - List<SysRole> list3 = sysRoleService.lambdaQuery().between(SysRole::getCreateTime, start, end).list(); - List<SysUser> list4 = sysUserService.lambdaQuery().between(SysUser::getCreateTime, start, end).list(); + List<SysLoginLog> list1 = sysLoginLogService.lambdaQuery() + .ge(SysLoginLog::getCreateTime,start) + .le(SysLoginLog::getCreateTime,end) .list(); + List<SysOperLog> list2 = sysOperLogService.lambdaQuery() + .ge(SysOperLog::getOperTime,start) + .le(SysOperLog::getOperTime,end) .list(); + List<SysRole> list3 = sysRoleService.lambdaQuery() + .ge(SysRole::getCreateTime,start) + .le(SysRole::getCreateTime,end) .list(); + List<SysUser> list4 = sysUserService.lambdaQuery() + .ge(SysUser::getCreateTime,start) + .le(SysUser::getCreateTime,end) .list(); governmentCloudAccountVO.setLoginLogs(list1); governmentCloudAccountVO.setSysOperLogs(list2); governmentCloudAccountVO.setSysRoles(list3); diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/GovernmentCloudAccountController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/GovernmentCloudAccountController.java index 8e39b20..f67bcbc 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/GovernmentCloudAccountController.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/GovernmentCloudAccountController.java @@ -5,10 +5,13 @@ import com.ruoyi.account.api.vo.GovernmentCloudAccountVO; import com.ruoyi.account.service.*; import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.core.web.domain.BasePojo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.time.LocalDate; import java.time.LocalDateTime; +import java.util.Date; import java.util.List; /** @@ -43,25 +46,59 @@ @Autowired private TInvoiceInformationService invoiceInformationService; + /** * 政务云查询数据接口 * @return */ @PostMapping("/listAll") R<GovernmentCloudAccountVO> listAll() { - LocalDateTime end = LocalDateTime.now(); - LocalDateTime start = LocalDateTime.now().minusDays(1); + String start = LocalDate.now().minusDays(1)+" 00:00:00"; + String end = LocalDate.now().minusDays(1)+" 23:59:59"; GovernmentCloudAccountVO governmentCloudAccountVO = new GovernmentCloudAccountVO(); - List<TAppCoupon> list1 = tAppCouponService.lambdaQuery().between(TAppCoupon::getCreateTime, start, end).list(); - List<TAppUser> list2 = appUserService.lambdaQuery().between(TAppUser::getCreateTime, start, end).list(); - List<TAppUserAddress> list3 = appUserAddressService.lambdaQuery().between(TAppUserAddress::getCreateTime, start, end).list(); - List<TAppUserCar> list4 = appUserCarService.lambdaQuery().between(TAppUserCar::getCreateTime, start, end).list(); - List<TAppUserIntegralChange> list5 = appUserIntegralChangeService.lambdaQuery().between(TAppUserIntegralChange::getCreateTime, start, end).list(); - List<TAppUserSign> list6 = appUserSignService.lambdaQuery().between(TAppUserSign::getCreateTime, start, end).list(); - List<TAppUserTag> list7 = appUserTagService.lambdaQuery().between(TAppUserTag::getCreateTime, start, end).list(); - List<TAppUserVipDetail> list8 = appUserVipDetailService.lambdaQuery().between(TAppUserVipDetail::getCreateTime, start, end).list(); - List<TInviteUser> list9 = inviteUserService.lambdaQuery().between(TInviteUser::getCreateTime, start, end).list(); - List<TInvoiceInformation> list10 = invoiceInformationService.lambdaQuery().between(TInvoiceInformation::getCreateTime, start, end).list(); + List<TAppCoupon> list1 = tAppCouponService.lambdaQuery() + .ge(TAppCoupon::getCreateTime, start) + .le(TAppCoupon::getCreateTime, end) + .list(); + List<TAppUser> list2 = appUserService.lambdaQuery() + .ge(TAppUser::getCreateTime, start) + .le(TAppUser::getCreateTime, end) + .list(); + List<TAppUserAddress> list3 = appUserAddressService.lambdaQuery() + .ge(TAppUserAddress::getCreateTime, start) + .le(TAppUserAddress::getCreateTime, end) + .list(); + List<TAppUserCar> list4 = appUserCarService.lambdaQuery() + .ge(TAppUserCar::getCreateTime, start) + .le(TAppUserCar::getCreateTime, end) + .list(); + List<TAppUserIntegralChange> list5 = appUserIntegralChangeService.lambdaQuery() + .ge(TAppUserIntegralChange::getCreateTime, start) + .le(TAppUserIntegralChange::getCreateTime, end) + .list(); + List<TAppUserSign> list6 = appUserSignService.lambdaQuery() + .ge(TAppUserSign::getCreateTime, start) + .le(TAppUserSign::getCreateTime, end) + .list(); + List<TAppUserTag> list7 = appUserTagService.lambdaQuery() + .ge(TAppUserTag::getCreateTime, start) + .le(TAppUserTag::getCreateTime, end) + .list(); + List<TAppUserVipDetail> list8 = appUserVipDetailService.lambdaQuery() + .ge(TAppUserVipDetail::getCreateTime, start) + .le(TAppUserVipDetail::getCreateTime, end) + .list(); + List<TInviteUser> list9 = inviteUserService.lambdaQuery() + .ge(TInviteUser::getCreateTime, start) + .le(TInviteUser::getCreateTime, end) + .list(); + List<TInvoiceInformation> list10 = invoiceInformationService.lambdaQuery() + .ge(TInvoiceInformation::getCreateTime, start) + .le(TInvoiceInformation::getCreateTime, end) + .list(); + for (TAppUserSign tAppUserSign : list6) { + tAppUserSign.setSignDay(null); + } governmentCloudAccountVO.setAppCoupons(list1); governmentCloudAccountVO.setAppUsers(list2); governmentCloudAccountVO.setAppUserAddresses(list3); diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/GovernmentCloudChargingPileController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/GovernmentCloudChargingPileController.java index 606a5d2..7688348 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/GovernmentCloudChargingPileController.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/GovernmentCloudChargingPileController.java @@ -7,11 +7,13 @@ import com.ruoyi.chargingPile.api.vo.GovernmentCloudChargingPileVO; import com.ruoyi.chargingPile.service.*; import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.core.web.domain.BasePojo; 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.LocalDate; import java.time.LocalDateTime; import java.util.List; @@ -68,25 +70,57 @@ */ @PostMapping("/listAll") R<GovernmentCloudChargingPileVO> listAll() { - LocalDateTime end = LocalDateTime.now(); - LocalDateTime start = LocalDateTime.now().minusDays(1); + String start = LocalDate.now().minusDays(1)+" 00:00:00"; + String end = LocalDate.now().minusDays(1)+" 23:59:59"; 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<Partner> list1 = partnerService.lambdaQuery() + .ge(Partner::getCreateTime,start) + .le(Partner::getCreateTime,end) + .list(); + List<Site> list2 = siteService.lambdaQuery() + .ge(Site::getCreateTime,start) + .le(Site::getCreateTime,end) + .list(); + List<TAccountingStrategyDetail> list3 = accountingStrategyDetailService.lambdaQuery() + .ge(TAccountingStrategyDetail::getCreateTime,start) + .le(TAccountingStrategyDetail::getCreateTime,end) .list(); + List<TAccountingStrategy> list4 = accountingStrategyService.lambdaQuery() + .ge(TAccountingStrategy::getCreateTime,start) + .le(TAccountingStrategy::getCreateTime,end) .list(); + List<TApplyChargingPile> list5 = applyChargingPileService.lambdaQuery() + .ge(TApplyChargingPile::getCreateTime,start) + .le(TApplyChargingPile::getCreateTime,end) .list(); + List<TCarport> list6 = carportService.lambdaQuery() + .ge(TCarport::getCreateTime,start) + .le(TCarport::getCreateTime,end) .list(); + List<TChargingGun> list7 = chargingGunService.lambdaQuery() + .ge(TChargingGun::getCreateTime,start) + .le(TChargingGun::getCreateTime,end) .list(); + List<TChargingPile> list8 = chargingPileService.lambdaQuery() + .ge(TChargingPile::getCreateTime,start) + .le(TChargingPile::getCreateTime,end) .list(); + List<TChargingPileNotification> list9 = chargingPileNotificationService.lambdaQuery() + .ge(TChargingPileNotification::getCreateTime,start) + .le(TChargingPileNotification::getCreateTime,end) .list(); + List<TFaultMessage> list10 = faultMessageService.lambdaQuery() + .ge(TFaultMessage::getCreateTime,start) + .le(TFaultMessage::getCreateTime,end) .list(); + List<TMonitoringEquipment> list11 = monitoringEquipmentService.lambdaQuery() + .ge(TMonitoringEquipment::getCreateTime,start) + .le(TMonitoringEquipment::getCreateTime,end) .list(); + List<TParkingLot> list12 = parkingLotService.lambdaQuery() + .ge(TParkingLot::getCreateTime,start) + .le(TParkingLot::getCreateTime,end) .list(); + List<TParkingRecord> list13 = parkingRecordService.lambdaQuery() + .ge(TParkingRecord::getCreateTime,start) + .le(TParkingRecord::getCreateTime,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<TRepair> list15 = repairService.lambdaQuery() + .ge(TRepair::getCreateTime,start) + .le(TRepair::getCreateTime,end) .list(); + List<TVehicleRamp> list16 = vehicleRampService.lambdaQuery() + .ge(TVehicleRamp::getCreateTime,start) + .le(TVehicleRamp::getCreateTime,end) .list(); // List<TSiteMenu> list17 = siteMenuService.lambdaQuery().between(TSiteMenu::getCreateTime, start, end).list(); governmentCloudAccountVO.setPartners(list1); diff --git a/ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java b/ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java index 66a213c..b5cc605 100644 --- a/ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java +++ b/ruoyi-service/ruoyi-jianguan/src/main/java/com/ruoyi/jianguan/util/GovernmentCloudTask.java @@ -284,142 +284,146 @@ // account服务 GovernmentCloudAccountVO data = jianGuanAccountClient.listAll().getData(); if (data != null) { + log.info("Account"+data); + List<TAppCoupon> appCoupons = data.getAppCoupons(); if (!appCoupons.isEmpty()) { - log.info("用户优惠券"+appCoupons); + log.info("用户优惠券"+appCoupons.size()); appCouponService.saveBatch(appCoupons); } List<TAppUser> appUsers = data.getAppUsers(); if (!appUsers.isEmpty()) { - log.info("用户"+appUsers); + log.info("用户"+appUsers.size()); appUserService.saveBatch(appUsers); } List<TAppUserAddress> appUserAddresses = data.getAppUserAddresses(); if (!appUserAddresses.isEmpty()) { - log.info("用户地址"+appUserAddresses); + log.info("用户地址"+appUserAddresses.size()); appUserAddressService.saveBatch(appUserAddresses); } List<TAppUserCar> appUserCars = data.getAppUserCars(); if (!appUserCars.isEmpty()) { - log.info("用户车辆"+appUserCars); + log.info("用户车辆"+appUserCars.size()); appUserCarService.saveBatch(appUserCars); } List<TAppUserIntegralChange> appUserIntegralChanges = data.getAppUserIntegralChanges(); if (!appUserIntegralChanges.isEmpty()) { - log.info("用户积分变动"+appUserIntegralChanges); + log.info("用户积分变动"+appUserIntegralChanges.size()); appUserIntegralChangeService.saveBatch(appUserIntegralChanges); } List<TAppUserSign> appUserSigns = data.getAppUserSigns(); if (!appUserSigns.isEmpty()) { - log.info("用户签到"+appUserSigns); + log.info("用户签到"+appUserSigns.size()); appUserSignService.saveBatch(appUserSigns); } List<TAppUserTag> appUserTags = data.getAppUserTags(); if (!appUserTags.isEmpty()) { - log.info("用户标签"+appUserTags); + log.info("用户标签"+appUserTags.size()); appUserTagService.saveBatch(appUserTags); } List<TAppUserVipDetail> appUserVipDetails = data.getAppUserVipDetails(); if (!appUserVipDetails.isEmpty()) { - log.info("用户会员明细"+appUserVipDetails); + log.info("用户会员明细"+appUserVipDetails.size()); appUserVipDetailService.saveBatch(appUserVipDetails); } List<TInviteUser> inviteUsers = data.getInviteUsers(); if (!inviteUsers.isEmpty()) { - log.info("邀请用户"+inviteUsers); + log.info("邀请用户"+inviteUsers.size()); inviteUserService.saveBatch(inviteUsers); } List<TInvoiceInformation> invoiceInformations = data.getInvoiceInformations(); if (!invoiceInformations.isEmpty()) { - log.info("开票"+invoiceInformations); + log.info("开票"+invoiceInformations.size()); tInvoiceInformationService.saveBatch(invoiceInformations); } } // chargingPile服务 GovernmentCloudChargingPileVO data1 = jianGuanChargingPileClient.listAll().getData(); if (data1 != null) { + log.info("ChargingPile"+data1); + List<Partner> partners = data1.getPartners(); if (!partners.isEmpty()) { - log.info("合作商"+partners); + log.info("合作商"+partners.size()); partnerService.saveBatch(partners); } List<Site> sites = data1.getSites(); if (!sites.isEmpty()) { - log.info("站点"+sites); + log.info("站点"+sites.size()); siteService.saveBatch(sites); } List<TAccountingStrategy> accountingStrategies = data1.getAccountingStrategies(); if (!accountingStrategies.isEmpty()) { - log.info("策略"+accountingStrategies); + log.info("策略"+accountingStrategies.size()); accountingStrategyService.saveBatch(accountingStrategies); } List<TAccountingStrategyDetail> accountingStrategyDetails = data1.getAccountingStrategyDetails(); if (!accountingStrategyDetails.isEmpty()) { - log.info("策略明细"+accountingStrategyDetails); + log.info("策略明细"+accountingStrategyDetails.size()); accountingStrategyDetailService.saveBatch(accountingStrategyDetails); } List<TApplyChargingPile> applyChargingPiles = data1.getApplyChargingPiles(); if (!applyChargingPiles.isEmpty()) { - log.info("申请充电桩"+applyChargingPiles); + log.info("申请充电桩"+applyChargingPiles.size()); applyChargingPileService.saveBatch(applyChargingPiles); } List<TCarport> carports = data1.getCarports(); if (!carports.isEmpty()) { - log.info("停车场"+carports); + log.info("停车场"+carports.size()); carportService.saveBatch(carports); } List<TChargingGun> chargingGuns = data1.getChargingGuns(); if (!chargingGuns.isEmpty()) { - log.info("充电枪"+chargingGuns); + log.info("充电枪"+chargingGuns.size()); chargingGunService.saveBatch(chargingGuns); } List<TChargingPile> chargingPiles = data1.getChargingPiles(); if (!chargingPiles.isEmpty()) { - log.info("充电桩"+chargingPiles); + log.info("充电桩"+chargingPiles.size()); chargingPileService.saveBatch(chargingPiles); } List<TChargingPileNotification> chargingPileNotifications = data1.getChargingPileNotifications(); if (!chargingPileNotifications.isEmpty()) { - log.info("通知"+chargingPileNotifications); + log.info("通知"+chargingPileNotifications.size()); chargingPileNotificationService.saveBatch(chargingPileNotifications); } List<TFaultMessage> faultMessages = data1.getFaultMessages(); if (!faultMessages.isEmpty()) { - log.info("故障"+faultMessages); + log.info("故障"+faultMessages.size()); faultMessageService.saveBatch(faultMessages); } List<TMonitoringEquipment> monitoringEquipments = data1.getMonitoringEquipments(); if (!monitoringEquipments.isEmpty()) { - log.info("监控设备"+monitoringEquipments); + log.info("监控设备"+monitoringEquipments.size()); monitoringEquipmentService.saveBatch(monitoringEquipments); } List<TParkingLot> parkingLots = data1.getParkingLots(); if (!parkingLots.isEmpty()) { - log.info("停车场"+parkingLots); + log.info("停车场"+parkingLots.size()); parkingLotService.saveBatch(parkingLots); } List<TParkingRecord> parkingRecords = data1.getParkingRecords(); if (!parkingRecords.isEmpty()) { - log.info("停车记录"+parkingRecords); + log.info("停车记录"+parkingRecords.size()); parkingRecordService.saveBatch(parkingRecords); } @@ -429,7 +433,7 @@ // } List<TRepair> repairs = data1.getRepairs(); if (!repairs.isEmpty()) { - log.info("报修"+repairs); + log.info("报修"+repairs.size()); repairService.saveBatch(repairs); } @@ -439,115 +443,114 @@ // } List<TVehicleRamp> vehicleRamps = data1.getVehicleRamps(); if (!vehicleRamps.isEmpty()) { - log.info("车道"+vehicleRamps); + log.info("车道"+vehicleRamps.size()); vehicleRampService.saveBatch(vehicleRamps); } } //order服务 GovernmentCloudOrderVO data2 = jianGuanOrderClient.listAll().getData(); - - if (data2 != null) { + log.info("Order"+data2); List<AccountingStrategyDetailOrder> accountingStrategyDetailOrders = data2.getAccountingStrategyDetailOrders(); if (!accountingStrategyDetailOrders.isEmpty()) { - log.info("订单明细策略"+accountingStrategyDetailOrders); + log.info("订单明细策略"+accountingStrategyDetailOrders.size()); accountingStrategyDetailOrderService.saveBatch(accountingStrategyDetailOrders); } List<AccountingStrategyOrder> accountingStrategyOrders = data2.getAccountingStrategyOrders(); if (!accountingStrategyOrders.isEmpty()) { - log.info("订单策略"+accountingStrategyOrders); + log.info("订单策略"+accountingStrategyOrders.size()); accountingStrategyOrderService.saveBatch(accountingStrategyOrders); } List<TChargingBill> chargingBills = data2.getChargingBills(); if (!chargingBills.isEmpty()) { - log.info("账单"+chargingBills); + log.info("账单"+chargingBills.size()); chargingBillService.saveBatch(chargingBills); } List<TChargingOrder> chargingOrders = data2.getChargingOrders(); if (!chargingOrders.isEmpty()) { - log.info("充电订单"+chargingOrders); + log.info("充电订单"+chargingOrders.size()); chargingOrderService.saveBatch(chargingOrders); } List<TChargingOrderAccountingStrategy> chargingOrderAccountingStrategies = data2.getChargingOrderAccountingStrategies(); if (!chargingOrderAccountingStrategies.isEmpty()) { - log.info("充电订单策略"+chargingOrderAccountingStrategies); + log.info("充电订单策略"+chargingOrderAccountingStrategies.size()); chargingOrderAccountingStrategyService.saveBatch(chargingOrderAccountingStrategies); } List<TChargingOrderRefund> chargingOrderRefunds = data2.getChargingOrderRefunds(); if (!chargingOrderRefunds.isEmpty()) { - log.info("充电订单退款"+chargingOrderRefunds); + log.info("充电订单退款"+chargingOrderRefunds.size()); chargingOrderRefundService.saveBatch(chargingOrderRefunds); } List<TExchangeOrder> exchangeOrders = data2.getExchangeOrders(); if (!exchangeOrders.isEmpty()) { - log.info("兑换订单"+exchangeOrders); + log.info("兑换订单"+exchangeOrders.size()); exchangeOrderService.saveBatch(exchangeOrders); } List<TGrantVip> grantVips = data2.getGrantVips(); if (!grantVips.isEmpty()) { - log.info("赠送vip"+grantVips); + log.info("赠送vip"+grantVips.size()); grantVipService.saveBatch(grantVips); } List<TOrderAppeal> orderAppeals = data2.getOrderAppeals(); if (!orderAppeals.isEmpty()) { - log.info("订单申诉"+orderAppeals); + log.info("订单申诉"+orderAppeals.size()); orderAppealService.saveBatch(orderAppeals); } List<TOrderEvaluate> orderEvaluates = data2.getOrderEvaluates(); if (!orderEvaluates.isEmpty()) { - log.info("订单评价"+orderEvaluates); + log.info("订单评价"+orderEvaluates.size()); orderEvaluateService.saveBatch(orderEvaluates); } List<TOrderEvaluateTag> orderEvaluateTags = data2.getOrderEvaluateTags(); if (!orderEvaluateTags.isEmpty()) { - log.info("订单评价标签"+orderEvaluateTags); + log.info("订单评价标签"+orderEvaluateTags.size()); orderEvaluateTagService.saveBatch(orderEvaluateTags); } List<TOrderInvoice> orderInvoices = data2.getOrderInvoices(); if (!orderInvoices.isEmpty()) { - log.info("订单开票"+orderInvoices); + log.info("订单开票"+orderInvoices.size()); orderInvoiceService.saveBatch(orderInvoices); } List<TOrderInvoiceDetail> orderInvoiceDetails = data2.getOrderInvoiceDetails(); if (!orderInvoiceDetails.isEmpty()) { - log.info("订单开票明细"+orderInvoiceDetails); + log.info("订单开票明细"+orderInvoiceDetails.size()); orderInvoiceDetailService.saveBatch(orderInvoiceDetails); } List<TSettlementConfirm> settlementConfirms = data2.getSettlementConfirms(); if (!settlementConfirms.isEmpty()) { - log.info("账单结算"+settlementConfirms); + log.info("账单结算"+settlementConfirms.size()); settlementConfirmService.saveBatch(settlementConfirms); } List<TShoppingOrder> shoppingOrders = data2.getShoppingOrders(); if (!shoppingOrders.isEmpty()) { - log.info("购物订单"+shoppingOrders); + log.info("购物订单"+shoppingOrders.size()); shoppingOrderService.saveBatch(shoppingOrders); } List<TShoppingOrderRefund> shoppingOrderRefunds = data2.getShoppingOrderRefunds(); if (!shoppingOrderRefunds.isEmpty()) { - log.info("购物订单退款"+shoppingOrderRefunds); + log.info("购物订单退款"+shoppingOrderRefunds.size()); shoppingOrderRefundService.saveBatch(shoppingOrderRefunds); } List<TVipOrder> vipOrders = data2.getVipOrders(); if (!vipOrders.isEmpty()) { - log.info("会员订单"+vipOrders); + log.info("会员订单"+vipOrders.size()); vipOrderService.saveBatch(vipOrders); } @@ -561,114 +564,118 @@ // other服务 GovernmentCloudOtherVO data3 = jianGuanOtherClient.listAll().getData(); if (data3 != null) { + log.info("other"+data3); + List<Operator> operators = data3.getOperators(); if (!operators.isEmpty()) { - log.info("运营商"+operators); + log.info("运营商"+operators.size()); operatorService.saveOrUpdateBatch(operators); } List<TActivity> activities = data3.getActivities(); if (!activities.isEmpty()) { - log.info("活动"+activities); + log.info("活动"+activities.size()); activityService.saveBatch(activities); } List<TAdvertising> advertisings = data3.getAdvertisings(); if (!advertisings.isEmpty()) { - log.info("广告"+advertisings); + log.info("广告"+advertisings.size()); advertisingService.saveBatch(advertisings); } List<TCompany> companies = data3.getCompanies(); if (!companies.isEmpty()) { - log.info("公司"+companies); + log.info("公司"+companies.size()); companyService.saveBatch(companies); } List<TCoupon> coupons = data3.getCoupons(); if (!coupons.isEmpty()) { - log.info("优惠券"+coupons); + log.info("优惠券"+coupons.size()); couponService.saveBatch(coupons); } List<TEnterpriseUserApplication> enterpriseUserApplications = data3.getEnterpriseUserApplications(); if (!enterpriseUserApplications.isEmpty()) { - log.info("公司申请"+enterpriseUserApplications); + log.info("公司申请"+enterpriseUserApplications.size()); enterpriseUserApplicationService.saveBatch(enterpriseUserApplications); } List<TEvaluationTag> evaluationTags = data3.getEvaluationTags(); if (!evaluationTags.isEmpty()) { - log.info("评价标签"+evaluationTags); + log.info("评价标签"+evaluationTags.size()); evaluationTagService.saveBatch(evaluationTags); } List<TGoods> goods = data3.getGoods(); if (!goods.isEmpty()) { - log.info("商品"+goods); + log.info("商品"+goods.size()); goodsService.saveBatch(goods); } List<THtml> htmls = data3.getHtmls(); if (!htmls.isEmpty()) { - log.info("html"+htmls); + log.info("html"+htmls.size()); htmlService.saveOrUpdateBatch(htmls); } List<TIntegralRule> integralRules = data3.getIntegralRules(); if (!integralRules.isEmpty()) { - log.info("积分规则"+integralRules); + log.info("积分规则"+integralRules.size()); integralRuleService.saveBatch(integralRules); } List<TInvoiceType> invoiceTypes = data3.getInvoiceTypes(); if (!invoiceTypes.isEmpty()) { - log.info("开票类型"+invoiceTypes); + log.info("开票类型"+invoiceTypes.size()); invoiceTypeService.saveBatch(invoiceTypes); } List<TNotice> notices = data3.getNotices(); if (!notices.isEmpty()) { - log.info("通知"+notices); + log.info("通知"+notices.size()); noticeService.saveBatch(notices); } List<TSystemConfiguration> systemConfigurations = data3.getSystemConfigurations(); if (!systemConfigurations.isEmpty()) { - log.info("系统设置"+systemConfigurations); + log.info("系统设置"+systemConfigurations.size()); systemConfigurationService.saveOrUpdateBatch(systemConfigurations); } List<TUserTag> userTags = data3.getUserTags(); if (!userTags.isEmpty()) { - log.info("用户标签"+userTags); + log.info("用户标签"+userTags.size()); userTagService.saveBatch(userTags); } List<TVip> vips = data3.getVips(); if (!vips.isEmpty()) { - log.info("会员"+vips); + log.info("会员"+vips.size()); vipService.saveBatch(vips); } } GovernmentCloudSystemVO data4 = jianGuanSystemClient.listAll().getData(); if (data4 != null) { + log.info("System"+data4); + List<SysLoginLog> loginLogs = data4.getLoginLogs(); if (!loginLogs.isEmpty()) { - log.info("登录日志"+loginLogs); + log.info("登录日志"+loginLogs.size()); sysLoginLogService.saveBatch(loginLogs); } List<SysOperLog> sysOperLogs = data4.getSysOperLogs(); if (!sysOperLogs.isEmpty()) { - log.info("操作日志"+sysOperLogs); + log.info("操作日志"+sysOperLogs.size()); sysOperLogService.saveBatch(sysOperLogs); } List<SysRole> sysRoles = data4.getSysRoles(); if (!sysRoles.isEmpty()) { - log.info("角色"+sysRoles); + log.info("角色"+sysRoles.size()); sysRoleService.saveBatch(sysRoles); } List<SysUser> sysUsers = data4.getSysUsers(); if (!sysUsers.isEmpty()) { - log.info("系统用户"+sysUsers); + log.info("系统用户"+sysUsers.size()); sysUserService.saveBatch(sysUsers); } } diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/GovernmentCloudOrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/GovernmentCloudOrderController.java index d13e4b4..c9e79f1 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/GovernmentCloudOrderController.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/GovernmentCloudOrderController.java @@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.time.LocalDate; import java.time.LocalDateTime; import java.util.List; @@ -70,27 +71,63 @@ */ @PostMapping("/listAll") R<GovernmentCloudOrderVO> listAll() { - LocalDateTime end = LocalDateTime.now(); - LocalDateTime start = LocalDateTime.now().minusDays(1); + String start = LocalDate.now().minusDays(1)+" 00:00:00"; + String end = LocalDate.now().minusDays(1)+" 23:59:59"; GovernmentCloudOrderVO governmentCloudAccountVO = new GovernmentCloudOrderVO(); - List<AccountingStrategyDetailOrder> list1 = accountingStrategyDetailOrderService.lambdaQuery().between(AccountingStrategyDetailOrder::getCreateTime, start, end).list(); - List<AccountingStrategyOrder> list2 = accountingStrategyOrderService.lambdaQuery().between(AccountingStrategyOrder::getCreateTime, start, end).list(); - List<TChargingBill> list3 = chargingBillService.lambdaQuery().between(TChargingBill::getCreateTime, start, end).list(); - List<TChargingOrderAccountingStrategy> list4 = chargingOrderAccountingStrategyService.lambdaQuery().between(TChargingOrderAccountingStrategy::getCreateTime, start, end).list(); - List<TChargingOrderRefund> list5 = chargingOrderRefundService.lambdaQuery().between(TChargingOrderRefund::getCreateTime, start, end).list(); - List<TChargingOrder> list6 = chargingOrderService.lambdaQuery().between(TChargingOrder::getCreateTime, start, end).list(); - List<TExchangeOrder> list7 = exchangeOrderService.lambdaQuery().between(TExchangeOrder::getCreateTime, start, end).list(); - List<TGrantVip> list8 = grantVipService.lambdaQuery().between(TGrantVip::getCreateTime, start, end).list(); - List<TOrderAppeal> list9 = orderAppealService.lambdaQuery().between(TOrderAppeal::getCreateTime, start, end).list(); - List<TOrderEvaluate> list10 = orderEvaluateService.lambdaQuery().between(TOrderEvaluate::getCreateTime, start, end).list(); - List<TOrderEvaluateTag> list11 = orderEvaluateTagService.lambdaQuery().between(TOrderEvaluateTag::getCreateTime, start, end).list(); - List<TOrderInvoiceDetail> list12 = orderInvoiceDetailService.lambdaQuery().between(TOrderInvoiceDetail::getCreateTime, start, end).list(); - List<TOrderInvoice> list13 = orderInvoiceService.lambdaQuery().between(TOrderInvoice::getCreateTime, start, end).list(); - List<TSettlementConfirm> list14 = settlementConfirmService.lambdaQuery().between(TSettlementConfirm::getCreateTime, start, end).list(); - List<TShoppingOrderRefund> list15 = shoppingOrderRefundService.lambdaQuery().between(TShoppingOrderRefund::getCreateTime, start, end).list(); - List<TVipOrderRefund> list16 = vipOrderRefundService.lambdaQuery().between(TVipOrderRefund::getCreateTime, start, end).list(); - List<TVipOrder> list17 = vipOrderService.lambdaQuery().between(TVipOrder::getCreateTime, start, end).list(); - List<TShoppingOrder> list18 = shoppingOrderService.lambdaQuery().between(TShoppingOrder::getCreateTime, start, end).list(); + List<AccountingStrategyDetailOrder> list1 = accountingStrategyDetailOrderService.lambdaQuery() + .ge(AccountingStrategyDetailOrder::getCreateTime,start) + .le(AccountingStrategyDetailOrder::getCreateTime,end) .list(); + List<AccountingStrategyOrder> list2 = accountingStrategyOrderService.lambdaQuery() + .ge(AccountingStrategyOrder::getCreateTime,start) + .le(AccountingStrategyOrder::getCreateTime,end) .list(); + List<TChargingBill> list3 = chargingBillService.lambdaQuery() + .ge(TChargingBill::getCreateTime,start) + .le(TChargingBill::getCreateTime,end) .list(); + List<TChargingOrderAccountingStrategy> list4 = chargingOrderAccountingStrategyService.lambdaQuery() + .ge(TChargingOrderAccountingStrategy::getCreateTime,start) + .le(TChargingOrderAccountingStrategy::getCreateTime,end) .list(); + List<TChargingOrderRefund> list5 = chargingOrderRefundService.lambdaQuery() + .ge(TChargingOrderRefund::getCreateTime,start) + .le(TChargingOrderRefund::getCreateTime,end) .list(); + List<TChargingOrder> list6 = chargingOrderService.lambdaQuery() + .ge(TChargingOrder::getCreateTime,start) + .le(TChargingOrder::getCreateTime,end) .list(); + List<TExchangeOrder> list7 = exchangeOrderService.lambdaQuery() + .ge(TExchangeOrder::getCreateTime,start) + .le(TExchangeOrder::getCreateTime,end) .list(); + List<TGrantVip> list8 = grantVipService.lambdaQuery() + .ge(TGrantVip::getCreateTime,start) + .le(TGrantVip::getCreateTime,end) .list(); + List<TOrderAppeal> list9 = orderAppealService.lambdaQuery() + .ge(TOrderAppeal::getCreateTime,start) + .le(TOrderAppeal::getCreateTime,end) .list(); + List<TOrderEvaluate> list10 = orderEvaluateService.lambdaQuery() + .ge(TOrderEvaluate::getCreateTime,start) + .le(TOrderEvaluate::getCreateTime,end) .list(); + List<TOrderEvaluateTag> list11 = orderEvaluateTagService.lambdaQuery() + .ge(TOrderEvaluateTag::getCreateTime,start) + .le(TOrderEvaluateTag::getCreateTime,end) .list(); + List<TOrderInvoiceDetail> list12 = orderInvoiceDetailService.lambdaQuery() + .ge(TOrderInvoiceDetail::getCreateTime,start) + .le(TOrderInvoiceDetail::getCreateTime,end) .list(); + List<TOrderInvoice> list13 = orderInvoiceService.lambdaQuery() + .ge(TOrderInvoice::getCreateTime,start) + .le(TOrderInvoice::getCreateTime,end) .list(); + List<TSettlementConfirm> list14 = settlementConfirmService.lambdaQuery() + .ge(TSettlementConfirm::getCreateTime,start) + .le(TSettlementConfirm::getCreateTime,end) .list(); + List<TShoppingOrderRefund> list15 = shoppingOrderRefundService.lambdaQuery() + .ge(TShoppingOrderRefund::getCreateTime,start) + .le(TShoppingOrderRefund::getCreateTime,end) .list(); + List<TVipOrderRefund> list16 = vipOrderRefundService.lambdaQuery() + .ge(TVipOrderRefund::getCreateTime,start) + .le(TVipOrderRefund::getCreateTime,end) .list(); + List<TVipOrder> list17 = vipOrderService.lambdaQuery() + .ge(TVipOrder::getCreateTime,start) + .le(TVipOrder::getCreateTime,end) .list(); + List<TShoppingOrder> list18 = shoppingOrderService.lambdaQuery() + .ge(TShoppingOrder::getCreateTime,start) + .le(TShoppingOrder::getCreateTime,end) .list(); governmentCloudAccountVO.setAccountingStrategyDetailOrders(list1); governmentCloudAccountVO.setAccountingStrategyOrders(list2); diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GovernmentCloudOtherController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GovernmentCloudOtherController.java index c12c799..5c91885 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GovernmentCloudOtherController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GovernmentCloudOtherController.java @@ -1,6 +1,7 @@ package com.ruoyi.other.controller; +import com.ruoyi.chargingPile.api.model.Partner; import com.ruoyi.common.core.domain.R; import com.ruoyi.order.api.model.*; import com.ruoyi.order.api.vo.GovernmentCloudOrderVO; @@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.time.LocalDate; import java.time.LocalDateTime; import java.util.List; @@ -71,29 +73,56 @@ */ @PostMapping("/listAll") R<GovernmentCloudOtherVO> listAll() { - LocalDateTime end = LocalDateTime.now(); - LocalDateTime start = LocalDateTime.now().minusDays(1); + String start = LocalDate.now().minusDays(1)+" 00:00:00"; + String end = LocalDate.now().minusDays(1)+" 23:59:59"; GovernmentCloudOtherVO governmentCloudAccountVO = new GovernmentCloudOtherVO(); + List<Operator> list1 = operatorService.lambdaQuery() - - List<Operator> list1 = operatorService.lambdaQuery().list(); - List<TActivity> list2 = activityService.lambdaQuery().between(TActivity::getCreateTime, start, end).list(); - List<TAdvertising> list3 = advertisingService.lambdaQuery().between(TAdvertising::getCreateTime, start, end).list(); - List<TCompany> list4 = companyService.lambdaQuery().between(TCompany::getCreateTime, start, end).list(); - List<TCoupon> list5 = couponService.lambdaQuery().between(TCoupon::getCreateTime, start, end).list(); - List<TEnterpriseUserApplication> list6 = enterpriseUserApplicationService.lambdaQuery().between(TEnterpriseUserApplication::getCreateTime, start, end).list(); - List<TEvaluationTag> list7 = evaluationTagService.lambdaQuery().between(TEvaluationTag::getCreateTime, start, end).list(); - List<TGoods> list8 = goodsService.lambdaQuery().between(TGoods::getCreateTime, start, end).list(); - List<THtml> list9 = htmlService.lambdaQuery().list(); - List<TIntegralRule> list10 = integralRuleService.lambdaQuery().list(); - List<TInvoiceType> list11 = invoiceTypeService.lambdaQuery().between(TInvoiceType::getCreateTime, start, end).list(); - List<TNotice> list12 = noticeService.lambdaQuery().between(TNotice::getCreateTime, start, end).list(); + .list(); + List<TActivity> list2 = activityService.lambdaQuery() + .ge(TActivity::getCreateTime,start) + .le(TActivity::getCreateTime,end) .list(); + List<TAdvertising> list3 = advertisingService.lambdaQuery() + .ge(TAdvertising::getCreateTime,start) + .le(TAdvertising::getCreateTime,end) .list(); + List<TCompany> list4 = companyService.lambdaQuery() + .ge(TCompany::getCreateTime,start) + .le(TCompany::getCreateTime,end) .list(); + List<TCoupon> list5 = couponService.lambdaQuery() + .ge(TCoupon::getCreateTime,start) + .le(TCoupon::getCreateTime,end) .list(); + List<TEnterpriseUserApplication> list6 = enterpriseUserApplicationService.lambdaQuery() + .ge(TEnterpriseUserApplication::getCreateTime,start) + .le(TEnterpriseUserApplication::getCreateTime,end) .list(); + List<TEvaluationTag> list7 = evaluationTagService.lambdaQuery() + .ge(TEvaluationTag::getCreateTime,start) + .le(TEvaluationTag::getCreateTime,end) .list(); + List<TGoods> list8 = goodsService.lambdaQuery() + .ge(TGoods::getCreateTime,start) + .le(TGoods::getCreateTime,end) .list(); +// List<THtml> list9 = htmlService.lambdaQuery() +// .ge(THtml::getCreateTime,start) +// .le(THtml::getCreateTime,end) +// .list(); + List<TIntegralRule> list10 = integralRuleService.lambdaQuery() + .list(); + List<TInvoiceType> list11 = invoiceTypeService.lambdaQuery() + .ge(TInvoiceType::getCreateTime,start) + .le(TInvoiceType::getCreateTime,end) .list(); + List<TNotice> list12 = noticeService.lambdaQuery() + .ge(TNotice::getCreateTime,start) + .le(TNotice::getCreateTime,end) .list(); // List<TRoleSite> list13 = roleSiteService.lambdaQuery().between(TRoleSite::getCreateTime, start, end).list(); List<TSystemConfiguration> list14 = systemConfigurationService.lambdaQuery().list(); // List<TUserSite> list15 = userSiteService.lambdaQuery().between(TUserSite::getCreateTime, start, end).list(); - List<TUserTag> list16 = userTagService.lambdaQuery().between(TUserTag::getCreateTime, start, end).list(); - List<TVip> list17 = vipService.lambdaQuery().between(TVip::getCreateTime, start, end).list(); - governmentCloudAccountVO.setOperators(list1); + List<TUserTag> list16 = userTagService.lambdaQuery() + .ge(TUserTag::getCreateTime,start) + .le(TUserTag::getCreateTime,end) .list(); + List<TVip> list17 = vipService.lambdaQuery() + .ge(TVip::getCreateTime,start) + .le(TVip::getCreateTime,end) + .list(); +// governmentCloudAccountVO.setOperators(list1); governmentCloudAccountVO.setActivities(list2); governmentCloudAccountVO.setAdvertisings(list3); governmentCloudAccountVO.setCompanies(list4); @@ -101,11 +130,11 @@ governmentCloudAccountVO.setEnterpriseUserApplications(list6); governmentCloudAccountVO.setEvaluationTags(list7); governmentCloudAccountVO.setGoods(list8); - governmentCloudAccountVO.setHtmls(list9); - governmentCloudAccountVO.setIntegralRules(list10); +// governmentCloudAccountVO.setHtmls(list9); +// governmentCloudAccountVO.setIntegralRules(list10); governmentCloudAccountVO.setInvoiceTypes(list11); governmentCloudAccountVO.setNotices(list12); - governmentCloudAccountVO.setSystemConfigurations(list14); +// governmentCloudAccountVO.setSystemConfigurations(list14); governmentCloudAccountVO.setUserTags(list16); governmentCloudAccountVO.setVips(list17); -- Gitblit v1.7.1