Commit 5d5c2d0041099249a2bae8cd82cc9c46b5ad8da0
1 parent
4789809936
Exists in
master
and in
6 other branches
听力诊断模块
Showing 10 changed files with 237 additions and 27 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/BabyPatientExtendEarScreenMapper.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/BabyPatientExtendEarScreenServiceImpl.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/Test.java
- 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/facade/BabyEarFacade.java
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/BabyPatientExtendEarScreenMapper.java
View file @
5d5c2d0
... | ... | @@ -25,5 +25,6 @@ |
25 | 25 | public List<BabyPatientExtendEarScreen> dubiousScreen(BabyPatientExtendEarScreenQuery screenQuery); |
26 | 26 | |
27 | 27 | List<BabyPatientExtendEarScreen> queryEarScreenList(BabyPatientExtendEarScreenQuery screenQuery); |
28 | + int queryEarScreenListCount(BabyPatientExtendEarScreenQuery screenQuery); | |
28 | 29 | } |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/BabyPatientExtendEarScreenServiceImpl.java
View file @
5d5c2d0
... | ... | @@ -60,6 +60,9 @@ |
60 | 60 | |
61 | 61 | @Override |
62 | 62 | public List<BabyPatientExtendEarScreen> queryEarScreenList(BabyPatientExtendEarScreenQuery screenQuery) { |
63 | + if (screenQuery.getNeed() != null) { | |
64 | + screenQuery.mysqlBuild(babyPatientExtendEarScreenMapper.queryEarScreenListCount(screenQuery)); | |
65 | + } | |
63 | 66 | return babyPatientExtendEarScreenMapper.queryEarScreenList(screenQuery); |
64 | 67 | } |
65 | 68 |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarBaby.xml
View file @
5d5c2d0
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarFollowUp.xml
View file @
5d5c2d0
... | ... | @@ -149,7 +149,7 @@ |
149 | 149 | |
150 | 150 | <sql id="orderAndLimit"> |
151 | 151 | <if test="sort != null and sort != '' "> |
152 | - order by ${sort} | |
152 | + order by ${sort} desc | |
153 | 153 | <if test="need != null"> |
154 | 154 | limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} |
155 | 155 | </if> |
... | ... | @@ -309,7 +309,7 @@ |
309 | 309 | </foreach> |
310 | 310 | </if> |
311 | 311 | and ifdel = 0 |
312 | - order by follow_time | |
312 | + order by follow_time desc | |
313 | 313 | </where> |
314 | 314 | </select> |
315 | 315 | </mapper> |
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarHearingDiagnose.xml
View file @
5d5c2d0
platform-biz-service/src/main/resources/mainOrm/master/BabyPatientExtendEarScreen.xml
View file @
5d5c2d0
... | ... | @@ -169,7 +169,7 @@ |
169 | 169 | |
170 | 170 | <sql id="orderAndLimit"> |
171 | 171 | <if test="sort != null and sort != '' "> |
172 | - order by ${sort} | |
172 | + order by ${sort} desc | |
173 | 173 | <if test="need != null"> |
174 | 174 | limit #{offset, jdbcType=INTEGER} , #{limit, jdbcType=INTEGER} |
175 | 175 | </if> |
... | ... | @@ -307,6 +307,161 @@ |
307 | 307 | select |
308 | 308 | 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,scr_ispass,pid |
309 | 309 | from baby_patient_extend_ear_screen |
310 | + <where> | |
311 | + status = 0 | |
312 | + <if test="srcStartTime!=null"> | |
313 | + AND | |
314 | + <![CDATA[ | |
315 | + DATEDIFF(#{srcStartTime},screen_date) <=0 | |
316 | + ]]> | |
317 | + </if> | |
318 | + <if test="srcEndTime!=null"> | |
319 | + and | |
320 | + <![CDATA[ | |
321 | + DATEDIFF(#{srcEndTime},screen_date) >=0 | |
322 | + ]]> | |
323 | + </if> | |
324 | + | |
325 | + <if test="screenType!=null and screenType >=0"> | |
326 | + and screen_type = #{screenType} | |
327 | + </if> | |
328 | + | |
329 | + <if test="checkDoctorId!=null and checkDoctorId != ''"> | |
330 | + and check_doctor_id = #{checkDoctorId} | |
331 | + </if> | |
332 | + <if test="pid!=null and pid != ''"> | |
333 | + and pid = #{pid} | |
334 | + </if> | |
335 | + | |
336 | + <if test="checkHospitalIds != null "> | |
337 | + and check_hospital_id in | |
338 | + <foreach item="item" index="index" collection="checkHospitalIds" open="(" separator="," close=")"> | |
339 | + #{item} | |
340 | + </foreach> | |
341 | + </if> | |
342 | + <if test="checkHospitalId != null and checkHospitalId != ''"> | |
343 | + and check_hospital_id = #{checkHospitalId,jdbcType=VARCHAR} | |
344 | + </if> | |
345 | + | |
346 | + <if test="babyIds!=null"> | |
347 | + and baby_id in ( | |
348 | + <foreach item="babyId" collection="babyIds" separator=","> | |
349 | + #{babyId} | |
350 | + </foreach> | |
351 | + ) | |
352 | + </if> | |
353 | + | |
354 | + <if test="scrIspass != null and srcSkill==null and leftRight == null"> | |
355 | + and scr_ispass = #{scrIspass,jdbcType=INTEGER} | |
356 | + </if> | |
357 | + <if test="srcSkill != null and srcSkill == 1"> | |
358 | + <if test="scrIspass != null and scrIspass ==1"> | |
359 | + and( | |
360 | + oae_left =1 | |
361 | + and oae_right = 1 | |
362 | + ) | |
363 | + </if> | |
364 | + <if test="scrIspass != null and scrIspass ==2"> | |
365 | + and( | |
366 | + oae_left =-1 | |
367 | + and oae_right = -1 | |
368 | + ) | |
369 | + </if> | |
370 | + <if test="scrIspass == null"> | |
371 | + and( | |
372 | + oae_left is not null | |
373 | + or oae_right is not null | |
374 | + ) | |
375 | + </if> | |
376 | + </if> | |
377 | + <if test="srcSkill != null and srcSkill == 2"> | |
378 | + <if test="scrIspass != null and scrIspass ==1"> | |
379 | + and( | |
380 | + aabr_left =1 | |
381 | + and aabr_right = 1 | |
382 | + ) | |
383 | + </if> | |
384 | + <if test="scrIspass != null and scrIspass ==2"> | |
385 | + and( | |
386 | + aabr_left =-1 | |
387 | + and aabr_right = -1 | |
388 | + ) | |
389 | + </if> | |
390 | + <if test="scrIspass == null"> | |
391 | + and( | |
392 | + aabr_left is not null | |
393 | + or aabr_right is not null | |
394 | + ) | |
395 | + </if> | |
396 | + | |
397 | + </if> | |
398 | + | |
399 | + <if test="leftRight!= null and leftRight == 1"> | |
400 | + <if test="scrIspass != null and scrIspass ==1"> | |
401 | + and( | |
402 | + oae_left =1 | |
403 | + and aabr_left = 1 | |
404 | + ) | |
405 | + </if> | |
406 | + <if test="scrIspass != null and scrIspass ==2"> | |
407 | + and( | |
408 | + oae_left =-1 | |
409 | + and aabr_left = -1 | |
410 | + ) | |
411 | + </if> | |
412 | + <if test="scrIspass == null"> | |
413 | + and( | |
414 | + oae_left is not null | |
415 | + or aabr_left is not null | |
416 | + ) | |
417 | + </if> | |
418 | + </if> | |
419 | + | |
420 | + <if test="leftRight!= null and leftRight == 2"> | |
421 | + <if test="scrIspass != null and scrIspass ==1"> | |
422 | + and( | |
423 | + oae_right =1 | |
424 | + and aabr_right = 1 | |
425 | + ) | |
426 | + </if> | |
427 | + <if test="scrIspass != null and scrIspass ==2"> | |
428 | + and( | |
429 | + oae_right =-1 | |
430 | + and aabr_right = -1 | |
431 | + ) | |
432 | + </if> | |
433 | + <if test="scrIspass == null"> | |
434 | + and( | |
435 | + oae_right is not null | |
436 | + or aabr_right is not null | |
437 | + ) | |
438 | + </if> | |
439 | + | |
440 | + </if> | |
441 | + | |
442 | + <if test="nextStartTime!=null"> | |
443 | + AND | |
444 | + <![CDATA[ | |
445 | + DATEDIFF(#{nextStartTime},next_check_time) <=0 | |
446 | + ]]> | |
447 | + </if> | |
448 | + <if test="nextEndTime!=null"> | |
449 | + and | |
450 | + <![CDATA[ | |
451 | + DATEDIFF(#{nextEndTime},next_check_time) >=0 | |
452 | + ]]> | |
453 | + </if> | |
454 | + <if test="status != null and status >= 0"> | |
455 | + and status = #{status,jdbcType=INTEGER} | |
456 | + </if> | |
457 | + </where> | |
458 | + <include refid="orderAndLimit"/> | |
459 | + </select> | |
460 | + | |
461 | + | |
462 | + <select id="queryEarScreenListCount" resultType="int" | |
463 | + parameterType="com.lyms.platform.permission.model.BabyPatientExtendEarScreenQuery"> | |
464 | + select count(1) from baby_patient_extend_ear_screen | |
310 | 465 | <where> |
311 | 466 | status = 0 |
312 | 467 | <if test="srcStartTime!=null"> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/Test.java
View file @
5d5c2d0
1 | 1 | package com.lyms.platform.operate.web; |
2 | 2 | |
3 | -import com.aspose.words.Document; | |
4 | -import com.aspose.words.License; | |
3 | +import net.sourceforge.pinyin4j.PinyinHelper; | |
5 | 4 | import org.apache.log4j.Logger; |
6 | -import org.apache.log4j.PropertyConfigurator; | |
7 | 5 | |
8 | -import java.io.File; | |
9 | -import java.io.InputStream; | |
10 | -import java.net.URL; | |
11 | -import java.text.DecimalFormat; | |
6 | +import java.util.*; | |
12 | 7 | |
13 | 8 | /** |
14 | 9 | * Created by Administrator on 2016/8/22 0022. |
... | ... | @@ -18,6 +13,53 @@ |
18 | 13 | private static org.apache.log4j.Logger log = Logger.getLogger("HTTP-INVOKE"); |
19 | 14 | |
20 | 15 | public static void main(String[] args) throws Exception{ |
16 | + String[] arr={ "王二六","张三", "李四", "王五","赵六", "JAVA", "123","怡情"}; | |
17 | + List<String> names = new ArrayList<>(); | |
18 | + names.add("张明"); | |
19 | + names.add("叶山"); | |
20 | + names.add("静香"); | |
21 | + names.add("恺呢"); | |
22 | + names.add("黄渤"); | |
23 | + names.add("李全域"); | |
24 | + names.add("向恒刚"); | |
25 | + names.add("阿明"); | |
26 | + names.add("落叶"); | |
27 | + names.add("王平"); | |
28 | + Arrays.sort(arr,new ComparatorPinYin()); | |
29 | + for (String string : arr) { | |
30 | + // System.out.println(string); | |
31 | + } | |
32 | + Collections.sort(names,new ComparatorPinYin()); | |
33 | + for (String string : names) { | |
34 | + System.out.println(string); | |
35 | + } | |
36 | + } | |
37 | + /** | |
38 | + * 功能:实现汉语拼音序比较 | |
39 | + * | |
40 | + */ | |
41 | + static class ComparatorPinYin implements Comparator<String> { | |
42 | + @Override | |
43 | + public int compare(String o1, String o2) { | |
44 | + return ToPinYinString(o1).compareTo(ToPinYinString(o2)); | |
45 | + } | |
46 | + | |
47 | + private String ToPinYinString(String str){ | |
48 | + | |
49 | + StringBuilder sb=new StringBuilder(); | |
50 | + String[] arr=null; | |
51 | + | |
52 | + for(int i=0;i<str.length();i++){ | |
53 | + arr= PinyinHelper.toHanyuPinyinStringArray(str.charAt(i)); | |
54 | + if(arr!=null && arr.length>0){ | |
55 | + for (String string : arr) { | |
56 | + sb.append(string); | |
57 | + } | |
58 | + } | |
59 | + } | |
60 | + | |
61 | + return sb.toString(); | |
62 | + } | |
21 | 63 | } |
22 | 64 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FollowUpController.java
View file @
5d5c2d0
... | ... | @@ -353,9 +353,9 @@ |
353 | 353 | query.setHospitalId(hospitalId); |
354 | 354 | //分页信息 |
355 | 355 | query.setNeed("1"); |
356 | - query.setSort("create_time"); | |
356 | + query.setSort("follow_time"); | |
357 | 357 | query.setLimit(fur.getLimit()); |
358 | - query.setPage(fur.getPage()); | |
358 | + query.setOffset((fur.getPage()-1)*fur.getLimit()); | |
359 | 359 | if (CollectionUtils.isNotEmpty(pids)) { |
360 | 360 | query.setPids((String[]) pids.toArray(new String[pids.size()])); |
361 | 361 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/HearDiagnManageController.java
View file @
5d5c2d0
... | ... | @@ -429,6 +429,9 @@ |
429 | 429 | } |
430 | 430 | query.setSort("diagnose_time"); |
431 | 431 | query.setNeed("1"); |
432 | + query.setLimit(hdReq.getLimit()); | |
433 | + query.setOffset((hdReq.getPage()-1)*hdReq.getLimit()); | |
434 | + | |
432 | 435 | List<BabyPatientExtendEarHearingDiagnose> hearingDiagnoseList = hearingDiagnoseService.getHdAndScreen(query); |
433 | 436 | |
434 | 437 | List<HearingDiagnoseListResult> hdList = new ArrayList<>(); |
435 | 438 | |
... | ... | @@ -500,12 +503,12 @@ |
500 | 503 | } |
501 | 504 | BaseListResponse result = new BaseListResponse(); |
502 | 505 | result.setData(hdList); |
503 | - PageInfo pageInfo = new PageInfo(); | |
504 | - pageInfo.setLimit(hdReq.getLimit()); | |
505 | - pageInfo.setPage(hdReq.getPage()); | |
506 | - pageInfo.setCount(query.getCount()); | |
506 | + // PageInfo pageInfo = new PageInfo(); | |
507 | + // pageInfo.setLimit(hdReq.getLimit()); | |
508 | + // pageInfo.setPage(hdReq.getPage()); | |
509 | + // pageInfo.setCount(query.getCount()); | |
507 | 510 | |
508 | - result.setPageInfo(pageInfo); | |
511 | + result.setPageInfo(query.getPageInfo()); | |
509 | 512 | return result; |
510 | 513 | } |
511 | 514 | |
... | ... | @@ -1141,7 +1144,9 @@ |
1141 | 1144 | |
1142 | 1145 | babyQuery.setHospitalId(hospitalId); |
1143 | 1146 | babyQuery.setNoEnable("0"); |
1144 | - | |
1147 | + babyQuery.setNeed("y"); | |
1148 | + babyQuery.setOffset((model.getPage()-1)*model.getLimit()); | |
1149 | + babyQuery.setLimit(model.getLimit()); | |
1145 | 1150 | List<String> babyIds = new ArrayList<>(); |
1146 | 1151 | |
1147 | 1152 | //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id |
... | ... | @@ -1209,6 +1214,7 @@ |
1209 | 1214 | hdm.setMonthAge(DateUtil.getBabyMonthAge(ear.getBirth(), new Date())); |
1210 | 1215 | hdm.setBirthday(com.lyms.platform.common.utils.StringUtils.emptyDeal(DateUtil.getyyyy_MM_dd(ear.getBirth()))); |
1211 | 1216 | hdm.setSex(com.lyms.platform.common.utils.StringUtils.emptyDeal(SexEnum.getTextById(ear.getSex()))); |
1217 | + | |
1212 | 1218 | BabyPatientExtendEarScreen es = screenMap.get(ear.getBabyPatientId()); |
1213 | 1219 | |
1214 | 1220 | if (es == null) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyEarFacade.java
View file @
5d5c2d0
... | ... | @@ -6,7 +6,6 @@ |
6 | 6 | import com.lyms.platform.biz.service.BasicConfigService; |
7 | 7 | import com.lyms.platform.biz.service.PersonService; |
8 | 8 | import com.lyms.platform.common.base.IBasicRequestConvert; |
9 | -import com.lyms.platform.common.base.PageInfo; | |
10 | 9 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
11 | 10 | import com.lyms.platform.common.enums.*; |
12 | 11 | import com.lyms.platform.common.result.BaseListResponse; |
... | ... | @@ -1813,6 +1812,10 @@ |
1813 | 1812 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
1814 | 1813 | screenQuery.setCheckHospitalId(hospitalId); |
1815 | 1814 | screenQuery.setStatus(0); |
1815 | + screenQuery.setSort("screen_date"); | |
1816 | + screenQuery.setNeed("y"); | |
1817 | + screenQuery.setOffset((earScreenListRequest.getPage()-1)*earScreenListRequest.getLimit()); | |
1818 | + screenQuery.setLimit(earScreenListRequest.getLimit()); | |
1816 | 1819 | |
1817 | 1820 | //如果查询号不为空,根据查询号查询儿童档案表,获取儿童档案Id |
1818 | 1821 | if (StringUtils.isNotEmpty(earScreenListRequest.getKeyWord()) || earScreenListRequest.getBirthStartTime() != null || earScreenListRequest.getBirthEndTime() != null) {//关键字:姓名、联系方式、就诊卡 查询babyId |
... | ... | @@ -1885,12 +1888,12 @@ |
1885 | 1888 | BaseListResponse baseResponse = new BaseListResponse(); |
1886 | 1889 | baseResponse.setObject(earScreenResults); |
1887 | 1890 | baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
1888 | - PageInfo pageInfo = new PageInfo(); | |
1889 | - pageInfo.setCount(earScreenResults.size()); | |
1890 | - pageInfo.setLimit(earScreenListRequest.getLimit()); | |
1891 | - pageInfo.setPage(earScreenListRequest.getPage()); | |
1892 | - pageInfo.setSize(earScreenResults.size()); | |
1893 | - baseResponse.setPageInfo(pageInfo); | |
1891 | + // PageInfo pageInfo = new PageInfo(); | |
1892 | + // pageInfo.setCount(earScreenResults.size()); | |
1893 | + // pageInfo.setLimit(earScreenListRequest.getLimit()); | |
1894 | + // pageInfo.setPage(earScreenListRequest.getPage()); | |
1895 | + // pageInfo.setSize(earScreenResults.size()); | |
1896 | + baseResponse.setPageInfo(screenQuery.getPageInfo()); | |
1894 | 1897 | baseResponse.setErrormsg("成功"); |
1895 | 1898 | return baseResponse; |
1896 | 1899 | } |