copy from src/main/java/com/example/utils/synczd/shanjianyi/DictionaryUtilShanXiWeiNanBjfhyy.java
copy to src/main/java/com/example/service/shanjianyi/shanxiqin/baoji/bjsqyy/DictionaryUtilShanXiBaoJiBjsqyy.java
File was copied from src/main/java/com/example/utils/synczd/shanjianyi/DictionaryUtilShanXiWeiNanBjfhyy.java |
| | |
| | | package com.example.utils.synczd.shanjianyi; |
| | | package com.example.service.shanjianyi.shanxiqin.baoji.bjsqyy; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONArray; |
| | |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class DictionaryUtilShanXiWeiNanBjfhyy { |
| | | public class DictionaryUtilShanXiBaoJiBjsqyy { |
| | | |
| | | // @Autowired |
| | | // private ConfigValue configValue; |
| | | @Autowired |
| | | private HisSyncDictMapper hisSyncDictMapper; |
| | | @Autowired |
| | | private DictCommonHisConfigService dictCommonHisConfigService; |
| | | |
| | | // private static String CONFIG_PATH; |
| | | // private static String BASE_API_URL = ""; |
| | | private static final int SIZE = 100; |
| | | // private static String USER = ""; |
| | | // private static String PASSWORD = ""; |
| | | // private static String URL = ""; |
| | | // private static String NAME = ""; |
| | | // @Value("${config.path}") |
| | | // public void setConfigPath(String configPath) { |
| | | // CONFIG_PATH = configPath; |
| | | // NAME = configValue.getConfigValue("ShanXi_Qin_BaoJi_Bjxjyy.name"); |
| | | // URL = "jdbc:mysql://" + configValue.getConfigValue("ShanXi_Qin_BaoJi_Bjxjyy.ip") |
| | | // + ":" + configValue.getConfigValue("ShanXi_Qin_BaoJi_Bjxjyy.prot") + "/" + NAME + |
| | | // "?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8"; |
| | | // USER = configValue.getConfigValue("ShanXi_Qin_BaoJi_Bjxjyy.username"); |
| | | // PASSWORD = configValue.getConfigValue("ShanXi_Qin_BaoJi_Bjxjyy.password"); |
| | | // String apiUrl = configValue.getConfigValue("ShanXi_Qin_BaoJi_Bjxjyy.his_api_url"); |
| | | // String apiPort = configValue.getConfigValue("ShanXi_Qin_BaoJi_Bjxjyy.his_api_port"); |
| | | // BASE_API_URL = apiUrl+":"+apiPort+configValue.getConfigValue("ShanXi_Qin_BaoJi_Bjxjyy.hisapiappend"); |
| | | // } |
| | | |
| | | |
| | | /** |
| | | * 暂时不做 |
| | | * 1.90 门诊明细计费及组合计费项目 MZJFZHMXXM |
| | | * |
| | | */ |
| | | |
| | | // 分页每次1000条 |
| | | // 分页每次1000条 |
| | | static { |
| | | try { |
| | | Class.forName("com.mysql.cj.jdbc.Driver"); |
| | |
| | | * 进行同步 |
| | | */ |
| | | public void exec(List<HisSyncDict> hisSyncDicts, String token){ |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("bjfhyy"); |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("bjsqyy"); |
| | | log.info("开始执行同步"); |
| | | Connection connection = getConnection(config); |
| | | if (connection == null) |
| | |
| | | // } |
| | | try { |
| | | String url = "jdbc:mysql://" + config.getDbIp() |
| | | + ":" + config.getDbPort() + "/" + config.getDbName() + |
| | | "?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8"; |
| | | + ":" + config.getDbPort() + "/" + config.getDbName() + |
| | | "?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8"; |
| | | log.info("数据库信息 ->{},{},{}",config.getDbUser(),config.getDbPassword(),url); |
| | | return DriverManager.getConnection(url,config.getDbUser(),config.getDbPassword()); |
| | | } catch (Exception throwables) { |