|
|
@@ -70,11 +70,12 @@ public class PublicController {
|
|
|
public ResultVo<List<GetDropdownBox>> getDept() {
|
|
|
return service.getDept();
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* @description:查询有住院的科室
|
|
|
* @author: lihong
|
|
|
* @date: 2022/12/26 16:57
|
|
|
- * @return: thyyxxk.webserver.entity.ResultVo<java.util.List<thyyxxk.webserver.entity.datamodify.GetDropdownBox>>
|
|
|
+ * @return: thyyxxk.webserver.entity.ResultVo<java.util.List < thyyxxk.webserver.entity.datamodify.GetDropdownBox>>
|
|
|
**/
|
|
|
@GetMapping("/getZhuYuanDept")
|
|
|
public ResultVo<List<GetDropdownBox>> getZhuYuanDept() {
|
|
|
@@ -190,8 +191,8 @@ public class PublicController {
|
|
|
|
|
|
@GetMapping("/getOperationGuide")
|
|
|
@PassToken
|
|
|
- public ResultVo<String> getOperationGuide() {
|
|
|
- String path = "D:\\a.snapshot\\download\\操作指南";
|
|
|
+ public ResultVo<String> getOperationGuide(@RequestParam("folderName") String folderName) {
|
|
|
+ String path = "D:\\a.snapshot\\download\\操作指南\\" + folderName;
|
|
|
File folder = new File(path);
|
|
|
String[] docFiles = folder.list(new MyExtFilter("docx"));
|
|
|
if (docFiles == null) {
|
|
|
@@ -205,33 +206,6 @@ public class PublicController {
|
|
|
return ResultVoUtil.success("v1.1.0");
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 线上预览 pdf
|
|
|
- * @param response
|
|
|
- * @throws IOException
|
|
|
- */
|
|
|
- @PostMapping("/getOperationGuidePdf")
|
|
|
- @PassToken
|
|
|
- @Deprecated
|
|
|
- public void getOperationGuidePdf(HttpServletResponse response) throws IOException {
|
|
|
- String path = "D:\\a.snapshot\\download\\操作指南";
|
|
|
- File folder = new File(path);
|
|
|
- String[] docFiles = folder.list(new MyExtFilter("pdf"));
|
|
|
- if (docFiles != null) {
|
|
|
- FileInputStream inputStream = new FileInputStream(path + "\\" + docFiles[0]);
|
|
|
- byte[] data = new byte[inputStream.available()];
|
|
|
- inputStream.read(data);
|
|
|
- response.setContentType("application/pdf");
|
|
|
- response.setContentLength(data.length);
|
|
|
- OutputStream os = response.getOutputStream();
|
|
|
- os.write(data);
|
|
|
- //先声明的流后关掉!
|
|
|
- os.flush();
|
|
|
- os.close();
|
|
|
- inputStream.close();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
static class MyExtFilter implements FilenameFilter {
|
|
|
private final String ext;
|
|
|
@@ -243,7 +217,6 @@ public class PublicController {
|
|
|
public boolean accept(File dir, String name) {
|
|
|
return name.endsWith(ext);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|