路泰机电科技体检——数据平台后端
zhaowenxuan
2024-12-18 9449b5f71bd0c20ed9aefd025ee87c69bcdfbd40
20241218
2个文件已修改
4个文件已添加
1个文件已删除
1 文件已重命名
1053 ■■■■■ 已修改文件
src/main/java/com/example/config/ConfigValue.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/config/DruidConfig.java 141 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/config/RedisConfig.java 98 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/controller/HisController.java 274 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/controller/xian/MeiJiController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/factory/ServiceFactory.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/service/HisService.java 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/service/xian/MeiJiHisService.java 231 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/example/config/ConfigValue.java
New file
@@ -0,0 +1,54 @@
package com.example.config;
import cn.hutool.json.JSONUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
/**
 * @Company: 西安路泰科技有限公司
 * @Author: zhaowenxuan
 * @Date: 2024/12/17 20:26
 */
@Slf4j
@Component
public class ConfigValue {
    @Value("${config.path}")
    private String CONFIG_PATH;
    @Value("${config.dir}")
    private String CONFIG_DIR;
    private Map<String, String> configMap = new HashMap<>();
    @PostConstruct
    private void init(){
        Properties props = new Properties();
        FileInputStream fis = null;
        try {
            fis = new FileInputStream(CONFIG_PATH);
            props.load(fis);
            fis.close();
            for (String key : props.stringPropertyNames()) {
                configMap.put(key, props.getProperty(key));
            }
            log.info("配置 -> {}", JSONUtil.toJsonStr(configMap));
        } catch (IOException e) {
            throw new RuntimeException("找不到配置文件或加载异常");
        }
    }
    public Map<String, String> getConfigMap() {
        return configMap;
    }
    public String getConfigValue(String key) {
        return configMap.get(key);
    }
}
src/main/java/com/example/config/DruidConfig.java
@@ -8,6 +8,7 @@
import com.example.enums.DataSourceType;
import com.example.utils.SpringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
@@ -31,79 +32,27 @@
@Slf4j
@Configuration
public class DruidConfig {
    @Value("${config.path}")
    private String CONFIG_PATH;
    @Value("${config.dir}")
    private String CONFIG_DIR;
    @Autowired
    private ConfigValue configValue;
    private DruidDataSource dataSource;
    @Bean
    public DataSource masterDataSource(DruidProperties druidProperties){
        dataSource = DruidDataSourceBuilder.create().build();
        Properties props = new Properties();
        Map<String, String> configMap = configValue.getConfigMap();
        try {
            // 从文件中读取配置信息
            FileInputStream fis = null;
            try {
                fis = new FileInputStream(CONFIG_PATH);
            } catch (FileNotFoundException e) {
                log.info("数据库连接文件找不到 系统正在创建!");
                File f = new File(CONFIG_DIR);
                if(!f.exists()){
                    f.mkdirs();
                }
                File file = new File(CONFIG_PATH);
                try {
                    FileWriter fileWriter = new FileWriter(file);
                    fileWriter.write("ip = 你的主数据库连接ip地址\n");
                    fileWriter.write("prot = 你的主数据库连接端口\n");
                    fileWriter.write("name = 你的主数据库连接名称\n");
                    fileWriter.write("username = 你的主数据库连接用户名\n");
                    fileWriter.write("password = 你的主数据库连接密码\n");
                    fileWriter.write("\n");
                    fileWriter.write("hisenabled = 是否开启 his 从库数据库连接 (从数据源开关/默认关闭 fales)\n");
                    fileWriter.write("hisip = 你的 his 数据库连接ip地址\n");
                    fileWriter.write("hisprot = 你的 his 数据库连接端口\n");
                    fileWriter.write("hisname = 你的 his 数据库连接名称\n");
                    fileWriter.write("hisusername = 你的 his 数据库连接用户名\n");
                    fileWriter.write("hispassword = 你的 his 数据库连接密码\n");
                    fileWriter.write("\n");
                    fileWriter.write("pacsenabled = 是否开启pacs从库数据库连接 (从数据源开关/默认关闭 fales)\n");
                    fileWriter.write("pacsip = 你的pacs数据库连接ip地址\n");
                    fileWriter.write("pacsprot = 你的pacs数据库连接端口\n");
                    fileWriter.write("pacsname = 你的pacs数据库连接名称\n");
                    fileWriter.write("pacsusername = 你的pacs数据库连接用户名\n");
                    fileWriter.write("pacspassword = 你的pacs数据库连接密码\n");
                    fileWriter.write("\n");
                    fileWriter.write("lisenabled = 是否开启 lis 从库数据库连接 (从数据源开关/默认关闭 fales)\n");
                    fileWriter.write("lisip = 你的 lis 数据库连接ip地址\n");
                    fileWriter.write("lisprot = 你的 lis 数据库连接端口\n");
                    fileWriter.write("lisname = 你的 lis 数据库连接名称\n");
                    fileWriter.write("lisusername = 你的 lis 数据库连接用户名\n");
                    fileWriter.write("lispassword = 你的 lis 数据库连接密码\n");
                    fileWriter.close();
                    log.info("数据库连接文件创建成功!");
                } catch (IOException ioException) {
                    log.info("数据库连接文件创建失败  请联系管理员手动创建!");
                    ioException.printStackTrace();
                }
                e.printStackTrace();
            }
            props.load(fis);
            fis.close();
            // 获取属性值并赋值
            Properties properties = new Properties();
            // 这里是测试写法,具体的value可以通过请求参数传递过来
            properties.setProperty("druid.url","jdbc:mysql://"+props.getProperty("ip")+":"+props.getProperty("prot")+"/"+props.getProperty("name")+"" +
            properties.setProperty("druid.url","jdbc:mysql://"+configMap.get("ip")+":"+configMap.get("prot")+"/"+configMap.get("name")+"" +
                    "?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8");
            properties.setProperty("druid.username",props.getProperty("username"));
            properties.setProperty("druid.password",props.getProperty("password"));
            properties.setProperty("druid.username",configMap.get("username"));
            properties.setProperty("druid.password",configMap.get("password"));
            dataSource.restart(properties);
            log.info("数据库连接成功!!!");
        } catch (Exception e) {
            log.info("数据库连接失败  请联系管理员!");
            log.error("数据库连接失败  请联系管理员!");
            e.printStackTrace();
        }
        return druidProperties.dataSource(dataSource);
@@ -114,31 +63,21 @@
//    @ConditionalOnProperty(prefix = "spring.datasource.druid.slavehis", name = "enabled", havingValue = "true")
    public DataSource slaveHisDataSource(DruidProperties druidProperties) {
        DruidDataSource dataSource = DruidDataSourceBuilder.create().build();
        Properties props = new Properties();
        Map<String, String> configMap = configValue.getConfigMap();
        // 获取属性值并赋值
        Properties properties = new Properties();
        // 这里是测试写法,具体的value可以通过请求参数传递过来
        properties.setProperty("druid.enabled",configMap.get("hisenabled"));
        properties.setProperty("druid.driverClassName","com.microsoft.sqlserver.jdbc.SQLServerDriver");
        properties.setProperty("druid.url","jdbc:sqlserver://"+configMap.get("hisip")+":"+configMap.get("hisprot")+";DatabaseName="+configMap.get("hisname")+
                ";&characterEncoding=utf8");
        properties.setProperty("druid.username",configMap.get("hisusername"));
        properties.setProperty("druid.password",configMap.get("hispassword"));
        try {
            // 从文件中读取配置信息
            FileInputStream fis = null;
            try {
                fis = new FileInputStream(CONFIG_PATH);
            } catch (FileNotFoundException e) {
                log.info("数据库连接文件找不到!");
            }
            props.load(fis);
            fis.close();
            // 获取属性值并赋值
            Properties properties = new Properties();
            // 这里是测试写法,具体的value可以通过请求参数传递过来
            properties.setProperty("druid.enabled",props.getProperty("hisenabled"));
            properties.setProperty("druid.driverClassName","com.microsoft.sqlserver.jdbc.SQLServerDriver");
            properties.setProperty("druid.url","jdbc:sqlserver://"+props.getProperty("hisip")+":"+props.getProperty("hisprot")+";DatabaseName="+props.getProperty("hisname")+
                    ";&characterEncoding=utf8");
            properties.setProperty("druid.username",props.getProperty("hisusername"));
            properties.setProperty("druid.password",props.getProperty("hispassword"));
            dataSource.restart(properties);
            log.info("his数据库连接成功!!!");
        } catch (Exception e) {
            log.info("数据库连接失败  请联系管理员!");
            e.printStackTrace();
        } catch (SQLException e) {
            log.error("his数据库连接失败!!!");
        }
        return druidProperties.dataSource(dataSource);
    }
@@ -148,29 +87,20 @@
//    @ConditionalOnProperty(prefix = "spring.datasource.druid.slavelis", name = "enabled", havingValue = "true")
    public DataSource slaveDataLisSource(DruidProperties druidProperties) {
        DruidDataSource dataSource = DruidDataSourceBuilder.create().build();
        Properties props = new Properties();
        Map<String, String> configMap = configValue.getConfigMap();
        try {
            // 从文件中读取配置信息
            FileInputStream fis = null;
            try {
                fis = new FileInputStream(CONFIG_PATH);
            } catch (FileNotFoundException e) {
                log.info("数据库连接文件找不到!");
            }
            props.load(fis);
            fis.close();
            // 获取属性值并赋值
            Properties properties = new Properties();
            // 这里是测试写法,具体的value可以通过请求参数传递过来
            properties.setProperty("druid.enabled",props.getProperty("lisenabled"));
            properties.setProperty("druid.url","jdbc:mysql://"+props.getProperty("lisip")+":"+props.getProperty("lisprot")+"/"+props.getProperty("lisname")+"" +
            properties.setProperty("druid.enabled",configMap.get("lisenabled"));
            properties.setProperty("druid.url","jdbc:mysql://"+configMap.get("lisip")+":"+configMap.get("lisprot")+"/"+configMap.get("lisname")+"" +
                    "?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8");
            properties.setProperty("druid.username",props.getProperty("lisusername"));
            properties.setProperty("druid.password",props.getProperty("lispassword"));
            properties.setProperty("druid.username",configMap.get("lisusername"));
            properties.setProperty("druid.password",configMap.get("lispassword"));
            dataSource.restart(properties);
            log.info("数据库连接成功!!!");
        } catch (Exception e) {
            log.info("数据库连接失败  请联系管理员!");
            log.error("数据库连接失败  请联系管理员!");
            e.printStackTrace();
        }
        return druidProperties.dataSource(dataSource);
@@ -181,25 +111,16 @@
//    @ConditionalOnProperty(prefix = "spring.datasource.druid.slavepacs", name = "enabled", havingValue = "true")
    public DataSource slaveDataPacsSource(DruidProperties druidProperties) {
        DruidDataSource dataSource = DruidDataSourceBuilder.create().build();
        Properties props = new Properties();
        Map<String, String> configMap = configValue.getConfigMap();
        try {
            // 从文件中读取配置信息
            FileInputStream fis = null;
            try {
                fis = new FileInputStream(CONFIG_PATH);
            } catch (FileNotFoundException e) {
                log.info("数据库连接文件找不到");
            }
            props.load(fis);
            fis.close();
            // 获取属性值并赋值
            Properties properties = new Properties();
            // 这里是测试写法,具体的value可以通过请求参数传递过来
            properties.setProperty("druid.enabled",props.getProperty("pacsenabled"));
            properties.setProperty("druid.enabled",configMap.get("pacsenabled"));
            properties.setProperty("druid.driverClassName","oracle.jdbc.OracleDriver");
            properties.setProperty("druid.url","jdbc:oracle:thin:@//"+props.getProperty("pacsip")+"/"+props.getProperty("pacsname"));
            properties.setProperty("druid.username",props.getProperty("pacsusername"));
            properties.setProperty("druid.password",props.getProperty("pacspassword"));
            properties.setProperty("druid.url","jdbc:oracle:thin:@//"+configMap.get("pacsip")+"/"+configMap.get("pacsname"));
            properties.setProperty("druid.username",configMap.get("pacsusername"));
            properties.setProperty("druid.password",configMap.get("pacspassword"));
            dataSource.restart(properties);
            log.info("数据库连接成功!!!");
        } catch (Exception e) {
src/main/java/com/example/config/RedisConfig.java
@@ -2,6 +2,7 @@
import com.example.utils.FastJson2JsonRedisSerializer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
@@ -15,6 +16,7 @@
import redis.clients.jedis.JedisPoolConfig;
import java.io.*;
import java.util.Map;
import java.util.Properties;
/**
@@ -27,15 +29,13 @@
@Slf4j
public class RedisConfig extends CachingConfigurerSupport {
    @Value ("${config.path}")
    private String url;
    @Value ("${config.dir}")
    private  String path;
    @Autowired
    private ConfigValue configValue;
    @Bean
    @SuppressWarnings(value = {"unchecked", "rawtypes"})
    public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory) {
        log.info("Initializing RedisTemplate...");
        RedisTemplate<Object, Object> template = new RedisTemplate<>();
        template.setConnectionFactory(connectionFactory);
@@ -50,6 +50,7 @@
        template.setHashValueSerializer(serializer);
        template.afterPropertiesSet();
        log.info("RedisTemplate initialized");
        return template;
    }
@@ -68,81 +69,20 @@
    @Bean
    public RedisConnectionFactory redisConnectionFactory(JedisPoolConfig jedisPoolConfig) {
        JedisConnectionFactory factory = new JedisConnectionFactory();
        Map<String, String> configMap = configValue.getConfigMap();
        // 从文件中读取配置信息
        try {
            FileInputStream fis = null;
            Properties props = new Properties();
            try {
                fis = new FileInputStream(url);
            } catch (FileNotFoundException e) {
                log.info("配置文件找不到 系统正在创建!");
                File f = new File(path);
                if(!f.exists()){
                    f.mkdirs();
                }
                File file = new File(url);
                try {
                    FileWriter fileWriter = new FileWriter(file);
                    fileWriter.write("ip = 你的主数据库连接ip地址\n");
                    fileWriter.write("prot = 你的主数据库连接端口\n");
                    fileWriter.write("name = 你的主数据库连接名称\n");
                    fileWriter.write("username = 你的主数据库连接用户名\n");
                    fileWriter.write("password = 你的主数据库连接密码\n");
                    fileWriter.write("hisenabled = 是否开启 his 从库数据库连接 (从数据源开关/默认关闭 fales)\n");
                    fileWriter.write("\n");
                    fileWriter.write("hisip = 你的 his 数据库连接ip地址\n");
                    fileWriter.write("hisprot = 你的 his 数据库连接端口\n");
                    fileWriter.write("hisname = 你的 his 数据库连接名称\n");
                    fileWriter.write("hisusername = 你的 his 数据库连接用户名\n");
                    fileWriter.write("hispassword = 你的 his 数据库连接密码\n");
                    fileWriter.write("\n");
                    fileWriter.write("pacsenabled = 是否开启pacs从库数据库连接 (从数据源开关/默认关闭 fales)\n");
                    fileWriter.write("pacsip = 你的pacs数据库连接ip地址\n");
                    fileWriter.write("pacsprot = 你的pacs数据库连接端口\n");
                    fileWriter.write("pacsname = 你的pacs数据库连接名称\n");
                    fileWriter.write("pacsusername = 你的pacs数据库连接用户名\n");
                    fileWriter.write("pacspassword = 你的pacs数据库连接密码\n");
                    fileWriter.write("\n");
                    fileWriter.write("lisenabled = 是否开启 lis 从库数据库连接 (从数据源开关/默认关闭 fales)\n");
                    fileWriter.write("lisip = 你的 lis 数据库连接ip地址\n");
                    fileWriter.write("lisprot = 你的 lis 数据库连接端口\n");
                    fileWriter.write("lisname = 你的 lis 数据库连接名称\n");
                    fileWriter.write("lisusername = 你的 lis 数据库连接用户名\n");
                    fileWriter.write("lispassword = 你的 lis 数据库连接密码\n");
                    fileWriter.write("redisIp = 你的redisIp地址\n");
                    fileWriter.write("redisProt = 你的redis端口\n");
                    fileWriter.write("redisIpDatabase = 你的redis链接库\n");
                    fileWriter.write("redisPassword = 你的redis密码\n");
                    fileWriter.write("\n");
                    fileWriter.close();
                    log.info("配置文件创建成功!");
                } catch (IOException ioException) {
                    log.info("配置文件创建失败  请联系管理员手动创建!");
                    ioException.printStackTrace();
                }
                e.printStackTrace();
            }
            props.load(fis);
            fis.close();
            // 获取属性值并赋值
            factory.setPoolConfig(jedisPoolConfig);
            // 设置Redis服务器的地址和端口号
            factory.setHostName(props.getProperty("redisIp"));
            factory.setPort(Integer.parseInt(props.getProperty("redisProt")));
            // 如果需要密码验证,设置密码
            factory.setPassword(props.getProperty("redisPassword"));
            // 设置其他参数,如数据库索引等
            factory.setDatabase(Integer.parseInt(props.getProperty("redisIpDatabase")));
            // 最后,初始化连接
            factory.afterPropertiesSet();
            log.info("redis连接成功!!!");
        } catch (IOException e) {
            log.info("redis连接失败  请联系管理员!");
            e.printStackTrace();
        }
        // 获取属性值并赋值
        factory.setPoolConfig(jedisPoolConfig);
        // 设置Redis服务器的地址和端口号
        factory.setHostName(configMap.get("redisIp"));
        factory.setPort(Integer.parseInt(configMap.get("redisProt")));
        // 如果需要密码验证,设置密码
        factory.setPassword(configMap.get("redisPassword"));
        // 设置其他参数,如数据库索引等
        factory.setDatabase(Integer.parseInt(configMap.get("redisIpDatabase")));
        // 最后,初始化连接
        factory.afterPropertiesSet();
        log.info("redis连接成功!!!");
        return factory;
    }
src/main/java/com/example/controller/HisController.java
New file
@@ -0,0 +1,274 @@
package com.example.controller;
import com.example.domain.TjCustomer;
import com.example.dto.xian.meiji.CheXiaoMzFyDto;
import com.example.dto.xian.meiji.CreateMenZhenFyDto;
import com.example.factory.ServiceFactory;
import com.example.service.HisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * his接口请求
 * @Company: 西安路泰科技有限公司
 * @Author: zhaowenxuan
 * @Date: 2024/12/17 17:16
 */
@RestController
@RequestMapping("/api/his")
public class HisController {
    private final ServiceFactory serviceFactory;
    private final HisService hisService;
    @Autowired
    public HisController(ServiceFactory serviceFactory) {
        this.serviceFactory = serviceFactory;
        hisService= serviceFactory.getService();
    }
    /**
     * 建档
     * @param customer
     * @return
     */
    @PostMapping("creat")
    public String jianDang (TjCustomer customer) {
        return hisService.jianDang(customer);
    }
    /**
     * 验证身份证是否建过档
     * @param customer
     * @return
     */
    @PostMapping("isCreat")
    public String getBingRenXxByShengFenZheng (TjCustomer customer) {
        return hisService.getBingRenXxByShengFenZheng(customer);
    }
    /**
     * 病人基本信息变更
     * @param customer
     * @return
     */
    @PostMapping("update")
    public String saveBingRenXx (TjCustomer customer) {
        return hisService.saveBingRenXx(customer);
    }
    /**
     * 待收费费用查询
     * @param bingRenId
     * @param jiuZhenKh
     * @param yuanQuId
     * @return
     */
    @PostMapping("getPendingPaymentList")
    public String getListDaiShouFei (String bingRenId,String jiuZhenKh,String yuanQuId) {
        return hisService.getListDaiShouFei(bingRenId,jiuZhenKh,yuanQuId);
    }
    /**
     * 生成待收费/待退费 费用
     * @param dto
     * @return
     */
    @PostMapping("creatCostInfo")
    public String createMenZhenFy (CreateMenZhenFyDto dto) {
        return hisService.createMenZhenFy(dto);
    }
    /**
     * 门诊未收费费用撤销
     * @param dto
     * @return
     */
    @PostMapping("revokeCost")
    public String cheXiaoMzFy (CheXiaoMzFyDto dto) {
        return hisService.cheXiaoMzFy(dto);
    }
    /**
     * 收费/退费完成通知第三方
     * @param feiYongId
     * @param yeWuLx
     * @return
     */
    @PostMapping("pushPayMsg")
    public String pushZhiFuMsg (String feiYongId,int yeWuLx ) {
        return hisService.pushZhiFuMsg(feiYongId,yeWuLx);
    }
    /**
     * 科室信息查询
     * @param yuanQuId
     * @param keShiMc
     * @param pageIndex
     * @param pageSize
     * @return
     */
    @PostMapping("getKeShiList")
    public String getKeShi (String yuanQuId,String keShiMc,int pageIndex,int pageSize ) {
        return hisService.getKeShi(yuanQuId,keShiMc,pageIndex,pageSize);
    }
    /**
     * 医生信息查询
     * @param yuanQuId
     * @param keShiMc
     * @param pageIndex
     * @param pageSize
     * @return
     */
    @PostMapping("getYiShengList")
    public String getListYiShengZd (String yuanQuId,String keShiMc,int pageIndex,int pageSize ) {
        return hisService.getListYiShengZd(yuanQuId,keShiMc,pageIndex,pageSize);
    }
    /**
     * 获取收费项目分页
     * @param queryString
     * @param bianGengSj
     * @param pageIndex
     * @param pageSize
     * @return
     */
    @PostMapping("getShouFeiXmList")
    public String getShouFeiXm (String queryString,String bianGengSj,int pageIndex,int pageSize ) {
        return hisService.getShouFeiXm(queryString,bianGengSj,pageIndex,pageSize);
    }
    /**
     *科室信息推送
     * @param xingZhiSx 组织属性 第一位1 表示 挂号
     * 第二位 1表示临床
     * 第三位 1表示检查
     * 第四位 1 表示手术
     * 第五位 1 表示治疗
     * 第六位 1 表示护理
     * @param queryString 模糊匹配输⼊码1、科室名称
     * @param zuoFeiBz 作废标志:0 正常;1 作废
     * @param yuanQuId 院区id
     * @param keShiIds 科室ID集合
     * @param ifPlus 是否查询plus属性
     * @return
     */
    @PostMapping("getKeShiByConditionsList")
    public String getKeShiByConditions (int xingZhiSx, String queryString, int zuoFeiBz, String yuanQuId, List<String> keShiIds, int ifPlus) {
        return hisService.getKeShiByConditions(xingZhiSx, queryString, zuoFeiBz, yuanQuId, keShiIds,ifPlus);
    }
    /**
     * 取样本字典
     * @param queryString 样本类型名称(样本名称/样本类型id)
     * @param pageIndex
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @return
     */
    @PostMapping("getYangBen")
    public String getYangBen (String queryString,int pageIndex,int pageSize ) {
        return hisService.getYangBen(queryString,pageIndex,pageSize);
    }
    /**
     *  病区信息推送
     * @param yuanQuId 院区Id
     * @param keShiId 科室Id
     * @param pageIndex 当前⻚
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @return
     */
    @PostMapping("getBingQuList")
    public String getListBingQuZd (String yuanQuId,String keShiId,int pageIndex,int pageSize ) {
        return hisService.getListBingQuZd(yuanQuId,keShiId,pageIndex,pageSize);
    }
    /**
     * 职⼯信息
     * @param bianGengSj 变更时间
     * @param pageIndex 当前⻚
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @return
     */
    @PostMapping("getZhiGongList")
    public String getZhiGongPage (String bianGengSj,int pageIndex,int pageSize ) {
        return hisService.getZhiGongPage(bianGengSj,pageIndex,pageSize);
    }
    /**
     * 检查项目
     * @param queryString
     * @param bianGengSj
     * @param pageIndex
     * @param pageSize
     * @return
     */
    @PostMapping("getJcxm")
    public String getJianChaXm (String queryString,String bianGengSj,int pageIndex,int pageSize ) {
        return hisService.getJianChaXm(queryString,bianGengSj,pageIndex,pageSize);
    }
    /**
     * 检验项⽬推送
     * @param queryCode 查询码(项⽬编码/拼⾳码
     * @param page 当前⻚
     * @param size 每⻚条数(最⼤不能超过100
     * @return
     */
    @PostMapping("getJyxm")
    public String getJianYanXm(String queryCode,Integer page,Integer size){
        return hisService.getJianYanXm(queryCode,page,size);
    }
    /**
     * 检验项⽬收费推送
     * @param shouFeiXmId 收费项⽬id
     * @param jiaGeTx 价格体系
     * @return
     */
    @PostMapping("getShouFeiXmjg")
    public String getShouFeiXmJg(String shouFeiXmId,String jiaGeTx){
        return hisService.getShouFeiXmJg(shouFeiXmId,jiaGeTx);
    }
    /**
     * 检验容器
     * @param queryString 容器名称(容器名称/输⼊码1)
     * @param pageIndex 当前⻚
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @return
     */
    @PostMapping("getJyrqList")
    public String getRongQi(String queryString,Integer pageIndex,Integer pageSize){
        return hisService.getRongQi(queryString,pageIndex,pageSize);
    }
    /**
     *  检验样本
     * @param queryString 样本类型名称(样本名称/样本类型id)
     * @param pageIndex  当前⻚
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @return
     */
    @PostMapping("getJyybList")
    public String getYangBen(String queryString,Integer pageIndex,Integer pageSize){
        return hisService.getJyYangBen(queryString,pageIndex,pageSize);
    }
}
src/main/java/com/example/controller/xian/MeiJiController.java
File was deleted
src/main/java/com/example/factory/ServiceFactory.java
New file
@@ -0,0 +1,44 @@
package com.example.factory;
import com.example.config.ConfigValue;
import com.example.service.HisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
/**
 * @Company: 西安路泰科技有限公司
 * @Author: zhaowenxuan
 * @Date: 2024/12/18 09:32
 */
@Component
public class ServiceFactory {
    private final ConfigValue configValue;
    private final ApplicationContext applicationContext;
    private final String userId;
    @Autowired
    public ServiceFactory(ApplicationContext applicationContext, ConfigValue configValue) {
        this.applicationContext = applicationContext;
        this.configValue = configValue;
        try {
            this.userId = configValue.getConfigValue("hosp_service");
        } catch (Exception e) {
            throw new RuntimeException("配置文件中没有配置hosp_service医院编码");
        }
    }
    public HisService getService() {
        String beanName = getServiceBeanName(userId);
        return (HisService) applicationContext.getBean(beanName);
    }
    private String getServiceBeanName(String userId) {
        switch (userId) {
            case "ShanXi_XiAn_MeiJi":
                return "ShanXiXiAnMeiJi";
            default:
                throw new RuntimeException("找不到对应的医院编码服务层配置:" + userId);
        }
    }
}
src/main/java/com/example/service/HisService.java
New file
@@ -0,0 +1,200 @@
package com.example.service;
import cn.hutool.json.JSONUtil;
import com.example.domain.TjCustomer;
import com.example.dto.xian.meiji.CheXiaoMzFyDto;
import com.example.dto.xian.meiji.CreateMenZhenFyDto;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * @Company: 西安路泰科技有限公司
 * @Author: zhaowenxuan
 * @Date: 2024/12/18 09:35
 */
@Service
public interface HisService {
    /**
     * 建档
     * @param customer
     * @return
     */
    String jianDang(TjCustomer customer);
    /**
     * 验证身份证是否建过档
     * @param customer
     * @return
     */
    String getBingRenXxByShengFenZheng(TjCustomer customer);
    /**
     * 病人基本信息变更
     * @param customer
     * @return
     */
    String saveBingRenXx(TjCustomer customer);
    /**
     * 待收费费用查询
     * @param bingRenId
     * @param jiuZhenKh
     * @param yuanQuId
     * @return
     */
    String getListDaiShouFei(String bingRenId, String jiuZhenKh, String yuanQuId);
    /**
     * 生成待收费/待退费 费用
     * @param dto
     * @return
     */
    String createMenZhenFy(CreateMenZhenFyDto dto);
    /**
     * 门诊未收费费用撤销
     * @param dto
     * @return
     */
    String cheXiaoMzFy(CheXiaoMzFyDto dto);
    /**
     * 收费/退费完成通知第三方
     * @param feiYongId
     * @param yeWuLx
     * @return
     */
    String pushZhiFuMsg(String feiYongId, int yeWuLx);
    /**
     * 科室信息查询
     * @param yuanQuId
     * @param keShiMc
     * @param pageIndex
     * @param pageSize
     * @return
     */
    String getKeShi(String yuanQuId, String keShiMc, int pageIndex, int pageSize);
    /**
     * 医生信息查询
     * @param yuanQuId
     * @param keShiMc
     * @param pageIndex
     * @param pageSize
     * @return
     */
    String getListYiShengZd(String yuanQuId, String keShiMc, int pageIndex, int pageSize);
    /**
     * 获取收费项目分页
     * @param queryString
     * @param bianGengSj
     * @param pageIndex
     * @param pageSize
     * @return
     */
    String getShouFeiXm(String queryString, String bianGengSj, int pageIndex, int pageSize);
    /**
     *科室信息推送
     * @param xingZhiSx 组织属性 第一位1 表示 挂号
     * 第二位 1表示临床
     * 第三位 1表示检查
     * 第四位 1 表示手术
     * 第五位 1 表示治疗
     * 第六位 1 表示护理
     * @param queryString 模糊匹配输⼊码1、科室名称
     * @param zuoFeiBz 作废标志:0 正常;1 作废
     * @param yuanQuId 院区id
     * @param keShiIds 科室ID集合
     * @param ifPlus 是否查询plus属性
     * @return
     */
    String getKeShiByConditions(int xingZhiSx, String queryString, int zuoFeiBz, String yuanQuId, List<String> keShiIds, int ifPlus);
    /**
     * 取样本字典
     * @param queryString 样本类型名称(样本名称/样本类型id)
     * @param pageIndex
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @return
     */
    String getYangBen(String queryString, int pageIndex, int pageSize);
    /**
     *  病区信息推送
     * @param yuanQuId 院区Id
     * @param keShiId 科室Id
     * @param pageIndex 当前⻚
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @return
     */
    String getListBingQuZd(String yuanQuId, String keShiId, int pageIndex, int pageSize);
    /**
     * 职⼯信息
     * @param bianGengSj 变更时间
     * @param pageIndex 当前⻚
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @return
     */
    String getZhiGongPage(String bianGengSj, int pageIndex, int pageSize);
    /**
     * 检查项目
     * @param queryString
     * @param bianGengSj
     * @param pageIndex
     * @param pageSize
     * @return
     */
    String getJianChaXm(String queryString, String bianGengSj, int pageIndex, int pageSize);
    /**
     * 检验项⽬推送
     * @param queryCode 查询码(项⽬编码/拼⾳码
     * @param page 当前⻚
     * @param size 每⻚条数(最⼤不能超过100
     * @return
     */
    String getJianYanXm(String queryCode, Integer page, Integer size);
    /**
     * 检验项⽬收费推送
     * @param shouFeiXmId 收费项⽬id
     * @param jiaGeTx 价格体系
     * @return
     */
    String getShouFeiXmJg(String shouFeiXmId, String jiaGeTx);
    /**
     * 检验容器
     * @param queryString 容器名称(容器名称/输⼊码1)
     * @param pageIndex 当前⻚
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @return
     */
    String getRongQi(String queryString, Integer pageIndex, Integer pageSize);
    /**
     *  检验样本
     * @param queryString 样本类型名称(样本名称/样本类型id)
     * @param pageIndex  当前⻚
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @return
     */
    String getJyYangBen(String queryString, Integer pageIndex, Integer pageSize);
}
src/main/java/com/example/service/xian/MeiJiHisService.java
File was renamed from src/main/java/com/example/service/xian/MeiJiService.java
@@ -2,17 +2,21 @@
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSON;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.example.config.ConfigValue;
import com.example.domain.TjCustomer;
import com.example.dto.xian.meiji.CheXiaoMzFyDto;
import com.example.dto.xian.meiji.CreateMenZhenFyDto;
import com.example.service.HisService;
import com.example.service.ISysConfigService;
import com.example.utils.HttpClientUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import java.io.FileInputStream;
import java.io.IOException;
@@ -28,67 +32,50 @@
 * @Author: zhaowenxuan
 * @Date: 2024/12/17 17:17
 */
public class MeiJiService {
    @Autowired
    private ISysConfigService configService;
    @Autowired
    private RedisTemplate<String ,Object> redisTemplate;
    private static  String HIS_URL = "http://oapi.pbkwyy.com/OAPI";
    private static String CONFIG_PATH;
    private static  String GRANT_TYPE = "client_credentials";
    private static  String CLIENT_ID = "XFZZQEfXTZ7exhhi";
    private static  String CLIENT_SECRET = "05a192176c21edfcc9cf5fa26fc5a9e0c5b131ad";
//    private static  String SCOP = "";
@Service("ShanXiXiAnMeiJi")
public class MeiJiHisService implements HisService {
//    http://oapi.pbkwyy.com/OAPI/oauth/token
//    grant_type:client_credentials
//    client_id:XFZZQEfXTZ7exhhi
//    client_secret:05a192176c21edfcc9cf5fa26fc5a9e0c5b131ad
// http://oapi.pbkwyy.com/OAPI
    @Value("${config.properties}")
    public void setConfigPath(String configPath) {
        CONFIG_PATH = configPath;
        try {
            FileInputStream inputStream = new FileInputStream(CONFIG_PATH);
            Properties props = new Properties();
            props.load(inputStream);
            String url = props.getProperty("df_his_api_url");
            String port = props.getProperty("df_his_api_port");
            GRANT_TYPE = props.getProperty("grant_type");
            CLIENT_ID= props.getProperty("client_id");
            CLIENT_SECRET = props.getProperty("client_secret");
//            SCOP = props.getProperty("scope");
            HIS_URL=url+":"+port+"/OAPI/";
        } catch (IOException throwables) {
            throwables.printStackTrace();
        }
    @Autowired
    public MeiJiHisService(ApplicationContext applicationContext, ConfigValue configValue) {
        this.applicationContext = applicationContext;
        this.configValue = configValue;
        HIS_URL = configValue.getConfigValue("his_api_url") + ":" + configValue.getConfigValue("his_api_port") +"/OAPI/";
    }
    @Autowired
    private ISysConfigService configService;
    @Autowired
    private RedisTemplate<Object ,Object> redisTemplate;
    private ConfigValue configValue;
    private final ApplicationContext applicationContext;
    private final String HIS_URL;
    //获取token
    private JSONObject getToken () {
        String GRANT_TYPE = "client_credentials";
        String CLIENT_ID = "XFZZQEfXTZ7exhhi";
        String CLIENT_SECRET = "05a192176c21edfcc9cf5fa26fc5a9e0c5b131ad";
        Map<String, Object> map = new HashMap<>();
        map.put("grant_type",GRANT_TYPE);
        map.put("client_id",CLIENT_ID);
        map.put("client_secret",CLIENT_SECRET);
        map.put("grant_type", GRANT_TYPE);
        map.put("client_id", CLIENT_ID);
        map.put("client_secret", CLIENT_SECRET);
//        map.put("scope",SCOP);
        String post = sendPost (HIS_URL+"/oauth/token", map);
        if (StrUtil.isBlank(post)) return null;
        JSONObject parseObj = JSONUtil.parseObj(post);
//        Integer expiresIn = parseObj.getInt("expires_in");
//        if (expiresIn != null){
//            parseObj.putOpt("time",Instant.now().getEpochSecond());
//            redisTemplate.opsForHash().putAll("token:his:df",parseObj);
//            redisTemplate.expire("token:his:df",expiresIn - 10, TimeUnit.SECONDS);
//        }
        return parseObj;
        return JSONUtil.parseObj(post);
    }
    //建档
    public JSON jianDang (TjCustomer customer) {
    public String jianDang (TjCustomer customer) {
        String czy = configService.selectConfigByKey("dfhisczybm");
        Map<String, Object> map = new HashMap<> ();
@@ -124,24 +111,22 @@
        map.put ("minZuDm","");
        map.put ("minZuMc","");
        //职业编码
        String post = sendPost (HIS_URL+"/menZhenJz/jianDang", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/menZhenJz/jianDang", map);
    }
    //验证身份证是否建过档
    public JSON getBingRenXxByShengFenZheng (TjCustomer customer) {
    public String getBingRenXxByShengFenZheng (TjCustomer customer) {
        String czy = configService.selectConfigByKey("dfhisczybm");
        Map<String, Object> map = new HashMap<> ();
        map.put ("caoZuoYuan",czy);
        map.put ("shenFenZh", customer.getCusIdcard ());
        map.put ("danWeiBh","");
        //职业编码
        String post = sendPost (HIS_URL+"/menZhenJz/getBingRenXxByShengFenZheng", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/menZhenJz/getBingRenXxByShengFenZheng", map);
    }
    //病人基本信息变更
    public JSON saveBingRenXx (TjCustomer customer) {
    public String saveBingRenXx (TjCustomer customer) {
        String czy = configService.selectConfigByKey("dfhisczybm");
        Map<String, Object> map = new HashMap<> ();
        map.put ("jiuZhenKh", customer.getPationId ());
@@ -165,24 +150,22 @@
        map.put ("jiLuLy","3");
        map.put ("caoZuoYuan",czy);
        //职业编码
        String post = sendPost (HIS_URL+"/menZhenJz/saveBingRenXx", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/menZhenJz/saveBingRenXx", map);
    }
    //待收费费用查询
    public JSON getListDaiShouFei (String bingRenId,String jiuZhenKh,String yuanQuId) {
    public String getListDaiShouFei (String bingRenId, String jiuZhenKh, String yuanQuId) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("bingRenId",bingRenId);
        map.put ("jiuZhenKh",jiuZhenKh);
        map.put ("yuanQuId",yuanQuId);
        //职业编码
        String post = sendPost (HIS_URL+"/shouFei/getListDaiShouFei", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/shouFei/getListDaiShouFei", map);
    }
    //生成待收费/待退费 费用
    public JSON createMenZhenFy (CreateMenZhenFyDto dto) {
    public String createMenZhenFy (CreateMenZhenFyDto dto) {
        String czy = configService.selectConfigByKey("dfhisczybm");
        Map<String, Object> map = new HashMap<> ();
        map.put ("bingRenId",dto.getBingRenId());
@@ -195,48 +178,44 @@
        map.put ("shouTuiBz",dto.getShouTuiBz());
        map.put ("feiYongMxList",dto.getFeiYongMxList());
        //职业编码
        String post = sendPost (HIS_URL+"/shouFei/createMenZhenFy", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/shouFei/createMenZhenFy", map);
    }
    //门诊未收费费用撤销
    public JSON cheXiaoMzFy (CheXiaoMzFyDto dto) {
    public String cheXiaoMzFy (CheXiaoMzFyDto dto) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("bingRenId",dto.getBingRenId());
        map.put ("jiuZhenKh",dto.getJiuZhenKh());
        map.put ("feiYongIdList",dto.getFeiYongIdList());
        //职业编码
        String post = sendPost (HIS_URL+"/shouFei/cheXiaoMzFy", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/shouFei/cheXiaoMzFy", map);
    }
    //收费/退费完成通知第三方
    public JSON pushZhiFuMsg (String feiYongId,int yeWuLx ) {
    public String pushZhiFuMsg (String feiYongId, int yeWuLx ) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("feiYongId",feiYongId);
        map.put ("yeWuLx",yeWuLx);
        //职业编码
        String post = sendPost (HIS_URL+"/shouFei/pushZhiFuMsg", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/shouFei/pushZhiFuMsg", map);
    }
    //科室信息查询
    public JSON getKeShi (String yuanQuId,String keShiMc,int pageIndex,int pageSize ) {
    public String getKeShi (String yuanQuId, String keShiMc, int pageIndex, int pageSize ) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("yuanQuId",yuanQuId);
        map.put ("keShiMc",keShiMc);
        map.put ("pageIndex",pageIndex);
        map.put ("pageSize",pageSize);
        //职业编码
        String post = sendPost (HIS_URL+"/zhuShuJu/getKeShi", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/zhuShuJu/getKeShi", map);
    }
    //医生信息查询
    public JSON getListYiShengZd (String yuanQuId,String keShiMc,int pageIndex,int pageSize ) {
    public String getListYiShengZd (String yuanQuId, String keShiMc, int pageIndex, int pageSize ) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("yuanQuId",yuanQuId);
        map.put ("keShiMc",keShiMc);
@@ -244,41 +223,40 @@
        map.put ("pageIndex",pageIndex);
        map.put ("pageSize",pageSize);
        //职业编码
        String post = sendPost (HIS_URL+"/zhuShuJu/getListYiShengZd", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/zhuShuJu/getListYiShengZd", map);
    }
    //获取收费项目分页
    public JSON getShouFeiXm (String queryString,String bianGengSj,int pageIndex,int pageSize ) {
    public String getShouFeiXm (String queryString, String bianGengSj, int pageIndex, int pageSize ) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("queryString",queryString);
        map.put ("bianGengSj",bianGengSj);
        map.put ("pageIndex",pageIndex);
        map.put ("pageSize",pageSize);
        //职业编码
        String post = sendPost (HIS_URL+"/zhuShuJu/getShouFeiXm", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/zhuShuJu/getShouFeiXm", map);
    }
    /**
     *科室信息推送
     * @param xingZhiSx 组织属性 第一位1 表示 挂号
     * 第二位 1表示临床
     * 第三位 1表示检查
     * 第四位 1 表示手术
     * 第五位 1 表示治疗
     * 第六位 1 表示护理
     * 科室信息推送
     *
     * @param xingZhiSx   组织属性 第一位1 表示 挂号
     *                    第二位 1表示临床
     *                    第三位 1表示检查
     *                    第四位 1 表示手术
     *                    第五位 1 表示治疗
     *                    第六位 1 表示护理
     * @param queryString 模糊匹配输⼊码1、科室名称
     * @param zuoFeiBz 作废标志:0 正常;1 作废
     * @param yuanQuId 院区id
     * @param keShiIds 科室ID集合
     * @param ifPlus 是否查询plus属性
     * @param zuoFeiBz    作废标志:0 正常;1 作废
     * @param yuanQuId    院区id
     * @param keShiIds    科室ID集合
     * @param ifPlus      是否查询plus属性
     * @return
     */
    public JSON getKeShiByConditions (int xingZhiSx, String queryString, int zuoFeiBz, String yuanQuId, List<String> keShiIds, int ifPlus) {
    public String getKeShiByConditions (int xingZhiSx, String queryString, int zuoFeiBz, String yuanQuId, List<String> keShiIds, int ifPlus) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("xingZhiSx",xingZhiSx);
        map.put ("queryString",queryString);
@@ -287,146 +265,145 @@
        map.put ("keShiIds",keShiIds);
        map.put ("ifPlus",ifPlus);
        //职业编码
        String post = sendPost (HIS_URL+"/zhuShuJu/getKeShiByConditions", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/zhuShuJu/getKeShiByConditions", map);
    }
    /**
     * 取样本字典
     *
     * @param queryString 样本类型名称(样本名称/样本类型id)
     * @param pageIndex
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @param pageSize    每⻚条数(最⼤不能超过100)
     * @return
     */
    public JSON getYangBen (String queryString,int pageIndex,int pageSize ) {
    public String getYangBen (String queryString, int pageIndex, int pageSize ) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("queryString",queryString);
        map.put ("pageIndex",pageIndex);
        map.put ("pageSize",pageSize);
        //职业编码
        String post = sendPost (HIS_URL+"/zhuShuJu/getYangBen", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/zhuShuJu/getYangBen", map);
    }
    /**
     *  病区信息推送
     * @param yuanQuId 院区Id
     * @param keShiId 科室Id
     * 病区信息推送
     *
     * @param yuanQuId  院区Id
     * @param keShiId   科室Id
     * @param pageIndex 当前⻚
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @param pageSize  每⻚条数(最⼤不能超过100)
     * @return
     */
    public JSON getListBingQuZd (String yuanQuId,String keShiId,int pageIndex,int pageSize ) {
    public String getListBingQuZd (String yuanQuId, String keShiId, int pageIndex, int pageSize ) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("yuanQuId",yuanQuId);
        map.put ("keShiId",keShiId);
        map.put ("pageIndex",pageIndex);
        map.put ("pageSize",pageSize);
        //职业编码
        String post = sendPost (HIS_URL+"/zhuShuJu/getListBingQuZd", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/zhuShuJu/getListBingQuZd", map);
    }
    /**
     * 职⼯信息
     *
     * @param bianGengSj 变更时间
     * @param pageIndex 当前⻚
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @param pageIndex  当前⻚
     * @param pageSize   每⻚条数(最⼤不能超过100)
     * @return
     */
    public JSON getZhiGongPage (String bianGengSj,int pageIndex,int pageSize ) {
    public String getZhiGongPage (String bianGengSj, int pageIndex, int pageSize ) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("bianGengSj",bianGengSj);
        map.put ("pageIndex",pageIndex);
        map.put ("pageSize",pageSize);
        //职业编码
        String post = sendPost (HIS_URL+"/zhuShuJu/getZhiGongPage", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/zhuShuJu/getZhiGongPage", map);
    }
    /**
     * 检查项目
     *
     * @param queryString
     * @param bianGengSj
     * @param pageIndex
     * @param pageSize
     * @return
     */
    public JSON getJianChaXm (String queryString,String bianGengSj,int pageIndex,int pageSize ) {
    public String getJianChaXm (String queryString, String bianGengSj, int pageIndex, int pageSize ) {
        Map<String, Object> map = new HashMap<> ();
        map.put ("queryString",queryString);
        map.put ("bianGengSj",bianGengSj);
        map.put ("pageIndex",pageIndex);
        map.put ("pageSize",pageSize);
        //职业编码
        String post = sendPost (HIS_URL+"/zhuShuJu/getJianChaXm", map);
        return JSONUtil.parseObj(post);
        return sendPost (HIS_URL+"/zhuShuJu/getJianChaXm", map);
    }
    /**
     * 检验项⽬推送
     *
     * @param queryCode 查询码(项⽬编码/拼⾳码
     * @param page 当前⻚
     * @param size 每⻚条数(最⼤不能超过100
     * @param page      当前⻚
     * @param size      每⻚条数(最⼤不能超过100
     * @return
     */
    public JSON getJianYanXm(String queryCode,Integer page,Integer size){
    public String getJianYanXm(String queryCode, Integer page, Integer size){
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("queryCode",queryCode);
        hashMap.put("page",page);
        hashMap.put("size",size);
        String post = sendPost (HIS_URL+"/zhuShuJu/getJianYanXm", hashMap);
        return JSONUtil.parse(post);
        return sendPost (HIS_URL+"/zhuShuJu/getJianYanXm", hashMap);
    }
    /**
     * 检验项⽬收费推送
     *
     * @param shouFeiXmId 收费项⽬id
     * @param jiaGeTx 价格体系
     * @param jiaGeTx     价格体系
     * @return
     */
    public JSON getShouFeiXmJg(String shouFeiXmId,String jiaGeTx){
    public String getShouFeiXmJg(String shouFeiXmId, String jiaGeTx){
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("shouFeiXmId",shouFeiXmId);
        hashMap.put("jiaGeTx",jiaGeTx);
        String post = sendPost (HIS_URL+"/zhuShuJu/getShouFeiXmJg", hashMap);
        return JSONUtil.parse(post);
        return sendPost (HIS_URL+"/zhuShuJu/getShouFeiXmJg", hashMap);
    }
    /**
     * 检验容器
     *
     * @param queryString 容器名称(容器名称/输⼊码1)
     * @param pageIndex 当前⻚
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @param pageIndex   当前⻚
     * @param pageSize    每⻚条数(最⼤不能超过100)
     * @return
     */
    public JSON getRongQi(String queryString,Integer pageIndex,Integer pageSize){
    public String getRongQi(String queryString, Integer pageIndex, Integer pageSize){
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("queryString",queryString);
        hashMap.put("pageIndex",pageIndex);
        hashMap.put("pageSize",pageSize);
        String post = sendPost (HIS_URL+"/zhuShuJu/getRongQi", hashMap);
        return JSONUtil.parse(post);
        return sendPost (HIS_URL+"/zhuShuJu/getRongQi", hashMap);
    }
    /**
     *  检验样本
     * 检验样本
     *
     * @param queryString 样本类型名称(样本名称/样本类型id)
     * @param pageIndex  当前⻚
     * @param pageSize 每⻚条数(最⼤不能超过100)
     * @param pageIndex   当前⻚
     * @param pageSize    每⻚条数(最⼤不能超过100)
     * @return
     */
    public JSON getYangBen(String queryString,Integer pageIndex,Integer pageSize){
    public String getJyYangBen(String queryString, Integer pageIndex, Integer pageSize){
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("queryString",queryString);
        hashMap.put("pageIndex",pageIndex);
        hashMap.put("pageSize",pageSize);
        String post = sendPost (HIS_URL+"/zhuShuJu/getYangBen", hashMap);
        return JSONUtil.parse(post);
        return sendPost (HIS_URL+"/zhuShuJu/getYangBen", hashMap);
    }
    private String sendPost(String url,Map<String, Object> hashMap){