From 7027235124f1aaf2d64cd0cee2308e85a2130a03 Mon Sep 17 00:00:00 2001 From: MrZhai Date: Mon, 7 Mar 2022 18:40:54 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9json=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E4=B8=BAudi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/basic/CorpExportLogController.java | 4 ++-- .../admin/controller/basic/CorpImportLogController.java | 4 ++-- .../admin/controller/basic/UdiInfoExportLogController.java | 4 ++-- .../admin/controller/basic/UdiInfoImportLogController.java | 7 ++----- .../controller/thrsys/ThrCorpExportLogController.java | 4 ++-- .../controller/thrsys/ThrProductsExportLogController.java | 4 ++-- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/CorpExportLogController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/CorpExportLogController.java index 46a291c5..f79a3a6c 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/CorpExportLogController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/CorpExportLogController.java @@ -106,7 +106,7 @@ public class CorpExportLogController { //往来单位导出生成Excel,并创建生成记录 @PostMapping("/udiwms/corps/importLog/export") public BaseResponse excelDownload(@RequestBody CorpsExportRequest corpsExportRequest) { - String fileName = "D:\\udiwms\\exportFile\\" + "往来单位信息导出" + System.currentTimeMillis() + ".json"; + String fileName = "D:\\udiwms\\exportFile\\" + "往来单位信息导出" + System.currentTimeMillis() + ".udi"; CorpExportLogEntity corpExportLogEntity = new CorpExportLogEntity(); corpExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_PROCESS); String genKey = CustomUtil.getId(); @@ -118,7 +118,7 @@ public class CorpExportLogController { corpExportLogService.insertCorpExportLog(corpExportLogEntity); //basicGenExcelService.exportCorp(genKey, corpsExportRequest); basicGenJsonService.exportCorp(genKey, corpsExportRequest); - return ResultVOUtils.success("后台正在导出生成Json文件,请稍后刷新查看!"); + return ResultVOUtils.success("后台正在导出生成udi文件,请稍后刷新查看!"); } //往来单位上传SMP,并创建生成记录 diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/CorpImportLogController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/CorpImportLogController.java index 62653f40..bc4b9995 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/CorpImportLogController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/CorpImportLogController.java @@ -125,7 +125,7 @@ public class CorpImportLogController { //解析数据 try { String fileType = fileName.substring(fileName.lastIndexOf(".")); - if (".json".equals(fileType.toLowerCase())) { + if (".udi".equals(fileType.toLowerCase())) { String jsonData = IoUtil.read(file.getInputStream()).toString(); List basicUnitMaintainEntities = JSONUtil.toList(jsonData, BasicUnitMaintainEntity.class); @@ -141,7 +141,7 @@ public class CorpImportLogController { corpImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS); corpImportLogService.updateImportLog(corpImportLogEntity); } else { - return ResultVOUtils.error(500, "请上传json文件"); + return ResultVOUtils.error(500, "请上传udi文件"); } } catch (Exception e) { log.error("导入往来单位信息错误,文件名为:{}", fileName); diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/UdiInfoExportLogController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/UdiInfoExportLogController.java index f9aa8b1c..384a5455 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/UdiInfoExportLogController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/UdiInfoExportLogController.java @@ -120,7 +120,7 @@ public class UdiInfoExportLogController { UdiInfoExportLogEntity udiInfoExportLogEntity = new UdiInfoExportLogEntity(); udiInfoExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_PROCESS); String genKey = CustomUtil.getId(); - String fileName = "D:\\udiwms\\exportFile\\" + "医疗器械信息导出" + genKey + ".json"; + String fileName = "D:\\udiwms\\exportFile\\" + "医疗器械信息导出" + genKey + ".udi"; udiInfoExportLogEntity.setGenKey(genKey); udiInfoExportLogEntity.setFilePath(fileName); udiInfoExportLogEntity.setUpdateTime(new Date()); @@ -129,7 +129,7 @@ public class UdiInfoExportLogController { udiInfoExportLogService.insertUdiInfoExportLog(udiInfoExportLogEntity); //basicGenExcelService.exportUdiInfo(genKey, udiInfoExportRequest); basicGenJsonService.exportUdiInfoJson(genKey, udiInfoExportRequest); - return ResultVOUtils.success("后台正在导出生成excel文件,请稍后刷新查看!"); + return ResultVOUtils.success("后台正在导出生成udi文件,请稍后刷新查看!"); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/UdiInfoImportLogController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/UdiInfoImportLogController.java index 7b643625..5488b2f0 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/basic/UdiInfoImportLogController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/basic/UdiInfoImportLogController.java @@ -130,8 +130,8 @@ public class UdiInfoImportLogController { String fileName = file.getOriginalFilename(); try { String fileType = fileName.substring(fileName.lastIndexOf(".")); - if (!".json".equals(fileType.toLowerCase())) { - return ResultVOUtils.error(500, "请上传json文件"); + if (!".udi".equals(fileType.toLowerCase())) { + return ResultVOUtils.error(500, "请上传udi文件"); } //导入数据 String jsonData = IoUtil.read(file.getInputStream()).toString(); @@ -152,10 +152,7 @@ public class UdiInfoImportLogController { } catch (Exception e) { log.error("产品信息导入失败", e); } - } - - return ResultVOUtils.success("上传成功"); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/thrsys/ThrCorpExportLogController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/thrsys/ThrCorpExportLogController.java index 4bf210c6..377fc415 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/thrsys/ThrCorpExportLogController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/thrsys/ThrCorpExportLogController.java @@ -121,7 +121,7 @@ public class ThrCorpExportLogController { public BaseResponse excelDownload(@RequestBody ThrCorpExportRequest thrCorpExportRequest) { //String fileName = "D:\\udiwms\\exportFile\\" + "第三方往来单位信息导出" + System.currentTimeMillis() + ".xls"; - String fileName = "D:\\udiwms\\exportFile\\" + "第三方往来单位信息导出" + System.currentTimeMillis() + ".json"; + String fileName = "D:\\udiwms\\exportFile\\" + "第三方往来单位信息导出" + System.currentTimeMillis() + ".udi"; File file = new File(fileName); if (!file.exists()) { try { @@ -142,7 +142,7 @@ public class ThrCorpExportLogController { //thrCorpsDlService.genExcel(genKey, thrCorpExportRequest); //修改为导出json文件 thrCorpsDlService.genJsonFile(genKey, thrCorpExportRequest); - return ResultVOUtils.success("后台正在导出生成excel文件,请稍后刷新查看!"); + return ResultVOUtils.success("后台正在导出生成udi文件,请稍后刷新查看!"); } diff --git a/api-admin/src/main/java/com/glxp/api/admin/controller/thrsys/ThrProductsExportLogController.java b/api-admin/src/main/java/com/glxp/api/admin/controller/thrsys/ThrProductsExportLogController.java index cde68f54..92166b15 100644 --- a/api-admin/src/main/java/com/glxp/api/admin/controller/thrsys/ThrProductsExportLogController.java +++ b/api-admin/src/main/java/com/glxp/api/admin/controller/thrsys/ThrProductsExportLogController.java @@ -119,7 +119,7 @@ public class ThrProductsExportLogController { ThrProductsExportLogEntity thrProductsExportLogEntity = new ThrProductsExportLogEntity(); thrProductsExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_PROCESS); String genKey = CustomUtil.getId(); - String fileName = "D:\\udiwms\\exportFile\\" + "第三方产品信息" + genKey + ".json"; + String fileName = "D:\\udiwms\\exportFile\\" + "第三方产品信息" + genKey + ".udi"; File file = new File(fileName); if (!file.exists()) { try { @@ -138,7 +138,7 @@ public class ThrProductsExportLogController { //修改为导出json文件 thrProductsDlService.genJsonFile(genKey, thrProductsExportRequest); - return ResultVOUtils.success("后台正在导出生成excel文件,请稍后刷新查看!"); + return ResultVOUtils.success("后台正在导出生成udi文件,请稍后刷新查看!"); }