|
|
@@ -448,10 +448,16 @@ public class GxtRepairOrderController extends BaseController
|
|
|
@PostMapping("/exportCompanyRank")
|
|
|
@ApiOperation("导出排名列表")
|
|
|
public void exportCompanyRanking(HttpServletResponse response, GxtUserScore userScore) {
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|
|
|
- String monthPeriod = sdf.format(calendar.getTime());
|
|
|
List<GxtUserScore> list = gxtRepairOrderService.getCompanyRankingList(userScore);
|
|
|
+ String monthPeriod = userScore.getMonthPeriod();
|
|
|
+ if (StringUtil.isEmpty(monthPeriod)) {
|
|
|
+ if (userScore.getDateFrom() != null && userScore.getDateTo() != null) {
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ monthPeriod = sdf.format(userScore.getDateFrom()) + "到" + sdf.format(userScore.getDateTo());
|
|
|
+ } else {
|
|
|
+ monthPeriod = "自定义";
|
|
|
+ }
|
|
|
+ }
|
|
|
List<GxtCompanyRankingVo> ranks = new ArrayList<>();
|
|
|
int currentRank = 1; // 当前排名
|
|
|
BigDecimal prevScore = null;
|