Merge remote-tracking branch 'origin/master'
| | |
| | | @PostMapping(value = "/user/invite/page") |
| | | public R<Page<TInviteUser>> invitePage(@RequestBody BasePage basePage) { |
| | | Long userId = tokenService.getLoginUserApplet().getUserId(); |
| | | |
| | | Page<TInviteUser> page = inviteUserService.lambdaQuery().eq(TInviteUser::getAppUserId, userId).isNotNull(TInviteUser::getAward).orderByDesc(TInviteUser::getCreateTime).page(Page.of(basePage.getPageCurr(), basePage.getPageSize())); |
| | | for (TInviteUser record : page.getRecords()) { |
| | | TAppUser byId = appUserService.getById(record.getBeInvitedAppUserId()); |
| | |
| | | chargingBillExport.setCode(byId.getCode()); |
| | | chargingBillExport.setAccountType("微信商户"); |
| | | chargingBillExport.setType(byId.getType().toString()); |
| | | chargingBillExport.setBillType("月账单"); |
| | | LocalDateTime billTime = byId.getBillTime(); |
| | | // 将billTime 减去一个月 转化为yyyy-MM格式字符串 |
| | | billTime = billTime.minusMonths(1); |
| | | chargingBillExport.setBillWeek(DateUtils.parseDateToStr("yyyy-MM",DateUtils.toDate(billTime))); |
| | | |
| | | chargingBillExport.setBillTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss",DateUtils.toDate(billTime))); |
| | | chargingBillExport.setState("未出账"); |
| | | List<Site> data = siteClient.getSiteByIds(Arrays.asList(byId.getSiteId())).getData(); |
| | | if (!data.isEmpty()){ |
| | | chargingBillExport.setSiteName(data.get(0).getName()); |
| | |
| | | private String accountType; |
| | | @Excel(name = "账单分类",width = 30,replace = {"全站账单_1","各个站点账单_2"}) |
| | | private String type; |
| | | @Excel(name = "账单类型",width = 30) |
| | | private String billType; |
| | | |
| | | @Excel(name = "账单周期",width = 30 ) |
| | | private String billWeek; |
| | | @Excel(name = "账单生成日期",width = 30) |
| | | private String billTime; |
| | | @Excel(name = "状态",width = 30) |
| | | private String state; |
| | | |
| | | @Excel(name = "站点名称",width = 30) |
| | | private String siteName; |
| | | @Excel(name = "支付金额",width = 30) |
| | |
| | | tChargingBill3.setType(2); |
| | | tChargingBill3.setSiteId(collect.get(i)); |
| | | tChargingBill3.setBillTime(LocalDateTime.now()); |
| | | tChargingBill3.setBillType(1); |
| | | tChargingBill3.setBillType(2); |
| | | tChargingBill3.setStatus(1); |
| | | tChargingBill3.setOrderState(2); |
| | | tChargingBills1.add(tChargingBill3); |
| | |
| | | CAST(SUM(service_charge-coupon_discount_amount) AS DECIMAL(20, 6)) as servicecharge, |
| | | CAST(SUM(charging_capacity) AS DECIMAL(20, 6)) as electrovalence, |
| | | CAST(SUM(electrovalence) AS DECIMAL(20, 4)) AS paymentAmount, |
| | | SUM(payment_amount) AS paymoney, |
| | | count(1) as orderCount |
| | | FROM |
| | | t_charging_order |
| | |
| | | LEFT JOIN `charging_pile_service`.`t_charging_gun` tc on co.charging_gun_id = tc.id |
| | | LEFT JOIN `charging_pile_service`.`t_charging_pile` cp on tc.charging_pile_id = cp.id |
| | | WHERE |
| | | co.start_time IS NOT NULL AND co.end_time IS NOT NULL and cp.type = 1 |
| | | co.start_time IS NOT NULL AND co.end_time IS NOT NULL and tc.type = 4 |
| | | <if test="siteIds != null and siteIds.size() > 0"> |
| | | and co.site_id IN |
| | | <foreach collection="siteIds" item="siteId" open="(" separator="," close=")"> |
| | |
| | | LEFT JOIN `charging_pile_service`.`t_charging_gun` tc on co.charging_gun_id = tc.id |
| | | LEFT JOIN `charging_pile_service`.`t_charging_pile` cp on tc.charging_pile_id = cp.id |
| | | WHERE |
| | | co.start_time IS NOT NULL AND co.end_time IS NOT NULL and cp.type = 2 |
| | | co.start_time IS NOT NULL AND co.end_time IS NOT NULL and tc.type in (2,3) |
| | | <if test="siteIds != null and siteIds.size() > 0"> |
| | | and co.site_id IN |
| | | <foreach collection="siteIds" item="siteId" open="(" separator="," close=")"> |