1.修改json格式为udi

master
MrZhai 3 years ago
parent 273b1daa26
commit 7027235124

@ -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并创建生成记录

@ -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<BasicUnitMaintainEntity> 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);

@ -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文件,请稍后刷新查看!");
}

@ -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("上传成功");
}

@ -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文件,请稍后刷新查看!");
}

@ -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文件,请稍后刷新查看!");
}

Loading…
Cancel
Save