| | |
| | | JSONObject jsonObject = JSONObject.parseObject(xpOperationsUserVO.getAvatar()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 1 |
| | | String downloadUrl1 = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | downloadUrl = downloadUrl1; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | xpOperationsUserVO.setAvatar(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpOperationsUserVO.setAvatar(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | return R.ok(xpOperationsUserVO); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(avatar); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | xpOperationsUserVO.setAvatar(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpOperationsUserVO.setAvatar(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | pageInfo.setRecords(list); |
| | |
| | | String certificateOfNoCriminalRecord = xpQualificationAuditVO.getCertificateOfNoCriminalRecord(); |
| | | if(certificateOfNoCriminalRecord!=null){ |
| | | JSONObject jsonObject = JSONObject.parseObject(certificateOfNoCriminalRecord); |
| | | // 1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | xpQualificationAuditVO.setCertificateOfNoCriminalRecord(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpQualificationAuditVO.setCertificateOfNoCriminalRecord(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | String driverLicense = xpQualificationAuditVO.getDriverLicense(); |
| | | if(driverLicense!=null){ |
| | | JSONObject jsonObject = JSONObject.parseObject(driverLicense); |
| | | //1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | xpQualificationAuditVO.setDriverLicense(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpQualificationAuditVO.setDriverLicense(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | |
| | | String trainingGraduationCertificate = xpQualificationAuditVO.getTrainingGraduationCertificate(); |
| | | if(trainingGraduationCertificate!=null){ |
| | | JSONObject jsonObject = JSONObject.parseObject(trainingGraduationCertificate); |
| | | //1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | xpQualificationAuditVO.setTrainingGraduationCertificate(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpQualificationAuditVO.setTrainingGraduationCertificate(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | String idCardFront = xpQualificationAuditVO.getIdCardFront(); |
| | | if(idCardFront!=null){ |
| | | JSONObject jsonObject = JSONObject.parseObject(idCardFront); |
| | | //1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | xpQualificationAuditVO.setIdCardFront(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpQualificationAuditVO.setIdCardFront(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | String idCardBack = xpQualificationAuditVO.getIdCardBack(); |
| | | if(idCardBack!=null){ |
| | | JSONObject jsonObject = JSONObject.parseObject(idCardBack); |
| | | //1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | xpQualificationAuditVO.setIdCardBack(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpQualificationAuditVO.setIdCardBack(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | } |
| | |
| | | String taskImage = xpTask.getTaskImage(); |
| | | if (StringUtils.isNotBlank(taskImage)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(taskImage); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | JSONObject jsonObject = (JSONObject)o; |
| | | String downloadUrl = null; |
| | | try { |
| | | // 1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | xpTask.setTaskImage(String.join(",", list)); |
| | | xpTask.setTaskImage(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | return R.ok(xpTask); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "执行保险年检检测定时任务", tags = {"定时任务"}) |
| | | @GetMapping("/base/task/insurance/execute") |
| | | public R<?> executeInsuranceTask() { |
| | |
| | | String vehiclePictures = vehicle.getVehiclePictures(); |
| | | if (org.apache.commons.lang3.StringUtils.isNotBlank(vehiclePictures)) { |
| | | JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); |
| | | //1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | vehicle.setVehiclePictures(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | vehicle.setVehiclePictures(jsonObject.toJSONString()); |
| | | } |
| | | } |
| | | return R.ok(vehicles); |
| | |
| | | String vehiclePictures = xpVehicleCleanVO.getVehiclePictures(); |
| | | if (vehiclePictures != null && !vehiclePictures.isEmpty()) { |
| | | JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); |
| | | // 1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | xpVehicleCleanVO.setVehiclePictures(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpVehicleCleanVO.setVehiclePictures(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | |
| | |
| | | String taskImage = xpVehicleCleanVO.getTaskImage(); |
| | | if (StringUtils.isNotBlank(taskImage)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(taskImage); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | xpVehicleCleanVO.setTaskImage(String.join(",", list)); |
| | | xpVehicleCleanVO.setTaskImage(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | |
| | |
| | | String taskImage = record.getTaskImage(); |
| | | if (StringUtils.isNotBlank(taskImage)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(taskImage); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | record.setTaskImage(String.join(",", list)); |
| | | record.setTaskImage(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | data.stream().filter(xpOperationsUser -> xpOperationsUser.getId().equals(record.getOperationsUserId())).findFirst().ifPresent(xpOperationsUser -> record.setCreateBy(xpOperationsUser.getNickName())); |
| | | } |
| | |
| | | String vehiclePictures = xpVehicleDetectionVO.getVehiclePictures(); |
| | | if (vehiclePictures != null && !vehiclePictures.isEmpty()) { |
| | | JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); |
| | | // 1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | xpVehicleDetectionVO.setVehiclePictures(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpVehicleDetectionVO.setVehiclePictures(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | |
| | | String sensorCleaningPicture = xpVehicleDetectionVO.getSensorCleaningPicture(); |
| | | if (StringUtils.isNotBlank(sensorCleaningPicture)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(sensorCleaningPicture); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | xpVehicleDetectionVO.setSensorCleaningPicture(String.join(",", list)); |
| | | xpVehicleDetectionVO.setSensorCleaningPicture(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | |
| | | String interactiveScreenPicture = xpVehicleDetectionVO.getInteractiveScreenPicture(); |
| | | if (StringUtils.isNotBlank(interactiveScreenPicture)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(interactiveScreenPicture); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | xpVehicleDetectionVO.setInteractiveScreenPicture(String.join(",", list)); |
| | | xpVehicleDetectionVO.setInteractiveScreenPicture(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | |
| | | String helpButtonPicture = xpVehicleDetectionVO.getHelpButtonPicture(); |
| | | if (StringUtils.isNotBlank(helpButtonPicture)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(helpButtonPicture); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | xpVehicleDetectionVO.setHelpButtonPicture(String.join(",", list)); |
| | | xpVehicleDetectionVO.setHelpButtonPicture(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | |
| | | String paymentFunctionPicture = xpVehicleDetectionVO.getPaymentFunctionPicture(); |
| | | if (StringUtils.isNotBlank(paymentFunctionPicture)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(paymentFunctionPicture); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | xpVehicleDetectionVO.setPaymentFunctionPicture(String.join(",", list)); |
| | | xpVehicleDetectionVO.setPaymentFunctionPicture(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | |
| | | String systemCheckPicture = xpVehicleDetectionVO.getSystemCheckPicture(); |
| | | if (StringUtils.isNotBlank(systemCheckPicture)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(systemCheckPicture); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | xpVehicleDetectionVO.setSystemCheckPicture(String.join(",", list)); |
| | | xpVehicleDetectionVO.setSystemCheckPicture(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | |
| | |
| | | String vehiclePictures = xpVehicleDetectionVO.getVehiclePictures(); |
| | | if (vehiclePictures != null && !vehiclePictures.isEmpty()) { |
| | | JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); |
| | | // 2 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | xpVehicleDetectionVO.setVehiclePictures(downloadUrl); |
| | | } |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | String interactiveScreenPicture = xpVehicleDetectionVO.getInteractiveScreenPicture(); |
| | | if (StringUtils.isNotBlank(interactiveScreenPicture)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(interactiveScreenPicture); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | xpVehicleDetectionVO.setInteractiveScreenPicture(String.join(",", list)); |
| | | xpVehicleDetectionVO.setInteractiveScreenPicture(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | |
| | | String helpButtonPicture = xpVehicleDetectionVO.getHelpButtonPicture(); |
| | | if (StringUtils.isNotBlank(helpButtonPicture)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(helpButtonPicture); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | xpVehicleDetectionVO.setHelpButtonPicture(String.join(",", list)); |
| | | xpVehicleDetectionVO.setHelpButtonPicture(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | |
| | | String paymentFunctionPicture = xpVehicleDetectionVO.getPaymentFunctionPicture(); |
| | | if (StringUtils.isNotBlank(paymentFunctionPicture)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(paymentFunctionPicture); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | xpVehicleDetectionVO.setPaymentFunctionPicture(String.join(",", list)); |
| | | xpVehicleDetectionVO.setPaymentFunctionPicture(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | |
| | | String systemCheckPicture = xpVehicleDetectionVO.getSystemCheckPicture(); |
| | | if (StringUtils.isNotBlank(systemCheckPicture)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(systemCheckPicture); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | xpVehicleDetectionVO.setSystemCheckPicture(String.join(",", list)); |
| | | xpVehicleDetectionVO.setSystemCheckPicture(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | } |
| | |
| | | String vehiclePictures = record.getVehiclePictures(); |
| | | if (StringUtils.isNotBlank(vehiclePictures)) { |
| | | JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); |
| | | // 2 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | record.setVehiclePictures(downloadUrl); |
| | | } |
| | |
| | | String vehiclePictures = xpVehiclePreparationVO.getVehiclePictures(); |
| | | if (StringUtils.isNotBlank(vehiclePictures)) { |
| | | JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); |
| | | // 1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | xpVehiclePreparationVO.setVehiclePictures(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpVehiclePreparationVO.setVehiclePictures(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | |
| | |
| | | String vehiclePictures = xpVehicleRepairVO.getVehiclePictures(); |
| | | if (StringUtils.isNotBlank(vehiclePictures)) { |
| | | JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); |
| | | // 1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | xpVehicleRepairVO.setVehiclePictures(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpVehicleRepairVO.setVehiclePictures(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | String startRepairPicture = xpVehicleRepairVO.getStartRepairPicture(); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | String vehiclePictures = record.getVehiclePictures(); |
| | | if (StringUtils.isNotBlank(vehiclePictures)) { |
| | | JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); |
| | | //1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | record.setVehiclePictures(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | record.setVehiclePictures(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | String startRepairPicture = record.getStartRepairPicture(); |
| | | if (StringUtils.isNotBlank(startRepairPicture)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(startRepairPicture); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | record.setStartRepairPicture(String.join(",", list)); |
| | | record.setStartRepairPicture(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | } |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | String vehiclePictures =xpVehicle.getVehiclePictures(); |
| | | if (StringUtils.isNotBlank(vehiclePictures)) { |
| | | JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); |
| | | // 1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | xpChargingRecordVO.setVehiclePictures(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpChargingRecordVO.setVehiclePictures(jsonObject.toJSONString()); |
| | | } |
| | | |
| | | |
| | |
| | | String vehiclePictures = vo.getVehiclePictures(); |
| | | if (StringUtils.isNotBlank(vehiclePictures)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(vehiclePictures); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | vo.setVehiclePictures(String.join(",", list)); |
| | | vo.setVehiclePictures(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | String vehiclePictures = workBenchVO.getVehiclePictures(); |
| | | if (StringUtils.isNotBlank(vehiclePictures)) { |
| | | JSONObject jsonObject = JSONObject.parseObject(vehiclePictures); |
| | | //1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | workBenchVO.setVehiclePictures(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | workBenchVO.setVehiclePictures(jsonObject.toJSONString()); |
| | | } |
| | | } |
| | | |
| | |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | // 2 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | list.add(downloadUrl); |
| | | } |
| | |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | // 2 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | list.add(downloadUrl); |
| | | } |
| | |
| | | String startChargingPicture = res.getStartChargingPicture(); |
| | | if (StringUtils.isNotBlank(startChargingPicture)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(startChargingPicture); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | res.setStartChargingPicture(String.join(",", list)); |
| | | res.setStartChargingPicture(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | res.setStartTime(chargingRecord.getStartTime()); |
| | |
| | | String endChargingPicture = chargingRecord.getEndChargingPicture(); |
| | | if (StringUtils.isNotBlank(endChargingPicture)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(endChargingPicture); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | //1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | res.setEndChargingPicture(String.join(",", list)); |
| | | res.setEndChargingPicture(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | res.setEndTime(chargingRecord.getEndTime()); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | // 2 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | list.add(downloadUrl); |
| | | } |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | |
| | | if(vehicle.getVehiclePictures()!=null){ |
| | | JSONObject jsonObject = JSONObject.parseObject(vehicle.getVehiclePictures()); |
| | | // 2 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | taskManagementDetectionDetailVO.setVehiclePictures(downloadUrl); |
| | | } |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | String RepairMoneyDetail = vo.getRepairMoneyDetail(); |
| | | if (StringUtils.isNotBlank(RepairMoneyDetail)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(RepairMoneyDetail); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 1 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | vo.setRepairMoneyDetail(String.join(",", list)); |
| | | vo.setRepairMoneyDetail(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSON.parseArray(xpBanner.getBannerPictures()).getJSONObject(0); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSON.parseArray(item.getBannerPictures()).getJSONObject(0); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSON.parseArray(xpBanner.getBannerPictures()).getJSONObject(0); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | JSONObject jsonObject = JSON.parseObject(xpRideGuide.getGuideImage()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | xpRideGuide.setGuideImage(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | xpRideGuide.setGuideImage(jsonObject.toJSONString()); |
| | | } |
| | | return list; |
| | | } |
| | |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | String downloadUrl = null; |
| | | try { |
| | | // 2 |
| | | downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | |
| | | ,create_time as createTime,update_time as updateTime,create_by as createBy,update_by as updateBy |
| | | from xp_whitelist |
| | | where is_deleted = 0 |
| | | group by account |
| | | <if test="query.account != null and query.account != ''"> |
| | | and account like concat('%',#{query.account},'%') |
| | | </if> |
| | |
| | | String vehiclePictures = xpVehicle.getVehiclePictures(); |
| | | if(vehiclePictures!=null){ |
| | | JSONObject jsonObject = JSON.parseObject(vehiclePictures); |
| | | // 2 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | xpVehicle.setVehiclePictures(downloadUrl); |
| | | } |
| | |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | // 2 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | list.add(downloadUrl); |
| | | } |
| | |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | // 2 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | list.add(downloadUrl); |
| | | } |
| | |
| | | String policyInformation = record.getPolicyInformation(); |
| | | if (StringUtils.isNotBlank(policyInformation)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(policyInformation); |
| | | ArrayList<String> list = new ArrayList<>(jsonArray.size()); |
| | | for (Object o : jsonArray) { |
| | | JSONObject jsonObject = JSONObject.parseObject(o.toString()); |
| | | // 1 |
| | | String downloadUrl = aliOssService.getDownloadUrl(jsonObject.getString("id"), jsonObject.getString("name"), true); |
| | | list.add(downloadUrl); |
| | | jsonObject.put("url", downloadUrl); |
| | | } |
| | | record.setPolicyInformation(String.join(",", list)); |
| | | record.setPolicyInformation(JSONArray.toJSONString(jsonArray)); |
| | | } |
| | | |
| | | |