Commit a86fc42041035e4b88c92a5328a76fdbbc301a22
1 parent
4ee912ad88
Exists in
master
and in
6 other branches
听力诊断模块
Showing 9 changed files with 381 additions and 261 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarBabyQuery.java
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarBaby.xml
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarHearingDiagnose.xml
- platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarScreen.xml
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
platform-biz-service/src/main/java/com/lyms/platform/permission/model/BabyPatientExtendEarBabyQuery.java
View file @
a86fc42
... | ... | @@ -26,6 +26,8 @@ |
26 | 26 | private Date buildDate; |
27 | 27 | private String babyPatientId; |
28 | 28 | private String babyEarId; |
29 | + //儿童姓名、母亲证件号、母亲联系方式 | |
30 | + private String queryNo; | |
29 | 31 | /** |
30 | 32 | * 生日 |
31 | 33 | */ |
... | ... | @@ -55,6 +57,13 @@ |
55 | 57 | return id; |
56 | 58 | } |
57 | 59 | |
60 | + public String getQueryNo() { | |
61 | + return queryNo; | |
62 | + } | |
63 | + | |
64 | + public void setQueryNo(String queryNo) { | |
65 | + this.queryNo = queryNo; | |
66 | + } | |
58 | 67 | |
59 | 68 | public void setId(String id) { |
60 | 69 | this.id = id; |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarBaby.xml
View file @
a86fc42
... | ... | @@ -2,191 +2,216 @@ |
2 | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
3 | 3 | <mapper namespace="com.lyms.platform.permission.dao.master.BabyPatientExtendEarBabyMapper"> |
4 | 4 | |
5 | -<resultMap id="BabyPatientExtendEarBabyResultMap" type="com.lyms.platform.permission.model.BabyPatientExtendEarBaby"> | |
6 | -<id column="id" property="id" jdbcType="VARCHAR" /> | |
7 | -<result column="name" property="name" jdbcType="VARCHAR" /> | |
8 | -<result column="sex" property="sex" jdbcType="INTEGER" /> | |
9 | -<result column="cardNo" property="cardno" jdbcType="VARCHAR" /> | |
10 | -<result column="birth" property="birth" jdbcType="TIMESTAMP" /> | |
11 | -<result column="mname" property="mname" jdbcType="VARCHAR" /> | |
12 | -<result column="mcert_type_id" property="mcertTypeId" jdbcType="VARCHAR" /> | |
13 | -<result column="mcert_no" property="mcertNo" jdbcType="VARCHAR" /> | |
14 | -<result column="mphone" property="mphone" jdbcType="VARCHAR" /> | |
15 | -<result column="vc_card_no" property="vcCardNo" jdbcType="VARCHAR" /> | |
16 | -<result column="build_doctor" property="buildDoctor" jdbcType="VARCHAR" /> | |
17 | -<result column="hospital_id" property="hospitalId" jdbcType="VARCHAR" /> | |
18 | -<result column="build_type" property="buildType" jdbcType="INTEGER" /> | |
19 | -<result column="enable" property="enable" jdbcType="VARCHAR" /> | |
20 | -<result column="yn" property="yn" jdbcType="INTEGER" /> | |
21 | -<result column="build_date" property="buildDate" jdbcType="TIMESTAMP" /> | |
22 | -<result column="baby_patient_id" property="babyPatientId" jdbcType="VARCHAR" /> | |
23 | -<result column="baby_ear_id" property="babyEarId" jdbcType="VARCHAR" /> | |
24 | -</resultMap> | |
5 | + <resultMap id="BabyPatientExtendEarBabyResultMap" | |
6 | + type="com.lyms.platform.permission.model.BabyPatientExtendEarBaby"> | |
7 | + <id column="id" property="id" jdbcType="VARCHAR"/> | |
8 | + <result column="name" property="name" jdbcType="VARCHAR"/> | |
9 | + <result column="sex" property="sex" jdbcType="INTEGER"/> | |
10 | + <result column="cardNo" property="cardno" jdbcType="VARCHAR"/> | |
11 | + <result column="birth" property="birth" jdbcType="TIMESTAMP"/> | |
12 | + <result column="mname" property="mname" jdbcType="VARCHAR"/> | |
13 | + <result column="mcert_type_id" property="mcertTypeId" jdbcType="VARCHAR"/> | |
14 | + <result column="mcert_no" property="mcertNo" jdbcType="VARCHAR"/> | |
15 | + <result column="mphone" property="mphone" jdbcType="VARCHAR"/> | |
16 | + <result column="vc_card_no" property="vcCardNo" jdbcType="VARCHAR"/> | |
17 | + <result column="build_doctor" property="buildDoctor" jdbcType="VARCHAR"/> | |
18 | + <result column="hospital_id" property="hospitalId" jdbcType="VARCHAR"/> | |
19 | + <result column="build_type" property="buildType" jdbcType="INTEGER"/> | |
20 | + <result column="enable" property="enable" jdbcType="VARCHAR"/> | |
21 | + <result column="yn" property="yn" jdbcType="INTEGER"/> | |
22 | + <result column="build_date" property="buildDate" jdbcType="TIMESTAMP"/> | |
23 | + <result column="baby_patient_id" property="babyPatientId" jdbcType="VARCHAR"/> | |
24 | + <result column="baby_ear_id" property="babyEarId" jdbcType="VARCHAR"/> | |
25 | + </resultMap> | |
25 | 26 | |
26 | 27 | |
27 | - | |
28 | -<insert id="addBabyPatientExtendEarBaby" parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBaby"> | |
28 | + <insert id="addBabyPatientExtendEarBaby" | |
29 | + parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBaby"> | |
29 | 30 | insert into baby_patient_extend_ear_baby (id,name,sex,cardNo,birth,mname,mcert_type_id,mcert_no,mphone,vc_card_no,build_doctor,hospital_id,build_type,enable,yn,build_date,baby_patient_id,baby_ear_id) values (#{id},#{name},#{sex},#{cardno},#{birth},#{mname},#{mcertTypeId},#{mcertNo},#{mphone},#{vcCardNo},#{buildDoctor},#{hospitalId},#{buildType},#{enable},#{yn},#{buildDate},#{babyPatientId},#{babyEarId}) |
30 | 31 | </insert> |
31 | 32 | |
32 | 33 | |
34 | + <update id="updateBabyPatientExtendEarBaby" | |
35 | + parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBaby"> | |
36 | + update baby_patient_extend_ear_baby | |
37 | + <set> | |
38 | + <if test="name != null and name != ''"> | |
39 | + name = #{name,jdbcType=VARCHAR}, | |
40 | + </if> | |
41 | + <if test="sex != null and sex >= 0"> | |
42 | + sex = #{sex,jdbcType=INTEGER}, | |
43 | + </if> | |
44 | + <if test="cardno != null and cardno != ''"> | |
45 | + cardNo = #{cardno,jdbcType=VARCHAR}, | |
46 | + </if> | |
47 | + <if test="birth != null"> | |
48 | + birth = #{birth,jdbcType=TIMESTAMP}, | |
49 | + </if> | |
50 | + <if test="mname != null and mname != ''"> | |
51 | + mname = #{mname,jdbcType=VARCHAR}, | |
52 | + </if> | |
53 | + <if test="mcertTypeId != null and mcertTypeId != ''"> | |
54 | + mcert_type_id = #{mcertTypeId,jdbcType=VARCHAR}, | |
55 | + </if> | |
56 | + <if test="mcertNo != null and mcertNo != ''"> | |
57 | + mcert_no = #{mcertNo,jdbcType=VARCHAR}, | |
58 | + </if> | |
59 | + <if test="mphone != null and mphone != ''"> | |
60 | + mphone = #{mphone,jdbcType=VARCHAR}, | |
61 | + </if> | |
62 | + <if test="vcCardNo != null and vcCardNo != ''"> | |
63 | + vc_card_no = #{vcCardNo,jdbcType=VARCHAR}, | |
64 | + </if> | |
65 | + <if test="buildDoctor != null and buildDoctor != ''"> | |
66 | + build_doctor = #{buildDoctor,jdbcType=VARCHAR}, | |
67 | + </if> | |
68 | + <if test="hospitalId != null and hospitalId != ''"> | |
69 | + hospital_id = #{hospitalId,jdbcType=VARCHAR}, | |
70 | + </if> | |
71 | + <if test="buildType != null and buildType >= 0"> | |
72 | + build_type = #{buildType,jdbcType=INTEGER}, | |
73 | + </if> | |
74 | + <if test="enable != null and enable != ''"> | |
75 | + enable = #{enable,jdbcType=VARCHAR}, | |
76 | + </if> | |
77 | + <if test="yn != null and yn >= 0"> | |
78 | + yn = #{yn,jdbcType=INTEGER}, | |
79 | + </if> | |
80 | + <if test="buildDate != null"> | |
81 | + build_date = #{buildDate,jdbcType=TIMESTAMP}, | |
82 | + </if> | |
83 | + <if test="babyPatientId != null and babyPatientId != ''"> | |
84 | + baby_patient_id = #{babyPatientId,jdbcType=VARCHAR}, | |
85 | + </if> | |
86 | + <if test="babyEarId != null and babyEarId != ''"> | |
87 | + baby_ear_id = #{babyEarId,jdbcType=VARCHAR}, | |
88 | + </if> | |
89 | + </set> | |
90 | + where id = #{id,jdbcType=VARCHAR} | |
91 | + </update> | |
33 | 92 | |
34 | -<update id="updateBabyPatientExtendEarBaby" parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBaby"> | |
35 | -update baby_patient_extend_ear_baby <set><if test="name != null and name != ''"> | |
36 | -name = #{name,jdbcType=VARCHAR}, | |
37 | -</if> | |
38 | -<if test="sex != null and sex >= 0"> | |
39 | -sex = #{sex,jdbcType=INTEGER}, | |
40 | -</if> | |
41 | -<if test="cardno != null and cardno != ''"> | |
42 | -cardNo = #{cardno,jdbcType=VARCHAR}, | |
43 | -</if> | |
44 | -<if test="birth != null"> | |
45 | -birth = #{birth,jdbcType=TIMESTAMP}, | |
46 | -</if> | |
47 | -<if test="mname != null and mname != ''"> | |
48 | -mname = #{mname,jdbcType=VARCHAR}, | |
49 | -</if> | |
50 | -<if test="mcertTypeId != null and mcertTypeId != ''"> | |
51 | -mcert_type_id = #{mcertTypeId,jdbcType=VARCHAR}, | |
52 | -</if> | |
53 | -<if test="mcertNo != null and mcertNo != ''"> | |
54 | -mcert_no = #{mcertNo,jdbcType=VARCHAR}, | |
55 | -</if> | |
56 | -<if test="mphone != null and mphone != ''"> | |
57 | -mphone = #{mphone,jdbcType=VARCHAR}, | |
58 | -</if> | |
59 | -<if test="vcCardNo != null and vcCardNo != ''"> | |
60 | -vc_card_no = #{vcCardNo,jdbcType=VARCHAR}, | |
61 | -</if> | |
62 | -<if test="buildDoctor != null and buildDoctor != ''"> | |
63 | -build_doctor = #{buildDoctor,jdbcType=VARCHAR}, | |
64 | -</if> | |
65 | -<if test="hospitalId != null and hospitalId != ''"> | |
66 | -hospital_id = #{hospitalId,jdbcType=VARCHAR}, | |
67 | -</if> | |
68 | -<if test="buildType != null and buildType >= 0"> | |
69 | -build_type = #{buildType,jdbcType=INTEGER}, | |
70 | -</if> | |
71 | -<if test="enable != null and enable != ''"> | |
72 | -enable = #{enable,jdbcType=VARCHAR}, | |
73 | -</if> | |
74 | -<if test="yn != null and yn >= 0"> | |
75 | -yn = #{yn,jdbcType=INTEGER}, | |
76 | -</if> | |
77 | -<if test="buildDate != null"> | |
78 | -build_date = #{buildDate,jdbcType=TIMESTAMP}, | |
79 | -</if> | |
80 | -<if test="babyPatientId != null and babyPatientId != ''"> | |
81 | -baby_patient_id = #{babyPatientId,jdbcType=VARCHAR}, | |
82 | -</if> | |
83 | -<if test="babyEarId != null and babyEarId != ''"> | |
84 | -baby_ear_id = #{babyEarId,jdbcType=VARCHAR}, | |
85 | -</if> | |
86 | -</set> | |
87 | -where id = #{id,jdbcType=VARCHAR} | |
88 | -</update> | |
89 | 93 | |
90 | - | |
91 | -<delete id="deleteBabyPatientExtendEarBaby" parameterType="java.lang.String"> | |
94 | + <delete id="deleteBabyPatientExtendEarBaby" parameterType="java.lang.String"> | |
92 | 95 | delete from baby_patient_extend_ear_baby where id = #{id,jdbcType=VARCHAR} |
93 | 96 | </delete> |
94 | 97 | |
95 | 98 | |
96 | - | |
97 | -<select id="getBabyPatientExtendEarBaby" resultMap="BabyPatientExtendEarBabyResultMap" parameterType="java.lang.String"> | |
99 | + <select id="getBabyPatientExtendEarBaby" resultMap="BabyPatientExtendEarBabyResultMap" | |
100 | + parameterType="java.lang.String"> | |
98 | 101 | select id,name,sex,cardNo,birth,mname,mcert_type_id,mcert_no,mphone,vc_card_no,build_doctor,hospital_id,build_type,enable,yn,build_date,baby_patient_id,baby_ear_id |
99 | 102 | from baby_patient_extend_ear_baby where id = #{id,jdbcType=VARCHAR} |
100 | 103 | </select> |
101 | 104 | |
102 | 105 | |
103 | -<sql id="orderAndLimit"> | |
104 | -<if test="sort != null and sort != '' "> | |
105 | -order by ${sort} | |
106 | -<if test="need != null"> | |
107 | -limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} | |
108 | -</if> | |
109 | -</if> | |
110 | -</sql> | |
106 | + <sql id="orderAndLimit"> | |
107 | + <if test="sort != null and sort != '' "> | |
108 | + order by ${sort} | |
109 | + <if test="need != null"> | |
110 | + limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} | |
111 | + </if> | |
112 | + </if> | |
113 | + </sql> | |
111 | 114 | |
112 | 115 | |
116 | + <sql id="BabyPatientExtendEarBabyCondition"> | |
117 | + <where> | |
118 | + 1 = 1 | |
119 | + <if test="id != null and id != ''"> | |
120 | + and id = #{id,jdbcType=VARCHAR} | |
121 | + </if> | |
122 | + <if test="name != null and name != ''"> | |
123 | + and name = #{name,jdbcType=VARCHAR} | |
124 | + </if> | |
125 | + <if test="queryNo != null and queryNo != ''"> | |
126 | + and ( | |
127 | + name LIKE concat("%",#{queryNo,jdbcType=VARCHAR},"%") | |
128 | + or | |
129 | + mcertNo LIKE concat("%",#{queryNo,jdbcType=VARCHAR},"%") | |
130 | + or | |
131 | + mphone LIKE concat(#{queryNo,jdbcType=VARCHAR},"%") | |
132 | + or | |
133 | + cardno LIKE concat(#{queryNo,jdbcType=VARCHAR},"%") | |
134 | + ) | |
135 | + </if> | |
136 | + <if test="sex != null and sex >= 0"> | |
137 | + and sex = #{sex,jdbcType=INTEGER} | |
138 | + </if> | |
139 | + <if test="cardno != null and cardno != ''"> | |
140 | + and cardNo = #{cardno,jdbcType=VARCHAR} | |
141 | + </if> | |
142 | + <if test="birth != null"> | |
143 | + and birth = #{birth,jdbcType=TIMESTAMP} | |
144 | + </if> | |
145 | + <if test="birthStart!=null"> | |
146 | + AND | |
147 | + <![CDATA[ | |
148 | + DATEDIFF(#{birthStart},birth) <=0 | |
149 | + ]]> | |
150 | + </if> | |
151 | + <if test="birthEnd!=null"> | |
152 | + and | |
153 | + <![CDATA[ | |
154 | + DATEDIFF(#{birthEnd},birth) >=0 | |
155 | + ]]> | |
156 | + </if> | |
157 | + <if test="mname != null and mname != ''"> | |
158 | + and mname = #{mname,jdbcType=VARCHAR} | |
159 | + </if> | |
160 | + <if test="mcertTypeId != null and mcertTypeId != ''"> | |
161 | + and mcert_type_id = #{mcertTypeId,jdbcType=VARCHAR} | |
162 | + </if> | |
163 | + <if test="mcertNo != null and mcertNo != ''"> | |
164 | + and mcert_no = #{mcertNo,jdbcType=VARCHAR} | |
165 | + </if> | |
166 | + <if test="mphone != null and mphone != ''"> | |
167 | + and mphone = #{mphone,jdbcType=VARCHAR} | |
168 | + </if> | |
169 | + <if test="vcCardNo != null and vcCardNo != ''"> | |
170 | + and vc_card_no = #{vcCardNo,jdbcType=VARCHAR} | |
171 | + </if> | |
172 | + <if test="buildDoctor != null and buildDoctor != ''"> | |
173 | + and build_doctor = #{buildDoctor,jdbcType=VARCHAR} | |
174 | + </if> | |
175 | + <if test="hospitalId != null and hospitalId != ''"> | |
176 | + and hospital_id = #{hospitalId,jdbcType=VARCHAR} | |
177 | + </if> | |
178 | + <if test="buildType != null and buildType >= 0"> | |
179 | + and build_type = #{buildType,jdbcType=INTEGER} | |
180 | + </if> | |
181 | + <if test="enable != null and enable != ''"> | |
182 | + and enable = #{enable,jdbcType=VARCHAR} | |
183 | + </if> | |
184 | + <if test="yn != null and yn >= 0"> | |
185 | + and yn = #{yn,jdbcType=INTEGER} | |
186 | + </if> | |
187 | + <if test="buildDate != null"> | |
188 | + and build_date = #{buildDate,jdbcType=TIMESTAMP} | |
189 | + </if> | |
190 | + <if test="babyPatientId != null and babyPatientId != ''"> | |
191 | + and baby_patient_id = #{babyPatientId,jdbcType=VARCHAR} | |
192 | + </if> | |
193 | + <if test="babyEarId != null and babyEarId != ''"> | |
194 | + and baby_ear_id = #{babyEarId,jdbcType=VARCHAR} | |
195 | + </if> | |
196 | + </where> | |
197 | + </sql> | |
113 | 198 | |
114 | -<sql id="BabyPatientExtendEarBabyCondition"> | |
115 | -<where> | |
116 | - 1 = 1 | |
117 | -<if test="id != null and id != ''"> | |
118 | -and id = #{id,jdbcType=VARCHAR} | |
119 | -</if> | |
120 | -<if test="name != null and name != ''"> | |
121 | -and name = #{name,jdbcType=VARCHAR} | |
122 | -</if> | |
123 | -<if test="sex != null and sex >= 0"> | |
124 | -and sex = #{sex,jdbcType=INTEGER} | |
125 | -</if> | |
126 | -<if test="cardno != null and cardno != ''"> | |
127 | -and cardNo = #{cardno,jdbcType=VARCHAR} | |
128 | -</if> | |
129 | -<if test="birth != null"> | |
130 | -and birth = #{birth,jdbcType=TIMESTAMP} | |
131 | -</if> | |
132 | -<if test="mname != null and mname != ''"> | |
133 | -and mname = #{mname,jdbcType=VARCHAR} | |
134 | -</if> | |
135 | -<if test="mcertTypeId != null and mcertTypeId != ''"> | |
136 | -and mcert_type_id = #{mcertTypeId,jdbcType=VARCHAR} | |
137 | -</if> | |
138 | -<if test="mcertNo != null and mcertNo != ''"> | |
139 | -and mcert_no = #{mcertNo,jdbcType=VARCHAR} | |
140 | -</if> | |
141 | -<if test="mphone != null and mphone != ''"> | |
142 | -and mphone = #{mphone,jdbcType=VARCHAR} | |
143 | -</if> | |
144 | -<if test="vcCardNo != null and vcCardNo != ''"> | |
145 | -and vc_card_no = #{vcCardNo,jdbcType=VARCHAR} | |
146 | -</if> | |
147 | -<if test="buildDoctor != null and buildDoctor != ''"> | |
148 | -and build_doctor = #{buildDoctor,jdbcType=VARCHAR} | |
149 | -</if> | |
150 | -<if test="hospitalId != null and hospitalId != ''"> | |
151 | -and hospital_id = #{hospitalId,jdbcType=VARCHAR} | |
152 | -</if> | |
153 | -<if test="buildType != null and buildType >= 0"> | |
154 | -and build_type = #{buildType,jdbcType=INTEGER} | |
155 | -</if> | |
156 | -<if test="enable != null and enable != ''"> | |
157 | -and enable = #{enable,jdbcType=VARCHAR} | |
158 | -</if> | |
159 | -<if test="yn != null and yn >= 0"> | |
160 | -and yn = #{yn,jdbcType=INTEGER} | |
161 | -</if> | |
162 | -<if test="buildDate != null"> | |
163 | -and build_date = #{buildDate,jdbcType=TIMESTAMP} | |
164 | -</if> | |
165 | -<if test="babyPatientId != null and babyPatientId != ''"> | |
166 | -and baby_patient_id = #{babyPatientId,jdbcType=VARCHAR} | |
167 | -</if> | |
168 | -<if test="babyEarId != null and babyEarId != ''"> | |
169 | -and baby_ear_id = #{babyEarId,jdbcType=VARCHAR} | |
170 | -</if> | |
171 | -</where> | |
172 | -</sql> | |
173 | 199 | |
200 | + <select id="queryBabyPatientExtendEarBaby" resultMap="BabyPatientExtendEarBabyResultMap" | |
201 | + parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBabyQuery"> | |
202 | + select | |
203 | + id,name,sex,cardNo,birth,mname,mcert_type_id,mcert_no,mphone,vc_card_no,build_doctor,hospital_id,build_type,enable,yn,build_date,baby_patient_id,baby_ear_id | |
204 | + from baby_patient_extend_ear_baby | |
205 | + <include refid="BabyPatientExtendEarBabyCondition"/> | |
206 | + <include refid="orderAndLimit"/> | |
207 | + </select> | |
174 | 208 | |
175 | 209 | |
176 | -<select id="queryBabyPatientExtendEarBaby" resultMap="BabyPatientExtendEarBabyResultMap" parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBabyQuery"> | |
177 | -select id,name,sex,cardNo,birth,mname,mcert_type_id,mcert_no,mphone,vc_card_no,build_doctor,hospital_id,build_type,enable,yn,build_date,baby_patient_id,baby_ear_id | |
178 | - from baby_patient_extend_ear_baby | |
179 | -<include refid="BabyPatientExtendEarBabyCondition" /> | |
180 | -<include refid="orderAndLimit" /> | |
181 | -</select> | |
182 | - | |
183 | - | |
184 | - | |
185 | -<select id="queryBabyPatientExtendEarBabyCount" resultType="int" parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBabyQuery"> | |
186 | -select count(1) from baby_patient_extend_ear_baby | |
187 | -<include refid="BabyPatientExtendEarBabyCondition" /> | |
188 | -</select> | |
189 | - | |
210 | + <select id="queryBabyPatientExtendEarBabyCount" resultType="int" | |
211 | + parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarBabyQuery"> | |
212 | + select count(1) from baby_patient_extend_ear_baby | |
213 | + <include refid="BabyPatientExtendEarBabyCondition"/> | |
214 | + </select> | |
190 | 215 | |
191 | 216 | |
192 | 217 | </mapper> |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
View file @
a86fc42
... | ... | @@ -258,11 +258,9 @@ |
258 | 258 | <select id="queryBabyPatientExtendEarFollowUp" resultMap="BabyPatientExtendEarFollowUpResultMap" |
259 | 259 | parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarFollowUpQuery"> |
260 | 260 | select |
261 | - id,baby_id,max(follow_time) as | |
262 | - follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,month_age,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
261 | + id,baby_id,follow_time,follow_addr,mark_time,mark_result,mark_detail,follow_info,audiphone,operation,artifi_cochlea,guide_opinion,follow_doctor_name,follow_doctor_id,next_time,month_age,ifdel,ifclose,hospital_id,modify_time,modify_id,create_time,create_id,enalble | |
263 | 262 | from baby_patient_extend_ear_follow_up |
264 | 263 | <include refid="BabyPatientExtendEarFollowUpCondition"/> |
265 | - GROUP BY baby_id | |
266 | 264 | <include refid="orderAndLimit"/> |
267 | 265 | </select> |
268 | 266 |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarHearingDiagnose.xml
View file @
a86fc42
... | ... | @@ -895,7 +895,7 @@ |
895 | 895 | |
896 | 896 | <select id="getHdAndScreen" resultMap="BabyPatientExtendEarHearingDiagnoseResultMap" |
897 | 897 | parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarHearingDiagnoseQuery"> |
898 | - select hd.id,hd.baby_id,max(hd.diagnose_time) diagnose_time,hd.high_factor,hd.confirm_result,hd.diagn_doctor_id,diagn_result,isconfirm,diagn_hand_sugge | |
898 | + select hd.id,hd.baby_id,hd.diagnose_time,diagnose_time,hd.high_factor,hd.confirm_result,hd.diagn_doctor_id,diagn_result,isconfirm,diagn_hand_sugge | |
899 | 899 | from baby_patient_extend_ear_hearing_diagnose hd |
900 | 900 | <where> |
901 | 901 | 1=1 |
... | ... | @@ -967,7 +967,6 @@ |
967 | 967 | </foreach> |
968 | 968 | ) |
969 | 969 | </if> |
970 | - group by baby_id | |
971 | 970 | </where> |
972 | 971 | <include refid="orderAndLimit"/> |
973 | 972 | </select> |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarScreen.xml
View file @
a86fc42
... | ... | @@ -179,7 +179,7 @@ |
179 | 179 | and baby_id = #{babyId,jdbcType=VARCHAR} |
180 | 180 | </if> |
181 | 181 | <if test="babyIds != null "> |
182 | - and baby_id not in | |
182 | + and baby_id in | |
183 | 183 | <foreach item="item" index="index" collection="babyIds" open="(" separator="," close=")"> |
184 | 184 | #{item} |
185 | 185 | </foreach> |
... | ... | @@ -325,7 +325,7 @@ |
325 | 325 | |
326 | 326 | <if test="babyIds!=null"> |
327 | 327 | and baby_id in ( |
328 | - <foreach item="babyId" collection="babyIds" separator="," > | |
328 | + <foreach item="babyId" collection="babyIds" separator=","> | |
329 | 329 | #{babyId} |
330 | 330 | </foreach> |
331 | 331 | ) |
... | ... | @@ -445,7 +445,6 @@ |
445 | 445 | ]]> |
446 | 446 | </if> |
447 | 447 | </where> |
448 | - GROUP BY baby_id | |
449 | 448 | </select> |
450 | 449 | |
451 | 450 | |
... | ... | @@ -454,7 +453,112 @@ |
454 | 453 | select |
455 | 454 | id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,rrna_1494,rrna_1555,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,last_update_date,next_check_time,last_update_user_id,last_update_hospital_id,status |
456 | 455 | from baby_patient_extend_ear_screen |
457 | - <include refid="BabyPatientExtendEarScreenCondition"/> | |
456 | + | |
457 | + <where> | |
458 | + 1 = 1 | |
459 | + <if test="id != null and id != ''"> | |
460 | + and id = #{id,jdbcType=VARCHAR} | |
461 | + </if> | |
462 | + <if test="babyId != null and babyId != ''"> | |
463 | + and baby_id = #{babyId,jdbcType=VARCHAR} | |
464 | + </if> | |
465 | + <if test="babyIds != null "> | |
466 | + and baby_id not in | |
467 | + <foreach item="item" index="index" collection="babyIds" open="(" separator="," close=")"> | |
468 | + #{item} | |
469 | + </foreach> | |
470 | + </if> | |
471 | + <if test="screenType != null and screenType >= 0"> | |
472 | + and screen_type = #{screenType,jdbcType=INTEGER} | |
473 | + </if> | |
474 | + <if test="checkHospitalIds != null "> | |
475 | + and check_hospital_id in | |
476 | + <foreach item="item" index="index" collection="checkHospitalIds" open="(" separator="," close=")"> | |
477 | + #{item} | |
478 | + </foreach> | |
479 | + </if> | |
480 | + <if test="checkHospitalId != null and checkHospitalId != ''"> | |
481 | + and check_hospital_id = #{checkHospitalId,jdbcType=VARCHAR} | |
482 | + </if> | |
483 | + <if test="screenDate != null"> | |
484 | + and screen_date = #{screenDate,jdbcType=TIMESTAMP} | |
485 | + </if> | |
486 | + <if test="highRiskCause != null and highRiskCause != ''"> | |
487 | + and high_risk_cause = #{highRiskCause,jdbcType=VARCHAR} | |
488 | + </if> | |
489 | + <if test="oaeLeft != null"> | |
490 | + and oae_left = #{oaeLeft,jdbcType=INTEGER} | |
491 | + </if> | |
492 | + <if test="oaeRight != null"> | |
493 | + and oae_right = #{oaeRight,jdbcType=INTEGER} | |
494 | + </if> | |
495 | + <if test="aabrLeft != null"> | |
496 | + and aabr_left = #{aabrLeft,jdbcType=INTEGER} | |
497 | + </if> | |
498 | + <if test="aabrRight != null"> | |
499 | + and aabr_right = #{aabrRight,jdbcType=INTEGER} | |
500 | + </if> | |
501 | + <if test="gjb2Del35 != null and gjb2Del35 >= 0"> | |
502 | + and gjb2_del_35 = #{gjb2Del35,jdbcType=INTEGER} | |
503 | + </if> | |
504 | + <if test="gjb2Del176 != null and gjb2Del176 >= 0"> | |
505 | + and gjb2_del_176 = #{gjb2Del176,jdbcType=INTEGER} | |
506 | + </if> | |
507 | + <if test="gjb2Del235 != null and gjb2Del235 >= 0"> | |
508 | + and gjb2_del_235 = #{gjb2Del235,jdbcType=INTEGER} | |
509 | + </if> | |
510 | + <if test="gjb2Del299 != null and gjb2Del299 >= 0"> | |
511 | + and gjb2_del_299 = #{gjb2Del299,jdbcType=INTEGER} | |
512 | + </if> | |
513 | + <if test="gjb3Slc26a4538 != null and gjb3Slc26a4538 >= 0"> | |
514 | + and gjb3_slc26a4_538 = #{gjb3Slc26a4538,jdbcType=INTEGER} | |
515 | + </if> | |
516 | + <if test="gjb3Slc26a42168 != null and gjb3Slc26a42168 >= 0"> | |
517 | + and gjb3_slc26a4_2168 = #{gjb3Slc26a42168,jdbcType=INTEGER} | |
518 | + </if> | |
519 | + <if test="gjb3Slc26a4Ivs7 != null and gjb3Slc26a4Ivs7 >= 0"> | |
520 | + and gjb3_slc26a4_ivs7 = #{gjb3Slc26a4Ivs7,jdbcType=INTEGER} | |
521 | + </if> | |
522 | + <if test="processOptionType != null and processOptionType >= 0"> | |
523 | + and process_option_type = #{processOptionType,jdbcType=INTEGER} | |
524 | + </if> | |
525 | + <if test="processOptionDesc != null and processOptionDesc != ''"> | |
526 | + and process_option_desc = #{processOptionDesc,jdbcType=VARCHAR} | |
527 | + </if> | |
528 | + <if test="guidOpinion != null and guidOpinion != ''"> | |
529 | + and guid_opinion = #{guidOpinion,jdbcType=VARCHAR} | |
530 | + </if> | |
531 | + <if test="checkDoctorId != null and checkDoctorId != ''"> | |
532 | + and check_doctor_id = #{checkDoctorId,jdbcType=VARCHAR} | |
533 | + </if> | |
534 | + <if test="referralDate != null"> | |
535 | + and referral_date = #{referralDate,jdbcType=TIMESTAMP} | |
536 | + </if> | |
537 | + <if test="createDate != null"> | |
538 | + and create_date = #{createDate,jdbcType=TIMESTAMP} | |
539 | + </if> | |
540 | + <if test="createUserId != null and createUserId != ''"> | |
541 | + and create_user_id = #{createUserId,jdbcType=VARCHAR} | |
542 | + </if> | |
543 | + <if test="createHospitalId != null and createHospitalId != ''"> | |
544 | + and create_hospital_id = #{createHospitalId,jdbcType=VARCHAR} | |
545 | + </if> | |
546 | + <if test="nextCheckTime != null"> | |
547 | + and next_check_time = #{nextCheckTime,jdbcType=TIMESTAMP} | |
548 | + </if> | |
549 | + <if test="lastUpdateDate != null"> | |
550 | + and last_update_date = #{lastUpdateDate,jdbcType=TIMESTAMP} | |
551 | + </if> | |
552 | + <if test="lastUpdateUserId != null and lastUpdateUserId != ''"> | |
553 | + and last_update_user_id = #{lastUpdateUserId,jdbcType=VARCHAR} | |
554 | + </if> | |
555 | + <if test="lastUpdateHospitalId != null and lastUpdateHospitalId != ''"> | |
556 | + and last_update_hospital_id = #{lastUpdateHospitalId,jdbcType=VARCHAR} | |
557 | + </if> | |
558 | + <if test="status != null and status >= 0"> | |
559 | + and status = #{status,jdbcType=INTEGER} | |
560 | + </if> | |
561 | + </where> | |
458 | 562 | <include refid="orderAndLimit"/> |
459 | 563 | </select> |
460 | 564 | |
461 | 565 | |
462 | 566 | |
463 | 567 | |
464 | 568 | |
... | ... | @@ -464,29 +568,29 @@ |
464 | 568 | id,baby_id,screen_type,check_hospital_id,screen_date,high_risk_cause,oae_left,oae_right,aabr_left,aabr_right,gjb2_del_35,gjb2_del_176,gjb2_del_235,gjb2_del_299,gjb3_slc26a4_538,gjb3_slc26a4_2168,gjb3_slc26a4_ivs7,rrna_1494,rrna_1555,process_option_type,process_option_desc,guid_opinion,check_doctor_id,referral_date,create_date,create_user_id,create_hospital_id,last_update_date,next_check_time,last_update_user_id,last_update_hospital_id,status |
465 | 569 | from baby_patient_extend_ear_screen |
466 | 570 | <where> |
467 | - (oae_left =-1 or oae_right = -1 or aabr_left = -1 or aabr_right = -1) | |
468 | - and screen_type = 2 | |
469 | - <if test="screenStartDate!=null"> | |
470 | - and | |
471 | - <![CDATA[ | |
571 | + (oae_left =-1 or oae_right = -1 or aabr_left = -1 or aabr_right = -1) | |
572 | + and screen_type = 2 | |
573 | + <if test="screenStartDate!=null"> | |
574 | + and | |
575 | + <![CDATA[ | |
472 | 576 | DATEDIFF(#{screenStartDate},screen_date)<=0 |
473 | 577 | ]]> |
474 | - </if> | |
475 | - <if test="screenEndDate!=null"> | |
476 | - AND | |
477 | - <![CDATA[ | |
578 | + </if> | |
579 | + <if test="screenEndDate!=null"> | |
580 | + AND | |
581 | + <![CDATA[ | |
478 | 582 | DATEDIFF(#{screenEndDate},screen_date) >=0 |
479 | 583 | ]]> |
480 | - </if> | |
584 | + </if> | |
481 | 585 | <if test="checkDoctorId!=null and checkDoctorId != ''"> |
482 | - and check_doctor_id = #{checkDoctorId} | |
586 | + and check_doctor_id = #{checkDoctorId} | |
483 | 587 | </if> |
484 | 588 | <if test="checkHospitalId != null and checkHospitalId != ''"> |
485 | 589 | and check_hospital_id = #{checkHospitalId} |
486 | 590 | </if> |
487 | 591 | <if test="babyIds!=null"> |
488 | 592 | and baby_id in ( |
489 | - <foreach item="babyId" collection="babyIds" separator="," > | |
593 | + <foreach item="babyId" collection="babyIds" separator=","> | |
490 | 594 | #{babyId} |
491 | 595 | </foreach> |
492 | 596 | ) |
... | ... | @@ -502,7 +606,8 @@ |
502 | 606 | <include refid="BabyPatientExtendEarScreenCondition"/> |
503 | 607 | </select> |
504 | 608 | |
505 | - <select id="queryScrBabyIds" parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarScreenQuery" resultType="String"> | |
609 | + <select id="queryScrBabyIds" parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarScreenQuery" | |
610 | + resultType="String"> | |
506 | 611 | select DISTINCT baby_id from baby_patient_extend_ear_screen sc |
507 | 612 | <where> |
508 | 613 | <if test="checkHospitalIds!=null"> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
View file @
a86fc42
... | ... | @@ -17,12 +17,8 @@ |
17 | 17 | import com.lyms.platform.operate.web.result.FollowUpOneResult; |
18 | 18 | import com.lyms.platform.operate.web.result.FrontEndResult; |
19 | 19 | import com.lyms.platform.permission.model.*; |
20 | -import com.lyms.platform.permission.service.BabyPatientExtendEarFollowUpService; | |
21 | -import com.lyms.platform.permission.service.HighriskChangeHospitalService; | |
22 | -import com.lyms.platform.permission.service.OrganizationService; | |
23 | -import com.lyms.platform.permission.service.UsersService; | |
20 | +import com.lyms.platform.permission.service.*; | |
24 | 21 | import com.lyms.platform.pojo.BabyModel; |
25 | -import com.lyms.platform.query.BabyModelQuery; | |
26 | 22 | import org.apache.commons.collections.CollectionUtils; |
27 | 23 | import org.apache.commons.lang.StringUtils; |
28 | 24 | import org.springframework.beans.factory.annotation.Autowired; |
... | ... | @@ -60,6 +56,8 @@ |
60 | 56 | private BabyBookbuildingService babyBookbuildingService; |
61 | 57 | @Autowired |
62 | 58 | private BabyEarFacade babyEarFacade; |
59 | + @Autowired | |
60 | + private BabyPatientExtendEarBabyService earBabyService; | |
63 | 61 | |
64 | 62 | /** |
65 | 63 | * 根据babyId获取随访记录 |
66 | 64 | |
67 | 65 | |
... | ... | @@ -245,14 +243,15 @@ |
245 | 243 | |
246 | 244 | //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id |
247 | 245 | if (StringUtils.isNotEmpty(fur.getKeyWord())) {//关键字:姓名、联系方式、就诊卡 查询babyId |
248 | - BabyModelQuery babyQuery = new BabyModelQuery(); | |
246 | + BabyPatientExtendEarBabyQuery babyQuery = new BabyPatientExtendEarBabyQuery(); | |
249 | 247 | babyQuery.setQueryNo(fur.getKeyWord()); |
250 | - //查询建档记录 | |
251 | - List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); | |
248 | + babyQuery.setHospitalId(hospitalId); | |
249 | + List<BabyPatientExtendEarBaby> models = earBabyService.queryBabyPatientExtendEarBaby(babyQuery); | |
250 | + | |
252 | 251 | if(CollectionUtils.isNotEmpty(models)){ |
253 | 252 | List<String> babyIds = new ArrayList<>(); |
254 | - for(BabyModel babyModel:models){ | |
255 | - babyIds.add(babyModel.getId()); | |
253 | + for(BabyPatientExtendEarBaby babyModel:models){ | |
254 | + babyIds.add(babyModel.getBabyPatientId()); | |
256 | 255 | } |
257 | 256 | query.setBabyIds(babyIds.toArray(new String[babyIds.size()])); |
258 | 257 | }else{ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
View file @
a86fc42
... | ... | @@ -21,8 +21,6 @@ |
21 | 21 | import com.lyms.platform.permission.model.*; |
22 | 22 | import com.lyms.platform.permission.service.*; |
23 | 23 | import com.lyms.platform.pojo.BabyModel; |
24 | -import com.lyms.platform.pojo.Patients; | |
25 | -import com.lyms.platform.query.PatientsQuery; | |
26 | 24 | import org.apache.commons.collections.CollectionUtils; |
27 | 25 | import org.apache.commons.lang.StringUtils; |
28 | 26 | import org.springframework.beans.factory.annotation.Autowired; |
29 | 27 | |
30 | 28 | |
31 | 29 | |
32 | 30 | |
... | ... | @@ -448,32 +446,26 @@ |
448 | 446 | |
449 | 447 | |
450 | 448 | List<String> babyIds = new ArrayList<>(); |
451 | - PatientsQuery patientsQuery = new PatientsQuery(); | |
452 | 449 | |
453 | - if (model.getBirthStartTime() != null) {//儿童出生开始日期 | |
454 | - patientsQuery.setBirthStart(model.getBirthStartTime()); | |
450 | + BabyPatientExtendEarScreenQuery screenQuery = new BabyPatientExtendEarScreenQuery(); | |
451 | + BabyPatientExtendEarBabyQuery babyQuery = new BabyPatientExtendEarBabyQuery(); | |
452 | + babyQuery.setQueryNo(model.getKeyWord()); | |
453 | + babyQuery.setBirthStart(model.getBirthStartTime()); | |
454 | + babyQuery.setBirthEnd(model.getBirthEndTime()); | |
455 | + babyQuery.setHospitalId(hospitalId); | |
456 | + List<BabyPatientExtendEarBaby> models = earBabyService.queryBabyPatientExtendEarBaby(babyQuery); | |
457 | + if (CollectionUtils.isEmpty(models) && (StringUtils.isNotEmpty(model.getKeyWord()) || model.getBirthStartTime() == null || model.getBirthEndTime() == null)) { | |
458 | + return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
455 | 459 | } |
456 | 460 | |
457 | - if (model.getBirthEndTime() != null) {//儿童出生结束日期 | |
458 | - patientsQuery.setBirthEnd(model.getBirthEndTime()); | |
459 | - } | |
460 | - | |
461 | - List<Patients> patientses = null; | |
462 | - if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(model.getKeyWord())) { | |
463 | - patientsQuery.setQueryNo(model.getKeyWord()); | |
464 | - patientses = patientsService.queryPatient1(patientsQuery, "modified"); | |
465 | - } | |
466 | - | |
467 | - BabyPatientExtendEarScreenQuery screenQuery = new BabyPatientExtendEarScreenQuery(); | |
468 | - if (CollectionUtils.isNotEmpty(patientses)) { | |
469 | - for (Patients pa : patientses) { | |
470 | - babyIds.add(pa.getId()); | |
461 | + if (CollectionUtils.isNotEmpty(models)) { | |
462 | + for (BabyPatientExtendEarBaby pa : models) { | |
463 | + babyIds.add(pa.getBabyPatientId()); | |
471 | 464 | } |
472 | 465 | screenQuery.setBabyIds(babyIds.toArray(new String[babyIds.size()])); |
473 | - } else if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(model.getKeyWord())) { | |
474 | - return new BaseListResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
475 | 466 | } |
476 | 467 | |
468 | + | |
477 | 469 | //听筛开始时间 |
478 | 470 | if (model.getSecrStartTime() != null) { |
479 | 471 | screenQuery.setScreenStartDate(model.getSecrStartTime()); |
480 | 472 | |
481 | 473 | |
... | ... | @@ -887,22 +879,18 @@ |
887 | 879 | List<String> babyIds = new ArrayList<>(); |
888 | 880 | |
889 | 881 | for (BabyPatientExtendEarBaby babyModel : babyModels) { |
890 | - babyIds.add(babyModel.getId()); | |
882 | + babyIds.add(babyModel.getBabyPatientId()); | |
891 | 883 | } |
892 | 884 | |
893 | - //根据儿童条件查询如果为空 | |
894 | - if(CollectionUtils.isEmpty(babyIds)&&(model.getMonthAgeStart()!=null||model.getMonthAgeEnd()!=null||StringUtils.isNotEmpty(model.getKeyWord())||model.getBirthStartTime()!=null||model.getBirthEndTime()!=null)){ | |
885 | + | |
886 | +//根据儿童条件查询如果为空 | |
887 | + if (CollectionUtils.isEmpty(babyIds) && (model.getMonthAgeStart() != null || model.getMonthAgeEnd() != null || StringUtils.isNotEmpty(model.getKeyWord()) || model.getBirthStartTime() != null || model.getBirthEndTime() != null)) { | |
895 | 888 | BaseListResponse result = new BaseListResponse(); |
896 | 889 | result.setData(new ArrayList()); |
897 | 890 | result.setErrorcode(0); |
898 | 891 | return result; |
899 | 892 | } |
900 | 893 | |
901 | - BabyPatientExtendEarQuery earQuery = new BabyPatientExtendEarQuery(); | |
902 | - earQuery.setCreateHospitalId(hospitalId); | |
903 | - earQuery.setBabyPatientIds(babyIds.toArray(new String[babyIds.size()])); | |
904 | - //查询听力儿童档案 | |
905 | - List<BabyPatientExtendEar> babyPatientExtendEars = babyPatientExtendEarService.queryBabyPatientExtendEar(earQuery); | |
906 | 894 | |
907 | 895 | //查询儿童听筛记录 |
908 | 896 | BabyPatientExtendEarScreenQuery screenQuery = new BabyPatientExtendEarScreenQuery(); |
... | ... | @@ -913,7 +901,7 @@ |
913 | 901 | screenQuery.setBabyIds(babyIds.toArray(new String[babyIds.size()])); |
914 | 902 | screenQuery.setCheckHospitalId(hospitalId); |
915 | 903 | //查询全部数据 |
916 | - List<BabyPatientExtendEarScreen> earScreens = screenService.notAuscultationBabyPatientExtendEarScreen(screenQuery); | |
904 | + List<BabyPatientExtendEarScreen> earScreens = screenService.queryBabyPatientExtendEarScreen(screenQuery); | |
917 | 905 | Map<String, BabyPatientExtendEarScreen> screenMap = new HashMap<>(); |
918 | 906 | if (CollectionUtils.isNotEmpty(earScreens)) { |
919 | 907 | for (BabyPatientExtendEarScreen es : earScreens) { |
920 | 908 | |
... | ... | @@ -924,20 +912,17 @@ |
924 | 912 | |
925 | 913 | //要返回的数据 |
926 | 914 | List<HearDiagnManageListResult> hdmResult = new ArrayList<>(); |
927 | - if (CollectionUtils.isNotEmpty(babyPatientExtendEars)) { | |
928 | - for (BabyPatientExtendEar ear : babyPatientExtendEars) { | |
915 | + if (CollectionUtils.isNotEmpty(babyModels)) { | |
916 | + for (BabyPatientExtendEarBaby ear : babyModels) { | |
929 | 917 | HearDiagnManageListResult hdm = new HearDiagnManageListResult(); |
930 | - BabyModel babyModel = babyService.getOneBabyById(ear.getBabyPatientId()); | |
931 | - if (babyModel != null) { | |
932 | - hdm.setBabyName(babyModel.getName()); | |
933 | - hdm.setBabyId(ear.getBabyPatientId()); | |
934 | - hdm.setMommyName(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMname())); | |
935 | - hdm.setMommnyPhone(com.lyms.platform.common.utils.StringUtils.emptyDeal(babyModel.getMphone())); | |
936 | - hdm.setMommnyEncryptPhone(com.lyms.platform.common.utils.StringUtils.encryPhone(babyModel.getMphone())); | |
937 | - hdm.setMonthAge(DateUtil.getBabyMonthAge(babyModel.getBirth(), new Date())); | |
938 | - hdm.setBirthday(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(babyModel.getBirth()))); | |
939 | - hdm.setSex(com.lyms.platform.common.utils.StringUtils.emptyDeal(SexEnum.getTextById(babyModel.getSex()))); | |
940 | - } | |
918 | + hdm.setBabyName(ear.getName()); | |
919 | + hdm.setBabyId(ear.getBabyPatientId()); | |
920 | + hdm.setMommyName(com.lyms.platform.common.utils.StringUtils.emptyDeal(ear.getMname())); | |
921 | + hdm.setMommnyPhone(com.lyms.platform.common.utils.StringUtils.emptyDeal(ear.getMphone())); | |
922 | + hdm.setMommnyEncryptPhone(com.lyms.platform.common.utils.StringUtils.encryPhone(ear.getMphone())); | |
923 | + hdm.setMonthAge(DateUtil.getBabyMonthAge(ear.getBirth(), new Date())); | |
924 | + hdm.setBirthday(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(ear.getBirth()))); | |
925 | + hdm.setSex(com.lyms.platform.common.utils.StringUtils.emptyDeal(SexEnum.getTextById(ear.getSex()))); | |
941 | 926 | BabyPatientExtendEarScreen es = screenMap.get(ear.getBabyPatientId()); |
942 | 927 | if (es != null) { |
943 | 928 | hdm.setId(es.getId()); |
... | ... | @@ -958,8 +943,7 @@ |
958 | 943 | result.setPageInfo(pageInfo); |
959 | 944 | result.setData(hdmResult); |
960 | 945 | return result; |
961 | - } else | |
962 | - { | |
946 | + } else { | |
963 | 947 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("没有数据"); |
964 | 948 | } |
965 | 949 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearingDiagnoseController.java
View file @
a86fc42
... | ... | @@ -20,7 +20,6 @@ |
20 | 20 | import com.lyms.platform.permission.model.*; |
21 | 21 | import com.lyms.platform.permission.service.*; |
22 | 22 | import com.lyms.platform.pojo.BabyModel; |
23 | -import com.lyms.platform.query.BabyModelQuery; | |
24 | 23 | import org.apache.commons.collections.CollectionUtils; |
25 | 24 | import org.apache.commons.lang.StringUtils; |
26 | 25 | import org.springframework.beans.factory.annotation.Autowired; |
... | ... | @@ -62,6 +61,8 @@ |
62 | 61 | private BabyBookbuildingService babyBookbuildingService; |
63 | 62 | @Autowired |
64 | 63 | private BabyEarFacade babyEarFacade; |
64 | + @Autowired | |
65 | + private BabyPatientExtendEarBabyService earBabyService; | |
65 | 66 | |
66 | 67 | /** |
67 | 68 | * 根据儿童id获取最后一次确诊结果 |
68 | 69 | |
69 | 70 | |
... | ... | @@ -354,14 +355,14 @@ |
354 | 355 | BabyPatientExtendEarScreenQuery scrQuery = new BabyPatientExtendEarScreenQuery(); |
355 | 356 | //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id |
356 | 357 | if (StringUtils.isNotEmpty(hdReq.getKeyWord())) {//关键字:姓名、联系方式、就诊卡 查询babyId |
357 | - BabyModelQuery babyQuery = new BabyModelQuery(); | |
358 | + BabyPatientExtendEarBabyQuery babyQuery = new BabyPatientExtendEarBabyQuery(); | |
358 | 359 | babyQuery.setQueryNo(hdReq.getKeyWord()); |
359 | - //查询建档记录 | |
360 | - List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); | |
360 | + babyQuery.setHospitalId(hospitalId); | |
361 | + List<BabyPatientExtendEarBaby> models = earBabyService.queryBabyPatientExtendEarBaby(babyQuery); | |
361 | 362 | if(CollectionUtils.isNotEmpty(models)){ |
362 | 363 | List<String> babyIds = new ArrayList<>(); |
363 | - for(BabyModel babyModel:models){ | |
364 | - babyIds.add(babyModel.getId()); | |
364 | + for(BabyPatientExtendEarBaby babyModel:models){ | |
365 | + babyIds.add(babyModel.getBabyPatientId()); | |
365 | 366 | } |
366 | 367 | scrQuery.setBabyIds(babyIds.toArray(new String[babyIds.size()])); |
367 | 368 | }else{ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
View file @
a86fc42
... | ... | @@ -94,10 +94,11 @@ |
94 | 94 | private OrganizationGroupsFacade groupsFacade; |
95 | 95 | @Autowired |
96 | 96 | private BabyBookbuildingService babyBookbuildingService; |
97 | + @Autowired | |
98 | + private BabyPatientExtendEarBabyService earBabyService; | |
97 | 99 | |
98 | 100 | |
99 | 101 | |
100 | - | |
101 | 102 | //处理儿童person信息 |
102 | 103 | private PersonModel handBabyPerson(BabyModel baby) { |
103 | 104 | //跟距母親的證件號查詢兒童person信息 |
104 | 105 | |
105 | 106 | |
106 | 107 | |
... | ... | @@ -1642,16 +1643,15 @@ |
1642 | 1643 | |
1643 | 1644 | //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id |
1644 | 1645 | if (StringUtils.isNotEmpty(earScreenListRequest.getKeyWord()) || earScreenListRequest.getBirthStartTime() != null || earScreenListRequest.getBirthEndTime() != null) {//关键字:姓名、联系方式、就诊卡 查询babyId |
1645 | - BabyModelQuery babyQuery = new BabyModelQuery(); | |
1646 | + BabyPatientExtendEarBabyQuery babyQuery = new BabyPatientExtendEarBabyQuery(); | |
1646 | 1647 | babyQuery.setQueryNo(earScreenListRequest.getKeyWord()); |
1648 | + babyQuery.setHospitalId(hospitalId); | |
1647 | 1649 | babyQuery.setBirthStart(earScreenListRequest.getBirthStartTime()); |
1648 | 1650 | babyQuery.setBirthEnd(earScreenListRequest.getBirthEndTime()); |
1649 | - babyQuery.setHospitalId(hospitalId); | |
1650 | - //查询建档记录 | |
1651 | - List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); | |
1651 | + List<BabyPatientExtendEarBaby> models = earBabyService.queryBabyPatientExtendEarBaby(babyQuery); | |
1652 | 1652 | if (CollectionUtils.isNotEmpty(models)) { |
1653 | 1653 | List<String> babyIds = new ArrayList<>(); |
1654 | - for (BabyModel babyModel : models) { | |
1654 | + for (BabyPatientExtendEarBaby babyModel : models) { | |
1655 | 1655 | babyIds.add(babyModel.getId()); |
1656 | 1656 | } |
1657 | 1657 | screenQuery.setBabyIds(babyIds.toArray(new String[babyIds.size()])); |