Commit 16451380fbf74c024a70bf0fe52695bd62c22f97
1 parent
97f37c61aa
Exists in
dev
#fix:优化儿保小程序通知公告管理模块
Showing 5 changed files with 60 additions and 15 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/FeedbackService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java
- platform-dal/src/main/java/com/lyms/platform/query/FeedbackQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FeedbackFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/FeedbackService.java
View file @
1645138
| ... | ... | @@ -29,6 +29,7 @@ |
| 29 | 29 | msgQuery.mysqlBuild(feedbackDao.queryListCount(msgQuery.convertToQuery())); |
| 30 | 30 | query.start(msgQuery.getOffset()).end(msgQuery.getLimit()); |
| 31 | 31 | } |
| 32 | + //System.out.println(query.convertToMongoQuery().toString()); | |
| 32 | 33 | return feedbackDao.queryList(query.addOrder(Sort.Direction.DESC, "id")); |
| 33 | 34 | } |
| 34 | 35 |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java
View file @
1645138
| ... | ... | @@ -427,6 +427,9 @@ |
| 427 | 427 | patients.setTp(params.get("TP-抗体")); |
| 428 | 428 | } |
| 429 | 429 | if (p){ |
| 430 | + /* if (StringUtils.isNotEmpty(applyDoctor)&&canConvertToInt(applyDoctor)){ | |
| 431 | + patients.setLastCheckEmployeeId(applyDoctor); | |
| 432 | + }*/ | |
| 430 | 433 | patientsService.updatePatientOne(patients,patients.getId()); |
| 431 | 434 | } |
| 432 | 435 | } else { |
| ... | ... | @@ -556,6 +559,9 @@ |
| 556 | 559 | patients.setTp(params.get("TP-抗体")); |
| 557 | 560 | } |
| 558 | 561 | if (p){ |
| 562 | + /* if (StringUtils.isNotEmpty(applyDoctor)&&canConvertToInt(applyDoctor)){ | |
| 563 | + patients.setLastCheckEmployeeId(applyDoctor); | |
| 564 | + }*/ | |
| 559 | 565 | patientsService.updatePatientOne(patients,patients.getId()); |
| 560 | 566 | } |
| 561 | 567 | |
| 562 | 568 | |
| ... | ... | @@ -565,8 +571,18 @@ |
| 565 | 571 | } |
| 566 | 572 | |
| 567 | 573 | } |
| 574 | + public static boolean canConvertToInt(String str) { | |
| 575 | + if (str == null || str.isEmpty()) { | |
| 576 | + return false; // 空字符串或null不能转换 | |
| 577 | + } | |
| 578 | + try { | |
| 579 | + Integer.parseInt(str); | |
| 580 | + return true; // 转换成功 | |
| 581 | + } catch (NumberFormatException e) { | |
| 582 | + return false; // 转换失败,抛出异常 | |
| 583 | + } | |
| 584 | + } | |
| 568 | 585 | |
| 569 | - | |
| 570 | 586 | @Autowired |
| 571 | 587 | private AntenatalExaminationService antenatalExaminationService; |
| 572 | 588 | @Autowired |
| ... | ... | @@ -576,6 +592,19 @@ |
| 576 | 592 | |
| 577 | 593 | public void addAntenatalExamination(AntenatalExaminationModel antenatalExaminationModel, AntExChuModel antExChuModel, Patients patients,String applyDoctor) { |
| 578 | 594 | if (antenatalExaminationModel.getId() != null) { |
| 595 | + if (StringUtils.isEmpty(applyDoctor)){ | |
| 596 | + UsersQuery usersQuery=new UsersQuery(); | |
| 597 | + usersQuery.setYn(1); | |
| 598 | + usersQuery.setName(applyDoctor); | |
| 599 | + List<Users> usersList= usersService.queryUsers(usersQuery); | |
| 600 | + if (CollectionUtils.isNotEmpty(usersList)){ | |
| 601 | + applyDoctor=String.valueOf(usersList.get(0).getId()); | |
| 602 | + antenatalExaminationModel.setCheckDoctor(applyDoctor); | |
| 603 | + }else { | |
| 604 | + applyDoctor=String.valueOf(antExChuModel.getProdDoctor()); | |
| 605 | + antenatalExaminationModel.setCheckDoctor(applyDoctor); | |
| 606 | + } | |
| 607 | + } | |
| 579 | 608 | antenatalExaminationModel.setCheckDate(new Date()); |
| 580 | 609 | antenatalExaminationService.updateOneAnt(antenatalExaminationModel, antenatalExaminationModel.getId()); |
| 581 | 610 | } else { |
platform-dal/src/main/java/com/lyms/platform/query/FeedbackQuery.java
View file @
1645138
| ... | ... | @@ -121,10 +121,10 @@ |
| 121 | 121 | if (type!=null){ |
| 122 | 122 | condition = condition.and("type", type, MongoOper.IS); |
| 123 | 123 | } |
| 124 | - if (publishId!=null){ | |
| 124 | + if (StringUtils.isNotEmpty(publishId)){ | |
| 125 | 125 | condition = condition.and("publishId", publishId, MongoOper.IS); |
| 126 | 126 | } |
| 127 | - if (publishName!=null){ | |
| 127 | + if (StringUtils.isNotEmpty(publishName)){ | |
| 128 | 128 | condition = condition.and("publishName", publishName, MongoOper.IS); |
| 129 | 129 | } |
| 130 | 130 | Criteria c1 = null; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/FeedbackFacade.java
View file @
1645138
| ... | ... | @@ -57,6 +57,7 @@ |
| 57 | 57 | feedbackQuery.setPage(page); |
| 58 | 58 | feedbackQuery.setLimit(limit); |
| 59 | 59 | feedbackQuery.setPublishId(babyId); |
| 60 | + feedbackQuery.setYn(1); | |
| 60 | 61 | List<BabyFeedbackModel> list= feedbackService.queryList(feedbackQuery); |
| 61 | 62 | BaseListResponse objectResponse = new BaseListResponse(); |
| 62 | 63 | objectResponse.setData(list); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
1645138
| ... | ... | @@ -3133,7 +3133,17 @@ |
| 3133 | 3133 | } |
| 3134 | 3134 | return ""; |
| 3135 | 3135 | } |
| 3136 | - | |
| 3136 | + public static boolean canConvertToInt(String str) { | |
| 3137 | + if (str == null || str.isEmpty()) { | |
| 3138 | + return false; // 空字符串或null不能转换 | |
| 3139 | + } | |
| 3140 | + try { | |
| 3141 | + Integer.parseInt(str); | |
| 3142 | + return true; // 转换成功 | |
| 3143 | + } catch (NumberFormatException e) { | |
| 3144 | + return false; // 转换失败,抛出异常 | |
| 3145 | + } | |
| 3146 | + } | |
| 3137 | 3147 | /** |
| 3138 | 3148 | * 复诊查询 |
| 3139 | 3149 | * |
| 3140 | 3150 | |
| ... | ... | @@ -3293,18 +3303,22 @@ |
| 3293 | 3303 | String teamName=""; |
| 3294 | 3304 | |
| 3295 | 3305 | if (org.apache.commons.lang.StringUtils.isNotEmpty(data.getCheckDoctor())) { |
| 3296 | - Users users = usersService.getUsers(Integer.parseInt(data.getCheckDoctor())); | |
| 3297 | - if (users != null && users.getYn() == YnEnums.YES.getId()) { | |
| 3298 | - checkDoctor = users.getName(); | |
| 3299 | - } | |
| 3300 | 3306 | |
| 3301 | - //医生所在团队 | |
| 3302 | - if(StringUtils.isNotEmpty(data.getTeamId())){ | |
| 3303 | - DoctorTeam doctorTeam=new DoctorTeam(); | |
| 3304 | - doctorTeam.setId(Integer.parseInt(data.getTeamId())); | |
| 3305 | - FrontEndResult frontEndResult=teamService.queryListDoctorTeam(doctorTeam); | |
| 3306 | - if(null!=frontEndResult.getData()){ | |
| 3307 | - teamName=((DoctorTeam)(frontEndResult.getData().get(0))).getTeamName(); | |
| 3307 | + boolean b=canConvertToInt(data.getCheckDoctor()); | |
| 3308 | + if (b){ | |
| 3309 | + Users users = usersService.getUsers(Integer.parseInt(data.getCheckDoctor())); | |
| 3310 | + if (users != null && users.getYn() == YnEnums.YES.getId()) { | |
| 3311 | + checkDoctor = users.getName(); | |
| 3312 | + } | |
| 3313 | + | |
| 3314 | + //医生所在团队 | |
| 3315 | + if(StringUtils.isNotEmpty(data.getTeamId())){ | |
| 3316 | + DoctorTeam doctorTeam=new DoctorTeam(); | |
| 3317 | + doctorTeam.setId(Integer.parseInt(data.getTeamId())); | |
| 3318 | + FrontEndResult frontEndResult=teamService.queryListDoctorTeam(doctorTeam); | |
| 3319 | + if(null!=frontEndResult.getData()){ | |
| 3320 | + teamName=((DoctorTeam)(frontEndResult.getData().get(0))).getTeamName(); | |
| 3321 | + } | |
| 3308 | 3322 | } |
| 3309 | 3323 | } |
| 3310 | 3324 | } |