| | |
| | | TCharingOrderVO res = chargingOrderService.chargingOrder(dto); |
| | | return AjaxResult.success(res); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | String temp = "00"; |
| | | Integer i = Integer.valueOf(temp); |
| | | System.err.println(i); |
| | | } |
| | | @RequiresPermissions(value = {"/chargingPileOrder/monitoring_record"}, logical = Logical.OR) |
| | | @ResponseBody |
| | | @GetMapping(value = "/chargingOrderInfo") |
| | |
| | | List<TChargingOrderAccountingStrategy> list = chargingOrderAccountingStrategyService.lambdaQuery().eq(TChargingOrderAccountingStrategy::getChargingOrderId, strategyId).orderByDesc(TChargingOrderAccountingStrategy::getStartTime).list(); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | for (TChargingOrderAccountingStrategy tChargingOrderAccountingStrategy : list) { |
| | | String format = tChargingOrderAccountingStrategy.getCreateTime().format(formatter); |
| | | String format = ""; |
| | | String format1 = ""; |
| | | String temp1=list.get(0).getStartTime().split(":")[0]; |
| | | String[] split = tChargingOrderAccountingStrategy.getStartTime().split(":"); |
| | | if (Integer.parseInt(split[0])>=Integer.valueOf(temp1)){ |
| | | format = byId.getCreateTime().format(formatter); |
| | | }else { |
| | | format = byId.getEndTime().format(formatter); |
| | | } |
| | | String[] split1 = tChargingOrderAccountingStrategy.getEndTime().split(":"); |
| | | if (Integer.parseInt(split1[0])<Integer.valueOf(temp1)){ |
| | | format1 = byId.getCreateTime().format(formatter); |
| | | }else { |
| | | format1 = byId.getEndTime().format(formatter); |
| | | } |
| | | tChargingOrderAccountingStrategy.setStartTime(format+" "+tChargingOrderAccountingStrategy.getStartTime()); |
| | | tChargingOrderAccountingStrategy.setEndTime(format+" "+tChargingOrderAccountingStrategy.getEndTime()); |
| | | tChargingOrderAccountingStrategy.setEndTime(format1+" "+tChargingOrderAccountingStrategy.getEndTime()); |
| | | if (byId.getVipDiscountAmount()!=null && byId.getServiceCharge().compareTo(BigDecimal.ZERO) != 0){ |
| | | BigDecimal multiply = byId.getVipDiscountAmount().divide(byId.getServiceCharge(), 2) |
| | | .multiply(tChargingOrderAccountingStrategy.getPeriodOriginalServicePrice()); |