zjh
2024-06-05 66a1d779057d1c9fc75abd30218546a419b7b442
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiGetMethodService.java
@@ -30,16 +30,16 @@
     * @param code 接口代码
     * @return 执行是否成功
     */
    public AjaxResult save(String json, String code) {
    public AjaxResult save(JSONObject object, String code) {
        code = code.toLowerCase();
        JSONObject jsonObject = JSONUtil.parseObj(json);
        JSONObject response = jsonObject.getJSONObject("Response");
//        JSONObject jsonObject = JSONUtil.parseObj(json);
//        JSONObject response = jsonObject.getJSONObject("Response");
        String tabName = "ltkj_" + code;
        if (response.getStr("ResultCode").equals("0")) {
            JSONArray resultData = response.getJSONArray("ResultData");
//        if (response.getStr("ResultCode").equals("0")) {
//            JSONObject  object = response.getJSONObject("ResultData");
            Connection connection = getConnection();
            for (Object resultDatum : resultData) {
                JSONObject object = (JSONObject) resultDatum;
//            for (Object resultDatum : resultData) {
//                JSONObject object = (JSONObject) resultDatum;
                Boolean isExists = tabIsExists(connection, tabName);
                if (null == isExists)
                    return AjaxResult.error();
@@ -58,13 +58,13 @@
                    throwables.printStackTrace();
                    return AjaxResult.error();
                }
            }
//            }
            try {
                if (connection != null)
                    connection.close();
            } catch (SQLException throwables) {
            }
        }
//        }
        return AjaxResult.success();
    }