|
|
@@ -235,23 +235,21 @@ public class GxtUserScoreController extends BaseController
|
|
|
monthScore.setDeptId(deptId);
|
|
|
List<GxtMonthScore> monthScoreList = gxtMonthScoreService.selectGxtMonthScoreList(monthScore);
|
|
|
if (!monthScoreList.isEmpty()) {
|
|
|
+ Collections.sort(monthScoreList, new Comparator<GxtMonthScore>() {
|
|
|
+ @Override
|
|
|
+ public int compare(GxtMonthScore o1, GxtMonthScore o2) {
|
|
|
+ return o2.getMonthPeriod().compareTo(o1.getMonthPeriod());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ dictList.clear();
|
|
|
for (GxtMonthScore monthScore1:monthScoreList) {
|
|
|
String monthValue = monthScore1.getMonthPeriod();
|
|
|
- boolean isOld = false;
|
|
|
- for (Map<String, String> dict:dictList) {
|
|
|
- if (dict.get("value").equals(monthValue)) {
|
|
|
- isOld = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if (!isOld) {
|
|
|
- String[] months = monthValue.split("-");
|
|
|
- String monthLabel = months[0] + "年" + months[1] + "月";
|
|
|
- dictList.add(new HashMap<String, String>() {{
|
|
|
- put("value", monthValue);
|
|
|
- put("label", monthLabel);
|
|
|
- }});
|
|
|
- }
|
|
|
+ String[] months = monthValue.split("-");
|
|
|
+ String monthLabel = months[0] + "年" + months[1] + "月";
|
|
|
+ dictList.add(new HashMap<String, String>() {{
|
|
|
+ put("value", monthValue);
|
|
|
+ put("label", monthLabel);
|
|
|
+ }});
|
|
|
}
|
|
|
}
|
|
|
AjaxResult ajax = AjaxResult.success();
|