From 99d28bddd6ad5bd7c87babf7dcab670215993cb6 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期四, 03 七月 2025 13:51:36 +0800 Subject: [PATCH] zjh20250703 --- ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysConfigController.java | 81 +++++++++++++++++++++++++++------------- 1 files changed, 54 insertions(+), 27 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 19e1285..87a916b 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 @@ -9,6 +9,7 @@ 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; @@ -19,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; @@ -412,43 +414,53 @@ @GetMapping ("/tjjcycxm")//鍚屾his椤圭洰鍗曚环淇℃伅 // @PreAuthorize("@ss.hasPermi('system:config:tbhisproprice')") @ApiOperation (value = "tjjcycxm") - public AjaxResult tjjcycxm(@RequestParam(required = false)@ApiParam(value = "浣撴鍙�") String tjh) { + 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()); - List<LtkjExamJcsqd> list = jcsqdService.getLtkjJcsqdByTjh(order.getCardId()); - if(null !=list && !list.isEmpty()){ - for (LtkjExamJcsqd jcsqd : list) { - if(StringUtil.isNotBlank(jcsqd.getJgzt())){ - 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("姝e父")&& !jg.contains("鍙屼晶妞庨棿瀛旀棤鐙獎")&& !jg.contains("鏃犳畩")){ - TjJcycxm jcycxm=new TjJcycxm(); - jcycxm.setTjh(s); - jcycxm.setYqid(yqbm); - String[] split1 = jcsqd.getJcxmid().split(";"); - jcycxm.setProId(split1[0]); - jcycxm.setProName(jcsqd.getJcxmmc()); - jcycxm.setCreateTime(new Date()); - jcycxm.setJcjg(jg); - jcycxmService.save(jcycxm); + if(null != order){ + jcycxmService.deletedByTjh(s); + List<LtkjExamJcsqd> list = jcsqdService.getLtkjJcsqdByTjh(order.getCardId()); + if(null !=list && !list.isEmpty()){ + for (LtkjExamJcsqd jcsqd : list) { + if(StringUtil.isNotBlank(jcsqd.getJgzt())){ + 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("姝e父")&& !jg.contains("鍙屼晶妞庨棿瀛旀棤鐙獎")&& !jg.contains("鏃犳畩")){ + TjJcycxm jcycxm=new TjJcycxm(); + jcycxm.setTjh(s); + jcycxm.setYqid(yqbm); + String[] split1 = jcsqd.getJcxmid().split(";"); + jcycxm.setProId(split1[0]); + jcycxm.setProName(jcsqd.getJcxmmc()); + jcycxm.setCreateTime(new Date()); + jcycxm.setJcjg(jg); + jcycxmService.save(jcycxm); + } } } } @@ -482,4 +494,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