| | |
| | | @GetMapping ("/dataSynchronization") |
| | | @ApiOperation (value = "同步sql server数据到本地数据库数据接口") |
| | | @RepeatSubmit |
| | | @Transactional |
| | | // @Transactional |
| | | public AjaxResult dataSynchronization(@RequestParam String tjNumber) { |
| | | |
| | | |
| | | |
| | | //根据配置调取存储过程 将临时表数据存入预约表2023.12.12 |
| | | final String getInfoFromSqlData = configService.selectConfigByKey("getInfoFromSqlData"); |
| | | |
| | |
| | | return AjaxResult.error("化验项目暂时无结果,请稍后同步!!!"); |
| | | } |
| | | JSONArray data = object.getJSONArray("ResultData"); |
| | | // int size = data.size(); |
| | | // if(size>0){ |
| | | // |
| | | // } |
| | | |
| | | for (Object datum : data) { |
| | | JSONObject jsonObject = (JSONObject) datum; |
| | | LtkjHysqd jybgid = ltkjHysqdService.getLtkjHysqdByTjhAndTmh(order.getCardId(), jsonObject.getStr("JYBGID")); |
| | |
| | | |
| | | |
| | | /*同步检查 his存储过程*/ |
| | | Map<String, Object> mapss = new HashMap<>(); |
| | | mapss.put("ksmc", "体检中心"); |
| | | mapss.put("str_in",order.getCardId()); |
| | | mapss.put("brid","''"); |
| | | mapss.put("pagecount", 100); |
| | | mapss.put("page", 1); |
| | | mapss.put("status","'1'"); |
| | | AjaxResult results = jcsqdService.getTjJcProByHisCall(mapss); |
| | | AjaxResult results = jcsqdService.getTjJcProByHisCall("体检中心",order.getCardId(),"''",100,1,"'1'"); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | |
| | | |
| | | if (Integer.parseInt(results.get("code").toString()) == 200) { |
| | |
| | | asyncService.updateCheckType(order.getTjNumber()); |
| | | } |
| | | return AjaxResult.success("同步成功"); |
| | | // return AjaxResult.error("化验项目暂时无结果,请稍后同步!!!"); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |