Commit 8c94b5292ab0079ca1b5ec19bbba830aab7024bc
1 parent
3bed6f556d
Exists in
dev
#fix:优化科室建档统计导出逻辑及新建档比率计算逻辑
Showing 3 changed files with 165 additions and 151 deletions
platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java
View file @
8c94b52
| ... | ... | @@ -14,6 +14,7 @@ |
| 14 | 14 | import jxl.write.*; |
| 15 | 15 | import jxl.write.Number; |
| 16 | 16 | import jxl.write.biff.RowsExceededException; |
| 17 | +import org.apache.commons.collections.CollectionUtils; | |
| 17 | 18 | import org.apache.poi.ss.usermodel.CellStyle; |
| 18 | 19 | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| 19 | 20 | import org.apache.poi.ss.usermodel.Row; |
| 20 | 21 | |
| ... | ... | @@ -229,34 +230,35 @@ |
| 229 | 230 | } |
| 230 | 231 | |
| 231 | 232 | |
| 232 | - for (int t = 0, len = dataList.size(); t < len; t++){ | |
| 233 | - map=dataList.get(t); | |
| 234 | - ws.addCell(new Label(7, s+1+t, String.valueOf(map.get("doctor")))); | |
| 235 | - ws.addCell(new Label(8, s+1+t, String.valueOf(map.get("appointmentNum")!=null?map.get("appointmentNum"):0))); | |
| 236 | - ws.addCell(new Label(9, s+1+t, String.valueOf(map.get("buildNum")!=null?map.get("buildNum"):0))); | |
| 237 | - ws.addCell(new Label(10, s+1+t, String.valueOf(map.get("newBuildNum")!=null?map.get("newBuildNum"):0))); | |
| 238 | - ws.addCell(new Label(11, s+1+t, String.valueOf(map.get("unBuildNum")!=null?map.get("unBuildNum"):0))); | |
| 239 | - if (map.get("appointmentNum")==null){ | |
| 240 | - ws.addCell(new Label(12, s+1+t,"0.00%")); | |
| 241 | - }else { | |
| 242 | - ws.addCell(new Label(12, s+1+t, new BigDecimal(String.valueOf(map.get("buildNum")!=null?map.get("buildNum"):0)).multiply(new BigDecimal("100")).divide(new BigDecimal(String.valueOf(map.get("appointmentNum")!=null?map.get("appointmentNum"):0)),2,BigDecimal.ROUND_HALF_UP).toPlainString()+"%")); | |
| 243 | - } | |
| 244 | - if (map.get("buildNum")==null){ | |
| 245 | - ws.addCell(new Label(13, s+1+t,"0.00%")); | |
| 246 | - }else { | |
| 247 | - ws.addCell(new Label(13, s+1+t,new BigDecimal(String.valueOf(map.get("newBuildNum")!=null?map.get("newBuildNum"):0)).multiply(new BigDecimal("100")).divide((new BigDecimal(String.valueOf(map.get("buildNum")!=null?map.get("buildNum"):0))),2,BigDecimal.ROUND_HALF_UP).toPlainString()+"%")); | |
| 248 | - } | |
| 249 | - } | |
| 233 | + if (CollectionUtils.isNotEmpty(dataList)){ | |
| 234 | + for (int t = 0, len = dataList.size(); t < len; t++){ | |
| 235 | + map=dataList.get(t); | |
| 236 | + ws.addCell(new Label(7, s+1+t, String.valueOf(map.get("doctor")))); | |
| 237 | + ws.addCell(new Label(8, s+1+t, String.valueOf(map.get("appointmentNum")!=null?map.get("appointmentNum"):0))); | |
| 238 | + ws.addCell(new Label(9, s+1+t, String.valueOf(map.get("buildNum")!=null?map.get("buildNum"):0))); | |
| 239 | + ws.addCell(new Label(10, s+1+t, String.valueOf(map.get("newBuildNum")!=null?map.get("newBuildNum"):0))); | |
| 240 | + ws.addCell(new Label(11, s+1+t, String.valueOf(map.get("unBuildNum")!=null?map.get("unBuildNum"):0))); | |
| 241 | + if (map.get("appointmentNum")==null){ | |
| 242 | + ws.addCell(new Label(12, s+1+t,"0.00%")); | |
| 243 | + }else { | |
| 244 | + ws.addCell(new Label(12, s+1+t, new BigDecimal(String.valueOf(map.get("buildNum")!=null?map.get("buildNum"):0)).multiply(new BigDecimal("100")).divide(new BigDecimal(String.valueOf(map.get("appointmentNum")!=null?map.get("appointmentNum"):0)),2,BigDecimal.ROUND_HALF_UP).toPlainString()+"%")); | |
| 245 | + } | |
| 246 | + if (map.get("buildNum")==null){ | |
| 247 | + ws.addCell(new Label(13, s+1+t,"0.00%")); | |
| 248 | + }else { | |
| 249 | + ws.addCell(new Label(13, s+1+t,new BigDecimal(String.valueOf(map.get("newBuildNum")!=null?map.get("newBuildNum"):0)).multiply(new BigDecimal("100")).divide((new BigDecimal(String.valueOf(map.get("buildNum")!=null?map.get("buildNum"):0))),2,BigDecimal.ROUND_HALF_UP).toPlainString()+"%")); | |
| 250 | + } | |
| 251 | + } | |
| 250 | 252 | |
| 251 | - ws.mergeCells(0, s+1, 0, s+dataList.size()); | |
| 252 | - ws.mergeCells(1, s+1, 1, s+dataList.size()); | |
| 253 | - ws.mergeCells(2, s+1, 2, s+dataList.size()); | |
| 254 | - ws.mergeCells(3, s+1, 3, s+dataList.size()); | |
| 255 | - ws.mergeCells(4, s+1, 4, s+dataList.size()); | |
| 256 | - ws.mergeCells(5, s+1, 5, s+dataList.size()); | |
| 257 | - ws.mergeCells(6, s+1, 6, s+dataList.size()); | |
| 258 | - s+=dataList.size(); | |
| 259 | - | |
| 253 | + ws.mergeCells(0, s+1, 0, s+dataList.size()); | |
| 254 | + ws.mergeCells(1, s+1, 1, s+dataList.size()); | |
| 255 | + ws.mergeCells(2, s+1, 2, s+dataList.size()); | |
| 256 | + ws.mergeCells(3, s+1, 3, s+dataList.size()); | |
| 257 | + ws.mergeCells(4, s+1, 4, s+dataList.size()); | |
| 258 | + ws.mergeCells(5, s+1, 5, s+dataList.size()); | |
| 259 | + ws.mergeCells(6, s+1, 6, s+dataList.size()); | |
| 260 | + s+=dataList.size(); | |
| 261 | + } | |
| 260 | 262 | } |
| 261 | 263 | wwb.write(); |
| 262 | 264 | wwb.close(); |
platform-operate-api/src/main/java/com/lyms/hospitalapi/dtdyrm/DtdyrmFmService.java
View file @
8c94b52
| ... | ... | @@ -627,67 +627,71 @@ |
| 627 | 627 | patientsQuery.setYn(1); |
| 628 | 628 | patientsQuery.setHospitalId("2100002419"); |
| 629 | 629 | for (AppointmentModel appointmentModel : list) { |
| 630 | - Map<String, Object> result = new LinkedHashMap<>(); | |
| 631 | - String idCard=appointmentModel.getIdCard(); | |
| 632 | - String phone=appointmentModel.getPhone(); | |
| 633 | - String username=appointmentModel.getName(); | |
| 634 | - if (StringUtils.isNotEmpty(idCard)){ | |
| 635 | - patientsQuery.setCardNo(idCard); | |
| 636 | - }else { | |
| 637 | - if (StringUtils.isNotEmpty(username)&&StringUtils.isNotEmpty(phone)){ | |
| 638 | - patientsQuery.setName(username); | |
| 639 | - patientsQuery.setPhone(phone); | |
| 630 | + if (StringUtils.isNotEmpty(appointmentModel.getDoctor())){ | |
| 631 | + Map<String, Object> result = new LinkedHashMap<>(); | |
| 632 | + String idCard=appointmentModel.getIdCard(); | |
| 633 | + String phone=appointmentModel.getPhone(); | |
| 634 | + String username=appointmentModel.getName(); | |
| 635 | + if (StringUtils.isNotEmpty(idCard)){ | |
| 636 | + patientsQuery.setName(null); | |
| 637 | + patientsQuery.setPhone(null); | |
| 638 | + patientsQuery.setCardNo(idCard); | |
| 640 | 639 | }else { |
| 641 | - appointmentModel.setIsBuild(0); | |
| 642 | - appointmentQuery.setIdCard(idCard); | |
| 643 | - appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery)); | |
| 640 | + if (StringUtils.isNotEmpty(username)&&StringUtils.isNotEmpty(phone)){ | |
| 641 | + patientsQuery.setCardNo(null); | |
| 642 | + patientsQuery.setName(username); | |
| 643 | + patientsQuery.setPhone(phone); | |
| 644 | + }else { | |
| 645 | + appointmentModel.setIsBuild(0); | |
| 646 | + appointmentQuery.setIdCard(idCard); | |
| 647 | + appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery)); | |
| 644 | 648 | |
| 649 | + } | |
| 645 | 650 | } |
| 646 | - } | |
| 647 | - if (appointmentModel.getIsBuild()==null){ | |
| 648 | - List<Patients> patientsList= patientsService.queryPatient(patientsQuery); | |
| 649 | - if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(patientsList)){ | |
| 650 | - appointmentModel.setIsBuild(1); | |
| 651 | - Patients patients= patientsList.get(0); | |
| 652 | - appointmentModel.setBookbuildingDate(patients.getBookbuildingDate()); | |
| 653 | - PatientServiceQuery patientQuery = new PatientServiceQuery(); | |
| 654 | - patientQuery.setParentid(patients.getId()); | |
| 655 | - patientQuery.setSerType(1); | |
| 651 | + if (appointmentModel.getIsBuild()==null){ | |
| 652 | + List<Patients> patientsList= patientsService.queryPatient(patientsQuery); | |
| 653 | + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(patientsList)){ | |
| 654 | + appointmentModel.setIsBuild(1); | |
| 655 | + Patients patients= patientsList.get(0); | |
| 656 | + appointmentModel.setBookbuildingDate(patients.getBookbuildingDate()); | |
| 657 | + PatientServiceQuery patientQuery = new PatientServiceQuery(); | |
| 658 | + patientQuery.setParentid(patients.getId()); | |
| 659 | + patientQuery.setSerType(1); | |
| 656 | 660 | |
| 657 | - List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); | |
| 658 | - if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(patientServices)){ | |
| 659 | - Date serEndTime= patientServices.get(0).getSerEndTime(); | |
| 660 | - Date serStartTime=patientServices.get(0).getUpdateDate(); | |
| 661 | - appointmentModel.setSerEndTime(serEndTime); | |
| 662 | - appointmentModel.setSerStartTime(serStartTime); | |
| 663 | - result.put("服务截止时间", DateUtil.gety_m_dhm(appointmentModel.getSerEndTime())); | |
| 661 | + List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); | |
| 662 | + if (com.lyms.platform.operate.web.utils.CollectionUtils.isNotEmpty(patientServices)){ | |
| 663 | + Date serEndTime= patientServices.get(0).getSerEndTime(); | |
| 664 | + Date serStartTime=patientServices.get(0).getUpdateDate(); | |
| 665 | + appointmentModel.setSerEndTime(serEndTime); | |
| 666 | + appointmentModel.setSerStartTime(serStartTime); | |
| 667 | + result.put("服务截止时间", DateUtil.gety_m_dhm(appointmentModel.getSerEndTime())); | |
| 668 | + } | |
| 669 | + }else { | |
| 670 | + appointmentModel.setIsBuild(0); | |
| 671 | + if (appointmentModel.getAppointmentNum()==null || appointmentModel.getAppointmentNum()==0){ | |
| 672 | + appointmentQuery.setIdCard(idCard); | |
| 673 | + appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery)); | |
| 674 | + } | |
| 664 | 675 | } |
| 665 | - }else { | |
| 666 | - appointmentModel.setIsBuild(0); | |
| 667 | - if (appointmentModel.getAppointmentNum()==null || appointmentModel.getAppointmentNum()==0){ | |
| 668 | - appointmentQuery.setIdCard(idCard); | |
| 669 | - appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery)); | |
| 670 | - } | |
| 671 | 676 | } |
| 677 | + result.put("建档状态",appointmentModel.getIsBuild()==1?"已建档":"未建档"); | |
| 678 | + result.put("就诊卡号", appointmentModel.getVccardNo()); | |
| 679 | + result.put("就诊次数",appointmentModel.getAppointmentNum()); | |
| 680 | + result.put("姓名", appointmentModel.getName()); | |
| 681 | + result.put("手机号", appointmentModel.getPhone()); | |
| 682 | + result.put("证件号", appointmentModel.getIdCard()); | |
| 683 | + result.put("出生日期",appointmentModel.getAge()); | |
| 684 | + result.put("服务开始时间",DateUtil.gety_m_dhm(appointmentModel.getSerStartTime())); | |
| 685 | + result.put("服务截至时间",DateUtil.gety_m_dhm(appointmentModel.getSerEndTime())); | |
| 686 | + result.put("建档时间",DateUtil.getYyyyMmDd(appointmentModel.getBookbuildingDate())); | |
| 687 | + result.put("就诊时间",DateUtil.gety_m_dhm(appointmentModel.getCheckTime())); | |
| 688 | + result.put("就诊医生",appointmentModel.getDoctor()); | |
| 689 | + result.put("科室", appointmentModel.getDept()); | |
| 690 | + result.put("预约时间",DateUtil.gety_m_dhm(appointmentModel.getCreated())); | |
| 691 | + results.add(result); | |
| 672 | 692 | } |
| 673 | - result.put("建档状态",appointmentModel.getIsBuild()==1?"已建档":"未建档"); | |
| 674 | - result.put("就诊卡号", appointmentModel.getVccardNo()); | |
| 675 | - result.put("就诊次数",appointmentModel.getAppointmentNum()); | |
| 676 | - result.put("姓名", appointmentModel.getName()); | |
| 677 | - result.put("手机号", appointmentModel.getPhone()); | |
| 678 | - result.put("证件号", appointmentModel.getIdCard()); | |
| 679 | - result.put("出生日期",appointmentModel.getAge()); | |
| 680 | - result.put("服务开始时间",DateUtil.gety_m_dhm(appointmentModel.getSerStartTime())); | |
| 681 | - result.put("服务截至时间",DateUtil.gety_m_dhm(appointmentModel.getSerEndTime())); | |
| 682 | - result.put("建档时间",DateUtil.getYyyyMmDd(appointmentModel.getBookbuildingDate())); | |
| 683 | - result.put("就诊时间",DateUtil.gety_m_dhm(appointmentModel.getCheckTime())); | |
| 684 | - result.put("就诊医生",appointmentModel.getDoctor()); | |
| 685 | - result.put("科室", appointmentModel.getDept()); | |
| 686 | - result.put("预约时间",DateUtil.gety_m_dhm(appointmentModel.getCreated())); | |
| 687 | - results.add(result); | |
| 688 | 693 | } |
| 689 | 694 | } |
| 690 | - | |
| 691 | 695 | ResponseUtil.responseExcel(cnames, results, response); |
| 692 | 696 | } |
| 693 | 697 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientDtController.java
View file @
8c94b52
| ... | ... | @@ -681,91 +681,97 @@ |
| 681 | 681 | patientsQuery.setHospitalId(hospitalId); |
| 682 | 682 | for (int i = 0,j=modelList.size(); i < j; i++) { |
| 683 | 683 | AppointmentModel appointmentModel= modelList.get(i); |
| 684 | - String idCard=appointmentModel.getIdCard(); | |
| 685 | - String phone=appointmentModel.getPhone(); | |
| 686 | - String username=appointmentModel.getName(); | |
| 687 | - if (StringUtils.isNotEmpty(idCard)){ | |
| 688 | - patientsQuery.setCardNo(idCard); | |
| 689 | - }else { | |
| 690 | - if (StringUtils.isNotEmpty(username)&&StringUtils.isNotEmpty(phone)){ | |
| 691 | - patientsQuery.setName(username); | |
| 692 | - patientsQuery.setPhone(phone); | |
| 684 | + if (StringUtils.isNotEmpty(appointmentModel.getDoctor())){ | |
| 685 | + String idCard=appointmentModel.getIdCard(); | |
| 686 | + String phone=appointmentModel.getPhone(); | |
| 687 | + String username=appointmentModel.getName(); | |
| 688 | + if (StringUtils.isNotEmpty(idCard)){ | |
| 689 | + patientsQuery.setName(null); | |
| 690 | + patientsQuery.setPhone(null); | |
| 691 | + patientsQuery.setCardNo(idCard); | |
| 693 | 692 | }else { |
| 694 | - appointmentModel.setIsBuild(0); | |
| 695 | - appointmentModel.setExpire(1); | |
| 696 | - appointmentQuery.setIdCard(idCard); | |
| 697 | - appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery)); | |
| 693 | + if (StringUtils.isNotEmpty(username)&&StringUtils.isNotEmpty(phone)){ | |
| 694 | + patientsQuery.setCardNo(null); | |
| 695 | + patientsQuery.setName(username); | |
| 696 | + patientsQuery.setPhone(phone); | |
| 697 | + }else { | |
| 698 | + appointmentModel.setIsBuild(0); | |
| 699 | + appointmentModel.setExpire(1); | |
| 700 | + appointmentQuery.setIdCard(idCard); | |
| 701 | + appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery)); | |
| 702 | + } | |
| 698 | 703 | } |
| 699 | - } | |
| 700 | - if (appointmentModel.getIsBuild()==null){ | |
| 701 | - List<Patients> patientsList= patientsService.queryPatient(patientsQuery); | |
| 702 | - if (CollectionUtils.isNotEmpty(patientsList)){ | |
| 703 | - appointmentModel.setIsBuild(1); | |
| 704 | - Patients patients= patientsList.get(0); | |
| 705 | - appointmentModel.setBookbuildingDate(patients.getBookbuildingDate()); | |
| 706 | - PatientServiceQuery patientQuery = new PatientServiceQuery(); | |
| 707 | - patientQuery.setParentid(patients.getId()); | |
| 708 | - patientQuery.setSerType(1); | |
| 709 | - List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); | |
| 710 | - if (CollectionUtils.isNotEmpty(patientServices)){ | |
| 711 | - Date serEndTime= patientServices.get(0).getSerEndTime(); | |
| 712 | - Date serStartTime=patientServices.get(0).getUpdateDate(); | |
| 713 | - appointmentModel.setSerEndTime(serEndTime); | |
| 714 | - appointmentModel.setSerStartTime(serStartTime); | |
| 715 | - if (serEndTime.compareTo(date)>0){ | |
| 716 | - appointmentModel.setExpire(0); | |
| 704 | + if (appointmentModel.getIsBuild()==null){ | |
| 705 | + List<Patients> patientsList= patientsService.queryPatient(patientsQuery); | |
| 706 | + if (CollectionUtils.isNotEmpty(patientsList)){ | |
| 707 | + appointmentModel.setIsBuild(1); | |
| 708 | + Patients patients= patientsList.get(0); | |
| 709 | + appointmentModel.setBookbuildingDate(patients.getBookbuildingDate()); | |
| 710 | + PatientServiceQuery patientQuery = new PatientServiceQuery(); | |
| 711 | + patientQuery.setParentid(patients.getId()); | |
| 712 | + patientQuery.setSerType(1); | |
| 713 | + List<PatientService> patientServices = patientServiceService.queryPatientService(patientQuery); | |
| 714 | + if (CollectionUtils.isNotEmpty(patientServices)){ | |
| 715 | + Date serEndTime= patientServices.get(0).getSerEndTime(); | |
| 716 | + Date serStartTime=patientServices.get(0).getUpdateDate(); | |
| 717 | + appointmentModel.setSerEndTime(serEndTime); | |
| 718 | + appointmentModel.setSerStartTime(serStartTime); | |
| 719 | + if (serEndTime.compareTo(date)>0){ | |
| 720 | + appointmentModel.setExpire(0); | |
| 721 | + }else { | |
| 722 | + appointmentModel.setExpire(1); | |
| 723 | + } | |
| 717 | 724 | }else { |
| 718 | 725 | appointmentModel.setExpire(1); |
| 719 | 726 | } |
| 720 | - }else { | |
| 721 | - appointmentModel.setExpire(1); | |
| 722 | - } | |
| 723 | 727 | |
| 724 | - if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getRiskLevelId()) && !"[]".equals(patients.getRiskLevelId())) { | |
| 725 | - List level = new ArrayList(); | |
| 726 | - try { | |
| 727 | - List<String> list = JsonUtil.patientRiskLevelIdToList(patients.getRiskLevelId()); | |
| 728 | - for (String str : list) { | |
| 729 | - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(str); | |
| 730 | - if (null != basicConfig) { | |
| 731 | - Map map = new HashMap(); | |
| 732 | - basicConfig.replenRisk(map); | |
| 733 | - if (!level.contains(map)){ | |
| 734 | - level.add(map); | |
| 728 | + if (org.apache.commons.lang.StringUtils.isNotEmpty(patients.getRiskLevelId()) && !"[]".equals(patients.getRiskLevelId())) { | |
| 729 | + List level = new ArrayList(); | |
| 730 | + try { | |
| 731 | + List<String> list = JsonUtil.patientRiskLevelIdToList(patients.getRiskLevelId()); | |
| 732 | + for (String str : list) { | |
| 733 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(str); | |
| 734 | + if (null != basicConfig) { | |
| 735 | + Map map = new HashMap(); | |
| 736 | + basicConfig.replenRisk(map); | |
| 737 | + if (!level.contains(map)){ | |
| 738 | + level.add(map); | |
| 739 | + } | |
| 735 | 740 | } |
| 736 | 741 | } |
| 742 | + } catch (Exception e) { | |
| 743 | + ExceptionUtils.catchException(e, "patients.getRiskLevelId error."); | |
| 737 | 744 | } |
| 738 | - } catch (Exception e) { | |
| 739 | - ExceptionUtils.catchException(e, "patients.getRiskLevelId error."); | |
| 745 | + appointmentModel.setrlevel(level); | |
| 740 | 746 | } |
| 741 | - appointmentModel.setrlevel(level); | |
| 747 | + }else { | |
| 748 | + appointmentModel.setIsBuild(0); | |
| 749 | + appointmentModel.setExpire(1); | |
| 750 | + if (appointmentModel.getAppointmentNum()==null || appointmentModel.getAppointmentNum()==0){ | |
| 751 | + appointmentQuery.setIdCard(idCard); | |
| 752 | + appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery)); | |
| 753 | + } | |
| 742 | 754 | } |
| 743 | - }else { | |
| 744 | - appointmentModel.setIsBuild(0); | |
| 745 | - appointmentModel.setExpire(1); | |
| 746 | - if (appointmentModel.getAppointmentNum()==null || appointmentModel.getAppointmentNum()==0){ | |
| 747 | - appointmentQuery.setIdCard(idCard); | |
| 748 | - appointmentModel.setAppointmentNum(appointmentService.queryAppointmentCount(appointmentQuery)); | |
| 749 | - } | |
| 750 | 755 | } |
| 751 | - } | |
| 752 | - if (isBuild!=null){ | |
| 753 | - if (expire!=null){ | |
| 754 | - if (appointmentModel.getIsBuild()==isBuild&&appointmentModel.getExpire()==expire){ | |
| 755 | - checkList.add(appointmentModel); | |
| 756 | + if (isBuild!=null){ | |
| 757 | + if (expire!=null){ | |
| 758 | + if (appointmentModel.getIsBuild()==isBuild&&appointmentModel.getExpire()==expire){ | |
| 759 | + checkList.add(appointmentModel); | |
| 760 | + } | |
| 761 | + }else { | |
| 762 | + if (appointmentModel.getIsBuild()==isBuild){ | |
| 763 | + checkList.add(appointmentModel); | |
| 764 | + } | |
| 756 | 765 | } |
| 757 | 766 | }else { |
| 758 | - if (appointmentModel.getIsBuild()==isBuild){ | |
| 759 | - checkList.add(appointmentModel); | |
| 767 | + if (expire!=null){ | |
| 768 | + if (appointmentModel.getExpire()==expire){ | |
| 769 | + checkList.add(appointmentModel); | |
| 770 | + } | |
| 760 | 771 | } |
| 761 | 772 | } |
| 762 | - }else { | |
| 763 | - if (expire!=null){ | |
| 764 | - if (appointmentModel.getExpire()==expire){ | |
| 765 | - checkList.add(appointmentModel); | |
| 766 | - } | |
| 767 | - } | |
| 768 | 773 | } |
| 774 | + | |
| 769 | 775 | } |
| 770 | 776 | |
| 771 | 777 | if (b){ |
| ... | ... | @@ -822,7 +828,8 @@ |
| 822 | 828 | for (int i = 0,j=modelList.size(); i < j; i++) { |
| 823 | 829 | AppointmentModel appointmentModel= modelList.get(i); |
| 824 | 830 | String depts=appointmentModel.getDept(); |
| 825 | - if (StringUtils.isNotEmpty(depts)){ | |
| 831 | + String doctorName=appointmentModel.getDoctor(); | |
| 832 | + if (StringUtils.isNotEmpty(depts)&&StringUtils.isNotEmpty(doctorName)){ | |
| 826 | 833 | AppointmentData appointmentData= params.get(depts); |
| 827 | 834 | if (appointmentData==null){ |
| 828 | 835 | appointmentData=new AppointmentData(); |
| ... | ... | @@ -865,7 +872,6 @@ |
| 865 | 872 | params.put(depts,appointmentData); |
| 866 | 873 | } |
| 867 | 874 | } |
| 868 | - System.out.println(params); | |
| 869 | 875 | // 使用TreeMap进行排序 |
| 870 | 876 | Map<String, AppointmentData> sortedMap = new TreeMap<>(new ChineseComparator()); |
| 871 | 877 | sortedMap.putAll(params); |
| 872 | 878 | |
| ... | ... | @@ -1048,8 +1054,9 @@ |
| 1048 | 1054 | for (int i = 0,j=modelList.size(); i < j; i++) { |
| 1049 | 1055 | AppointmentModel appointmentModel= modelList.get(i); |
| 1050 | 1056 | String doctorName=appointmentModel.getDoctor(); |
| 1051 | - String depts=appointmentModel.getDept(); | |
| 1057 | + | |
| 1052 | 1058 | if (StringUtils.isNotEmpty(doctorName)){ |
| 1059 | + String depts=appointmentModel.getDept(); | |
| 1053 | 1060 | Map<String,Object> appointmentData= params1.get(doctorName+","+depts); |
| 1054 | 1061 | if (appointmentData==null){ |
| 1055 | 1062 | appointmentData=new HashMap<>(); |
| ... | ... | @@ -1095,6 +1102,7 @@ |
| 1095 | 1102 | } |
| 1096 | 1103 | for (Map.Entry<String,Map<String,Object>> entry: params1.entrySet()) { |
| 1097 | 1104 | Map<String,Object> value= entry.getValue(); |
| 1105 | + // System.out.println(value); | |
| 1098 | 1106 | String deptName= String.valueOf(value.get("dept")); |
| 1099 | 1107 | if (StringUtils.isNotEmpty(deptName)){ |
| 1100 | 1108 | List<Map<String,Object>> data1 =data.get(deptName); |