Răsfoiți Sursa

20231023--处理了 中间某天缺少数据导致重复工单无法计算的问题

lifuquan 1 an în urmă
părinte
comite
98344ff284

+ 4 - 0
README.md

@@ -18,6 +18,10 @@ dingtalk_auto已经移到独立的仓库,2.0版本
 
 ## tsl_data版本说明
 
+### v1.9
+
+1. 调整了订阅数据的分隔符为SOH
+
 ### v1.8
 
 1. 修复了sql语句的错误 selectClientRatioForDay

+ 7 - 7
doc/开发文档/部署环境/手动入库数据.md

@@ -6,7 +6,7 @@
 POST http://192.168.31.10:11111/tsl/task/send HTTP/1.1
 Content-Type:application/json
 
-20230623
+20231016
 ```
 
 > 注意:文件缺失时不需要手动入库和生成报表,当前已经加入了等待,检查的机制。发送的逻辑后续需要修改一下。
@@ -17,7 +17,7 @@ Content-Type:application/json
 POST http://192.168.10.7:29100/tsl/task/report/generate HTTP/1.1
 Content-Type:application/json
 
-20230623
+20231022
 ```
 
 ## 数据手动入库
@@ -28,7 +28,7 @@ Content-Type:application/json
 POST http://192.168.10.7:29100/tsl/task/warahouse HTTP/1.1
 Content-Type:application/json
 
-20230612
+20231022
 ```
 
 - report_auto.he_d_mobile_comp
@@ -46,7 +46,7 @@ Content-Type:application/json
 POST http://192.168.10.7:29100/tsl/task/warahouse/highquality HTTP/1.1
 Content-Type:application/json
 
-20230521
+20231015
 ```
 
 ## 查询数据
@@ -55,7 +55,7 @@ Content-Type:application/json
 POST http://192.168.10.7:29100/tsl/task/check/srcfile HTTP/1.1
 Content-Type:application/json
 
-20230524
+20230815
 ```
 
 ## 删除数据
@@ -66,7 +66,7 @@ Content-Type:application/json
 POST http://192.168.10.7:29100/tsl/task/delete/mobilecomp HTTP/1.1
 Content-Type:application/json
 
-20230623
+20230815
 ```
 
 - report_auto.he_d_high_quality
@@ -75,5 +75,5 @@ Content-Type:application/json
 POST http://192.168.10.7:29100/tsl/task/delete/highquality HTTP/1.1
 Content-Type:application/json
 
-20230531
+20231015
 ```

+ 2 - 2
doc/开发文档/部署环境接口测试.md

@@ -19,7 +19,7 @@ Content-Type:application/json
 POST http://192.168.10.7:29100/tsl/task/warahouse HTTP/1.1
 Content-Type:application/json
 
-20230522
+20230811
 ```
 
 ## 手动生成报表
@@ -28,7 +28,7 @@ Content-Type:application/json
 POST http://192.168.10.7:29100/tsl/task/report/generate HTTP/1.1
 Content-Type:application/json
 
-20230706
+20230812
 ```
 
 ## 查询数据

+ 0 - 1
pom.xml

@@ -11,7 +11,6 @@
     <packaging>pom</packaging>
 
     <modules>
-        <module>common</module>
         <module>dingtalk_auto</module>
         <module>tsl_data</module>
     </modules>

+ 1 - 1
tsl_data/pom.xml

@@ -13,7 +13,7 @@
 
     <groupId>com.nokia</groupId>
     <artifactId>tsl_data</artifactId>
-    <version>1.8</version>
+    <version>1.9</version>
 
     <packaging>jar</packaging>
 

+ 109 - 0
tsl_data/src/main/java/com/nokia/common/TextUtil.java

@@ -0,0 +1,109 @@
+package com.nokia.common;
+
+import org.springframework.util.StringUtils;
+
+import java.io.*;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 文本工具
+ */
+public class TextUtil {
+
+    // 判断是否为空字符串
+    public static boolean isBlank(String s) {
+        return !StringUtils.hasText(s);
+    }
+
+    // 使用utf8解码并读取文件
+    public static List<String> readLines(String path) {
+        return readLines(path, "utf-8");
+    }
+
+    // 使用utf8解码并读取文件
+    public static List<String> readLinesWithUTF8(String path) {
+        return readLines(path, "utf-8");
+    }
+
+    // 使用gbk读取文件
+    public static List<String> readLinesWithGBK(String path) {
+        return readLines(path, "gbk");
+    }
+
+    // 按行读取文件
+    public static List<String> readLines(String path, String charsetName) {
+        try (BufferedReader reader = new BufferedReader(
+                new InputStreamReader(new FileInputStream(path), charsetName))) {
+            return readLines(reader);
+        } catch (IOException e) {
+            e.printStackTrace();
+            throw new RuntimeException(e.getMessage());
+        }
+    }
+
+    // 按行读取文件
+    private static List<String> readLines(BufferedReader reader) {
+        List<String> result = new ArrayList<>();
+        String line;
+        try {
+            while ((line = reader.readLine()) != null) {
+                result.add(line);
+            }
+            return result;
+        } catch (IOException e) {
+            e.printStackTrace();
+            throw new RuntimeException(e.getMessage());
+        }
+    }
+
+    public static String readText(String path) {
+        return readText(path, "utf-8");
+    }
+
+    public static String readTextWithUTF8(String path) {
+        return readText(path, "utf-8");
+    }
+
+    public static String readTextWithGBK(String path) {
+        return readText(path, "gbk");
+    }
+
+    // 读取完整文件
+    public static String readText(String path, String charsetName) {
+        try {
+            return new String(Files.readAllBytes(Paths.get(path)), charsetName);
+        } catch (IOException e) {
+            e.printStackTrace();
+            throw new RuntimeException("读取文本文件出错: " + e.getMessage());
+        }
+    }
+
+    public static void writeToFile(String text, String path) {
+        writeToFile(text, path, "utf-8");
+    }
+
+    public static void writeToFileWithUTF8(String text, String path) {
+        writeToFile(text, path, "utf-8");
+    }
+
+    public static void writeToFileWithGBK(String text, String path) {
+        writeToFile(text, path, "gbk");
+    }
+
+    public static void writeToFile(String text, String path, String charsetName) {
+        writeToFile(text, new File(path), charsetName);
+    }
+
+    // 写入文件本舰
+    public static void writeToFile(String text, File file, String charsetName) {
+        try (OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(file), charsetName)) {
+            writer.write(text);
+        } catch (IOException e) {
+            e.printStackTrace();
+            throw new RuntimeException("写入文本文件出错:" + e.getMessage());
+        }
+    }
+}

+ 2 - 2
tsl_data/src/main/java/com/nokia/tsl_data/config/TaskRunner.java

@@ -10,10 +10,10 @@ import com.nokia.tsl_data.service.TslCronTaskService;
 /**
  * 在项目启动时根据配置启动任务
  */
-@Component
+// @Component
 public class TaskRunner implements CommandLineRunner {
 
-    @Value("${tslTask.isStarted}")
+    @Value("${tslTask.isStarted:false}")
     private boolean isStarted;
 
     @Value("${tslTask.cronExpression}")

+ 36 - 0
tsl_data/src/main/java/com/nokia/tsl_data/dao/MobileCompDao.java

@@ -40,6 +40,42 @@ public interface MobileCompDao {
      */
     List<Map<String, Object>> selectRepeatTsCountForDay(String day);
 
+    default List<Map<String, Object>> selectRepeatTsCountForPreDay(String day) {
+        return selectRepeatTsCountForPreDay(day, 2);
+    }
+
+    /**
+     * 递归获取前一天数据,如果前一天数据为空,则再次向前一天
+     */
+    default List<Map<String, Object>> selectRepeatTsCountForPreDay(String day, int stackLayerCount) {
+        do {
+            stackLayerCount -= 1;
+            String preDay = getPreDay(day);
+            List<Map<String, Object>> result = selectRepeatTsCountForDay(preDay);
+            if (result.size() == 13) {
+                // 获取到了就返回
+                return result;
+            } else if (day.endsWith("01")) {
+                // 1号数据缺失
+                throw new RuntimeException("获取之前数据失败...");
+            } else {
+                // 再向前倒1天
+                return selectRepeatTsCountForPreDay(preDay, stackLayerCount);
+            }
+        } while (stackLayerCount > 0);
+    }
+
+    /**
+     * 针对每月1日返回1号,针对其他时间返回前一天
+     */
+    default String getPreDay(String day) {
+        if (!day.endsWith("01")) {
+            return String.valueOf(Integer.parseInt(day) - 1);
+        } else {
+            return day;
+        }
+    }
+
     /**
      * 投诉清单按日按地市计数
      * 

+ 8 - 0
tsl_data/src/main/java/com/nokia/tsl_data/dao/TargetTsRatioDao.java

@@ -4,7 +4,9 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
 
 @Mapper
 public interface TargetTsRatioDao {
@@ -26,4 +28,10 @@ public interface TargetTsRatioDao {
      */
     @Select("select city_name, customer_target_ts_ratio from report_auto.target_ts_ratio where month_id = #{monthId}")
     List<Map<String, Object>> selectCustomerTargetTsRatioForMonth(String monthId);
+
+    @Select("select city_name, management_target_ts_ratio, customer_target_ts_ratio from report_auto.target_ts_ratio")
+    List<Map<String, Object>> findAll();
+
+    @Update("update report_auto.target_ts_ratio set management_target_ts_ratio = #{value} where month_id = #{monthId} and city_name = #{city}")
+    void updateMangementTargetTsRatio(@Param("monthId") String monthId,@Param("city") String city,@Param("value") double value);
 }

+ 0 - 3
tsl_data/src/main/java/com/nokia/tsl_data/dao/TslDao.java

@@ -25,9 +25,6 @@ public interface TslDao {
 
     /**
      * 查询河北_CEM高品质2日统计数据量
-     * 
-     * @param day
-     * @return
      */
     int selectQualityCountForDay(String day);
 

+ 6 - 5
tsl_data/src/main/java/com/nokia/tsl_data/service/TslDataService.java

@@ -276,11 +276,12 @@ public class TslDataService {
     public List<List<Object>> getSheet2Data(String day) {
         // 从数据库
         List<Map<String, Object>> dayData = mobileCompDao.selectRepeatTsCountForDay(day);
-        List<Map<String, Object>> preDayData = dayData;
-        if (!day.endsWith("01")) {
-            String preDay = String.valueOf(Integer.parseInt(day) - 1);
-            preDayData = mobileCompDao.selectRepeatTsCountForDay(preDay);
-        }
+        List<Map<String, Object>> preDayData = mobileCompDao.selectRepeatTsCountForPreDay(day);
+        // List<Map<String, Object>> preDayData = dayData;
+        // if (!day.endsWith("01")) {
+        // String preDay = String.valueOf(Integer.parseInt(day) - 1);
+        // preDayData = mobileCompDao.selectRepeatTsCountForDay(preDay);
+        // }
         // 转化格式方便读取
         Map<String, Map<String, Object>> dayMap = new HashMap<>();
         Map<String, Map<String, Object>> preMap = new HashMap<>();

+ 17 - 2
tsl_data/src/main/java/com/nokia/tsl_data/service/TslTaskService.java

@@ -78,6 +78,23 @@ public class TslTaskService {
         }
     }
 
+    public void doTask(String day) {
+        try {
+            // 检查数据源
+            // checkSrcExsit(day);
+            // 数据入库 v1.5修改修改了入库的表
+            // tslWaraHouseService.dataWaraHouseTask(day);
+            // 生成xlsx
+            reportGenerateTask(day);
+            // 截图
+            screenShotTask(day);
+        } catch (Exception e) {
+            log.error("定时任务出错--{}", e.getMessage());
+            e.printStackTrace();
+            pushMessageUtil.sendTextMessage("定时任务出错--" + e.getMessage());
+        }
+    }
+
     /**
      * 检查源文件是否存在,不存在发送提醒,等待1小时后再次检查
      * 
@@ -126,8 +143,6 @@ public class TslTaskService {
 
     /**
      * 截图任务
-     * 
-     * @param day
      */
     public void screenShotTask(String day) {
         String screenShotPath = outputPath + day + "/";

+ 6 - 2
tsl_data/src/main/java/com/nokia/tsl_data/service/TslWaraHouseService.java

@@ -92,6 +92,7 @@ public class TslWaraHouseService {
      * 河北_CEM移网质量投诉明细 数据入库
      * report_auto.he_d_mobile_comp
      * v1.5 修改为入库report_auto.he_d_mobile_comp_new
+     * v1.9 修改分割符为ascII SOH
      * 
      * @throws IOException
      * @throws FileNotFoundException
@@ -100,10 +101,11 @@ public class TslWaraHouseService {
     public void waraHouseMobileComp(String day) throws FileNotFoundException, IOException {
         String filePath = MOBILE_COMP_DIR + MOBILE_COMP_PREFIX + day + ".csv";
         try (Reader reader = new InputStreamReader(new FileInputStream(filePath), StandardCharsets.UTF_8)) {
+            char delimiter = 1;
             CSVParser parser = CSVFormat.DEFAULT.builder()
                     .setRecordSeparator("\n")
                     .setQuote(null)
-                    .setDelimiter("||")
+                    .setDelimiter(delimiter)
                     .setSkipHeaderRecord(false)
                     .build().parse(reader);
 
@@ -124,6 +126,7 @@ public class TslWaraHouseService {
     /**
      * 河北_CEM高品质2日统计 数据入库
      * report_auto.he_d_high_quality
+     * v1.9 修改分割符为ascII SOH
      * 
      * @throws IOException
      * @throws FileNotFoundException
@@ -132,10 +135,11 @@ public class TslWaraHouseService {
     public void waraHouseHighQuality(String day) throws FileNotFoundException, IOException {
         String filePath = HIGH_QUALITY_DIR + HIGH_QUALITY_PREFIX + day + ".csv";
         try (Reader reader = new InputStreamReader(new FileInputStream(filePath), StandardCharsets.UTF_8)) {
+            char delimiter = 1;
             CSVParser parser = CSVFormat.DEFAULT.builder()
                     .setRecordSeparator("\n")
                     .setQuote(null)
-                    .setDelimiter(",")
+                    .setDelimiter(delimiter)
                     .setSkipHeaderRecord(false)
                     .build().parse(reader);
 

+ 1 - 11
tsl_data/src/main/resources/application-dev.properties

@@ -7,24 +7,14 @@
 # 10.9上PG数据库
 spring.datasource.driver-class-name=org.postgresql.Driver
 spring.datasource.url=jdbc:postgresql://192.168.10.9:5432/sqmmt
-# spring.datasource.username=report_auto
 spring.datasource.username=postgres
-# spring.datasource.password=Richr00t!
 spring.datasource.password=Richr00t#
 
 # 生成文件的输出路径,末尾带/
 tslTask.outputPath=D:/src/
 
 # 测试环境路径配置--本地PC
-tslTask.source.MOBILE_COMP_SQL=insert into report_auto.he_d_mobile_comp_new (month_id,day_id,acct_date,sheet_no,is_online_complete,contact_no,busi_no,serv_content,last_deal_content,deal_depart_name,deal_opinion,serv_type,bus_type,duty_reason,accept_channel,submit_channel,compl_area_local,duty_major,product_name,sp_product_code,pre_repair_name,pre_repair_charges,fault_location,cust_level,satisfaction_in_reply,is_ok_in_reply,accept_time,end_time,proce_time,cust_area,is_cust_serv_complete,is_send_sheet_complete,is_repeat,is_upgrade,is_timeout,gis_city,process_nums,deal_depart_name_1,deal_depart_name_2,deal_depart_name_3,first_call_back_time,proce_remark,duty_major_day,duty_reason_id_day,duty_major_month,duty_reason_id_month,voice_text) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);
 # 路径的配置最后一定要带上/
 tslTask.source.MOBILE_COMP_DIR=D:/src/
-tslTask.source.MOBILE_COMP_PREFIX=HE_D_MOBILE_COMPLAINT_DETAILS_DAY_1087468015013851136_
-# 这里的字段数量和csv源文件字段数量相同
-tslTask.source.MOBILE_COMP_FIELD_NUM=47
-
-tslTask.source.HIGH_QUALITY_SQL=insert into report_auto.he_d_high_quality (month_id,day_id,acct_date,businoareaname,profes_dep,big_type_name,small_type_name,total_complaints,hotline_complaints,other_complaint,litigation_volume,satisfaction_rate,satisfaction_count,total_evaluation,complaint_satisfied,complaint_satisfied_list,complaint_satisfied_count,complaint_resolution,complaint_resolution_list,complaint_resolution_count,complaint_response,complaint_response_list,complaint_response_count,complaint,fault_satisfaction_rate,fault_satisfaction_list,fault_satisfaction_count,fault_resolution_rate,fault_resolution_list,fault_resolution_count,fault_response_rate,fault_response_list,fault_response_count) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);
 # 路径的配置最后一定要带上/
-tslTask.source.HIGH_QUALITY_DIR=D:/src/
-tslTask.source.HIGH_QUALITY_PREFIX=HE_D_HIGH_QUALITY_COUNT_DAY_
-tslTask.source.HIGH_QUALITY_FIELD_NUM=33
+tslTask.source.HIGH_QUALITY_DIR=D:/src/

+ 0 - 12
tsl_data/src/main/resources/application-pro.properties

@@ -5,15 +5,3 @@ spring.datasource.url=jdbc:postgresql://192.168.10.9:5432/sqmmt
 spring.datasource.username=postgres
 # spring.datasource.password=Richr00t!
 spring.datasource.password=Richr00t#
-
-tslTask.source.MOBILE_COMP_SQL=insert into report_auto.he_d_mobile_comp_new (month_id,day_id,acct_date,sheet_no,is_online_complete,contact_no,busi_no,serv_content,last_deal_content,deal_depart_name,deal_opinion,serv_type,bus_type,duty_reason,accept_channel,submit_channel,compl_area_local,duty_major,product_name,sp_product_code,pre_repair_name,pre_repair_charges,fault_location,cust_level,satisfaction_in_reply,is_ok_in_reply,accept_time,end_time,proce_time,cust_area,is_cust_serv_complete,is_send_sheet_complete,is_repeat,is_upgrade,is_timeout,gis_city,process_nums,deal_depart_name_1,deal_depart_name_2,deal_depart_name_3,first_call_back_time,proce_remark,duty_major_day,duty_reason_id_day,duty_major_month,duty_reason_id_month,voice_text) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);
-# 路径的配置最后一定要带上/
-tslTask.source.MOBILE_COMP_DIR=/data/nenglishangdian/mobile_complaint/
-tslTask.source.MOBILE_COMP_PREFIX=HE_D_MOBILE_COMPLAINT_DETAILS_DAY_1087468015013851136_
-tslTask.source.MOBILE_COMP_FIELD_NUM=47
-
-tslTask.source.HIGH_QUALITY_SQL=insert into report_auto.he_d_high_quality (month_id,day_id,acct_date,businoareaname,profes_dep,big_type_name,small_type_name,total_complaints,hotline_complaints,other_complaint,litigation_volume,satisfaction_rate,satisfaction_count,total_evaluation,complaint_satisfied,complaint_satisfied_list,complaint_satisfied_count,complaint_resolution,complaint_resolution_list,complaint_resolution_count,complaint_response,complaint_response_list,complaint_response_count,complaint,fault_satisfaction_rate,fault_satisfaction_list,fault_satisfaction_count,fault_resolution_rate,fault_resolution_list,fault_resolution_count,fault_response_rate,fault_response_list,fault_response_count) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);
-# 路径的配置最后一定要带上/
-tslTask.source.HIGH_QUALITY_DIR=/data/nenglishangdian/HE_D_HIGH_QUALITY_COUNT_DAY/
-tslTask.source.HIGH_QUALITY_PREFIX=HE_D_HIGH_QUALITY_COUNT_DAY_
-tslTask.source.HIGH_QUALITY_FIELD_NUM=33

+ 12 - 0
tsl_data/src/main/resources/application.properties

@@ -17,3 +17,15 @@ tslTask.outputPath=/data/report_auto/output/
 tslTask.isStarted=true
 # 定时任务表达式每天应只执行1次,默认每天14点10分执行
 tslTask.cronExpression=0 45 13 * * *
+
+tslTask.source.MOBILE_COMP_SQL=insert into report_auto.he_d_mobile_comp_new (month_id,day_id,acct_date,sheet_no,is_online_complete,contact_no,busi_no,serv_content,last_deal_content,deal_depart_name,deal_opinion,serv_type,bus_type,duty_reason,accept_channel,submit_channel,compl_area_local,duty_major,product_name,sp_product_code,pre_repair_name,pre_repair_charges,fault_location,cust_level,satisfaction_in_reply,is_ok_in_reply,accept_time,end_time,proce_time,cust_area,is_cust_serv_complete,is_send_sheet_complete,is_repeat,is_upgrade,is_timeout,gis_city,process_nums,deal_depart_name_1,deal_depart_name_2,deal_depart_name_3,first_call_back_time,proce_remark,duty_major_day,duty_reason_id_day,duty_major_month,duty_reason_id_month,voice_text) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);
+# 路径的配置最后一定要带上/
+tslTask.source.MOBILE_COMP_DIR=/data/nenglishangdian/mobile_complaint/
+tslTask.source.MOBILE_COMP_PREFIX=HE_D_MOBILE_COMPLAINT_DETAILS_DAY_1087468015013851136_
+tslTask.source.MOBILE_COMP_FIELD_NUM=47
+
+tslTask.source.HIGH_QUALITY_SQL=insert into report_auto.he_d_high_quality (month_id,day_id,acct_date,businoareaname,profes_dep,big_type_name,small_type_name,total_complaints,hotline_complaints,other_complaint,litigation_volume,satisfaction_rate,satisfaction_count,total_evaluation,complaint_satisfied,complaint_satisfied_list,complaint_satisfied_count,complaint_resolution,complaint_resolution_list,complaint_resolution_count,complaint_response,complaint_response_list,complaint_response_count,complaint,fault_satisfaction_rate,fault_satisfaction_list,fault_satisfaction_count,fault_resolution_rate,fault_resolution_list,fault_resolution_count,fault_response_rate,fault_response_list,fault_response_count) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);
+# 路径的配置最后一定要带上/
+tslTask.source.HIGH_QUALITY_DIR=/data/nenglishangdian/high_quality_count/
+tslTask.source.HIGH_QUALITY_PREFIX=HE_D_HIGH_QUALITY_COUNT_DAY_1087387382887477248_
+tslTask.source.HIGH_QUALITY_FIELD_NUM=33

+ 9 - 18
tsl_data/src/test/java/com/nokia/tsl_data/TslDataApplicationTest.java

@@ -7,37 +7,28 @@ import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 
-import com.nokia.tsl_data.dao.TslDao;
-import com.nokia.tsl_data.service.TslDataService;
+import com.nokia.tsl_data.dao.MobileCompDao;
 import com.nokia.tsl_data.service.TslTaskService;
 
 @SpringBootTest
 public class TslDataApplicationTest {
 
-    @Autowired
-    private TslDataService service;
-
-    @Test
-    void test() {
-        List<List<List<Object>>> sheet1Data = service.getSheet4_6Data("20230701");
-        System.out.println(sheet1Data);
-    }
-
     @Autowired
     private TslTaskService tslTaskService;
 
     @Test
-    void test1() {
-        tslTaskService.reportGenerateTask("20230627");
+    void test2() {
+        tslTaskService.doTask("20231022");
     }
 
     @Autowired
-    private TslDao tslDao;
+    private MobileCompDao mobileCompDao;
 
     @Test
-    void test2() {
-        List<Map<String, Object>> selectClientRatioForDay = tslDao.selectClientRatioForDay("2023-07-03");
-        System.out.println(selectClientRatioForDay);
+    void test() {
+        List<Map<String, Object>> selectRepeatTsCountForPreDay = mobileCompDao.selectRepeatTsCountForPreDay("20231022");
+        for (Map<String,Object> map : selectRepeatTsCountForPreDay) {
+            System.out.println(map);
+        }
     }
-
 }