zhaowenxuan
7 天以前 0892d843cd394f383ff50f480f7f22f2ec3829bc
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiGetMethodService.java
@@ -91,7 +91,7 @@
        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            log.error(String.valueOf(e),e.getMessage());
        }
//        try {
//            InputStreamReader reader = new InputStreamReader(new FileInputStream(url), StandardCharsets.UTF_8);
@@ -236,6 +236,7 @@
                for (Object resultDatum : resultData) {
                    JSONObject object = (JSONObject) resultDatum;
                    ajaxResult = save(object, type,hisApiConfig,JSONUtil.toJsonStr(params));
//                    save(object, type,hisApiConfig,JSONUtil.toJsonStr(params));
                    Map<String, String> map = new HashMap<>();
                    for (String key : object.keySet()) {
                        String defaultVal = object.get(key).toString();
@@ -251,7 +252,7 @@
            }
        } catch (Exception e) {
//            throw new RuntimeException(e);
            log.error(String.valueOf(e));
            log.error(String.valueOf(e),e.getMessage());
            return AjaxResult.error();
        }
    }
@@ -335,16 +336,16 @@
            try {
                creatTable(object, tabName, connection);
            } catch (SQLException e) {
                e.printStackTrace();
                return AjaxResult.error();
                log.error(String.valueOf(e),e.getMessage());
//                return AjaxResult.error();
            }
        }
        //插入数据
        try {
            operationTable(object,connection,hisApiConfig,paramsJson,code);
        } catch (SQLException e) {
            e.printStackTrace();
            return AjaxResult.error();
            log.error(String.valueOf(e),e.getMessage());
//            return AjaxResult.error();
        }finally {
            try {
                connection.close();
@@ -480,7 +481,7 @@
            String key = entry.getKey().trim().toLowerCase();
            if (StrUtil.isBlank(defaultVal) || defaultVal.equals("null"))
                continue;
            String val = defaultVal.trim().replaceAll("\\s+", "");
            String val = defaultVal.trim().replaceAll("\\s+", "").replaceAll("[^\\x00-\\x7F]", "");
            if (primaryKesList.contains(key)) {
                deleteSqlBuilder.append(key).append(" = '").append(val).append("' and ");
            }
@@ -682,8 +683,9 @@
            statement.close();
            return next;
        } catch (SQLException throwables) {
            throwables.printStackTrace();
            log.error(String.valueOf(throwables),throwables.getMessage());
        }
        log.error("查询表执行sql返回为null ->{},{},{}",tabSql,DB_NAME,tableName);
        return null;
    }