Commit 91daeea911ba9b500459f1098147f4fef34e0672
1 parent
35e6521654
Exists in
master
and in
6 other branches
update
Showing 4 changed files with 46 additions and 10 deletions
- platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterMysqlAntexcMapper.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/MysqlAntexcService.java
- platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/MysqlAntexcServiceImpl.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
platform-biz-service/src/main/java/com/lyms/platform/permission/dao/master/MasterMysqlAntexcMapper.java
View file @
91daeea
... | ... | @@ -145,8 +145,8 @@ |
145 | 145 | int getNameBuildCount(Map param); |
146 | 146 | int getBuildAndFmCount(Map param); |
147 | 147 | |
148 | - List<Map<String, String>> getgetLhByFmManage(Map param); | |
148 | + List<Map<String, Object>> getgetLhByFmManage(Map param); | |
149 | 149 | |
150 | - List<Map<String, String>> getLhWyFmManage(Map param); | |
150 | + List<Map<String, Object>> getLhWyFmManage(Map param); | |
151 | 151 | } |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/MysqlAntexcService.java
View file @
91daeea
... | ... | @@ -150,8 +150,8 @@ |
150 | 150 | int getNameBuildCount(Map param); |
151 | 151 | int getBuildAndFmCount(Map param); |
152 | 152 | |
153 | - List<Map<String, String>> getLhByFmManage(Map param); | |
153 | + List<Map<String, Object>> getLhByFmManage(Map param); | |
154 | 154 | |
155 | - List<Map<String, String>> getLhWyFmManage(Map param); | |
155 | + List<Map<String, Object>> getLhWyFmManage(Map param); | |
156 | 156 | } |
platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/MysqlAntexcServiceImpl.java
View file @
91daeea
... | ... | @@ -435,12 +435,12 @@ |
435 | 435 | } |
436 | 436 | |
437 | 437 | @Override |
438 | - public List<Map<String, String>> getLhByFmManage(Map param) { | |
438 | + public List<Map<String, Object>> getLhByFmManage(Map param) { | |
439 | 439 | return masterMysqlAntexcMapper.getgetLhByFmManage(param); |
440 | 440 | } |
441 | 441 | |
442 | 442 | @Override |
443 | - public List<Map<String, String>> getLhWyFmManage(Map param) { | |
443 | + public List<Map<String, Object>> getLhWyFmManage(Map param) { | |
444 | 444 | return masterMysqlAntexcMapper.getLhWyFmManage(param); |
445 | 445 | } |
446 | 446 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
91daeea
... | ... | @@ -37,6 +37,7 @@ |
37 | 37 | import org.apache.commons.collections.map.HashedMap; |
38 | 38 | import org.apache.commons.lang.StringUtils; |
39 | 39 | import org.apache.commons.lang.math.NumberUtils; |
40 | +import org.apache.tools.ant.util.DateUtils; | |
40 | 41 | import org.slf4j.Logger; |
41 | 42 | import org.slf4j.LoggerFactory; |
42 | 43 | import org.springframework.beans.factory.annotation.Autowired; |
43 | 44 | |
44 | 45 | |
45 | 46 | |
46 | 47 | |
47 | 48 | |
... | ... | @@ -3768,27 +3769,52 @@ |
3768 | 3769 | param.put("startTime",startTime); |
3769 | 3770 | param.put("endTime",endTime); |
3770 | 3771 | param.put("doctorId",doctorId);//建档医生id int u.id |
3771 | - List<Map<String,String>>list =mysqlAntexcService.getLhByFmManage(param); | |
3772 | + List<Map<String,Object>>list =mysqlAntexcService.getLhByFmManage(param); | |
3773 | + List<Map<String,Object>>listb =new ArrayList<>(); | |
3774 | + List<Map<String,Object>>listw =new ArrayList<>(); | |
3772 | 3775 | //统计本院和外院分娩数量 |
3773 | 3776 | Map<String,String> mapCount=new HashMap<>(); |
3774 | 3777 | int by=0; |
3775 | 3778 | int wy=0; |
3776 | - for (Map<String, String> strMap : list) { | |
3779 | + for (Map<String, Object> strMap : list) { | |
3777 | 3780 | //本院 |
3778 | 3781 | if("隆化县妇幼保健院".equals(strMap.get("hospitalName"))){ |
3779 | 3782 | by++; |
3780 | 3783 | strMap.put("yn", "1");//标记本院数据 |
3784 | + listb.add(strMap); | |
3781 | 3785 | }else { |
3782 | 3786 | wy++; |
3783 | 3787 | strMap.put("yn", "2");//标记外院数据 |
3788 | + listw.add(strMap); | |
3784 | 3789 | } |
3785 | 3790 | } |
3791 | + if(CollectionUtils.isNotEmpty(listb)){//本院排序 | |
3792 | + Collections.sort(listb, new Comparator<Map<String, Object>>() {//list<map>排序 | |
3793 | + @Override | |
3794 | + public int compare(Map<String, Object> o1, Map<String, Object> o2) { | |
3795 | + Date date1 = (Date)o1.get("fmDate"); | |
3796 | + Date date2 = (Date)o2.get("fmDate"); | |
3797 | + return date1.compareTo(date2);//按ASC,如需DESC交换date1位置 | |
3798 | + } | |
3799 | + }); | |
3800 | + } | |
3801 | + if(CollectionUtils.isNotEmpty(listw)){//外院排序 | |
3802 | + Collections.sort(listw, new Comparator<Map<String, Object>>() {//list<map>排序 | |
3803 | + @Override | |
3804 | + public int compare(Map<String, Object> o1, Map<String, Object> o2) { | |
3805 | + Date date1 = (Date)o1.get("fmDate"); | |
3806 | + Date date2 = (Date)o2.get("fmDate"); | |
3807 | + return date1.compareTo(date2);//按ASC,如需DESC交换date1位置 | |
3808 | + } | |
3809 | + }); | |
3810 | + } | |
3786 | 3811 | mapCount.put("by",String.valueOf(by));//本院数 |
3787 | 3812 | mapCount.put("wy",String.valueOf(wy));//外院数 |
3788 | 3813 | mapCount.put("total",String.valueOf(by+wy));//总数 |
3789 | 3814 | mapCount.put("ratio",(by+wy)==0?"0%":String.valueOf(new DecimalFormat("0.00").format((float)by/(by+wy)*100))+"%");//分娩率 |
3790 | 3815 | Map<String,Object> dataMap=new HashMap<>(); |
3791 | - dataMap.put("data", list); | |
3816 | + dataMap.put("datab", listb); | |
3817 | + dataMap.put("dataw", listw); | |
3792 | 3818 | dataMap.put("dataCount", mapCount); |
3793 | 3819 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
3794 | 3820 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
3795 | 3821 | |
... | ... | @@ -3803,8 +3829,18 @@ |
3803 | 3829 | param.put("hospitalId",Integer.valueOf(hospitalId));//当前登录用户医院的id |
3804 | 3830 | param.put("startTime",startTime); |
3805 | 3831 | param.put("endTime",endTime); |
3806 | - List<Map<String,String>>list =mysqlAntexcService.getLhWyFmManage(param); | |
3832 | + List<Map<String,Object>>list =mysqlAntexcService.getLhWyFmManage(param); | |
3807 | 3833 | |
3834 | + if(CollectionUtils.isNotEmpty(list)){//排序 | |
3835 | + Collections.sort(list, new Comparator<Map<String, Object>>() {//list<map>排序 | |
3836 | + @Override | |
3837 | + public int compare(Map<String, Object> o1, Map<String, Object> o2) { | |
3838 | + Date date1 = (Date)o1.get("fmDate"); | |
3839 | + Date date2 = (Date)o2.get("fmDate"); | |
3840 | + return date1.compareTo(date2);//按ASC,如需DESC交换date1位置 | |
3841 | + } | |
3842 | + }); | |
3843 | + } | |
3808 | 3844 | BaseObjectResponse objectResponse = new BaseObjectResponse(); |
3809 | 3845 | objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS); |
3810 | 3846 | objectResponse.setErrormsg("成功"); |