From abba1aff81da3cc9d74d75f64cbd48d25716aec3 Mon Sep 17 00:00:00 2001 From: luliqiang <kidgrow> Date: Fri, 12 Mar 2021 19:19:10 +0800 Subject: [PATCH] 1、增加对于套餐中的剩余读片量、有效开始日期、结束日期的加密 2、增加扣费过程中对于剩余读片量的加密 3、为下载私有云数据库增加合同与明细的查询Feign接口 4、修改合作商数据库(影像版API)的合同与明细的查询bug --- kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-server/src/main/java/com/kidgrow/oprationcenter/controller/PartnerDockingInfoController.java | 56 ++++++++++++++++++++++++++++++-------------------------- 1 files changed, 30 insertions(+), 26 deletions(-) diff --git a/kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-server/src/main/java/com/kidgrow/oprationcenter/controller/PartnerDockingInfoController.java b/kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-server/src/main/java/com/kidgrow/oprationcenter/controller/PartnerDockingInfoController.java index b2c532a..89ce998 100644 --- a/kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-server/src/main/java/com/kidgrow/oprationcenter/controller/PartnerDockingInfoController.java +++ b/kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-server/src/main/java/com/kidgrow/oprationcenter/controller/PartnerDockingInfoController.java @@ -155,38 +155,42 @@ public void downLoadDataBase(@RequestBody PartnerDockingInfo partnerDockingInfo, HttpServletResponse response) { String dbSql = partnerDockingInfoService.createSQL(partnerDockingInfo); - OutputStream out = null; - InputStream fileInputStream = null; - try { - //BASE64Decoder dencoder = new BASE64Decoder(); - byte[] arr = dbSql.getBytes(); + if ((dbSql == null) ||(dbSql.isEmpty())) { + log.error("创建私有云数据库脚本出错!"); + } else { - // 设置输出的格式 - response.reset(); - response.setContentType("application/x-msdownload"); - response.addHeader("Content-Length", "" + arr.length); - response.addHeader("Content-Disposition", "attachment; filename=\"" + partnerDockingInfo.getHospitalName()+partnerDockingInfo.getDepartmentName() + ".sql\""); + OutputStream out = null; + InputStream fileInputStream = null; + try { + //BASE64Decoder dencoder = new BASE64Decoder(); + byte[] arr = dbSql.getBytes(); + + // 设置输出的格式 + response.reset(); + response.setContentType("application/x-msdownload"); + response.addHeader("Content-Length", "" + arr.length); + response.addHeader("Content-Disposition", "attachment; filename=\"" + partnerDockingInfo.getHospitalName() + partnerDockingInfo.getDepartmentName() + ".sql\""); + out = response.getOutputStream(); + fileInputStream = new ByteArrayInputStream(arr); + byte[] buffer = new byte[1024 * 10]; + int len = 0; + while ((len = fileInputStream.read(buffer)) > 0) { + out.write(buffer, 0, len); + } - out = response.getOutputStream(); - fileInputStream = new ByteArrayInputStream(arr); - byte[] buffer = new byte[1024 * 10] ; - int len = 0; - while ((len = fileInputStream.read(buffer)) > 0) { - out.write(buffer, 0, len); - } + } catch (Exception e) { + e.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); + } finally { - } finally { - - if (fileInputStream != null) { - try { - fileInputStream.close(); - } catch (IOException e) { - e.printStackTrace(); + if (fileInputStream != null) { + try { + fileInputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } } } } -- Gitblit v1.8.0