资质上传

dev2.0
薛宇 2 years ago
parent 608d3280dc
commit e05519acc1

@ -25,6 +25,10 @@ public class uploadController {
@Value("${file_path}") @Value("${file_path}")
private String filePath; private String filePath;
@Value("${file_url}")
private String fileUrl;
@Value("${file_lpath}")
private String fileLpath;
/** /**
* PDF * PDF
@ -117,6 +121,7 @@ public class uploadController {
} }
String newName = UUID.randomUUID() + fileType;//生成新文件名 String newName = UUID.randomUUID() + fileType;//生成新文件名
String savePath = filePath + "/register/" + type; String savePath = filePath + "/register/" + type;
String savePath1 = fileLpath + "?type=" + type;
File file1 = new File(savePath); File file1 = new File(savePath);
if (!file1.exists()) {// 判断目录是否存在 if (!file1.exists()) {// 判断目录是否存在
@ -127,7 +132,7 @@ public class uploadController {
file.transferTo(file1); file.transferTo(file1);
Map<String, String> rMap = new HashMap<>(); Map<String, String> rMap = new HashMap<>();
rMap.put("msg", "上传成功"); rMap.put("msg", "上传成功");
rMap.put("name", newName); rMap.put("name", fileUrl + savePath1 + "&name=" + newName);
rMap.put("type", type); rMap.put("type", type);
return ResultVOUtils.success(rMap); return ResultVOUtils.success(rMap);
} catch (IOException e) { } catch (IOException e) {

@ -4,9 +4,9 @@ server:
spring: spring:
datasource: datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_wms_pt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true jdbc-url: jdbc:p6spy:mysql://192.168.0.66:3364/udi_wms_0710?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root username: root
password: 123456 password: Glxp@6066
hikari: hikari:
connection-timeout: 60000 connection-timeout: 60000
maximum-pool-size: 20 maximum-pool-size: 20
@ -47,6 +47,8 @@ logging:
com.glxp.api.dao: debug com.glxp.api.dao: debug
file_path: D:/udi/udiwms/udiwmsfile/ file_path: D:/udi/udiwms/udiwmsfile/
file_lpath: /udiwms/image/register/file/getImage
file_url: http://127.0.0.1:9991
UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df UDI_KEY: 6b137c66-6286-46c6-8efa-c2f5dd9237df
UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test UDI_SERVER_URL: https://www.udims.com/UDI_DL_Server_test
SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs SPMS_KEY: lCOdWCBKS6Kw45wdnnqUTELXyuSKnXEs
@ -55,5 +57,4 @@ back_file_path: D:/share/udisps/back/
API_KEY: 1101 API_KEY: 1101
API_SECRET: zBITspLNvuoEd4FaamlSoqxRHmNsmQ6L API_SECRET: zBITspLNvuoEd4FaamlSoqxRHmNsmQ6L
WEB_TITLE: 平潭协和医院 WEB_TITLE: 平潭协和医院
SPMS_WEBSOCKET_TOKEN: 07rKFDFkQvBkbxgc7aUBlONo4gWNdx8b SPMS_WEBSOCKET_TOKEN: 07rKFDFkQvBkbxgc7aUBlONo4gWNdx8b

Loading…
Cancel
Save