| | |
| | | private TSettlementConfirmService tSettlementConfirmService; |
| | | @Resource |
| | | private VipClient vipClient; |
| | | @Autowired |
| | | @Resource |
| | | private SiteClient siteClient; |
| | | @Autowired |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | @Autowired |
| | | @Resource |
| | | private ChargingGunClient chargingGunClient; |
| | | @Autowired |
| | | @Resource |
| | | private AppUserCarClient appUserCarClient; |
| | | @Resource |
| | | private AccountingStrategyOrderService accountingStrategyOrderService; |
| | |
| | | @ApiOperation(value = "充电时段统计-导出", tags = {"管理后台-财务结算"}) |
| | | @PutMapping("/export") |
| | | public void export(@RequestBody ChargingListQuery dto) { |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | ChargingOrderTimeVO res = chargingOrderService.chargingList(dto); |
| | | List<TChargingOrderExport> tChargingOrderExports = new ArrayList<>(); |
| | | List<ChargingOrderListVO> exportList = res.getExportList(); |
| | | int i = 0; |
| | | List<Site> data9 = siteClient.getSiteAll().getData(); |
| | | int i = 1; |
| | | List<TChargingGun> data = chargingGunClient.getAllGun().getData(); |
| | | List<Site> data9 = siteClient.getSiteAll().getData(); |
| | | List<TAppUser> data6 = appUserClient.getAllUser().getData(); |
| | | List<Partner> data7 = siteClient.getAllPartner().getData(); |
| | | List<AccountingStrategyOrder> listAll = accountingStrategyOrderService.lambdaQuery() |
| | | .list(); |
| | | List<TChargingOrderAccountingStrategy> stageCostAll = tChargingOrderAccountingStrategyService.list( |
| | | ); |
| | | List<TVip> data5 = vipClient.getAllVip().getData(); |
| | | List<TAppUserCar> data8 = appUserCarClient.getAllCar().getData(); |
| | | for (ChargingOrderListVO chargingOrderListVO : exportList) { |
| | | TChargingOrderExport tChargingOrderExport = new TChargingOrderExport(); |
| | | Site site = data9.stream().filter(e -> e.getId().equals(chargingOrderListVO.getSiteId())).findFirst().orElse(null); |
| | |
| | | tChargingOrderExport.setStartType("扫码"); |
| | | tChargingOrderExport.setOne("小程序"); |
| | | if (chargingOrderListVO.getRechargePaymentType()!=null){ |
| | | switch (chargingOrderListVO.getRechargePaymentType()){ |
| | | case 1: |
| | | tChargingOrderExport.setTwo("微信小程序"); |
| | | break; |
| | | case 2: |
| | | tChargingOrderExport.setTwo("支付宝小程序"); |
| | | break; |
| | | if (chargingOrderListVO.getOrderSource()!=null&&chargingOrderListVO.getOrderSource().equals(2)){ |
| | | if (chargingOrderListVO.getTripartitePlatformName().equals("XinDianTu")){ |
| | | tChargingOrderExport.setTwo("新电途"); |
| | | tChargingOrderExport.setOne("互联互通"); |
| | | |
| | | } |
| | | if (chargingOrderListVO.getTripartitePlatformName().equals("KuaiDian")){ |
| | | tChargingOrderExport.setTwo("快电"); |
| | | tChargingOrderExport.setOne("互联互通"); |
| | | |
| | | } |
| | | }else{ |
| | | switch (chargingOrderListVO.getRechargePaymentType()){ |
| | | case 1: |
| | | tChargingOrderExport.setTwo("微信小程序"); |
| | | break; |
| | | case 2: |
| | | tChargingOrderExport.setTwo("支付宝小程序"); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | if (chargingOrderListVO.getCreateTime()!=null){ |
| | | String s1 = DateUtils.localDateTimeToString(chargingOrderListVO.getCreateTime()); |
| | |
| | | tChargingOrderExport.setIsSocNum("0"); |
| | | tChargingOrderExport.setUserType("普通个人用户"); |
| | | if (data3!=null&&data3.getVipId()!=null){ |
| | | TVip data1 = vipClient.getInfo1(data3.getVipId()).getData(); |
| | | TVip data1 = data5.stream().filter(e->e.getId().equals(data3.getVipId())).findFirst().orElse(null); |
| | | if (data1!=null){ |
| | | tChargingOrderExport.setVipType(data1.getName()); |
| | | } |
| | |
| | | tChargingOrderExport.setDeviceCode(data4.getCode()); |
| | | } |
| | | tChargingOrderExport.setAccountType("个人"); |
| | | List<TAppUserCar> data1 = appUserCarClient.getCarByIds(Arrays.asList(chargingOrderListVO.getAppUserCarId())).getData(); |
| | | if (data1!=null&&(!data1.isEmpty())){ |
| | | tChargingOrderExport.setCarNumber(data1.get(0).getLicensePlate()); |
| | | tChargingOrderExport.setCarType(data1.get(0).getVehicleModel()); |
| | | tChargingOrderExport.setCarBrand(data1.get(0).getVehicleBrand()); |
| | | |
| | | |
| | | TAppUserCar tAppUserCar = data8.stream().filter(e -> e.getId().equals(chargingOrderListVO.getAppUserId())).findFirst().orElse(null); |
| | | if (tAppUserCar!=null){ |
| | | tChargingOrderExport.setCarNumber(tAppUserCar.getLicensePlate()); |
| | | tChargingOrderExport.setCarType(tAppUserCar.getVehicleModel()); |
| | | tChargingOrderExport.setCarBrand(tAppUserCar.getVehicleBrand()); |
| | | } |
| | | tChargingOrderExport.setOrderCode(chargingOrderListVO.getCode()); |
| | | tChargingOrderExport.setOrderCode(chargingOrderListVO.getStartChargeSeq()); |
| | | tChargingOrderExport.setIsSingle("是"); |
| | | tChargingOrderExport.setPayTime(chargingOrderListVO.getPayTime()+""); |
| | | tChargingOrderExport.setElectrovalenceSiteName("四川明星新能源科技有限公司"); |