Commit d523ed9ac087ba5eef57aba546f2447123bd5c7f
1 parent
9e22e07dac
Exists in
master
and in
6 other branches
加入mysql
Showing 6 changed files with 565 additions and 0 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/BabyEyeCheckMapper.java
- platform-biz-service/src/main/resources/mainOrm/master/BabyEyeCheckMapper.xml
- platform-dal/src/main/java/com/lyms/platform/pojo/BabyEyeCheck.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/BabyEyeCheckMapper.java
View file @
d523ed9
platform-biz-service/src/main/resources/mainOrm/master/BabyEyeCheckMapper.xml
View file @
d523ed9
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper | |
3 | + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |
4 | + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
5 | +<mapper namespace="com.lyms.platform.permission.dao.master.BabyEyeCheckMapper"> | |
6 | + | |
7 | + <resultMap type="com.lyms.platform.pojo.BabyEyeCheck" id="babyEyeCheckMap"> | |
8 | + <result column="id" property="id"/> | |
9 | + <result column="created" property="created"/> | |
10 | + <result column="yn" property="yn"/> | |
11 | + <result column="operaterId" property="operaterId"/> | |
12 | + <result column="hospitalId" property="hospitalId"/> | |
13 | + <result column="babyId" property="babyId"/> | |
14 | + <result column="pid" property="pid"/> | |
15 | + <result column="checkMonthId" property="checkMonthId"/> | |
16 | + <result column="checkHospital" property="checkHospital"/> | |
17 | + <result column="checkTime" property="checkTime"/> | |
18 | + <result column="riskFactor" property="riskFactor"/> | |
19 | + <result column="extRightEyelook" property="extRightEyelook"/> | |
20 | + <result column="extRightEyelookOther" property="extRightEyelookOther"/> | |
21 | + <result column="blinkRightReflex" property="blinkRightReflex"/> | |
22 | + <result column="pupillaryRightReflex" property="pupillaryRightReflex"/> | |
23 | + <result column="redRightReflex" property="redRightReflex"/> | |
24 | + <result column="extLeftEyelook" property="extLeftEyelook"/> | |
25 | + <result column="extLeftEyelookOther" property="extLeftEyelookOther"/> | |
26 | + <result column="blinkLefttReflex" property="blinkLefttReflex"/> | |
27 | + <result column="pupillaryLeftReflex" property="pupillaryLeftReflex"/> | |
28 | + <result column="redLeftReflex" property="redLeftReflex"/> | |
29 | + <result column="fundusResult" property="fundusResult"/> | |
30 | + <result column="handleOpinionsId" property="handleOpinionsId"/> | |
31 | + <result column="guidanceOpinions" property="guidanceOpinions"/> | |
32 | + <result column="doctor" property="doctor"/> | |
33 | + <result column="nextCheckMonthId" property="nextCheckMonthId"/> | |
34 | + <result column="nextCheckTime" property="nextCheckTime"/> | |
35 | + <result column="extEyelook" property="extEyelook"/> | |
36 | + <result column="extEyelookOther" property="extEyelookOther"/> | |
37 | + <result column="redReflex" property="redReflex"/> | |
38 | + <result column="redReflexOther" property="redReflexOther"/> | |
39 | + <result column="r1" property="r1"/> | |
40 | + <result column="r2" property="r2"/> | |
41 | + <result column="l1" property="l1"/> | |
42 | + <result column="l2" property="l2"/> | |
43 | + <result column="optometry" property="optometry"/> | |
44 | + <result column="conjunctiva" property="conjunctiva"/> | |
45 | + <result column="conjunctivaOther" property="conjunctivaOther"/> | |
46 | + <result column="corneal" property="corneal"/> | |
47 | + <result column="cornealOther" property="cornealOther"/> | |
48 | + <result column="lacrimalApparatus" property="lacrimalApparatus"/> | |
49 | + <result column="lacrimalApparatusOther" property="lacrimalApparatusOther"/> | |
50 | + <result column="eyeMovementsId" property="eyeMovementsId"/> | |
51 | + <result column="eyePositionId" property="eyePositionId"/> | |
52 | + <result column="eyePositionOther" property="eyePositionOther"/> | |
53 | + <result column="binocularVision" property="binocularVision"/> | |
54 | + <result column="other" property="other"/> | |
55 | + <result column="lVision" property="lVision"/> | |
56 | + <result column="rVision" property="rVision"/> | |
57 | + <result column="refractionL1" property="refractionL1"/> | |
58 | + <result column="refractionL2" property="refractionL2"/> | |
59 | + <result column="refractionR1" property="refractionR1"/> | |
60 | + <result column="refractionR2" property="refractionR2"/> | |
61 | + <result column="nystagmus" property="nystagmus"/> | |
62 | + <result column="fixationCard" property="fixationCard"/> | |
63 | + </resultMap> | |
64 | + | |
65 | + <sql id="columnList"> | |
66 | + id,created,yn,operaterId,hospitalId,babyId,pid,checkMonthId,checkHospital,checkTime,riskFactor,extRightEyelook,extRightEyelookOther,blinkRightReflex,pupillaryRightReflex,redRightReflex,extLeftEyelook,extLeftEyelookOther,blinkLefttReflex,pupillaryLeftReflex,redLeftReflex,fundusResult,handleOpinionsId,guidanceOpinions,doctor,nextCheckMonthId,nextCheckTime,extEyelook,extEyelookOther,redReflex,redReflexOther,r1,r2,l1,l2,optometry,conjunctiva,conjunctivaOther,corneal,cornealOther,lacrimalApparatus,lacrimalApparatusOther,eyeMovementsId,eyePositionId,eyePositionOther,binocularVision,other,lVision,rVision,refractionL1,refractionL2,refractionR1,refractionR2,nystagmus,fixationCard | |
67 | + </sql> | |
68 | + | |
69 | + <sql id="columnWhere"> | |
70 | + <where> | |
71 | + <if test="id != null"> | |
72 | + and id = #{id} | |
73 | + </if> | |
74 | + <if test="created != null"> | |
75 | + and created = #{created} | |
76 | + </if> | |
77 | + <if test="yn != null"> | |
78 | + and yn = #{yn} | |
79 | + </if> | |
80 | + <if test="operaterId != null"> | |
81 | + and operaterId = #{operaterId} | |
82 | + </if> | |
83 | + <if test="hospitalId != null"> | |
84 | + and hospitalId = #{hospitalId} | |
85 | + </if> | |
86 | + <if test="babyId != null"> | |
87 | + and babyId = #{babyId} | |
88 | + </if> | |
89 | + <if test="pid != null"> | |
90 | + and pid = #{pid} | |
91 | + </if> | |
92 | + <if test="checkMonthId != null"> | |
93 | + and checkMonthId = #{checkMonthId} | |
94 | + </if> | |
95 | + <if test="checkHospital != null"> | |
96 | + and checkHospital = #{checkHospital} | |
97 | + </if> | |
98 | + <if test="checkTime != null"> | |
99 | + and checkTime = #{checkTime} | |
100 | + </if> | |
101 | + <if test="riskFactor != null"> | |
102 | + and riskFactor = #{riskFactor} | |
103 | + </if> | |
104 | + <if test="extRightEyelook != null"> | |
105 | + and extRightEyelook = #{extRightEyelook} | |
106 | + </if> | |
107 | + <if test="extRightEyelookOther != null"> | |
108 | + and extRightEyelookOther = #{extRightEyelookOther} | |
109 | + </if> | |
110 | + <if test="blinkRightReflex != null"> | |
111 | + and blinkRightReflex = #{blinkRightReflex} | |
112 | + </if> | |
113 | + <if test="pupillaryRightReflex != null"> | |
114 | + and pupillaryRightReflex = #{pupillaryRightReflex} | |
115 | + </if> | |
116 | + <if test="redRightReflex != null"> | |
117 | + and redRightReflex = #{redRightReflex} | |
118 | + </if> | |
119 | + <if test="extLeftEyelook != null"> | |
120 | + and extLeftEyelook = #{extLeftEyelook} | |
121 | + </if> | |
122 | + <if test="extLeftEyelookOther != null"> | |
123 | + and extLeftEyelookOther = #{extLeftEyelookOther} | |
124 | + </if> | |
125 | + <if test="blinkLefttReflex != null"> | |
126 | + and blinkLefttReflex = #{blinkLefttReflex} | |
127 | + </if> | |
128 | + <if test="pupillaryLeftReflex != null"> | |
129 | + and pupillaryLeftReflex = #{pupillaryLeftReflex} | |
130 | + </if> | |
131 | + <if test="redLeftReflex != null"> | |
132 | + and redLeftReflex = #{redLeftReflex} | |
133 | + </if> | |
134 | + <if test="fundusResult != null"> | |
135 | + and fundusResult = #{fundusResult} | |
136 | + </if> | |
137 | + <if test="handleOpinionsId != null"> | |
138 | + and handleOpinionsId = #{handleOpinionsId} | |
139 | + </if> | |
140 | + <if test="guidanceOpinions != null"> | |
141 | + and guidanceOpinions = #{guidanceOpinions} | |
142 | + </if> | |
143 | + <if test="doctor != null"> | |
144 | + and doctor = #{doctor} | |
145 | + </if> | |
146 | + <if test="nextCheckMonthId != null"> | |
147 | + and nextCheckMonthId = #{nextCheckMonthId} | |
148 | + </if> | |
149 | + <if test="nextCheckTime != null"> | |
150 | + and nextCheckTime = #{nextCheckTime} | |
151 | + </if> | |
152 | + <if test="extEyelook != null"> | |
153 | + and extEyelook = #{extEyelook} | |
154 | + </if> | |
155 | + <if test="extEyelookOther != null"> | |
156 | + and extEyelookOther = #{extEyelookOther} | |
157 | + </if> | |
158 | + <if test="redReflex != null"> | |
159 | + and redReflex = #{redReflex} | |
160 | + </if> | |
161 | + <if test="redReflexOther != null"> | |
162 | + and redReflexOther = #{redReflexOther} | |
163 | + </if> | |
164 | + <if test="r1 != null"> | |
165 | + and r1 = #{r1} | |
166 | + </if> | |
167 | + <if test="r2 != null"> | |
168 | + and r2 = #{r2} | |
169 | + </if> | |
170 | + <if test="l1 != null"> | |
171 | + and l1 = #{l1} | |
172 | + </if> | |
173 | + <if test="l2 != null"> | |
174 | + and l2 = #{l2} | |
175 | + </if> | |
176 | + <if test="optometry != null"> | |
177 | + and optometry = #{optometry} | |
178 | + </if> | |
179 | + <if test="conjunctiva != null"> | |
180 | + and conjunctiva = #{conjunctiva} | |
181 | + </if> | |
182 | + <if test="conjunctivaOther != null"> | |
183 | + and conjunctivaOther = #{conjunctivaOther} | |
184 | + </if> | |
185 | + <if test="corneal != null"> | |
186 | + and corneal = #{corneal} | |
187 | + </if> | |
188 | + <if test="cornealOther != null"> | |
189 | + and cornealOther = #{cornealOther} | |
190 | + </if> | |
191 | + <if test="lacrimalApparatus != null"> | |
192 | + and lacrimalApparatus = #{lacrimalApparatus} | |
193 | + </if> | |
194 | + <if test="lacrimalApparatusOther != null"> | |
195 | + and lacrimalApparatusOther = #{lacrimalApparatusOther} | |
196 | + </if> | |
197 | + <if test="eyeMovementsId != null"> | |
198 | + and eyeMovementsId = #{eyeMovementsId} | |
199 | + </if> | |
200 | + <if test="eyePositionId != null"> | |
201 | + and eyePositionId = #{eyePositionId} | |
202 | + </if> | |
203 | + <if test="eyePositionOther != null"> | |
204 | + and eyePositionOther = #{eyePositionOther} | |
205 | + </if> | |
206 | + <if test="binocularVision != null"> | |
207 | + and binocularVision = #{binocularVision} | |
208 | + </if> | |
209 | + <if test="other != null"> | |
210 | + and other = #{other} | |
211 | + </if> | |
212 | + <if test="lVision != null"> | |
213 | + and lVision = #{lVision} | |
214 | + </if> | |
215 | + <if test="rVision != null"> | |
216 | + and rVision = #{rVision} | |
217 | + </if> | |
218 | + <if test="refractionL1 != null"> | |
219 | + and refractionL1 = #{refractionL1} | |
220 | + </if> | |
221 | + <if test="refractionL2 != null"> | |
222 | + and refractionL2 = #{refractionL2} | |
223 | + </if> | |
224 | + <if test="refractionR1 != null"> | |
225 | + and refractionR1 = #{refractionR1} | |
226 | + </if> | |
227 | + <if test="refractionR2 != null"> | |
228 | + and refractionR2 = #{refractionR2} | |
229 | + </if> | |
230 | + <if test="nystagmus != null"> | |
231 | + and nystagmus = #{nystagmus} | |
232 | + </if> | |
233 | + <if test="fixationCard != null"> | |
234 | + and fixationCard = #{fixationCard} | |
235 | + </if> | |
236 | + </where> | |
237 | + </sql> | |
238 | + | |
239 | + <sql id="columnUpdate"> | |
240 | + <set> | |
241 | + <if test="created != null"> | |
242 | + created = #{created}, | |
243 | + </if> | |
244 | + <if test="yn != null"> | |
245 | + yn = #{yn}, | |
246 | + </if> | |
247 | + <if test="operaterId != null"> | |
248 | + operaterId = #{operaterId}, | |
249 | + </if> | |
250 | + <if test="hospitalId != null"> | |
251 | + hospitalId = #{hospitalId}, | |
252 | + </if> | |
253 | + <if test="babyId != null"> | |
254 | + babyId = #{babyId}, | |
255 | + </if> | |
256 | + <if test="pid != null"> | |
257 | + pid = #{pid}, | |
258 | + </if> | |
259 | + <if test="checkMonthId != null"> | |
260 | + checkMonthId = #{checkMonthId}, | |
261 | + </if> | |
262 | + <if test="checkHospital != null"> | |
263 | + checkHospital = #{checkHospital}, | |
264 | + </if> | |
265 | + <if test="checkTime != null"> | |
266 | + checkTime = #{checkTime}, | |
267 | + </if> | |
268 | + <if test="riskFactor != null"> | |
269 | + riskFactor = #{riskFactor}, | |
270 | + </if> | |
271 | + <if test="extRightEyelook != null"> | |
272 | + extRightEyelook = #{extRightEyelook}, | |
273 | + </if> | |
274 | + <if test="extRightEyelookOther != null"> | |
275 | + extRightEyelookOther = #{extRightEyelookOther}, | |
276 | + </if> | |
277 | + <if test="blinkRightReflex != null"> | |
278 | + blinkRightReflex = #{blinkRightReflex}, | |
279 | + </if> | |
280 | + <if test="pupillaryRightReflex != null"> | |
281 | + pupillaryRightReflex = #{pupillaryRightReflex}, | |
282 | + </if> | |
283 | + <if test="redRightReflex != null"> | |
284 | + redRightReflex = #{redRightReflex}, | |
285 | + </if> | |
286 | + <if test="extLeftEyelook != null"> | |
287 | + extLeftEyelook = #{extLeftEyelook}, | |
288 | + </if> | |
289 | + <if test="extLeftEyelookOther != null"> | |
290 | + extLeftEyelookOther = #{extLeftEyelookOther}, | |
291 | + </if> | |
292 | + <if test="blinkLefttReflex != null"> | |
293 | + blinkLefttReflex = #{blinkLefttReflex}, | |
294 | + </if> | |
295 | + <if test="pupillaryLeftReflex != null"> | |
296 | + pupillaryLeftReflex = #{pupillaryLeftReflex}, | |
297 | + </if> | |
298 | + <if test="redLeftReflex != null"> | |
299 | + redLeftReflex = #{redLeftReflex}, | |
300 | + </if> | |
301 | + <if test="fundusResult != null"> | |
302 | + fundusResult = #{fundusResult}, | |
303 | + </if> | |
304 | + <if test="handleOpinionsId != null"> | |
305 | + handleOpinionsId = #{handleOpinionsId}, | |
306 | + </if> | |
307 | + <if test="guidanceOpinions != null"> | |
308 | + guidanceOpinions = #{guidanceOpinions}, | |
309 | + </if> | |
310 | + <if test="doctor != null"> | |
311 | + doctor = #{doctor}, | |
312 | + </if> | |
313 | + <if test="nextCheckMonthId != null"> | |
314 | + nextCheckMonthId = #{nextCheckMonthId}, | |
315 | + </if> | |
316 | + <if test="nextCheckTime != null"> | |
317 | + nextCheckTime = #{nextCheckTime}, | |
318 | + </if> | |
319 | + <if test="extEyelook != null"> | |
320 | + extEyelook = #{extEyelook}, | |
321 | + </if> | |
322 | + <if test="extEyelookOther != null"> | |
323 | + extEyelookOther = #{extEyelookOther}, | |
324 | + </if> | |
325 | + <if test="redReflex != null"> | |
326 | + redReflex = #{redReflex}, | |
327 | + </if> | |
328 | + <if test="redReflexOther != null"> | |
329 | + redReflexOther = #{redReflexOther}, | |
330 | + </if> | |
331 | + <if test="r1 != null"> | |
332 | + r1 = #{r1}, | |
333 | + </if> | |
334 | + <if test="r2 != null"> | |
335 | + r2 = #{r2}, | |
336 | + </if> | |
337 | + <if test="l1 != null"> | |
338 | + l1 = #{l1}, | |
339 | + </if> | |
340 | + <if test="l2 != null"> | |
341 | + l2 = #{l2}, | |
342 | + </if> | |
343 | + <if test="optometry != null"> | |
344 | + optometry = #{optometry}, | |
345 | + </if> | |
346 | + <if test="conjunctiva != null"> | |
347 | + conjunctiva = #{conjunctiva}, | |
348 | + </if> | |
349 | + <if test="conjunctivaOther != null"> | |
350 | + conjunctivaOther = #{conjunctivaOther}, | |
351 | + </if> | |
352 | + <if test="corneal != null"> | |
353 | + corneal = #{corneal}, | |
354 | + </if> | |
355 | + <if test="cornealOther != null"> | |
356 | + cornealOther = #{cornealOther}, | |
357 | + </if> | |
358 | + <if test="lacrimalApparatus != null"> | |
359 | + lacrimalApparatus = #{lacrimalApparatus}, | |
360 | + </if> | |
361 | + <if test="lacrimalApparatusOther != null"> | |
362 | + lacrimalApparatusOther = #{lacrimalApparatusOther}, | |
363 | + </if> | |
364 | + <if test="eyeMovementsId != null"> | |
365 | + eyeMovementsId = #{eyeMovementsId}, | |
366 | + </if> | |
367 | + <if test="eyePositionId != null"> | |
368 | + eyePositionId = #{eyePositionId}, | |
369 | + </if> | |
370 | + <if test="eyePositionOther != null"> | |
371 | + eyePositionOther = #{eyePositionOther}, | |
372 | + </if> | |
373 | + <if test="binocularVision != null"> | |
374 | + binocularVision = #{binocularVision}, | |
375 | + </if> | |
376 | + <if test="other != null"> | |
377 | + other = #{other}, | |
378 | + </if> | |
379 | + <if test="lVision != null"> | |
380 | + lVision = #{lVision}, | |
381 | + </if> | |
382 | + <if test="rVision != null"> | |
383 | + rVision = #{rVision}, | |
384 | + </if> | |
385 | + <if test="refractionL1 != null"> | |
386 | + refractionL1 = #{refractionL1}, | |
387 | + </if> | |
388 | + <if test="refractionL2 != null"> | |
389 | + refractionL2 = #{refractionL2}, | |
390 | + </if> | |
391 | + <if test="refractionR1 != null"> | |
392 | + refractionR1 = #{refractionR1}, | |
393 | + </if> | |
394 | + <if test="refractionR2 != null"> | |
395 | + refractionR2 = #{refractionR2}, | |
396 | + </if> | |
397 | + <if test="nystagmus != null"> | |
398 | + nystagmus = #{nystagmus}, | |
399 | + </if> | |
400 | + <if test="fixationCard != null"> | |
401 | + fixationCard = #{fixationCard} | |
402 | + </if> | |
403 | + </set> | |
404 | + </sql> | |
405 | + | |
406 | + <select id="getById" resultMap="babyEyeCheckMap"> | |
407 | + select id,<include refid="columnList" /> from baby_eye_check where id = #{id} | |
408 | + </select> | |
409 | + | |
410 | + <select id="getListByCondition" parameterType="map" resultType="map"> | |
411 | + select id,<include refid="columnList" /> from baby_eye_check | |
412 | + <include refid="columnWhere" /> | |
413 | + <if test="sort != null and sort == true"> | |
414 | + order by id desc | |
415 | + </if> | |
416 | + <if test="currentPage != null and pageSize != null"> | |
417 | + limit #{currentPage},#{pageSize} | |
418 | + </if> | |
419 | + </select> | |
420 | + | |
421 | + <select id="getModelByCondition" parameterType="map" resultMap="babyEyeCheckMap"> | |
422 | + select id,<include refid="columnList" /> from baby_eye_check | |
423 | + <include refid="columnWhere" /> | |
424 | + <if test="sort != null and sort == true"> | |
425 | + order by id desc | |
426 | + </if> | |
427 | + <if test="currentPage != null and pageSize != null"> | |
428 | + limit #{currentPage},#{pageSize} | |
429 | + </if> | |
430 | + </select> | |
431 | + | |
432 | + <select id="getCount" parameterType="map" resultType="integer"> | |
433 | + select count(1) from baby_eye_check | |
434 | + <include refid="columnWhere" /> | |
435 | + </select> | |
436 | + | |
437 | + <insert id="save" parameterType="com.lyms.platform.pojo.BabyEyeCheck"> | |
438 | + insert into baby_eye_check(<include refid="columnList" />) values(#{id},#{created},#{yn},#{operaterId},#{hospitalId},#{babyId},#{pid},#{checkMonthId},#{checkHospital},#{checkTime},#{riskFactor},#{extRightEyelook},#{extRightEyelookOther},#{blinkRightReflex},#{pupillaryRightReflex},#{redRightReflex},#{extLeftEyelook},#{extLeftEyelookOther},#{blinkLefttReflex},#{pupillaryLeftReflex},#{redLeftReflex},#{fundusResult},#{handleOpinionsId},#{guidanceOpinions},#{doctor},#{nextCheckMonthId},#{nextCheckTime},#{extEyelook},#{extEyelookOther},#{redReflex},#{redReflexOther},#{r1},#{r2},#{l1},#{l2},#{optometry},#{conjunctiva},#{conjunctivaOther},#{corneal},#{cornealOther},#{lacrimalApparatus},#{lacrimalApparatusOther},#{eyeMovementsId},#{eyePositionId},#{eyePositionOther},#{binocularVision},#{other},#{lVision},#{rVision},#{refractionL1},#{refractionL2},#{refractionR1},#{refractionR2},#{nystagmus},#{fixationCard}) | |
439 | + </insert> | |
440 | + | |
441 | + <delete id="deleteById" parameterType="String"> | |
442 | + update baby_eye_check | |
443 | + set yn = 0 | |
444 | + where id = #{id} | |
445 | + </delete> | |
446 | + | |
447 | + <delete id="deleteByIds" parameterType="list"> | |
448 | + delete from baby_eye_check where id in | |
449 | + <foreach collection="list" open="(" close=")" separator="," item="id"> | |
450 | + #{id} | |
451 | + </foreach> | |
452 | + </delete> | |
453 | + | |
454 | + <update id="update" parameterType="com.lyms.platform.pojo.BabyEyeCheck"> | |
455 | + update baby_eye_check | |
456 | + <include refid="columnUpdate" /> | |
457 | + where id = #{id} | |
458 | + </update> | |
459 | +</mapper> |
platform-dal/src/main/java/com/lyms/platform/pojo/BabyEyeCheck.java
View file @
d523ed9
... | ... | @@ -46,6 +46,10 @@ |
46 | 46 | * 眼病高危因素 |
47 | 47 | */ |
48 | 48 | private List<String> riskFactorId; |
49 | + /** | |
50 | + * 用于存储mysql 转义 | |
51 | + */ | |
52 | + private String riskFactor; | |
49 | 53 | |
50 | 54 | /**================ 检查结果(左/右眼) ================*/ |
51 | 55 | /**============== 右眼 ===============*/ |
... | ... | @@ -215,6 +219,14 @@ |
215 | 219 | * 选择性注视卡检查 |
216 | 220 | */ |
217 | 221 | private String fixationCard; |
222 | + | |
223 | + public String getRiskFactor() { | |
224 | + return riskFactor; | |
225 | + } | |
226 | + | |
227 | + public void setRiskFactor(String riskFactor) { | |
228 | + this.riskFactor = riskFactor; | |
229 | + } | |
218 | 230 | |
219 | 231 | public String getExtLeftEyelookOther() { |
220 | 232 | return extLeftEyelookOther; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyEyeCheckController.java
View file @
d523ed9
... | ... | @@ -89,5 +89,11 @@ |
89 | 89 | return babyEyeCheckService.list(getUserId(request), startDate, endDate, doctor, key, currentMonth, chechMonth, positive, page, limit); |
90 | 90 | } |
91 | 91 | |
92 | + @ResponseBody | |
93 | + @RequestMapping(value = "/list/init", method = RequestMethod.GET) | |
94 | + public BaseResponse listInit() { | |
95 | + return babyEyeCheckService.listInit(); | |
96 | + } | |
97 | + | |
92 | 98 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/BabyEyeCheckService.java
View file @
d523ed9
... | ... | @@ -23,5 +23,7 @@ |
23 | 23 | BaseResponse list(Integer userId, Date startDate, Date endDate, String doctor, String key, String currentMonth, String chechMonth, boolean positive, Integer page, Integer limit); |
24 | 24 | |
25 | 25 | BaseResponse query(Integer userId, String babyId); |
26 | + | |
27 | + BaseResponse listInit(); | |
26 | 28 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEyeCheckServiceImpl.java
View file @
d523ed9
... | ... | @@ -80,10 +80,20 @@ |
80 | 80 | babyEyeCheck.setPid(babyModel.getPid()); |
81 | 81 | } |
82 | 82 | mongoTemplate.save(babyEyeCheck); |
83 | + if(CollectionUtils.isNotEmpty(babyEyeCheck.getRiskFactorId())) { | |
84 | + String riskFactor = org.apache.commons.lang3.StringUtils.join(babyEyeCheck.getRiskFactorId().toArray(), ","); | |
85 | + babyEyeCheck.setRiskFactor(riskFactor); | |
86 | + } | |
87 | + babyEyeCheckMapper.save(babyEyeCheck); | |
83 | 88 | } else { |
84 | 89 | babyEyeCheck.setOperaterId(userId.toString()); |
85 | 90 | Update update = MongoConvertHelper.convertToNativeUpdate(ReflectionUtils.getUpdateField(babyEyeCheck)); |
86 | 91 | mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(babyEyeCheck.getId())), update, BabyEyeCheck.class); |
92 | + if(CollectionUtils.isNotEmpty(babyEyeCheck.getRiskFactorId())) { | |
93 | + String riskFactor = org.apache.commons.lang3.StringUtils.join(babyEyeCheck.getRiskFactorId().toArray(), ","); | |
94 | + babyEyeCheck.setRiskFactor(riskFactor); | |
95 | + } | |
96 | + babyEyeCheckMapper.update(babyEyeCheck); | |
87 | 97 | } |
88 | 98 | return RespBuilder.buildSuccess(babyEyeCheck.getId()); |
89 | 99 | } |
... | ... | @@ -173,6 +183,7 @@ |
173 | 183 | @Override |
174 | 184 | public BaseResponse delete(String id) { |
175 | 185 | mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(id)), Update.update("yn", "0"), BabyEyeCheck.class); |
186 | + babyEyeCheckMapper.deleteById(id); | |
176 | 187 | return RespBuilder.buildSuccess(); |
177 | 188 | } |
178 | 189 | |
... | ... | @@ -286,6 +297,74 @@ |
286 | 297 | rest.add(temp); |
287 | 298 | } |
288 | 299 | return RespBuilder.buildSuccess(rest); |
300 | + } | |
301 | + | |
302 | + @Override | |
303 | + public BaseResponse listInit() { | |
304 | + List<Map<String, Object>> checkMonth = EnumUtil.toJson(CheckMonthEnums.class); /** 检查月龄 */ | |
305 | + List<Map<String, Object>> positive = new ArrayList<>(); /** 阳性项目 */ | |
306 | + | |
307 | + Map<String, Object> extRightEyelookMap = new HashMap<>(); | |
308 | + extRightEyelookMap.put("id", "extRightEyelook"); | |
309 | + extRightEyelookMap.put("name", "外眼观察(右)"); | |
310 | + positive.add(extRightEyelookMap); | |
311 | + | |
312 | + Map<String, Object> extLeftEyelookMap = new HashMap<>(); | |
313 | + extLeftEyelookMap.put("id", "extLeftEyelook"); | |
314 | + extLeftEyelookMap.put("name", "外眼观察(左)"); | |
315 | + positive.add(extLeftEyelookMap); | |
316 | + | |
317 | + Map<String, Object> blinkRightReflexMap = new HashMap<>(); | |
318 | + blinkRightReflexMap.put("id", "blinkRightReflex"); | |
319 | + blinkRightReflexMap.put("name", "瞬目反射(右)"); | |
320 | + positive.add(blinkRightReflexMap); | |
321 | + | |
322 | + Map<String, Object> blinkLefttReflexapMap = new HashMap<>(); | |
323 | + blinkLefttReflexapMap.put("id", "blinkLefttReflex"); | |
324 | + blinkLefttReflexapMap.put("name", "瞬目反射(左)"); | |
325 | + positive.add(blinkLefttReflexapMap); | |
326 | + | |
327 | + Map<String, Object> pupillaryRightReflexMap = new HashMap<>(); | |
328 | + pupillaryRightReflexMap.put("id", "pupillaryRightReflex"); | |
329 | + pupillaryRightReflexMap.put("name", "瞳孔对光反射(右)"); | |
330 | + positive.add(pupillaryRightReflexMap); | |
331 | + | |
332 | + Map<String, Object> pupillaryLeftReflexMap = new HashMap<>(); | |
333 | + pupillaryLeftReflexMap.put("id", "pupillaryLeftReflex"); | |
334 | + pupillaryLeftReflexMap.put("name", "瞳孔对光反射(左)"); | |
335 | + positive.add(pupillaryLeftReflexMap); | |
336 | + | |
337 | + Map<String, Object> redRightReflexMap = new HashMap<>(); | |
338 | + redRightReflexMap.put("id", "redRightReflex"); | |
339 | + redRightReflexMap.put("name", "瞳孔红光反射(右)"); | |
340 | + positive.add(redRightReflexMap); | |
341 | + | |
342 | + Map<String, Object> redLeftReflexMap = new HashMap<>(); | |
343 | + redLeftReflexMap.put("id", "redLeftReflex"); | |
344 | + redLeftReflexMap.put("name", "瞳孔红光反射(左)"); | |
345 | + positive.add(redLeftReflexMap); | |
346 | + | |
347 | + Map<String, Object> redReflexMap = new HashMap<>(); | |
348 | + redReflexMap.put("id", "redReflex"); | |
349 | + redReflexMap.put("name", "红光反射"); | |
350 | + positive.add(redReflexMap); | |
351 | + | |
352 | + Map<String, Object> conjunctivaMap = new HashMap<>(); | |
353 | + conjunctivaMap.put("id", "conjunctiva"); | |
354 | + conjunctivaMap.put("name", "结膜"); | |
355 | + positive.add(conjunctivaMap); | |
356 | + | |
357 | + Map<String, Object> cornealMap = new HashMap<>(); | |
358 | + cornealMap.put("id", "corneal"); | |
359 | + cornealMap.put("name", "角膜"); | |
360 | + positive.add(cornealMap); | |
361 | + | |
362 | + Map<String, Object> lacrimalApparatusMap = new HashMap<>(); | |
363 | + lacrimalApparatusMap.put("id", "lacrimalApparatus"); | |
364 | + lacrimalApparatusMap.put("name", "泪器"); | |
365 | + positive.add(lacrimalApparatusMap); | |
366 | + | |
367 | + return RespBuilder.buildSuccess("checkMonth", checkMonth, "positive", positive); | |
289 | 368 | } |
290 | 369 | } |