签出补偿接口
parent
1f89c57868
commit
533de37eab
@ -1,15 +1,19 @@
|
|||||||
[
|
{
|
||||||
{
|
"mappings": [{
|
||||||
"hospital": "emr",
|
"hospital": "emr",
|
||||||
"wzh": "1"
|
"wzh": "1"
|
||||||
},{
|
},
|
||||||
"hospital": "hl",
|
{
|
||||||
"wzh": "3"
|
"hospital": "hl",
|
||||||
},{
|
"wzh": "3"
|
||||||
"hospital": "sy",
|
},
|
||||||
"wzh": "6"
|
{
|
||||||
},{
|
"hospital": "sy",
|
||||||
"hospital": "hz",
|
"wzh": "6"
|
||||||
"wzh": "13"
|
},
|
||||||
}
|
{
|
||||||
]
|
"hospital": "hz",
|
||||||
|
"wzh": "13"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.docus.server.collection.infrastructure.dao.mapper;
|
||||||
|
|
||||||
|
import com.docus.server.collection.entity.CollectSysDictionary;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 采集系统字典 mapper
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wen yongbin
|
||||||
|
* @since 2023-7-26 08:45:51
|
||||||
|
*/
|
||||||
|
public interface CollectSysDictionaryMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询无纸化系统所有的采集系统字典
|
||||||
|
* @return 无纸化系统所有的采集系统字典
|
||||||
|
*/
|
||||||
|
List<CollectSysDictionary> findAll();
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,123 @@
|
|||||||
|
//
|
||||||
|
// Source code recreated from a .class file by IntelliJ IDEA
|
||||||
|
// (powered by FernFlower decompiler)
|
||||||
|
//
|
||||||
|
|
||||||
|
package com.docus.server.collection.util;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
|
||||||
|
public class TableJsonRead {
|
||||||
|
public TableJsonRead() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public <T> T Read(String path, String fileName, Class<T> clazz) {
|
||||||
|
String currentPath = this.CurrentPath();
|
||||||
|
path = currentPath + "\\" + path;
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
T dto = null;
|
||||||
|
File file = new File(path + "\\" + fileName);
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (!file.exists()) {
|
||||||
|
try {
|
||||||
|
file.createNewFile();
|
||||||
|
} catch (IOException var11) {
|
||||||
|
var11.printStackTrace();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
BufferedReader bufferedReader = null;
|
||||||
|
bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while(!StringUtils.isEmpty(line = bufferedReader.readLine())) {
|
||||||
|
sb.append(line);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sb.length() > 0) {
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
dto = objectMapper.readValue(sb.toString(), new TypeReference<T>() {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
bufferedReader.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
return dto;
|
||||||
|
} catch (Exception var12) {
|
||||||
|
var12.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String readContent(String path, String fileName) {
|
||||||
|
String currentPath = this.CurrentPath();
|
||||||
|
path = currentPath + "\\" + path;
|
||||||
|
StringBuilder content = new StringBuilder();
|
||||||
|
T dto = null;
|
||||||
|
File file = new File(path + "\\" + fileName);
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (!file.exists()) {
|
||||||
|
try {
|
||||||
|
file.createNewFile();
|
||||||
|
} catch (IOException var11) {
|
||||||
|
var11.printStackTrace();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
BufferedReader bufferedReader = null;
|
||||||
|
bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
|
||||||
|
|
||||||
|
String line;
|
||||||
|
while((line = bufferedReader.readLine())!=null) {
|
||||||
|
content.append(line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return content.toString();
|
||||||
|
} catch (Exception var12) {
|
||||||
|
var12.printStackTrace();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String CurrentPath() {
|
||||||
|
File dir = new File(".");
|
||||||
|
String currentpath = "";
|
||||||
|
|
||||||
|
try {
|
||||||
|
currentpath = dir.getCanonicalPath();
|
||||||
|
} catch (IOException var4) {
|
||||||
|
var4.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return currentpath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Save(String path, String fileName, String data) {
|
||||||
|
String currentPath = this.CurrentPath();
|
||||||
|
path = currentPath + "\\" + path;
|
||||||
|
FileWriter fwriter = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
fwriter = new FileWriter(path + "\\" + fileName);
|
||||||
|
fwriter.write(data);
|
||||||
|
} catch (IOException var15) {
|
||||||
|
var15.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
fwriter.flush();
|
||||||
|
fwriter.close();
|
||||||
|
} catch (IOException var14) {
|
||||||
|
var14.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.docus.server.collection.infrastructure.dao.mapper.CollectSysDictionaryMapper">
|
||||||
|
|
||||||
|
<select id="findAll" resultType="com.docus.server.collection.entity.CollectSysDictionary">
|
||||||
|
SELECT id,sys_code sysCode,sys_name sysName
|
||||||
|
FROM `docus_archivefile`.`af_collectsys_dictionary`
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue