zhaowenxuan
2024-10-18 74eb4efe4e23adac4e7a0b7483425243ccb63a61
增加lis项目分类合并
2个文件已修改
5个文件已添加
133 ■■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiGetMethodService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/LisJyflhb.java 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LisJyflhbMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/service/LisJyflhbService.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/LisJyflhbServiceImpl.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-hosp/src/main/resources/mapper/LisJyflhbMapper.xml 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiGetMethodService.java
@@ -275,7 +275,6 @@
                responseJson = HttpClientUtils.sendPost(LIS_URL + apiConfig.getApiUrl(), params);
                break;
        }
        log.info("请求返回值1 ->{}",responseJson);
        Integer isResponse = apiConfig.getIsResponse();
        JSONObject response = null;
        if (isResponse == 1) {
@@ -287,10 +286,8 @@
            AjaxResult ajaxResult = AjaxResult.success();
            if (response.getStr(apiConfig.getResultDataKey()) != null && StrUtil.isNotBlank(response.getStr(apiConfig.getResultDataKey()))){
                JSONArray resultData = response.getJSONArray(apiConfig.getResultDataKey());
                log.info("请求返回值2 ->{}",JSONUtil.toJsonStr(resultData));
                List<Map<String, String>> list = new ArrayList<>();
                for (Object resultDatum : resultData) {
                    log.info("请求返回值3 ->{}",JSONUtil.toJsonStr(resultDatum));
                    JSONObject object = (JSONObject) resultDatum;
                    ajaxResult = save(object, type,apiConfig,JSONUtil.toJsonStr(params));
                    Map<String, String> map = new HashMap<>();
@@ -324,7 +321,6 @@
        if (code.equals("lis") || code.equals("pacs"))
            tabName = ((ApiConfig)hisApiConfig).getTabName();
        else tabName = ((HisApiConfig) hisApiConfig).getTabName();
        log.info("save方法 ->{}", tabName);
        Connection connection = getConnection();
        Boolean isExists = tabIsExists(connection, tabName);
        if (null == isExists)
@@ -458,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")) {
ltkj-admin/src/main/java/com/ltkj/web/controller/service/TjSysAsyncServiceImpl.java
@@ -3,6 +3,7 @@
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
@@ -147,6 +148,8 @@
    private IdUtils idUtils;
    @Autowired
    private LtkjJybbzdService jybbzdService;
    @Autowired
    private LisJyflhbService lisJyflhbService;
    @Override
@@ -474,7 +477,30 @@
        String config = configService.selectConfigByKey("sfkqdyhis");
        if (lisApiMethod.isUseLisAndPacsRegister(order) && (null != config && config.equals("Y"))){
            AjaxResult ajaxResult = lisApiMethod.getJyFlHb();
            log.info("getJyFlHb ->{}",JSONUtil.toJsonStr(ajaxResult));
            if (ajaxResult.get("code").toString().equals("200")){
                String str = ajaxResult.get("data").toString();
                str = str.replace("=", ":");
                JSONArray array = JSONUtil.parseArray(str);
                for (Object o : array) {
                    JSONObject object = (JSONObject) o;
                    LisJyflhb lisJyflhb = new LisJyflhb();
                    lisJyflhb.setHbhxm(object.getStr("hbhxm"));
                    lisJyflhb.setFlmc(object.getStr("flmc"));
                    lisJyflhb.setMc(object.getStr("mc"));
                    lisJyflhb.setFlbm(object.getStr("flbm"));
                    LambdaQueryWrapper<LisJyflhb> wrapper = new LambdaQueryWrapper<>();
                    wrapper.eq(LisJyflhb::getFlbm,lisJyflhb.getFlbm());
                    LisJyflhb jyflhb = lisJyflhbService.getOne(wrapper);
                    if (jyflhb == null) {
                        lisJyflhb.setId(IdUtil.getSnowflake().nextId());
                        lisJyflhbService.save(lisJyflhb);
                    }else {
                        lisJyflhb.setId(jyflhb.getId());
                        lisJyflhbService.updateById(lisJyflhb);
                    }
                }
            }
        }
    }
ltkj-hosp/src/main/java/com/ltkj/hosp/domain/LisJyflhb.java
New file
@@ -0,0 +1,27 @@
package com.ltkj.hosp.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;
/**
 * @TableName lis_jyflhb
 */
@TableName(value ="lis_jyflhb")
@Data
public class LisJyflhb implements Serializable {
    private Long id;
    private String flmc;
    private String mc;
    private String flbm;
    private String hbhxm;
    private static final long serialVersionUID = 1L;
}
ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LisJyflhbMapper.java
New file
@@ -0,0 +1,18 @@
package com.ltkj.hosp.mapper;
import com.ltkj.hosp.domain.LisJyflhb;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author w
* @description 针对表【lis_jyflhb】的数据库操作Mapper
* @createDate 2024-10-18 15:13:39
* @Entity com.ltkj.hosp.domain.LisJyflhb
*/
public interface LisJyflhbMapper extends BaseMapper<LisJyflhb> {
}
ltkj-hosp/src/main/java/com/ltkj/hosp/service/LisJyflhbService.java
New file
@@ -0,0 +1,13 @@
package com.ltkj.hosp.service;
import com.ltkj.hosp.domain.LisJyflhb;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author w
* @description 针对表【lis_jyflhb】的数据库操作Service
* @createDate 2024-10-18 15:13:39
*/
public interface LisJyflhbService extends IService<LisJyflhb> {
}
ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/LisJyflhbServiceImpl.java
New file
@@ -0,0 +1,22 @@
package com.ltkj.hosp.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ltkj.hosp.domain.LisJyflhb;
import com.ltkj.hosp.service.LisJyflhbService;
import com.ltkj.hosp.mapper.LisJyflhbMapper;
import org.springframework.stereotype.Service;
/**
* @author w
* @description 针对表【lis_jyflhb】的数据库操作Service实现
* @createDate 2024-10-18 15:13:39
*/
@Service
public class LisJyflhbServiceImpl extends ServiceImpl<LisJyflhbMapper, LisJyflhb>
    implements LisJyflhbService{
}
ltkj-hosp/src/main/resources/mapper/LisJyflhbMapper.xml
New file
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ltkj.hosp.mapper.LisJyflhbMapper">
    <resultMap id="BaseResultMap" type="com.ltkj.hosp.domain.LisJyflhb">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="flmc" column="flmc" jdbcType="VARCHAR"/>
            <result property="mc" column="mc" jdbcType="VARCHAR"/>
            <result property="flbm" column="flbm" jdbcType="VARCHAR"/>
            <result property="hbhxm" column="hbhxm" jdbcType="VARCHAR"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,flmc,mc,
        flbm,hbhxm
    </sql>
</mapper>