@@ -70,8 +70,23 @@ public class ViewController extends Controller {
}
-
+
+ /**
+ * 在被连接数据库执行sql语句
+ */
+ public void postSql2() {
+ try {
+ DataService dService = ServiceFactory.getService(DataService.class);
+ String a = dService.getReport2("11H971155");
+ this.renderText(a);
+ } catch (Exception e) {
+ // TODO: handle exception
+ this.renderText(e.toString());
+ }
public void testConn() {
try {
DruidPlugin druidPluginConnected = createConnectedDruidPlugin();
@@ -95,6 +95,15 @@ public class DataService {
+ /*
+ * 医院代收
+ public String getReport2(String code) {
+ String content = getWithUrl("http://192.168.31.10:874/df/view/executeSql?sqlstr=select * from reportinfo where 检查编号 = " + code);
+ return content;
public static String postWithParameters(String url, Map<String, String> map) {
FormBody.Builder formbody = new FormBody.Builder();