| | |
| | | /** |
| | | * 开单科室 |
| | | */ |
| | | public static final String kaiDanKeShi = "kaiDanKs"; |
| | | // public static final String kaiDanKeShi = "kaiDanKs"; |
| | | |
| | | /** |
| | | * 费用类别标志 1代收费 2待退费 |
| | |
| | | /** |
| | | * |
| | | */ |
| | | private String kdks; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String dbIp; |
| | | |
| | | /** |
| | |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("yuanQuId","1"); |
| | | map.put ("yingYongId","870101"); |
| | | map.put ("kaiDanKs",params.get(ApiParamsConstants.kaiDanKeShi)); |
| | | map.put ("kaiDanKs",config.getKdks()); |
| | | map.put ("dengJiLsh",params.get(ApiParamsConstants.Tj_NUM)); |
| | | map.put ("shouTuiBz",params.get(ApiParamsConstants.SHOU_TUI_STATUS)); |
| | | map.put ("feiYongMxList",params.get(ApiParamsConstants.FEI_YONG_INFO_LIST)); |
| | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.example.config.ConfigValue; |
| | | import com.example.constant.ApiParamsConstants; |
| | | import com.example.domain.DictCommonHisConfig; |
| | | import com.example.domain.HisSyncDict; |
| | | import com.example.domain.TjFlowingWaterHis; |
| | | import com.example.service.DictCommonHisConfigService; |
| | | import com.example.service.HisService; |
| | | import com.example.utils.AjaxResult; |
| | | import com.example.utils.FieldNameConverter; |
| | |
| | | // client_secret:05a192176c21edfcc9cf5fa26fc5a9e0c5b131ad |
| | | // http://oapi.xamjyy.com/OAPI |
| | | |
| | | @Autowired |
| | | public JdczgzyyHisService(ApplicationContext applicationContext, ConfigValue configValue) { |
| | | this.applicationContext = applicationContext; |
| | | this.configValue = configValue; |
| | | HIS_URL = configValue.getConfigValue("ShanXi_Qin_WeiNan_Jdczgzyy.his_api_url") + ":" + configValue.getConfigValue("ShanXi_Qin_WeiNan_Jdczgzyy.his_api_port") + configValue.getConfigValue("ShanXi_Qin_WeiNan_Jdczgzyy.hisapiappend"); |
| | | TJ_URL = configValue.getConfigValue("tjUrl"); |
| | | CZY = configValue.getConfigValue("ShanXi_Qin_WeiNan_Jdczgzyy.czy"); |
| | | } |
| | | // @Autowired |
| | | // public JdczgzyyHisService(ApplicationContext applicationContext, ConfigValue configValue) { |
| | | // this.applicationContext = applicationContext; |
| | | // this.configValue = configValue; |
| | | // HIS_URL = configValue.getConfigValue("ShanXi_Qin_WeiNan_Jdczgzyy.his_api_url") + ":" + configValue.getConfigValue("ShanXi_Qin_WeiNan_Jdczgzyy.his_api_port") + configValue.getConfigValue("ShanXi_Qin_WeiNan_Jdczgzyy.hisapiappend"); |
| | | // TJ_URL = configValue.getConfigValue("tjUrl"); |
| | | // CZY = configValue.getConfigValue("ShanXi_Qin_WeiNan_Jdczgzyy.czy"); |
| | | // } |
| | | |
| | | @Autowired |
| | | private RedisTemplate<Object ,Object> redisTemplate; |
| | | @Autowired |
| | | private DictCommonHisConfigService dictCommonHisConfigService; |
| | | |
| | | private final ApplicationContext applicationContext; |
| | | |
| | | private final String HIS_URL; |
| | | private final String TJ_URL; |
| | | private final String CZY; |
| | | // private final ApplicationContext applicationContext; |
| | | // private final String HIS_URL; |
| | | // private final String TJ_URL; |
| | | // private final String CZY; |
| | | |
| | | //获取token |
| | | private JSONObject getToken () { |
| | |
| | | map.put("client_secret", CLIENT_SECRET); |
| | | // map.put("scope",SCOP); |
| | | // String post = sendPostTokenFormUrlencoded (HIS_URL+"/oauth/token", map); |
| | | String post = HttpClientUtils.sendPostTokenFormUrlencoded(HIS_URL + "/oauth/token", map, null); |
| | | String his_url = dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL"); |
| | | String post = HttpClientUtils.sendPostTokenFormUrlencoded(his_url + "/oauth/token", map, null); |
| | | if (StrUtil.isBlank(post)) return null; |
| | | return JSONUtil.parseObj(post); |
| | | } |
| | |
| | | map.put ("feiYongLb",""); |
| | | map.put ("feiYongXz",""); |
| | | map.put ("jiLuLy","3"); |
| | | map.put ("caoZuoYuan",CZY); |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("jdczgzyy"); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("chongZhiJe",""); |
| | | map.put ("yiBaoKh",""); |
| | | map.put ("geRenBh",""); |
| | |
| | | map.put ("minZuDm",""); |
| | | map.put ("minZuMc",""); |
| | | // 职业编码 |
| | | String post = sendPost(HIS_URL + "/menZhenJz/jianDang", map); |
| | | String post = sendPost(config.getHisUrl() + "/menZhenJz/jianDang", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject obj = JSONUtil.createObj(); |
| | |
| | | |
| | | @Override |
| | | public String getBingRenXxByShengFenZheng(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("jdczgzyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("shenFenZh", params.get(ApiParamsConstants.CUS_ID_CARD)); |
| | | map.put ("danWeiBh",params.get(ApiParamsConstants.COMP_ID)); |
| | | //职业编码 |
| | | String string = sendPostTokenFormUrlencoded(HIS_URL + "/menZhenJz/getBingRenXxByShengFenZheng", map); |
| | | String string = sendPostTokenFormUrlencoded(config.getHisUrl() + "/menZhenJz/getBingRenXxByShengFenZheng", map); |
| | | JSONObject object = JSONUtil.createObj(); |
| | | if (StrUtil.isBlank(string)){ |
| | | object.putOpt("code",500); |
| | |
| | | map.put ("feiYongLb",""); |
| | | map.put ("feiYongXz",""); |
| | | map.put ("jiLuLy","3"); |
| | | map.put ("caoZuoYuan",CZY); |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("jdczgzyy"); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/menZhenJz/saveBingRenXx", map); |
| | | String post = sendPost(config.getHisUrl() + "/menZhenJz/saveBingRenXx", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject obj = JSONUtil.createObj(); |
| | |
| | | map.put ("bingRenId",params.get(ApiParamsConstants.PATIONID)); |
| | | map.put ("jiuZhenKh",params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("yuanQuId","1"); |
| | | |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("jdczgzyy"); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/getListDaiShouFei", map); |
| | | String post = sendPost(config.getHisUrl() + "/shouFei/getListDaiShouFei", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject data = jsonObject.getJSONObject("returnData"); |
| | |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("bingRenId",params.get(ApiParamsConstants.PATIONID)); |
| | | map.put ("jiuZhenKh",params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("caoZuoYuan",CZY); |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("jdczgzyy"); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("yuanQuId","1"); |
| | | map.put ("yingYongId","870101"); |
| | | map.put ("kaiDanKs",params.get(ApiParamsConstants.kaiDanKeShi)); |
| | | map.put ("kaiDanKs",config.getKdks()); |
| | | map.put ("dengJiLsh",params.get(ApiParamsConstants.Tj_NUM)); |
| | | map.put ("shouTuiBz",params.get(ApiParamsConstants.SHOU_TUI_STATUS)); |
| | | map.put ("feiYongMxList",params.get(ApiParamsConstants.FEI_YONG_INFO_LIST)); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/createMenZhenFy", map); |
| | | String post = sendPost(config.getHisUrl() + "/shouFei/createMenZhenFy", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getInt("returnCode") != 1) return AjaxResult.error(post); |
| | | JSONObject data = jsonObject.getJSONObject("returnData"); |
| | |
| | | ids.add(object); |
| | | }); |
| | | map.put ("feiYongIdList",ids); |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("jdczgzyy"); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/cheXiaoMzFy", map); |
| | | String post = sendPost(config.getHisUrl() + "/shouFei/cheXiaoMzFy", map); |
| | | JSONObject entries = JSONUtil.parseObj(post); |
| | | if (entries.getStr("returnCode").equals("1")) |
| | | return AjaxResult.success(); |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getKeShi", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL")+"/zhuShuJu/getKeShi", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("bianGengSj",""); |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getListYiShengZd", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL")+"/zhuShuJu/getListYiShengZd", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getShouFeiXm", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL")+"/zhuShuJu/getShouFeiXm", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("keShiIds",params.get(ApiParamsConstants.DEPT_IDS)); |
| | | map.put ("ifPlus",""); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getKeShiByConditions", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL")+"/zhuShuJu/getKeShiByConditions", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getYangBen", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL")+"/zhuShuJu/getYangBen", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getListBingQuZd", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL")+"/zhuShuJu/getListBingQuZd", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getZhiGongPage", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL")+"/zhuShuJu/getZhiGongPage", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getJianChaXm", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL")+"/zhuShuJu/getJianChaXm", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryCode",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("page",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("size",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getJianYanXm", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL")+"/zhuShuJu/getJianYanXm", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("shouFeiXmId",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("jiaGeTx",map.get(ApiParamsConstants.COMMON_QUERY_KEY2)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getShouFeiXmJg", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL")+"/zhuShuJu/getShouFeiXmJg", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryString",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("pageIndex",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("pageSize",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getRongQi", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL")+"/zhuShuJu/getRongQi", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryString",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("pageIndex",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("pageSize",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getYangBen", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "HIS_URL")+"/zhuShuJu/getYangBen", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put("type","1"); |
| | | HashMap<String, Object> headers = new HashMap<>(); |
| | | headers.put("hospId","jdczgzyy"); |
| | | String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/pushZhiFuMsg", map,headers); |
| | | String post = HttpClientUtils.sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "TJ_URL") + "/callBack/pushZhiFuMsg", map,headers); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | JSONObject obj = JSONUtil.createObj(); |
| | | if (jsonObject.getStr("code").equals("200")) { |
| | |
| | | map.put("hosp","shanxiqinjdczgzyy"); |
| | | HashMap<String, Object> headers = new HashMap<>(); |
| | | headers.put("hospId","jdczgzyy"); |
| | | String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/getZdList", map,headers); |
| | | String post = HttpClientUtils.sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("jdczgzyy", "TJ_URL") + "/callBack/getZdList", map,headers); |
| | | JSONArray jsonArray = JSONUtil.parseObj(post).getJSONArray("data"); |
| | | if (jsonArray != null && !jsonArray.isEmpty()) { |
| | | List<HisSyncDict> list = jsonArray.toList(HisSyncDict.class); |
| | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.example.config.ConfigValue; |
| | | import com.example.constant.ApiParamsConstants; |
| | | import com.example.domain.DictCommonHisConfig; |
| | | import com.example.domain.HisSyncDict; |
| | | import com.example.domain.TjFlowingWaterHis; |
| | | import com.example.service.DictCommonHisConfigService; |
| | | import com.example.service.HisService; |
| | | import com.example.utils.AjaxResult; |
| | | import com.example.utils.FieldNameConverter; |
| | |
| | | // client_secret:05a192176c21edfcc9cf5fa26fc5a9e0c5b131ad |
| | | // http://oapi.xamjyy.com/OAPI |
| | | |
| | | @Autowired |
| | | public PbkwyyHisService(ApplicationContext applicationContext, ConfigValue configValue) { |
| | | this.applicationContext = applicationContext; |
| | | this.configValue = configValue; |
| | | HIS_URL = configValue.getConfigValue("ShanXi_Qin_WeiNan_Pbkwyy.his_api_url") + ":" + configValue.getConfigValue("ShanXi_Qin_WeiNan_Pbkwyy.his_api_port") + configValue.getConfigValue("ShanXi_Qin_WeiNan_Pbkwyy.hisapiappend"); |
| | | TJ_URL = configValue.getConfigValue("tjUrl"); |
| | | CZY = configValue.getConfigValue("ShanXi_Qin_WeiNan_Pbkwyy.czy"); |
| | | } |
| | | // @Autowired |
| | | // public PbkwyyHisService(ApplicationContext applicationContext, ConfigValue configValue) { |
| | | // this.applicationContext = applicationContext; |
| | | // this.configValue = configValue; |
| | | // HIS_URL = configValue.getConfigValue("ShanXi_Qin_WeiNan_Pbkwyy.his_api_url") + ":" + configValue.getConfigValue("ShanXi_Qin_WeiNan_Pbkwyy.his_api_port") + configValue.getConfigValue("ShanXi_Qin_WeiNan_Pbkwyy.hisapiappend"); |
| | | // TJ_URL = configValue.getConfigValue("tjUrl"); |
| | | // CZY = configValue.getConfigValue("ShanXi_Qin_WeiNan_Pbkwyy.czy"); |
| | | // } |
| | | |
| | | @Autowired |
| | | private RedisTemplate<Object ,Object> redisTemplate; |
| | | @Autowired |
| | | private DictCommonHisConfigService dictCommonHisConfigService; |
| | | |
| | | private final ApplicationContext applicationContext; |
| | | |
| | | private final String HIS_URL; |
| | | private final String TJ_URL; |
| | | private final String CZY; |
| | | // private final ApplicationContext applicationContext; |
| | | // |
| | | // private final String HIS_URL; |
| | | // private final String TJ_URL; |
| | | // private final String CZY; |
| | | |
| | | //获取token |
| | | private JSONObject getToken () { |
| | |
| | | map.put("client_secret", CLIENT_SECRET); |
| | | // map.put("scope",SCOP); |
| | | // String post = sendPostTokenFormUrlencoded (HIS_URL+"/oauth/token", map); |
| | | String post = HttpClientUtils.sendPostTokenFormUrlencoded(HIS_URL + "/oauth/token", map, null); |
| | | String post = HttpClientUtils.sendPostTokenFormUrlencoded(dictCommonHisConfigService.getConfigByHospital("pbkwyy").getHisUrl() + "/oauth/token", map, null); |
| | | if (StrUtil.isBlank(post)) return null; |
| | | return JSONUtil.parseObj(post); |
| | | } |
| | | |
| | | @Override |
| | | public String jianDang(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("pbkwyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("jiuZhenKh", params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("kaiLeiXing","4"); |
| | |
| | | map.put ("feiYongLb",""); |
| | | map.put ("feiYongXz",""); |
| | | map.put ("jiLuLy","3"); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("chongZhiJe",""); |
| | | map.put ("yiBaoKh",""); |
| | | map.put ("geRenBh",""); |
| | |
| | | map.put ("minZuDm",""); |
| | | map.put ("minZuMc",""); |
| | | // 职业编码 |
| | | String post = sendPost(HIS_URL + "/menZhenJz/jianDang", map); |
| | | String post = sendPost(config.getHisUrl() + "/menZhenJz/jianDang", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject obj = JSONUtil.createObj(); |
| | |
| | | |
| | | @Override |
| | | public String getBingRenXxByShengFenZheng(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("pbkwyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("shenFenZh", params.get(ApiParamsConstants.CUS_ID_CARD)); |
| | | map.put ("danWeiBh",params.get(ApiParamsConstants.COMP_ID)); |
| | | //职业编码 |
| | | String string = sendPostTokenFormUrlencoded(HIS_URL + "/menZhenJz/getBingRenXxByShengFenZheng", map); |
| | | String string = sendPostTokenFormUrlencoded(config.getHisUrl() + "/menZhenJz/getBingRenXxByShengFenZheng", map); |
| | | JSONObject object = JSONUtil.createObj(); |
| | | if (StrUtil.isBlank(string)){ |
| | | object.putOpt("code",500); |
| | |
| | | map.put ("feiYongLb",""); |
| | | map.put ("feiYongXz",""); |
| | | map.put ("jiLuLy","3"); |
| | | map.put ("caoZuoYuan",CZY); |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("pbkwyy"); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/menZhenJz/saveBingRenXx", map); |
| | | String post = sendPost(config.getHisUrl() + "/menZhenJz/saveBingRenXx", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject obj = JSONUtil.createObj(); |
| | |
| | | map.put ("jiuZhenKh",params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("yuanQuId","1"); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/getListDaiShouFei", map); |
| | | String post = sendPost(dictCommonHisConfigService.getConfigByHospital("pbkwyy").getHisUrl() + "/shouFei/getListDaiShouFei", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject data = jsonObject.getJSONObject("returnData"); |
| | |
| | | |
| | | @Override |
| | | public String createMenZhenFy(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("pbkwyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("bingRenId",params.get(ApiParamsConstants.PATIONID)); |
| | | map.put ("jiuZhenKh",params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("yuanQuId","1"); |
| | | map.put ("yingYongId","870101"); |
| | | map.put ("kaiDanKs",params.get(ApiParamsConstants.kaiDanKeShi)); |
| | | map.put ("kaiDanKs",config.getKdks()); |
| | | map.put ("dengJiLsh",params.get(ApiParamsConstants.Tj_NUM)); |
| | | map.put ("shouTuiBz",params.get(ApiParamsConstants.SHOU_TUI_STATUS)); |
| | | map.put ("feiYongMxList",params.get(ApiParamsConstants.FEI_YONG_INFO_LIST)); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/createMenZhenFy", map); |
| | | String post = sendPost(config.getHisUrl() + "/shouFei/createMenZhenFy", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getInt("returnCode") != 1) return AjaxResult.error(post); |
| | | JSONObject data = jsonObject.getJSONObject("returnData"); |
| | |
| | | }); |
| | | map.put ("feiYongIdList",ids); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/cheXiaoMzFy", map); |
| | | String post = sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL") + "/shouFei/cheXiaoMzFy", map); |
| | | JSONObject entries = JSONUtil.parseObj(post); |
| | | if (entries.getStr("returnCode").equals("1")) |
| | | return AjaxResult.success(); |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getKeShi", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL")+"/zhuShuJu/getKeShi", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getListYiShengZd", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL")+"/zhuShuJu/getListYiShengZd", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getShouFeiXm", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL")+"/zhuShuJu/getShouFeiXm", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("keShiIds",params.get(ApiParamsConstants.DEPT_IDS)); |
| | | map.put ("ifPlus",""); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getKeShiByConditions", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL")+"/zhuShuJu/getKeShiByConditions", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getYangBen", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL")+"/zhuShuJu/getYangBen", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getListBingQuZd", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL")+"/zhuShuJu/getListBingQuZd", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getZhiGongPage", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL")+"/zhuShuJu/getZhiGongPage", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getJianChaXm", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL")+"/zhuShuJu/getJianChaXm", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryCode",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("page",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("size",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getJianYanXm", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL")+"/zhuShuJu/getJianYanXm", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("shouFeiXmId",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("jiaGeTx",map.get(ApiParamsConstants.COMMON_QUERY_KEY2)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getShouFeiXmJg", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL")+"/zhuShuJu/getShouFeiXmJg", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryString",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("pageIndex",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("pageSize",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getRongQi", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL")+"/zhuShuJu/getRongQi", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryString",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("pageIndex",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("pageSize",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getYangBen", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "HIS_URL")+"/zhuShuJu/getYangBen", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put("type","1"); |
| | | HashMap<String, Object> headers = new HashMap<>(); |
| | | headers.put("hospId","pbkwyy"); |
| | | String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/pushZhiFuMsg", map,headers); |
| | | String post = HttpClientUtils.sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "TJ_URL") + "/callBack/pushZhiFuMsg", map,headers); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | JSONObject obj = JSONUtil.createObj(); |
| | | if (jsonObject.getStr("code").equals("200")) { |
| | |
| | | map.put("hosp","shanxiqinpbkwyy"); |
| | | HashMap<String, Object> headers = new HashMap<>(); |
| | | headers.put("hospId","pbkwyy"); |
| | | String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/getZdList", map,headers); |
| | | String post = HttpClientUtils.sendPost(dictCommonHisConfigService.getConfigValByHospitalAndKey("pbkwyy", "TJ_URL") + "/callBack/getZdList", map,headers); |
| | | JSONArray jsonArray = JSONUtil.parseObj(post).getJSONArray("data"); |
| | | if (jsonArray != null && !jsonArray.isEmpty()) { |
| | | List<HisSyncDict> list = jsonArray.toList(HisSyncDict.class); |
| | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.example.config.ConfigValue; |
| | | import com.example.constant.ApiParamsConstants; |
| | | import com.example.domain.DictCommonHisConfig; |
| | | import com.example.domain.HisSyncDict; |
| | | import com.example.domain.TjFlowingWaterHis; |
| | | import com.example.service.DictCommonHisConfigService; |
| | | import com.example.service.HisService; |
| | | import com.example.utils.AjaxResult; |
| | | import com.example.utils.FieldNameConverter; |
| | |
| | | // client_secret:05a192176c21edfcc9cf5fa26fc5a9e0c5b131ad |
| | | // http://oapi.xamjyy.com/OAPI |
| | | |
| | | @Autowired |
| | | public WbzxyyHisService(ApplicationContext applicationContext, ConfigValue configValue) { |
| | | this.applicationContext = applicationContext; |
| | | this.configValue = configValue; |
| | | HIS_URL = configValue.getConfigValue("ShanXi_Qin_WeiNan_Wbzxyy.his_api_url") + ":" + configValue.getConfigValue("ShanXi_Qin_WeiNan_Wbzxyy.his_api_port") + configValue.getConfigValue("ShanXi_Qin_WeiNan_Wbzxyy.hisapiappend"); |
| | | TJ_URL = configValue.getConfigValue("tjUrl"); |
| | | CZY = configValue.getConfigValue("ShanXi_Qin_WeiNan_Wbzxyy.czy"); |
| | | } |
| | | // @Autowired |
| | | // public WbzxyyHisService(ApplicationContext applicationContext, ConfigValue configValue) { |
| | | // this.applicationContext = applicationContext; |
| | | // this.configValue = configValue; |
| | | // HIS_URL = configValue.getConfigValue("ShanXi_Qin_WeiNan_Wbzxyy.his_api_url") + ":" + configValue.getConfigValue("ShanXi_Qin_WeiNan_Wbzxyy.his_api_port") + configValue.getConfigValue("ShanXi_Qin_WeiNan_Wbzxyy.hisapiappend"); |
| | | // TJ_URL = configValue.getConfigValue("tjUrl"); |
| | | // CZY = configValue.getConfigValue("ShanXi_Qin_WeiNan_Wbzxyy.czy"); |
| | | // } |
| | | |
| | | @Autowired |
| | | private RedisTemplate<Object ,Object> redisTemplate; |
| | | @Autowired |
| | | private DictCommonHisConfigService dictCommonHisConfigService; |
| | | |
| | | private final ApplicationContext applicationContext; |
| | | |
| | | private final String HIS_URL; |
| | | private final String TJ_URL; |
| | | private final String CZY; |
| | | // private final ApplicationContext applicationContext; |
| | | // |
| | | // private final String HIS_URL; |
| | | // private final String TJ_URL; |
| | | // private final String CZY; |
| | | |
| | | //获取token |
| | | private JSONObject getToken () { |
| | |
| | | map.put("client_secret", CLIENT_SECRET); |
| | | // map.put("scope",SCOP); |
| | | // String post = sendPostTokenFormUrlencoded (HIS_URL+"/oauth/token", map); |
| | | String post = HttpClientUtils.sendPostTokenFormUrlencoded(HIS_URL + "/oauth/token", map, null); |
| | | String post = HttpClientUtils.sendPostTokenFormUrlencoded(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl() + "/oauth/token", map, null); |
| | | if (StrUtil.isBlank(post)) return null; |
| | | return JSONUtil.parseObj(post); |
| | | } |
| | | |
| | | @Override |
| | | public String jianDang(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("wbzxyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("jiuZhenKh", params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("kaiLeiXing","4"); |
| | |
| | | map.put ("feiYongLb",""); |
| | | map.put ("feiYongXz",""); |
| | | map.put ("jiLuLy","3"); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("chongZhiJe",""); |
| | | map.put ("yiBaoKh",""); |
| | | map.put ("geRenBh",""); |
| | |
| | | map.put ("minZuDm",""); |
| | | map.put ("minZuMc",""); |
| | | // 职业编码 |
| | | String post = sendPost(HIS_URL + "/menZhenJz/jianDang", map); |
| | | String post = sendPost(config.getHisUrl() + "/menZhenJz/jianDang", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject obj = JSONUtil.createObj(); |
| | |
| | | |
| | | @Override |
| | | public String getBingRenXxByShengFenZheng(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("wbzxyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("shenFenZh", params.get(ApiParamsConstants.CUS_ID_CARD)); |
| | | map.put ("danWeiBh",params.get(ApiParamsConstants.COMP_ID)); |
| | | //职业编码 |
| | | String string = sendPostTokenFormUrlencoded(HIS_URL + "/menZhenJz/getBingRenXxByShengFenZheng", map); |
| | | String string = sendPostTokenFormUrlencoded(config.getHisUrl() + "/menZhenJz/getBingRenXxByShengFenZheng", map); |
| | | JSONObject object = JSONUtil.createObj(); |
| | | if (StrUtil.isBlank(string)){ |
| | | object.putOpt("code",500); |
| | |
| | | map.put ("feiYongLb",""); |
| | | map.put ("feiYongXz",""); |
| | | map.put ("jiLuLy","3"); |
| | | map.put ("caoZuoYuan",CZY); |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("wbzxyy"); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/menZhenJz/saveBingRenXx", map); |
| | | String post = sendPost(config.getHisUrl() + "/menZhenJz/saveBingRenXx", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject obj = JSONUtil.createObj(); |
| | |
| | | map.put ("jiuZhenKh",params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("yuanQuId","1"); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/getListDaiShouFei", map); |
| | | String post = sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl() + "/shouFei/getListDaiShouFei", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject data = jsonObject.getJSONObject("returnData"); |
| | |
| | | |
| | | @Override |
| | | public String createMenZhenFy(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("wbzxyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("bingRenId",params.get(ApiParamsConstants.PATIONID)); |
| | | map.put ("jiuZhenKh",params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("yuanQuId","1"); |
| | | map.put ("yingYongId","870101"); |
| | | map.put ("kaiDanKs",params.get(ApiParamsConstants.kaiDanKeShi)); |
| | | map.put ("kaiDanKs",config.getKdks()); |
| | | map.put ("dengJiLsh",params.get(ApiParamsConstants.Tj_NUM)); |
| | | map.put ("shouTuiBz",params.get(ApiParamsConstants.SHOU_TUI_STATUS)); |
| | | map.put ("feiYongMxList",params.get(ApiParamsConstants.FEI_YONG_INFO_LIST)); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/createMenZhenFy", map); |
| | | String post = sendPost(config.getHisUrl() + "/shouFei/createMenZhenFy", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getInt("returnCode") != 1) return AjaxResult.error(post); |
| | | JSONObject data = jsonObject.getJSONObject("returnData"); |
| | |
| | | }); |
| | | map.put ("feiYongIdList",ids); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/cheXiaoMzFy", map); |
| | | String post = sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl() + "/shouFei/cheXiaoMzFy", map); |
| | | JSONObject entries = JSONUtil.parseObj(post); |
| | | if (entries.getStr("returnCode").equals("1")) |
| | | return AjaxResult.success(); |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getKeShi", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl()+"/zhuShuJu/getKeShi", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getListYiShengZd", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl()+"/zhuShuJu/getListYiShengZd", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getShouFeiXm", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl()+"/zhuShuJu/getShouFeiXm", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("keShiIds",params.get(ApiParamsConstants.DEPT_IDS)); |
| | | map.put ("ifPlus",""); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getKeShiByConditions", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl()+"/zhuShuJu/getKeShiByConditions", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getYangBen", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl()+"/zhuShuJu/getYangBen", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getListBingQuZd", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl()+"/zhuShuJu/getListBingQuZd", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getZhiGongPage", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl()+"/zhuShuJu/getZhiGongPage", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getJianChaXm", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl()+"/zhuShuJu/getJianChaXm", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryCode",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("page",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("size",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getJianYanXm", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl()+"/zhuShuJu/getJianYanXm", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("shouFeiXmId",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("jiaGeTx",map.get(ApiParamsConstants.COMMON_QUERY_KEY2)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getShouFeiXmJg", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl()+"/zhuShuJu/getShouFeiXmJg", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryString",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("pageIndex",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("pageSize",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getRongQi", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl()+"/zhuShuJu/getRongQi", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryString",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("pageIndex",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("pageSize",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getYangBen", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getHisUrl()+"/zhuShuJu/getYangBen", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put("type","1"); |
| | | HashMap<String, Object> headers = new HashMap<>(); |
| | | headers.put("hospId","wbzxyy"); |
| | | String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/pushZhiFuMsg", map,headers); |
| | | String post = HttpClientUtils.sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getTjUrl() + "/callBack/pushZhiFuMsg", map,headers); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | JSONObject obj = JSONUtil.createObj(); |
| | | if (jsonObject.getStr("code").equals("200")) { |
| | |
| | | map.put("hosp","shanxiqinwbzxyy"); |
| | | HashMap<String, Object> headers = new HashMap<>(); |
| | | headers.put("hospId","wbzxyy"); |
| | | String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/getZdList", map,headers); |
| | | String post = HttpClientUtils.sendPost(dictCommonHisConfigService.getConfigByHospital("wbzxyy").getTjUrl() + "/callBack/getZdList", map,headers); |
| | | JSONArray jsonArray = JSONUtil.parseObj(post).getJSONArray("data"); |
| | | if (jsonArray != null && !jsonArray.isEmpty()) { |
| | | List<HisSyncDict> list = jsonArray.toList(HisSyncDict.class); |
| | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.example.config.ConfigValue; |
| | | import com.example.constant.ApiParamsConstants; |
| | | import com.example.domain.DictCommonHisConfig; |
| | | import com.example.domain.HisSyncDict; |
| | | import com.example.domain.TjFlowingWaterHis; |
| | | import com.example.service.DictCommonHisConfigService; |
| | | import com.example.service.HisService; |
| | | import com.example.utils.AjaxResult; |
| | | import com.example.utils.FieldNameConverter; |
| | |
| | | // client_secret:05a192176c21edfcc9cf5fa26fc5a9e0c5b131ad |
| | | // http://oapi.xamjyy.com/OAPI |
| | | |
| | | @Autowired |
| | | public ShanQiHisService(ApplicationContext applicationContext, ConfigValue configValue) { |
| | | this.applicationContext = applicationContext; |
| | | this.configValue = configValue; |
| | | HIS_URL = configValue.getConfigValue("ShanXi_Qin_XiAn_Sqyy.his_api_url") + ":" + configValue.getConfigValue("ShanXi_Qin_XiAn_Sqyy.his_api_port") + configValue.getConfigValue("ShanXi_Qin_XiAn_Sqyy.hisapiappend"); |
| | | TJ_URL = configValue.getConfigValue("tjUrl"); |
| | | CZY = configValue.getConfigValue("ShanXi_Qin_XiAn_Sqyy.czy"); |
| | | } |
| | | // @Autowired |
| | | // public ShanQiHisService(ApplicationContext applicationContext, ConfigValue configValue) { |
| | | // this.applicationContext = applicationContext; |
| | | // this.configValue = configValue; |
| | | // HIS_URL = configValue.getConfigValue("ShanXi_Qin_XiAn_Sqyy.his_api_url") + ":" + configValue.getConfigValue("ShanXi_Qin_XiAn_Sqyy.his_api_port") + configValue.getConfigValue("ShanXi_Qin_XiAn_Sqyy.hisapiappend"); |
| | | // TJ_URL = configValue.getConfigValue("tjUrl"); |
| | | // CZY = configValue.getConfigValue("ShanXi_Qin_XiAn_Sqyy.czy"); |
| | | // } |
| | | |
| | | @Autowired |
| | | private RedisTemplate<Object ,Object> redisTemplate; |
| | | @Autowired |
| | | private DictCommonHisConfigService dictCommonHisConfigService; |
| | | |
| | | private final ApplicationContext applicationContext; |
| | | |
| | | private final String HIS_URL; |
| | | private final String TJ_URL; |
| | | private final String CZY; |
| | | // private final ApplicationContext applicationContext; |
| | | // |
| | | // private final String HIS_URL; |
| | | // private final String TJ_URL; |
| | | // private final String CZY; |
| | | |
| | | //获取token |
| | | private JSONObject getToken () { |
| | |
| | | map.put("client_secret", CLIENT_SECRET); |
| | | // map.put("scope",SCOP); |
| | | // String post = sendPostTokenFormUrlencoded (HIS_URL+"/oauth/token", map); |
| | | String post = HttpClientUtils.sendPostTokenFormUrlencoded(HIS_URL + "/oauth/token", map, null); |
| | | String post = HttpClientUtils.sendPostTokenFormUrlencoded(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl() + "/oauth/token", map, null); |
| | | if (StrUtil.isBlank(post)) return null; |
| | | return JSONUtil.parseObj(post); |
| | | } |
| | | |
| | | @Override |
| | | public String jianDang(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("sqyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("jiuZhenKh", params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("kaiLeiXing","4"); |
| | |
| | | map.put ("feiYongLb",""); |
| | | map.put ("feiYongXz",""); |
| | | map.put ("jiLuLy","3"); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("chongZhiJe",""); |
| | | map.put ("yiBaoKh",""); |
| | | map.put ("geRenBh",""); |
| | |
| | | map.put ("minZuDm",""); |
| | | map.put ("minZuMc",""); |
| | | // 职业编码 |
| | | String post = sendPost(HIS_URL + "/menZhenJz/jianDang", map); |
| | | String post = sendPost(config.getHisUrl() + "/menZhenJz/jianDang", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject obj = JSONUtil.createObj(); |
| | |
| | | |
| | | @Override |
| | | public String getBingRenXxByShengFenZheng(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("sqyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("shenFenZh", params.get(ApiParamsConstants.CUS_ID_CARD)); |
| | | map.put ("danWeiBh",params.get(ApiParamsConstants.COMP_ID)); |
| | | //职业编码 |
| | | String string = sendPostTokenFormUrlencoded(HIS_URL + "/menZhenJz/getBingRenXxByShengFenZheng", map); |
| | | String string = sendPostTokenFormUrlencoded(config.getHisUrl() + "/menZhenJz/getBingRenXxByShengFenZheng", map); |
| | | JSONObject object = JSONUtil.createObj(); |
| | | if (StrUtil.isBlank(string)){ |
| | | object.putOpt("code",500); |
| | |
| | | map.put ("feiYongLb",""); |
| | | map.put ("feiYongXz",""); |
| | | map.put ("jiLuLy","3"); |
| | | map.put ("caoZuoYuan",CZY); |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("sqyy"); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/menZhenJz/saveBingRenXx", map); |
| | | String post = sendPost(config.getHisUrl() + "/menZhenJz/saveBingRenXx", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject obj = JSONUtil.createObj(); |
| | |
| | | map.put ("jiuZhenKh",params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("yuanQuId","1"); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/getListDaiShouFei", map); |
| | | String post = sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl() + "/shouFei/getListDaiShouFei", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject data = jsonObject.getJSONObject("returnData"); |
| | |
| | | |
| | | @Override |
| | | public String createMenZhenFy(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("sqyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("bingRenId",params.get(ApiParamsConstants.PATIONID)); |
| | | map.put ("jiuZhenKh",params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("yuanQuId","1"); |
| | | map.put ("yingYongId","870101"); |
| | | map.put ("kaiDanKs",params.get(ApiParamsConstants.kaiDanKeShi)); |
| | | map.put ("kaiDanKs",config.getKdks()); |
| | | map.put ("dengJiLsh",params.get(ApiParamsConstants.Tj_NUM)); |
| | | map.put ("shouTuiBz",params.get(ApiParamsConstants.SHOU_TUI_STATUS)); |
| | | map.put ("feiYongMxList",params.get(ApiParamsConstants.FEI_YONG_INFO_LIST)); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/createMenZhenFy", map); |
| | | String post = sendPost(config.getHisUrl() + "/shouFei/createMenZhenFy", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getInt("returnCode") != 1) return AjaxResult.error(post); |
| | | JSONObject data = jsonObject.getJSONObject("returnData"); |
| | |
| | | }); |
| | | map.put ("feiYongIdList",ids); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/cheXiaoMzFy", map); |
| | | String post = sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl() + "/shouFei/cheXiaoMzFy", map); |
| | | JSONObject entries = JSONUtil.parseObj(post); |
| | | if (entries.getStr("returnCode").equals("1")) |
| | | return AjaxResult.success(); |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getKeShi", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl()+"/zhuShuJu/getKeShi", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getListYiShengZd", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl()+"/zhuShuJu/getListYiShengZd", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getShouFeiXm", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl()+"/zhuShuJu/getShouFeiXm", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("keShiIds",params.get(ApiParamsConstants.DEPT_IDS)); |
| | | map.put ("ifPlus",""); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getKeShiByConditions", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl()+"/zhuShuJu/getKeShiByConditions", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getYangBen", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl()+"/zhuShuJu/getYangBen", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getListBingQuZd", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl()+"/zhuShuJu/getListBingQuZd", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getZhiGongPage", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl()+"/zhuShuJu/getZhiGongPage", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getJianChaXm", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl()+"/zhuShuJu/getJianChaXm", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryCode",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("page",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("size",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getJianYanXm", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl()+"/zhuShuJu/getJianYanXm", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("shouFeiXmId",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("jiaGeTx",map.get(ApiParamsConstants.COMMON_QUERY_KEY2)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getShouFeiXmJg", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl()+"/zhuShuJu/getShouFeiXmJg", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryString",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("pageIndex",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("pageSize",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getRongQi", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl()+"/zhuShuJu/getRongQi", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryString",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("pageIndex",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("pageSize",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getYangBen", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getHisUrl()+"/zhuShuJu/getYangBen", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put("type","1"); |
| | | HashMap<String, Object> headers = new HashMap<>(); |
| | | headers.put("hospId","sqyy"); |
| | | String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/pushZhiFuMsg", map,headers); |
| | | String post = HttpClientUtils.sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getTjUrl() + "/callBack/pushZhiFuMsg", map,headers); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | JSONObject obj = JSONUtil.createObj(); |
| | | if (jsonObject.getStr("code").equals("200")) { |
| | |
| | | map.put("hosp","shanxiqinsqyy"); |
| | | HashMap<String, Object> headers = new HashMap<>(); |
| | | headers.put("hospId","sqyy"); |
| | | String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/getZdList", map,headers); |
| | | String post = HttpClientUtils.sendPost(dictCommonHisConfigService.getConfigByHospital("sqyy").getTjUrl() + "/callBack/getZdList", map,headers); |
| | | JSONArray jsonArray = JSONUtil.parseObj(post).getJSONArray("data"); |
| | | if (jsonArray != null && !jsonArray.isEmpty()) { |
| | | List<HisSyncDict> list = jsonArray.toList(HisSyncDict.class); |
| | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.example.config.ConfigValue; |
| | | import com.example.constant.ApiParamsConstants; |
| | | import com.example.domain.DictCommonHisConfig; |
| | | import com.example.domain.HisSyncDict; |
| | | import com.example.domain.TjFlowingWaterHis; |
| | | import com.example.service.DictCommonHisConfigService; |
| | | import com.example.service.HisService; |
| | | import com.example.utils.AjaxResult; |
| | | import com.example.utils.FieldNameConverter; |
| | |
| | | // client_secret:05a192176c21edfcc9cf5fa26fc5a9e0c5b131ad |
| | | // http://oapi.xamjyy.com/OAPI |
| | | |
| | | @Autowired |
| | | public MeiJiHisService(ApplicationContext applicationContext, ConfigValue configValue) { |
| | | this.applicationContext = applicationContext; |
| | | this.configValue = configValue; |
| | | HIS_URL = configValue.getConfigValue("ShanXi_Qin_XiAn_MeiJi.his_api_url") + ":" + configValue.getConfigValue("ShanXi_Qin_XiAn_MeiJi.his_api_port") + configValue.getConfigValue("ShanXi_Qin_XiAn_MeiJi.hisapiappend"); |
| | | TJ_URL = configValue.getConfigValue("ShanXi_Qin_XiAn_MeiJi.tjUrl"); |
| | | CZY = configValue.getConfigValue("ShanXi_Qin_XiAn_MeiJi.czy"); |
| | | } |
| | | // @Autowired |
| | | // public MeiJiHisService(ApplicationContext applicationContext, ConfigValue configValue) { |
| | | // this.applicationContext = applicationContext; |
| | | // this.configValue = configValue; |
| | | // HIS_URL = configValue.getConfigValue("ShanXi_Qin_XiAn_MeiJi.his_api_url") + ":" + configValue.getConfigValue("ShanXi_Qin_XiAn_MeiJi.his_api_port") + configValue.getConfigValue("ShanXi_Qin_XiAn_MeiJi.hisapiappend"); |
| | | // TJ_URL = configValue.getConfigValue("ShanXi_Qin_XiAn_MeiJi.tjUrl"); |
| | | // CZY = configValue.getConfigValue("ShanXi_Qin_XiAn_MeiJi.czy"); |
| | | // } |
| | | |
| | | @Autowired |
| | | private RedisTemplate<Object ,Object> redisTemplate; |
| | | @Autowired |
| | | private DictCommonHisConfigService dictCommonHisConfigService; |
| | | |
| | | private final ApplicationContext applicationContext; |
| | | |
| | | private final String HIS_URL; |
| | | private final String TJ_URL; |
| | | private final String CZY; |
| | | // private final ApplicationContext applicationContext; |
| | | // |
| | | // private final String HIS_URL; |
| | | // private final String TJ_URL; |
| | | // private final String CZY; |
| | | |
| | | //获取token |
| | | private JSONObject getToken () { |
| | |
| | | map.put("client_secret", CLIENT_SECRET); |
| | | // map.put("scope",SCOP); |
| | | // String post = sendPostTokenFormUrlencoded (HIS_URL+"/oauth/token", map); |
| | | String post = HttpClientUtils.sendPostTokenFormUrlencoded(HIS_URL + "/oauth/token", map, null); |
| | | String post = HttpClientUtils.sendPostTokenFormUrlencoded(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl() + "/oauth/token", map, null); |
| | | if (StrUtil.isBlank(post)) return null; |
| | | return JSONUtil.parseObj(post); |
| | | } |
| | | |
| | | @Override |
| | | public String jianDang(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("xamjyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("jiuZhenKh", params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("kaiLeiXing","4"); |
| | |
| | | map.put ("feiYongLb",""); |
| | | map.put ("feiYongXz",""); |
| | | map.put ("jiLuLy","3"); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("chongZhiJe",""); |
| | | map.put ("yiBaoKh",""); |
| | | map.put ("geRenBh",""); |
| | |
| | | map.put ("minZuDm",""); |
| | | map.put ("minZuMc",""); |
| | | // 职业编码 |
| | | String post = sendPost(HIS_URL + "/menZhenJz/jianDang", map); |
| | | String post = sendPost(config.getHisUrl() + "/menZhenJz/jianDang", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject obj = JSONUtil.createObj(); |
| | |
| | | |
| | | @Override |
| | | public String getBingRenXxByShengFenZheng(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("xamjyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("shenFenZh", params.get(ApiParamsConstants.CUS_ID_CARD)); |
| | | map.put ("danWeiBh",params.get(ApiParamsConstants.COMP_ID)); |
| | | //职业编码 |
| | | String string = sendPostTokenFormUrlencoded(HIS_URL + "/menZhenJz/getBingRenXxByShengFenZheng", map); |
| | | String string = sendPostTokenFormUrlencoded(config.getHisUrl() + "/menZhenJz/getBingRenXxByShengFenZheng", map); |
| | | JSONObject object = JSONUtil.createObj(); |
| | | if (StrUtil.isBlank(string)){ |
| | | object.putOpt("code",500); |
| | |
| | | |
| | | @Override |
| | | public String saveBingRenXx(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("xamjyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("bingRenId", params.get(ApiParamsConstants.PATIONID)); |
| | | map.put ("kaiLeiXing","4"); |
| | |
| | | map.put ("feiYongLb",""); |
| | | map.put ("feiYongXz",""); |
| | | map.put ("jiLuLy","3"); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/menZhenJz/saveBingRenXx", map); |
| | | String post = sendPost(config.getHisUrl() + "/menZhenJz/saveBingRenXx", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject obj = JSONUtil.createObj(); |
| | |
| | | map.put ("jiuZhenKh",params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("yuanQuId","1"); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/getListDaiShouFei", map); |
| | | String post = sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl() + "/shouFei/getListDaiShouFei", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getStr("returnCode").equals("1")) { |
| | | JSONObject data = jsonObject.getJSONObject("returnData"); |
| | |
| | | |
| | | @Override |
| | | public String createMenZhenFy(Map<String, Object> params) { |
| | | DictCommonHisConfig config = dictCommonHisConfigService.getConfigByHospital("xamjyy"); |
| | | Map<String, Object> map = new HashMap<> (); |
| | | map.put ("bingRenId",params.get(ApiParamsConstants.PATIONID)); |
| | | map.put ("jiuZhenKh",params.get(ApiParamsConstants.CARD_ID)); |
| | | map.put ("caoZuoYuan",CZY); |
| | | map.put ("caoZuoYuan",config.getCzyId()); |
| | | map.put ("yuanQuId","1"); |
| | | map.put ("yingYongId","870101"); |
| | | map.put ("kaiDanKs",params.get(ApiParamsConstants.kaiDanKeShi)); |
| | | map.put ("kaiDanKs",config.getKdks()); |
| | | map.put ("dengJiLsh",params.get(ApiParamsConstants.Tj_NUM)); |
| | | map.put ("shouTuiBz",params.get(ApiParamsConstants.SHOU_TUI_STATUS)); |
| | | map.put ("feiYongMxList",params.get(ApiParamsConstants.FEI_YONG_INFO_LIST)); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/createMenZhenFy", map); |
| | | String post = sendPost(config.getHisUrl() + "/shouFei/createMenZhenFy", map); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | if (jsonObject.getInt("returnCode") != 1) return AjaxResult.error(post); |
| | | JSONObject data = jsonObject.getJSONObject("returnData"); |
| | |
| | | }); |
| | | map.put ("feiYongIdList",ids); |
| | | //职业编码 |
| | | String post = sendPost(HIS_URL + "/shouFei/cheXiaoMzFy", map); |
| | | String post = sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl() + "/shouFei/cheXiaoMzFy", map); |
| | | JSONObject entries = JSONUtil.parseObj(post); |
| | | if (entries.getStr("returnCode").equals("1")) |
| | | return AjaxResult.success(); |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getKeShi", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl()+"/zhuShuJu/getKeShi", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getListYiShengZd", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl()+"/zhuShuJu/getListYiShengZd", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getShouFeiXm", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl()+"/zhuShuJu/getShouFeiXm", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("keShiIds",params.get(ApiParamsConstants.DEPT_IDS)); |
| | | map.put ("ifPlus",""); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getKeShiByConditions", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl()+"/zhuShuJu/getKeShiByConditions", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getYangBen", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl()+"/zhuShuJu/getYangBen", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getListBingQuZd", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl()+"/zhuShuJu/getListBingQuZd", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getZhiGongPage", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl()+"/zhuShuJu/getZhiGongPage", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put ("pageIndex",params.get(ApiParamsConstants.PAGE_INDEX)); |
| | | map.put ("pageSize",params.get(ApiParamsConstants.PAGE_SIZE)); |
| | | //职业编码 |
| | | return sendPost(HIS_URL+"/zhuShuJu/getJianChaXm", map); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl()+"/zhuShuJu/getJianChaXm", map); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryCode",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("page",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("size",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getJianYanXm", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl()+"/zhuShuJu/getJianYanXm", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | HashMap<String, Object> hashMap = new HashMap<>(); |
| | | hashMap.put("shouFeiXmId",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("jiaGeTx",map.get(ApiParamsConstants.COMMON_QUERY_KEY2)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getShouFeiXmJg", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl()+"/zhuShuJu/getShouFeiXmJg", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryString",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("pageIndex",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("pageSize",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getRongQi", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl()+"/zhuShuJu/getRongQi", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | hashMap.put("queryString",map.get(ApiParamsConstants.COMMON_QUERY_KEY)); |
| | | hashMap.put("pageIndex",map.get(ApiParamsConstants.PAGE_INDEX)); |
| | | hashMap.put("pageSize",map.get(ApiParamsConstants.PAGE_SIZE)); |
| | | return sendPost(HIS_URL+"/zhuShuJu/getYangBen", hashMap); |
| | | return sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getHisUrl()+"/zhuShuJu/getYangBen", hashMap); |
| | | } |
| | | |
| | | @Override |
| | |
| | | map.put("type","1"); |
| | | HashMap<String, Object> headers = new HashMap<>(); |
| | | headers.put("hospId","xamjyy"); |
| | | String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/pushZhiFuMsg", map,headers); |
| | | String post = HttpClientUtils.sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getTjUrl() + "/callBack/pushZhiFuMsg", map,headers); |
| | | JSONObject jsonObject = JSONUtil.parseObj(post); |
| | | JSONObject obj = JSONUtil.createObj(); |
| | | if (jsonObject.getStr("code").equals("200")) { |
| | |
| | | map.put("hosp","shanxiqinxamjyy"); |
| | | HashMap<String, Object> headers = new HashMap<>(); |
| | | headers.put("hospId","xamjyy"); |
| | | String post = HttpClientUtils.sendPost(TJ_URL + "/callBack/getZdList", map,headers); |
| | | String post = HttpClientUtils.sendPost(dictCommonHisConfigService.getConfigByHospital("xamjyy").getTjUrl() + "/callBack/getZdList", map,headers); |
| | | JSONArray jsonArray = JSONUtil.parseObj(post).getJSONArray("data"); |
| | | if (jsonArray != null && !jsonArray.isEmpty()) { |
| | | List<HisSyncDict> list = jsonArray.toList(HisSyncDict.class); |
| | |
| | | <result property="hisApiAppend" column="his_api_append" jdbcType="VARCHAR"/> |
| | | <result property="czy" column="czy" jdbcType="VARCHAR"/> |
| | | <result property="czyId" column="czy_id" jdbcType="VARCHAR"/> |
| | | <result property="kdks" column="kdks" jdbcType="VARCHAR"/> |
| | | <result property="dbIp" column="db_ip" jdbcType="VARCHAR"/> |
| | | <result property="dbPort" column="db_port" jdbcType="SMALLINT"/> |
| | | <result property="dbName" column="db_name" jdbcType="VARCHAR"/> |
| | |
| | | id,full_key,province, |
| | | region,city,hospital, |
| | | tj_url,his_api_url,his_api_port, |
| | | his_api_append,czy,czy_id, |
| | | his_api_append,czy,czy_id,kdks, |
| | | db_ip,db_port,db_name, |
| | | db_user,db_password |
| | | </sql> |