From 0892d843cd394f383ff50f480f7f22f2ec3829bc Mon Sep 17 00:00:00 2001 From: zhaowenxuan <chacca165@163.com> Date: 星期五, 27 六月 2025 20:24:45 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java | 90 +++++++++++++++++++++++++++++++++++++++----- 1 files changed, 79 insertions(+), 11 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java index 7864f34..e7a3bd5 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java @@ -4,10 +4,12 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; import cn.hutool.extra.pinyin.PinyinUtil; import cn.hutool.json.JSONUtil; import com.ltkj.hosp.idutil.IdUtils; @@ -18,6 +20,7 @@ import com.ltkj.hosp.service.*; import com.ltkj.hosp.sqlDomain.*; import com.ltkj.system.service.ISysMenuService; +import com.ltkj.web.wxUtils.HttpClientUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -316,6 +319,48 @@ } + @GetMapping ("/chaxunjyjcwsxmjg") + @ApiOperation(value = "鏌ヨ妫�楠屾鏌ラ」鐩粨鏋滄帴鍙�") + public AjaxResult chaxunjyjcwsxmjg(@RequestParam @ApiParam(value = "jy妫�楠� jc妫�鏌� jyjc妫�楠屽拰妫�鏌�") String tblx, + @ApiParam(value = "浣撴鍙�")@RequestParam String tjh) { + String hospId = configService.selectConfigByKey("dqyyyqbm"); + log.info("鎵嬪姩鏌ヨ妫�楠屾垨妫�鏌ョ粨鏋滃紑濮�->{}{}",hospId,DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")); + try { + + switch (tblx){ + case "jy": + List<Map<String, Object>> hysqdList = testMapper.sysgetCcXZxYyLtkjHysqdByLisVi(tjh,hospId); + if (null != hysqdList && !hysqdList.isEmpty()) { + for (Map<String, Object> map : hysqdList) { + List<Map<String, Object>> hybgdList = testMapper.sysgetCcXZxYyLtkjHybgdByLisVi(map.get("鏉$爜鍙�").toString()); + map.put("jybgd",hybgdList); + } + DynamicDataSourceContextHolder.clearDataSourceType(); + } + + log.info("褰撳墠鏌ヨ鐨勬槸->{} 缁撴灉","妫�楠�"); + return AjaxResult.success(hysqdList); + + case "jc": + List<Map<String, Object>> jcsqdList = testMapper.sysgetCcXZxYyPacsLtkjExamJcsqd(tjh,hospId); + DynamicDataSourceContextHolder.clearDataSourceType(); + log.info("褰撳墠鏌ヨ鐨勬槸->{} 缁撴灉","妫�鏌�"); + return AjaxResult.success(jcsqdList); + default: + log.info("娌℃湁鎵惧埌鎵�鍖归厤鐨勫悓姝ョ被鍨�"); +// return AjaxResult.error("娌℃湁鎵惧埌鎵�鍖归厤鐨勫悓姝ョ被鍨�!"); + } + log.info("鎵嬪姩鏌ヨ妫�楠屾垨妫�鏌ョ粨鏋滃紑濮�->{}",DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")); + return AjaxResult.error("娌℃湁鎵惧埌鎵�鍖归厤鐨勫悓姝ョ被鍨�!"); + + } catch (Exception e) { + log.error(String.valueOf(e)); + return AjaxResult.error(); + } + } + + + @GetMapping ("/zxsq")//鎵ц @@ -369,25 +414,33 @@ @GetMapping ("/tjjcycxm")//鍚屾his椤圭洰鍗曚环淇℃伅 // @PreAuthorize("@ss.hasPermi('system:config:tbhisproprice')") @ApiOperation (value = "tjjcycxm") - public AjaxResult tjjcycxm(@RequestParam(required = false)@ApiParam(value = "浣撴鍙�") String tjh) { - String yqbm = configService.selectConfigByKey("common_api_service_hospbm"); + public AjaxResult tjjcycxm(@RequestParam(required = false)@ApiParam(value = "浣撴鍙�") String tjh, + @RequestParam(defaultValue = "0",required = false)@ApiParam(value = "0 浠呭悓姝ユ湭瀹℃牳浜哄憳 1鎵�鏈変汉") String lx) { + String yqbm = configService.selectConfigByKey("dqyyyqbm"); if(StringUtil.isNotBlank(tjh)){ zongjianshengchengyichangxiangmu(tjh, yqbm); return AjaxResult.success(); - } - List<String> jc = orderService.getJianChaTjNum(); - if (null != jc && !jc.isEmpty()) { - for (String s : jc) { - zongjianshengchengyichangxiangmu(s, yqbm); - + }else { + List<String> jc =null; + if(lx.equals("0")){ + jc = orderService.getJianChaTjNumWsh(); + }else { + jc = orderService.getJianChaTjNum(); } + + if (null != jc && !jc.isEmpty()) { + for (String s : jc) { + zongjianshengchengyichangxiangmu(s, yqbm); + } + } + return AjaxResult.success(); } - return AjaxResult.success(); + } public void zongjianshengchengyichangxiangmu(String s, String yqbm) { TjOrder order = orderService.getOrderByTjNum(s); - jcycxmService.deletedByTjh(order.getCardId()); + jcycxmService.deletedByTjh(s); List<LtkjExamJcsqd> list = jcsqdService.getLtkjJcsqdByTjh(order.getCardId()); if(null !=list && !list.isEmpty()){ for (LtkjExamJcsqd jcsqd : list) { @@ -395,7 +448,7 @@ String[] split = jcsqd.getJgzt().replaceAll("\n", "").split("銆倈锛泑;|,|锛�"); for (String jg : split) { if(StringUtil.isNotBlank(jg) && !jg.contains("鏈寮傚父") - && !jg.contains("鏈鏄庢樉寮傚父") && !jg.contains("鏈鍗犱綅") + && !jg.contains("鏈鏄庢樉寮傚父") && !jg.contains("鏈鍗犱綅") && !jg.contains("鏃犲紓甯�") && !jg.contains("鏈鏄庢樉")&& !jg.contains("姝e父")&& !jg.contains("鍙屼晶妞庨棿瀛旀棤鐙獎")&& !jg.contains("鏃犳畩")){ TjJcycxm jcycxm=new TjJcycxm(); jcycxm.setTjh(s); @@ -439,4 +492,19 @@ return AjaxResult.success(numbers); } + @GetMapping("/syncHisData") + public AjaxResult syncHisData(@RequestParam(value = "tbzd",required = false,defaultValue = "true") Boolean tbzd) { + if (tbzd) { + String apiUrl = configService.selectConfigByKey("common_api_url"); + if (StrUtil.isBlank(apiUrl)) { + return AjaxResult.error("鏈厤缃甤ommon_api_url"); + } + HttpClientUtils instance = HttpClientUtils.getInstance(); + String sendHttpGet = instance.sendHttpGet(apiUrl); + if (!sendHttpGet.equals("success")) return AjaxResult.error("鍚屾澶辫触"); + } + testMapper.updTbProHisPrice(); + return AjaxResult.success(); + } + } -- Gitblit v1.8.0