From 02b779f938e553a995717cfc5ef11d9fc5d4e657 Mon Sep 17 00:00:00 2001 From: zjh <1084500556@qq.com> Date: 星期四, 18 七月 2024 18:10:36 +0800 Subject: [PATCH] zjh 2024/07/18-1 --- ltkj-framework/src/main/java/com/ltkj/framework/config/SecurityConfig.java | 2 ltkj-hosp/src/main/resources/mapper/hosp/LtkjExamJcsqdMapper.xml | 29 ++++++++++++++ ltkj-hosp/src/main/java/com/ltkj/hosp/service/LtkjExamJcsqdService.java | 4 ++ ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/LtkjExamJcsqdServiceImpl.java | 8 ++++ ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java | 28 ++++++++++--- ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java | 39 ++++++++----------- ltkj-admin/src/main/resources/application.yml | 2 ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java | 8 +++ 8 files changed, 87 insertions(+), 33 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java index cbdd7df..569f84c 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java @@ -125,8 +125,10 @@ controller.Outpinconapply(hisRegistrationId, date, "00029"); if(null != tjOrder.getTjCategory() && !tjOrder.getTjCategory().equals("13")){ customer.setCardId(hisRegistrationId); - customerService.updateById(customer); + }else { + customer.setCardId("0"); } + customerService.updateById(customer); transitionService.updateCardIdByTjNumAndIdCard(customer.getCusIdcard(), hisRegistrationId, tjOrder.getTjNumber()); tjOrder.setCardId(hisRegistrationId); orderService.updateById(tjOrder); @@ -159,7 +161,7 @@ dto.setJzqk(9); controller.Outpinimpapply(dto); - return tijianshenqing(customer, date); + return tijianshenqing(customer, date,tjOrder.getCardId()); } // } @@ -170,10 +172,10 @@ //浣撴瀵筯is鐢宠鍗曡皟鐢ㄦ柟娉� - private AjaxResult tijianshenqing(TjCustomer customer, String date) { + private AjaxResult tijianshenqing(TjCustomer customer, String date,String cardId) { //妫�楠岀敵璇� OutpintestapplyDto dto = new OutpintestapplyDto(); - dto.setHisRegistrationId(customer.getCardId()); + dto.setHisRegistrationId(cardId); dto.setSfzh(customer.getCusIdcard()); dto.setSqysbm("00029"); dto.setMzksbm("0101"); @@ -181,7 +183,7 @@ dto.setCzybm("00029"); dto.setCzyksbm("0101"); dto.setSfjz("0"); - List<TbTransition> detailList = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(), customer.getCardId()); + List<TbTransition> detailList = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); List<OutpintestapplyDetailsDto> detailsDtos = new ArrayList<>(); List<OutpinmedicapplyDetilsDto> outpinmedicapplyDetilsDtos =new ArrayList<>(); if (null != detailList && detailList.size() > 0) { @@ -230,10 +232,7 @@ for (OutpintestapplyDetailsDto detail : details) { LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); tree.setCardId(dto.getHisRegistrationId()); - LambdaQueryWrapper<TjCustomer> wrapper4 = new LambdaQueryWrapper<>(); - wrapper4.eq(TjCustomer::getCardId, tree.getCardId()); - TjCustomer tjCustomer = customerService.getOne(wrapper4); - tree.setPationid(tjCustomer.getPationId()); + tree.setPationid(customer.getPationId()); JSONObject resultData = object3.getJSONObject("ResultData"); tree.setSqdh(resultData.getStr("jysqdh")); tree.setFyhj(resultData.getStr("fyhj")); @@ -271,7 +270,7 @@ //鑽搧鐢宠 if(outpinmedicapplyDetilsDtos.size()>0){ OutpinmedicapplyDto dto1=new OutpinmedicapplyDto(); - dto1.setHisRegistrationId(customer.getCardId()); + dto1.setHisRegistrationId(cardId); dto1.setSfzh(customer.getCusIdcard()); dto1.setSqysbm("00029"); dto1.setMzksbm("0101"); @@ -292,7 +291,7 @@ for (OutpinmedicapplyDetilsDto detilsDto : outpinmedicapplyDetilsDtos) { TjCf cf=new TjCf(); - cf.setCardId(customer.getCardId()); + cf.setCardId(cardId); cf.setSfzh(customer.getCusIdcard()); cf.setCfh(cfh); cf.setSqysbm("00029"); @@ -315,14 +314,14 @@ //闂ㄨ瘖妫�鏌ョ敵璇� OutpinexamapplyDto outpinexamapplyDto = new OutpinexamapplyDto(); - outpinexamapplyDto.setHisRegistrationId(customer.getCardId()); + outpinexamapplyDto.setHisRegistrationId(cardId); outpinexamapplyDto.setSfzh(customer.getCusIdcard()); outpinexamapplyDto.setSqysbm("00029"); outpinexamapplyDto.setMzksbm("0101"); outpinexamapplyDto.setCzybm("00029"); outpinexamapplyDto.setCzyksbm("0101"); outpinexamapplyDto.setSfjz("0"); - List<TbTransition> detailLists = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(), customer.getCardId()); + List<TbTransition> detailLists = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); List<OutpintestapplyDetailsDto> detailsDtoss = new ArrayList<>(); if (null != detailLists && detailLists.size() > 0) { LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); @@ -360,10 +359,7 @@ for (OutpintestapplyDetailsDto detail : details) { LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); tree.setCardId(outpinexamapplyDto.getHisRegistrationId()); - LambdaQueryWrapper<TjCustomer> wrapper4 = new LambdaQueryWrapper<>(); - wrapper4.eq(TjCustomer::getCardId, tree.getCardId()); - TjCustomer tjCustomer = customerService.getOne(wrapper4); - tree.setPationid(tjCustomer.getPationId()); + tree.setPationid(customer.getPationId()); JSONObject resultData = object5.getJSONObject("ResultData"); tree.setSqdh(resultData.getStr("jcsqdh")); tree.setFyhj(resultData.getStr("fyhj")); @@ -412,7 +408,7 @@ //闂ㄨ瘖娌荤枟澶勭疆鐢宠 OutpintreatapplyDto dao = new OutpintreatapplyDto(); - dao.setHisRegistrationId(customer.getCardId()); + dao.setHisRegistrationId(cardId); dao.setSfzh(customer.getCusIdcard()); dao.setSqysbm("00029"); dao.setMzksbm("0101"); @@ -420,7 +416,7 @@ dao.setCzybm("00029"); dao.setCzyksbm("0101"); dao.setSfjz("0"); - List<TbTransition> details = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(), customer.getCardId()); + List<TbTransition> details = tbTransitionService.getTbTransitionListByCusId(customer.getCusIdcard(),cardId); List<OutpintestapplyDetailsDto> detailDtos = new ArrayList<>(); if (null != details && details.size() > 0) { LambdaQueryWrapper<TjProject> wq = new LambdaQueryWrapper<>(); @@ -458,10 +454,7 @@ for (OutpintestapplyDetailsDto detail : details1) { LtkjJianchajianyanTree tree = new LtkjJianchajianyanTree(); tree.setCardId(dao.getHisRegistrationId()); - LambdaQueryWrapper<TjCustomer> wrapper4 = new LambdaQueryWrapper<>(); - wrapper4.eq(TjCustomer::getCardId, tree.getCardId()); - TjCustomer tjCustomer = customerService.getOne(wrapper4); - tree.setPationid(tjCustomer.getPationId()); + tree.setPationid(customer.getPationId()); JSONObject resultData = mzylyzsq3.getJSONObject("ResultData"); tree.setSqdh(resultData.getStr("zlczh")); tree.setFyhj(resultData.getStr("fyhj")); diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java index caec8fa..89f2208 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCheckController.java @@ -469,13 +469,27 @@ } } - //鍚屾妫�鏌� - Map<String, Object> maps = new HashMap<>(); - maps.put("his_registration_id", order.getCardId()); - maps.put("ksbm", "浣撴涓績"); - maps.put("pagecount", 100); - maps.put("page", 1); - AjaxResult results = service.getHISDataNew("Getexamreportinfo", maps); + /*鍚屾妫�鏌� his鎺ュ彛*/ + +// Map<String, Object> maps = new HashMap<>(); +// maps.put("his_registration_id", order.getCardId()); +// maps.put("ksbm", "浣撴涓績"); +// maps.put("pagecount", 100); +// maps.put("page", 1); +// AjaxResult results = service.getHISDataNew("Getexamreportinfo", maps); + + + /*鍚屾妫�鏌� 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); + + if (Integer.parseInt(results.get("code").toString()) == 200) { List<Map<String, Object>> datas = (List<Map<String, Object>>) results.get("data"); if(null !=datas && datas.size()>0){ diff --git a/ltkj-admin/src/main/resources/application.yml b/ltkj-admin/src/main/resources/application.yml index 967aa1c..cec4f4d 100644 --- a/ltkj-admin/src/main/resources/application.yml +++ b/ltkj-admin/src/main/resources/application.yml @@ -5,4 +5,4 @@ #xiaochengxu 娉惧窛鍘块儴缃插皬绋嬪簭鐜浣跨敤 spring: profiles: - active: dev \ No newline at end of file + active: test \ No newline at end of file diff --git a/ltkj-framework/src/main/java/com/ltkj/framework/config/SecurityConfig.java b/ltkj-framework/src/main/java/com/ltkj/framework/config/SecurityConfig.java index 1b88a18..380851d 100644 --- a/ltkj-framework/src/main/java/com/ltkj/framework/config/SecurityConfig.java +++ b/ltkj-framework/src/main/java/com/ltkj/framework/config/SecurityConfig.java @@ -109,7 +109,7 @@ .authorizeRequests() // 瀵逛簬鐧诲綍login 娉ㄥ唽register 楠岃瘉鐮乧aptchaImage 鍏佽鍖垮悕璁块棶 .antMatchers("/login", "/register", "/captchaImage","/cus/**","/getCaptchaConfigKey","/report/jmreport/**", - "/sqlserver/getdata/**","/api/His/**","/system/config/zx").permitAll() + "/sqlserver/getdata/**","/api/His/**","/system/config/zx","/system/report/savePdf").permitAll() .antMatchers("/common/uploadImgExe","/common/listExeVal").permitAll() // 闈欐�佽祫婧愶紝鍙尶鍚嶈闂� .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java index d3fe8bf..b1fab3a 100644 --- a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java +++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/LtkjExamJcsqdMapper.java @@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ltkj.common.annotation.DataSource; +import com.ltkj.common.core.domain.AjaxResult; import com.ltkj.common.enums.DataSourceType; import com.ltkj.hosp.sqlDomain.LtkjExamJcbgd; import com.ltkj.hosp.sqlDomain.LtkjExamJcsqd; @@ -9,6 +10,7 @@ import org.apache.ibatis.annotations.*; import java.util.List; +import java.util.Map; /** * @Company: 瑗垮畨璺嘲绉戞妧鏈夐檺鍏徃 @@ -16,7 +18,7 @@ * @Date: 2023/12/11 17:56 */ @Mapper -@DataSource(value = DataSourceType.MASTER) +//@DataSource(value = DataSourceType.MASTER) public interface LtkjExamJcsqdMapper extends BaseMapper<LtkjExamJcsqd> { @Select ("SELECT * FROM ltkj_exam_jcsqd a WHERE a.tjh=#{tjh} AND a.tmh=#{tmh} ") @@ -34,4 +36,8 @@ "a.yxzd jgzt,a.yxbx jgbx\n" + "FROM ltkj_exam_jcbgd a WHERE a.tjh=#{tjh} GROUP BY a.xmmc") void saveLtkjExamJcsqd(String tjh); + + + @DataSource(value = DataSourceType.SLAVE_HIS) + List<Map<String, Object>> getTjJcProByHisCall(Map<String, Object> map); } diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/service/LtkjExamJcsqdService.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/LtkjExamJcsqdService.java index 8a51072..0faae7d 100644 --- a/ltkj-hosp/src/main/java/com/ltkj/hosp/service/LtkjExamJcsqdService.java +++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/LtkjExamJcsqdService.java @@ -1,11 +1,13 @@ package com.ltkj.hosp.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.ltkj.common.core.domain.AjaxResult; import com.ltkj.hosp.sqlDomain.LtkjExamJcbgd; import com.ltkj.hosp.sqlDomain.LtkjExamJcsqd; import com.ltkj.hosp.sqlDomain.LtkjHysqd; import java.util.List; +import java.util.Map; /** * @Company: 瑗垮畨璺嘲绉戞妧鏈夐檺鍏徃 @@ -22,4 +24,6 @@ List<LtkjExamJcsqd> getLtkjJcsqdByTjh(String tjh); void saveLtkjExamJcsqd(String tjh); + + AjaxResult getTjJcProByHisCall(Map<String, Object> map); } diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/LtkjExamJcsqdServiceImpl.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/LtkjExamJcsqdServiceImpl.java index 987748f..6e95761 100644 --- a/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/LtkjExamJcsqdServiceImpl.java +++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/service/impl/LtkjExamJcsqdServiceImpl.java @@ -1,6 +1,7 @@ package com.ltkj.hosp.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ltkj.common.core.domain.AjaxResult; import com.ltkj.hosp.mapper.LtkjExamJcbgdMapper; import com.ltkj.hosp.mapper.LtkjExamJcsqdMapper; import com.ltkj.hosp.service.LtkjExamJcbgdService; @@ -12,6 +13,7 @@ import javax.annotation.Resource; import java.util.List; +import java.util.Map; /** * 鐥呯+鎰忚Service涓氬姟灞傚鐞� @@ -45,4 +47,10 @@ public void saveLtkjExamJcsqd(String tjh) { mapper.saveLtkjExamJcsqd(tjh); } + + @Override + public AjaxResult getTjJcProByHisCall(Map<String, Object> map) { + List<Map<String, Object>> tjJcProByHisCall = mapper.getTjJcProByHisCall(map); + return AjaxResult.success().put("data",tjJcProByHisCall); + } } diff --git a/ltkj-hosp/src/main/resources/mapper/hosp/LtkjExamJcsqdMapper.xml b/ltkj-hosp/src/main/resources/mapper/hosp/LtkjExamJcsqdMapper.xml new file mode 100644 index 0000000..a69e9d9 --- /dev/null +++ b/ltkj-hosp/src/main/resources/mapper/hosp/LtkjExamJcsqdMapper.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE mapper + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.ltkj.hosp.mapper.LtkjExamJcsqdMapper"> + + <select id="getTjJcProByHisCall" parameterType="java.util.Map" statementType="CALLABLE" resultType="java.util.Map"> + exec usp_his_getexamreportinfo + ${ksmc}, + ${brid}, + ${str_in}, + ${pagecount}, + ${page}, + ${status} + </select> + + +<!-- <select id="getTjJcProByHisCall" parameterType="java.util.Map" statementType="CALLABLE" resultType="java.util.Map">--> +<!-- {call usp_his_getexamreportinfo(--> +<!-- #{ksmc,jdbcType=VARCHAR},--> +<!-- #{brid,jdbcType=VARCHAR},--> +<!-- #{str_in,jdbcType=VARCHAR},--> +<!-- #{pagecount,jdbcType=INTEGER},--> +<!-- #{page,jdbcType=INTEGER},--> +<!-- #{status,jdbcType=VARCHAR}--> +<!-- )}--> +<!-- </select>--> + +</mapper> \ No newline at end of file -- Gitblit v1.8.0