Commit b0ad58aa1b95e9a8a1968b6e4555c872e515d182
1 parent
086fd62d4a
Exists in
master
and in
6 other branches
优惠券加排序
Showing 1 changed file with 48 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
b0ad58a
... | ... | @@ -126,15 +126,18 @@ |
126 | 126 | /** 儿童 */ |
127 | 127 | couponReportMap.put("7_1", "儿童建档券使用人次"); |
128 | 128 | // couponReportMap.put("8_1", "新生儿保健券使用人次"); |
129 | - couponReportMap.put("8_2", "<div class='ag-double-line'>儿童保健券(一)<div>使用人次</div></div>"); | |
130 | - couponReportMap.put("8_3", "<div class='ag-double-line'>儿童保健券(二)<div>使用人次</div></div>"); | |
131 | - couponReportMap.put("8_4", "<div class='ag-double-line'>儿童保健券(三)<div><div>使用人次</div></div>"); | |
132 | - couponReportMap.put("8_5", "<div class='ag-double-line'>儿童保健券(四)<div>使用人次</div></div>"); | |
133 | - couponReportMap.put("8_6", "<div class='ag-double-line'>儿童保健券(五)<div>使用人次</div></div>"); | |
134 | - couponReportMap.put("8_7", "<div class='ag-double-line'>儿童保健券(六)<div>使用人次</div></div>"); | |
135 | - couponReportMap.put("8_8", "<div class='ag-double-line'>儿童保健券(七)<div>使用人次</div></div>"); | |
136 | - couponReportMap.put("8_9", "<div class='ag-double-line'>儿童保健券(八)<div>使用人次</div></div>"); | |
137 | - couponReportMap.put("8_10", "<div class='ag-double-line'>儿童保健券(九)<div>使用人次</div></div>"); | |
129 | + couponReportMap.put("8_1", "<div class='ag-double-line'>儿童保健券(一)<div>使用人次</div></div>"); | |
130 | + couponReportMap.put("8_2", "<div class='ag-double-line'>儿童保健券(二)<div>使用人次</div></div>"); | |
131 | + couponReportMap.put("8_3", "<div class='ag-double-line'>儿童保健券(三)<div><div>使用人次</div></div>"); | |
132 | + couponReportMap.put("8_4", "<div class='ag-double-line'>儿童保健券(四)<div>使用人次</div></div>"); | |
133 | + couponReportMap.put("8_5", "<div class='ag-double-line'>儿童保健券(五)<div>使用人次</div></div>"); | |
134 | + couponReportMap.put("8_6", "<div class='ag-double-line'>儿童保健券(六)<div>使用人次</div></div>"); | |
135 | + couponReportMap.put("8_7", "<div class='ag-double-line'>儿童保健券(七)<div>使用人次</div></div>"); | |
136 | + couponReportMap.put("8_8", "<div class='ag-double-line'>儿童保健券(八)<div>使用人次</div></div>"); | |
137 | + couponReportMap.put("8_9", "<div class='ag-double-line'>儿童保健券(九)<div>使用人次</div></div>"); | |
138 | + couponReportMap.put("8_10", "<div class='ag-double-line'>儿童保健券(十)<div>使用人次</div></div>"); | |
139 | + couponReportMap.put("8_11", "<div class='ag-double-line'>儿童保健券(十一)<div>使用人次</div></div>"); | |
140 | + couponReportMap.put("8_12", "<div class='ag-double-line'>儿童保健券(十二)<div>使用人次</div></div>"); | |
138 | 141 | couponReportMap.put("9_1", "<div class='ag-double-line'>新生儿访视券(一)<div>使用人次</div></div>"); |
139 | 142 | couponReportMap.put("9_2", "<div class='ag-double-line'>新生儿访视券(二)<div>使用人次</div></div>"); |
140 | 143 | couponReportMap.put("9_3", "<div class='ag-double-line'>新生儿访视券(三)<div>使用人次</div></div>"); |
141 | 144 | |
142 | 145 | |
... | ... | @@ -555,14 +558,49 @@ |
555 | 558 | key.remove("8_1"); |
556 | 559 | } |
557 | 560 | if(CollectionUtils.isNotEmpty(couponReport)) { |
558 | - couponReport.get(0).remove("8_1"); | |
561 | + Map<String, Object> map = couponReport.get(0); | |
562 | + map.remove("8_1"); | |
559 | 563 | } |
564 | + | |
560 | 565 | for (Map<String, Object> map : couponReport) { |
561 | 566 | for (String s : key) { |
562 | 567 | if(map.get(s) == null) { |
563 | 568 | map.put(s, 0); |
564 | 569 | } |
565 | 570 | } |
571 | + } | |
572 | + | |
573 | + if(CollectionUtils.isNotEmpty(couponReport)) { | |
574 | + Map<String, Object> map = couponReport.get(0); | |
575 | + // 类型排序:儿童建档券-新生儿访视券-儿保检查券-血红蛋白检查券 (7 9 8 10) | |
576 | + Map<String, Object> temp = new LinkedHashMap<>(); | |
577 | + Set<String> keys = map.keySet(); | |
578 | + for (String s : keys) { | |
579 | + if(s.startsWith("7")) { | |
580 | + temp.put(s, map.get(s)); | |
581 | + } | |
582 | + } | |
583 | + for (String s : keys) { | |
584 | + if(s.startsWith("9")) { | |
585 | + temp.put(s, map.get(s)); | |
586 | + } | |
587 | + } | |
588 | + for (String s : keys) { | |
589 | + if(s.startsWith("8")) { | |
590 | + temp.put(s, map.get(s)); | |
591 | + } | |
592 | + } | |
593 | + for (String s : keys) { | |
594 | + if(s.startsWith("10")) { | |
595 | + temp.put(s, map.get(s)); | |
596 | + } | |
597 | + } | |
598 | + for (String s : keys) { | |
599 | + if(!s.startsWith("10")||!s.startsWith("9")||!s.startsWith("8")||!s.startsWith("7")) { | |
600 | + temp.put(s, map.get(s)); | |
601 | + } | |
602 | + } | |
603 | + couponReport.set(0, temp); | |
566 | 604 | } |
567 | 605 | } |
568 | 606 |