zjh
2025-02-26 263413a9ade62a8501acbbc60157d48ca51a9f9d
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiGetMethodService.java
@@ -282,22 +282,26 @@
        } else{
            response = JSONUtil.parseObj(responseJson);
        }
        if (response.getStr(apiConfig.getResultCodeKey()).equals("0")) {
        if (response.getStr(apiConfig.getResultCodeKey()).equals("1")) {
            AjaxResult ajaxResult = AjaxResult.success();
            JSONArray resultData = response.getJSONArray(apiConfig.getResultDataKey());
            List<Map<String, String>> list = new ArrayList<>();
            for (Object resultDatum : resultData) {
                JSONObject object = (JSONObject) resultDatum;
                ajaxResult = save(object, type,apiConfig,JSONUtil.toJsonStr(params));
                Map<String, String> map = new HashMap<>();
                for (String key : object.keySet()) {
                    String defaultVal = object.get(key).toString();
                    String val = defaultVal.trim().replaceAll("\\s+", "");
                    map.put(key, val);
            if (response.getStr(apiConfig.getResultDataKey()) != null && StrUtil.isNotBlank(response.getStr(apiConfig.getResultDataKey()))){
                JSONArray resultData = response.getJSONArray(apiConfig.getResultDataKey());
                List<Map<String, String>> list = new ArrayList<>();
                for (Object resultDatum : resultData) {
                    JSONObject object = (JSONObject) resultDatum;
                    ajaxResult = save(object, type,apiConfig,JSONUtil.toJsonStr(params));
                    Map<String, String> map = new HashMap<>();
                    for (String key : object.keySet()) {
                        String defaultVal = object.get(key).toString();
                        String val = defaultVal.trim().replaceAll("\\s+", "");
                        map.put(key, val);
                    }
                    list.add(map);
                }
                list.add(map);
                ajaxResult.put("data", list);
            }else {
                ajaxResult.put("data",response);
            }
            ajaxResult.put("data", list);
            return ajaxResult;
        } else {
            return AjaxResult.error().put("result", JSONUtil.parseObj(responseJson));
@@ -450,7 +454,7 @@
     * @throws SQLException
     */
    @Transactional
    private void insertDataNew(Connection connection, JSONObject jsonObject,Object hisApiConfig,String paramsJson,String code) throws SQLException {
    public void insertDataNew(Connection connection, JSONObject jsonObject, Object hisApiConfig, String paramsJson, String code) throws SQLException {
        String tabName = "";
        List<String> primaryKesList;
        if (code.equals("lis") || code.equals("pacs")) {