Преглед на файлове

驾驶舱个人-排名查询参数

wanglt преди 1 седмица
родител
ревизия
9e6d74dcbc

+ 9 - 3
ygtx-gxt/src/main/java/com/ygtx/gxt/controller/GxtRepairOrderController.java

@@ -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;

+ 1 - 1
ygtx-gxt/src/main/java/com/ygtx/gxt/domain/vo/GxtCompanyRankingVo.java

@@ -26,7 +26,7 @@ public class GxtCompanyRankingVo
     private BigDecimal finalScore;
 
     /** 统计月份(YYYY-MM) */
-    @Excel(name = "统计月份")
+    @Excel(name = "统计时段")
     private String monthPeriod;
 
     public Integer getRank() {

+ 2 - 2
ygtx-ui/src/views/index5.vue

@@ -274,7 +274,7 @@
               <el-input
                 v-model="rankingSearchQuery"
                 placeholder="搜索..."
-                @keyup.enter="handleRankingSearch"
+                @change="handleRankingSearch"
                 style="width: 150px;"
                 prefix-icon="search"
                 clearable
@@ -662,7 +662,7 @@ export default {
     },
     // 导出公司工分排名数据
     handleExportRank() {
-      this.download("gxt/repairOrder/exportCompanyRank", this.queryParams, `公司工分排名数据_${new Date().getTime()}.xlsx`);
+      this.download("gxt/repairOrder/exportCompanyRank", this.queryRank, `公司工分排名数据_${new Date().getTime()}.xlsx`);
     },
     handleWorkOrderClick(row) {
       // 记录来源路由和工单编码

+ 2 - 2
ygtx-ui/src/views/index6.vue

@@ -274,7 +274,7 @@
               <el-input
                 v-model="rankingSearchQuery"
                 placeholder="搜索..."
-                @keyup.enter="handleRankingSearch"
+                @change="handleRankingSearch"
                 style="width: 150px;"
                 prefix-icon="search"
                 clearable
@@ -663,7 +663,7 @@ export default {
     },
     // 导出公司工分排名数据
     handleExportRank() {
-      this.download("gxt/repairOrder/exportCompanyRank", this.queryParams, `公司工分排名数据_${new Date().getTime()}.xlsx`);
+      this.download("gxt/repairOrder/exportCompanyRank", this.queryRank, `公司工分排名数据_${new Date().getTime()}.xlsx`);
     },
     handleWorkOrderClick(row) {
       // 记录来源路由和工单编码