|
@@ -79,8 +79,7 @@ public class DataService {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取未出报告的检查列表
|
|
* 获取未出报告的检查列表
|
|
- * @param instutionId
|
|
|
|
- * @param number
|
|
|
|
|
|
+ * @param jmstr
|
|
*/
|
|
*/
|
|
public String getExamList(String jmstr) {
|
|
public String getExamList(String jmstr) {
|
|
String cloudjmStr = localjm2cloudjm(jmstr);
|
|
String cloudjmStr = localjm2cloudjm(jmstr);
|
|
@@ -93,6 +92,41 @@ public class DataService {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 获取未出报告的检查列表
|
|
|
|
+ * @param jmstr
|
|
|
|
+ */
|
|
|
|
+ public String saveReport(String jmstr) {
|
|
|
|
+ String cloudjmStr = localjm2cloudjm(jmstr);
|
|
|
|
+ Map <String,String> map = new HashMap<String,String>();
|
|
|
|
+ map.put("institution_id", "06300009");
|
|
|
|
+ map.put("params", cloudjmStr);
|
|
|
|
+ String content = postWithParameters(SAVE_REPORT_URL, map);
|
|
|
|
+ String examlistStr = cloudjm2localjm(content);
|
|
|
|
+ return examlistStr;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 更新检查信息
|
|
|
|
+ * @param jmstr
|
|
|
|
+ */
|
|
|
|
+ public String updateExam(String jmstr) {
|
|
|
|
+ String cloudjmStr = localjm2cloudjm(jmstr);
|
|
|
|
+ Map <String,String> map = new HashMap<String,String>();
|
|
|
|
+ map.put("institution_id", "06300009");
|
|
|
|
+ map.put("params", cloudjmStr);
|
|
|
|
+ String content = postWithParameters(UPDATE_PATIENT_URL, map);
|
|
|
|
+ String examlistStr = cloudjm2localjm(content);
|
|
|
|
+ return examlistStr;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 内网转外网加密
|
|
|
|
+ * @param jmstr
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
public String localjm2cloudjm(String jmstr) {
|
|
public String localjm2cloudjm(String jmstr) {
|
|
String IV = "0000000000000000";
|
|
String IV = "0000000000000000";
|
|
//解密内网数据
|
|
//解密内网数据
|
|
@@ -109,6 +143,11 @@ public class DataService {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 外网转内网加密
|
|
|
|
+ * @param content
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
public String cloudjm2localjm(String content) {
|
|
public String cloudjm2localjm(String content) {
|
|
String IV = "0000000000000000";
|
|
String IV = "0000000000000000";
|
|
//解密云端数据
|
|
//解密云端数据
|
|
@@ -219,20 +258,20 @@ public class DataService {
|
|
// postWithParameters(SAVE_REPORT_URL, map);
|
|
// postWithParameters(SAVE_REPORT_URL, map);
|
|
String content = postWithParameters(GET_KEY_URL, map);
|
|
String content = postWithParameters(GET_KEY_URL, map);
|
|
|
|
|
|
- File file = new File("./key.txt");
|
|
|
|
- try {
|
|
|
|
- // 使用FileWriter不需要考虑原文件不存在的情况
|
|
|
|
- // 当该文件不存在时,new FileWriter(file)会自动创建一个真实存在的空文件
|
|
|
|
- FileWriter fileWriter = new FileWriter(file);
|
|
|
|
- // 往文件重写内容
|
|
|
|
- fileWriter.write(content);// 清空
|
|
|
|
- fileWriter.flush();
|
|
|
|
- fileWriter.close();
|
|
|
|
- } catch (IOException e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
|
|
+// File file = new File("./key.txt");
|
|
|
|
+// try {
|
|
|
|
+// // 使用FileWriter不需要考虑原文件不存在的情况
|
|
|
|
+// // 当该文件不存在时,new FileWriter(file)会自动创建一个真实存在的空文件
|
|
|
|
+// FileWriter fileWriter = new FileWriter(file);
|
|
|
|
+// // 往文件重写内容
|
|
|
|
+// fileWriter.write(content);// 清空
|
|
|
|
+// fileWriter.flush();
|
|
|
|
+// fileWriter.close();
|
|
|
|
+// } catch (IOException e) {
|
|
|
|
+// e.printStackTrace();
|
|
|
|
+// }
|
|
// String content = getCloudKey();
|
|
// String content = getCloudKey();
|
|
-// System.out.println(content);
|
|
|
|
|
|
+ System.out.println(content);
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|