Procházet zdrojové kódy

超时工单和处理时长基本完成

“lifuquan” před 1 rokem
rodič
revize
63fe1d2f9a

+ 30 - 24
src/main/java/com/nokia/tsl_data/dao/WorkFlowBasicDataMapper.java

@@ -1,37 +1,43 @@
 package com.nokia.tsl_data.dao;
 
+import java.util.Date;
 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;
 
 @Mapper
 public interface WorkFlowBasicDataMapper {
 
-    /**
-     * 超时工单统计
-     */
-    @Select("with t1 as (select sdd.real_name as city,kfsn, to_timestamp(kf_file_time, 'yyyy-mm-dd hh24:mi:ss')" +
-            " - to_timestamp(kd_accept_time, 'yyyy-mm-dd hh24:mi:ss') > interval '36hours' as is_timeout\n" + //
-            "from tsl_data.work_flow_basic_data wfbd, tsl_data.sys_data_dictionary sdd \n" + //
-            "where kf_file_time is not null and re_is_status_id != '06678b79185349b5bf0c24490a978fbb'\n" + //
-            "and wfbd.city_id = sdd.nick_code and to_timestamp(kd_accept_time, 'yyyy-mm-dd hh24:mi:ss') >" +
-            " to_timestamp(#{date}, 'yyyy-mm-dd hh24:mi:ss')),\n" + //
-            "t2 as (select '全省' as city, count(1) as total_num, count(is_timeout or null) as timeout_num from t1),\n" + //
-            "t3 as (select city, count(1) as total_num, count(is_timeout or null) as timeout_num from t1 group by city)\n"
-            + "select * from t2 union select* from t3")
-    List<Map<String, Object>> selectTimeoutTsCountForDay(String date);
+        /**
+         * 超时工单统计
+         */
+        @Select("with t1 as (select sdd.real_name as city,kfsn, to_timestamp(kf_file_time, 'yyyy-mm-dd hh24:mi:ss')" +
+                        " - to_timestamp(kd_accept_time, 'yyyy-mm-dd hh24:mi:ss') > interval '36hours' as is_timeout\n"
+                        + "from tsl_data.work_flow_basic_data wfbd, tsl_data.sys_data_dictionary sdd \n" + //
+                        "where kf_file_time is not null and re_is_status_id != '06678b79185349b5bf0c24490a978fbb'\n" + //
+                        "and wfbd.city_id = sdd.nick_code and" +
+                        " to_timestamp(kd_accept_time, 'yyyy-mm-dd hh24:mi:ss') >= #{start}"
+                        + " and to_timestamp(kd_accept_time, 'yyyy-mm-dd hh24:mi:ss') <= #{end})," +
+                        "t2 as (select '全省' as city, count(1) as total_num, count(is_timeout or null) as timeout_num, " +
+                        " count(is_timeout or null)::float8 / count(1) as timeout_ratio from t1),"
+                        + " t3 as (select city, count(1) as total_num, count(is_timeout or null) as timeout_num, " +
+                        " count(is_timeout or null)::float8 / count(1) as timeout_ratio from t1 group by city) " +
+                        " select * from t2 union select* from t3")
+        List<Map<String, Object>> selectTimeoutTsCountForDay(@Param("start") Date start, @Param("end") Date end);
 
-    /**
-     * 处理时长统计
-     */
-    @Select("with t1 as (select sdd.real_name,kfsn, (extract(epoch from to_timestamp(kf_file_time, 'YYYY-MM-DD HH24:MI:SS'))"
-            + " - extract(epoch from to_timestamp(kd_accept_time, 'YYYY-MM-DD HH24:MI:SS'))) / 3600 as cost_time\n" + //
-            "from tsl_data.work_flow_basic_data wfbd, tsl_data.sys_data_dictionary sdd \n" + //
-            "where wfbd.city_id = sdd.nick_code and kf_file_time is not null and re_is_status_id != '06678b79185349b5bf0c24490a978fbb'\n"
-            + "and to_timestamp(wfbd.kd_accept_time, 'yyyy-mm-dd hh24:mi:ss') > to_timestamp(#{date}, 'yyyy-mm-dd hh24:mi:ss'))\n"
-            + "select real_name as city, avg(cost_time) as avg_cost\n" + //
-            "from t1 group by real_name order by real_name")
-    List<Map<String, Object>> selectTsDurationForDay(String date);
+        /**
+         * 处理时长统计
+         */
+        @Select("with t1 as (select sdd.real_name,kfsn, (extract(epoch from to_timestamp(kf_file_time, 'YYYY-MM-DD HH24:MI:SS'))"
+                        + " - extract(epoch from to_timestamp(kd_accept_time, 'YYYY-MM-DD HH24:MI:SS'))) / 3600 as cost_time\n"
+                        + "from tsl_data.work_flow_basic_data wfbd, tsl_data.sys_data_dictionary sdd \n" + //
+                        "where wfbd.city_id = sdd.nick_code and kf_file_time is not null and re_is_status_id != '06678b79185349b5bf0c24490a978fbb'\n"
+                        + "and to_timestamp(wfbd.kd_accept_time, 'yyyy-mm-dd hh24:mi:ss') >= #{start}" +
+                        " and to_timestamp(wfbd.kd_accept_time, 'yyyy-mm-dd hh24:mi:ss') <= #{end})"
+                        + "select real_name as city, avg(cost_time) as avg_duration\n" + //
+                        "from t1 group by real_name order by real_name")
+        List<Map<String, Object>> selectTsDurationForDay(@Param("start") Date start, @Param("end") Date end);
 }

+ 124 - 8
src/main/java/com/nokia/tsl_data/service/ReportServiceV3.java

@@ -27,6 +27,7 @@ import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.VerticalAlignment;
 import org.apache.poi.ss.usermodel.Workbook;
 import org.apache.poi.ss.usermodel.WorkbookFactory;
+import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.xssf.usermodel.XSSFCellStyle;
 import org.apache.poi.xssf.usermodel.XSSFColor;
 import org.apache.poi.xssf.usermodel.XSSFDataFormat;
@@ -50,10 +51,10 @@ public class ReportServiceV3 {
 
     @Autowired
     private SysDataDictionaryRepository sysDataDictionaryRepository;
-
     @Autowired
     private ManagementDetailService managementDetailService;
-
+    @Autowired
+    private WorkFlowService workFlowService;
     @Autowired
     private TslDataService tslDataService;
 
@@ -121,7 +122,10 @@ public class ReportServiceV3 {
         writeSheet1(workbookWrapper, day);
         log.info("帐期 {} 管理端-移网感知类 sheet写入成功", day);
         // 1.2 写入 服请情况
-        // 1.3 写入 重复投诉 超时工单情况
+        // 1.3 写入 投诉处理时长、超时工单概况
+        // TODO
+        writeSheet3(workbookWrapper, day);
+        log.info("帐期 {} 投诉处理时长、超时工单概况 sheet写入成功", day);
         // 1.4 写入三率
         tslDataService.checkStatDayCount(day);
         writeSheet4_6(workbookWrapper, day);
@@ -316,6 +320,123 @@ public class ReportServiceV3 {
         }
     }
 
+    /**
+     * 投诉处理时长、超时工单概况
+     */
+    private void writeSheet3(XSSFWorkbookWrapper workbookWrapper, String day) {
+        // 计算时间常数
+        Calendar calendar = Calendar.getInstance(Locale.CHINA);
+        try {
+            calendar.setTime(DAY_FORMAT.parse(day));
+        } catch (ParseException e) {
+            log.error("时间字符串解析失败--{}", day);
+        }
+        int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH);
+        // 修正,MONTH是从0开始
+        int monthOfYear = calendar.get(Calendar.MONTH) + 1;
+        int preMonthOfYear = monthOfYear > 1 ? monthOfYear - 1 : 12;
+        Sheet sheet = workbookWrapper.getWorkbook().createSheet("投诉处理时长、超时工单概况");
+        Row row;
+        Cell cell;
+        CellRangeAddress rangeAddress;
+        // 第一行
+        row = sheet.createRow(0);
+        cell = row.createCell(0);
+        cell.setCellValue(String.format("超时工单情况(1-%s)", dayOfMonth));
+        cell.setCellStyle(workbookWrapper.getCellStyle3());
+        // 合并单元格 A1 - D1
+        rangeAddress = new CellRangeAddress(0, 0, 0, 3);
+        PoiUtil.addMergedRegion(sheet, rangeAddress);
+        cell = row.createCell(6);
+        cell.setCellValue(String.format("平均处理时长(1-%s)", dayOfMonth));
+        cell.setCellStyle(workbookWrapper.getCellStyle3());
+        // 合并单元格 G1 - J1
+        rangeAddress = new CellRangeAddress(0, 0, 6, 9);
+        PoiUtil.addMergedRegion(sheet, rangeAddress);
+        // 第二行
+        row = sheet.createRow(1);
+        cell = row.createCell(0);
+        cell.setCellValue("地市");
+        cell.setCellStyle(workbookWrapper.getCellStyle3());
+        cell = row.createCell(1);
+        cell.setCellValue("工单数");
+        cell.setCellStyle(workbookWrapper.getCellStyle3());
+        cell = row.createCell(2);
+        cell.setCellValue("超时工单数");
+        cell.setCellStyle(workbookWrapper.getCellStyle3());
+        cell = row.createCell(3);
+        cell.setCellValue("超时工单占比");
+        cell.setCellStyle(workbookWrapper.getCellStyle3());
+        cell = row.createCell(6);
+        cell.setCellValue("地市");
+        cell.setCellStyle(workbookWrapper.getCellStyle3());
+        cell = row.createCell(7);
+        cell.setCellValue(String.format("%s月", preMonthOfYear));
+        cell.setCellStyle(workbookWrapper.getCellStyle3());
+        cell = row.createCell(8);
+        cell.setCellValue(String.format("%s月", monthOfYear));
+        cell.setCellStyle(workbookWrapper.getCellStyle3());
+        cell = row.createCell(9);
+        cell.setCellValue("涨幅");
+        cell.setCellStyle(workbookWrapper.getCellStyle3());
+        // 写入超时工单情况
+        List<List<Object>> sheet3Data1 = workFlowService.getTimeoutCountInfo(day);
+        int rowNum = 2;
+        for (List<Object> list : sheet3Data1) {
+            row = sheet.createRow(rowNum++);
+            // 地市
+            cell = row.createCell(0);
+            cell.setCellValue(list.get(0).toString());
+            cell.setCellStyle(workbookWrapper.getCellStyle1());
+            // 工单数
+            cell = row.createCell(1);
+            cell.setCellValue((long) list.get(1));
+            cell.setCellStyle(workbookWrapper.getCellStyle1());
+            // 超时工单数
+            cell = row.createCell(2);
+            cell.setCellValue((long) list.get(2));
+            cell.setCellStyle(workbookWrapper.getCellStyle1());
+            // 超时工单占比
+            cell = row.createCell(3);
+            cell.setCellValue(((double) list.get(3)));
+            cell.setCellStyle(workbookWrapper.getCellStyle2());
+        }
+        // 设置条件格式D3-D14
+        PoiUtil.setConditionalFormattingGreenToRed(sheet, 2, 13, 3, 3);
+        // 写入平均处理时长
+        List<List<Object>> sheet3Data2 = workFlowService.getCostTimeInfo(day);
+        rowNum = 2;
+        for (List<Object> list : sheet3Data2) {
+            row = sheet.getRow(rowNum++);
+            // 地市
+            cell = row.createCell(6);
+            cell.setCellValue(list.get(0).toString());
+            cell.setCellStyle(workbookWrapper.getCellStyle1());
+            // 上月
+            cell = row.createCell(7);
+            cell.setCellValue((double) list.get(1));
+            cell.setCellStyle(workbookWrapper.getCellStyle5());
+            // 当月
+            cell = row.createCell(8);
+            cell.setCellValue((double) list.get(2));
+            cell.setCellStyle(workbookWrapper.getCellStyle5());
+            // 涨幅
+            cell = row.createCell(9);
+            cell.setCellValue((double) list.get(3));
+            cell.setCellStyle(workbookWrapper.getCellStyle5());
+        }
+        // 设置条件格式J3-J14
+        PoiUtil.setConditionalFormattingGreenToRed(sheet, 2, 13, 9, 9);
+        // 设置列宽 2048 2276*3 2048*3 2276*2 3612
+        for (int i = 0; i < 10; i++) {
+            sheet.setColumnWidth(i, 2848);
+        }
+        // 设置行高 14.25 25.5 14.25...
+        for (int i = 0; i < 15; i++) {
+            sheet.getRow(i).setHeightInPoints(15.0F);
+        }
+    }
+
     /**
      * 管理端-移网感知类 2024年适配需求
      */
@@ -334,7 +455,6 @@ public class ReportServiceV3 {
         cell.setCellValue(day.substring(0, 4) + "年客服投诉清单各地市投诉率情况(" + sheetName + ")");
         cell.setCellStyle(workbookWrapper.getCellStyle4());
         PoiUtil.addMergedRegion(sheet, 0, 0, 0, dayOfMonth + 7);
-
         // 第二行 列名
         row = sheet.createRow(1);
         cell = row.createCell(0);
@@ -366,7 +486,6 @@ public class ReportServiceV3 {
         cell = row.createCell(dayOfMonth + 7);
         cell.setCellValue("地市");
         cell.setCellStyle(workbookWrapper.getCellStyle1());
-
         int rowNum = 2;
         int cellNum = 0;
         // 写入各地市数据
@@ -403,7 +522,6 @@ public class ReportServiceV3 {
         cell = row.createCell(cellNum);
         cell.setCellValue("全省");
         cell.setCellStyle(workbookWrapper.getCellStyle1());
-
         // 3-15行(2-14)dayOfMonth+2 - dayOfMonth+6是浮点数,设置为显示小数点后2位
         for (int i = 2; i <= 14; i++) {
             row = sheet.getRow(i);
@@ -412,7 +530,6 @@ public class ReportServiceV3 {
                 cell.setCellStyle(workbookWrapper.getCellStyle5());
             }
         }
-
         // 添加条件格式B15-V15
         PoiUtil.setConditionalFormattingGreenToRed(sheet, rowNum, rowNum, 1, dayOfMonth);
         // 添加条件格式(dayOfMonth+3)(3-14)
@@ -421,7 +538,6 @@ public class ReportServiceV3 {
         PoiUtil.setConditionalFormattingGreenToRed(sheet, 2, 13, dayOfMonth + 4, dayOfMonth + 4);
         // 添加条件格式AB3-AB14
         PoiUtil.setConditionalFormattingGreenToRed(sheet, 2, 13, dayOfMonth + 6, dayOfMonth + 6);
-
         // 设置sheet的列宽
         sheet.setColumnWidth(0, 1600);
         for (int i = 1; i <= dayOfMonth; i++) {

+ 140 - 8
src/main/java/com/nokia/tsl_data/service/WorkFlowService.java

@@ -1,18 +1,31 @@
 package com.nokia.tsl_data.service;
 
 import com.alibaba.fastjson2.JSONObject;
+import com.nokia.tsl_data.dao.AvgDurationMapper;
+import com.nokia.tsl_data.dao.SysDataDictionaryRepository;
 import com.nokia.tsl_data.dao.TslDataDao;
+import com.nokia.tsl_data.dao.WorkFlowBasicDataMapper;
 import com.nokia.tsl_data.dao.WorkFlowDao;
 import com.nokia.tsl_data.entity.TaskRecord;
 import com.nokia.tsl_data.entity.WorkFlowBasicData;
 import lombok.extern.slf4j.Slf4j;
+
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.time.Instant;
 import java.time.ZoneId;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
+import java.util.Map;
 
 /**
  * 用于所有查询工单流程的任务
@@ -21,15 +34,19 @@ import java.util.List;
 @Service
 public class WorkFlowService {
 
-    private final WorkFlowDao workFlowDao;
-    private final TslDataDao tslDataDao;
-
-    private final DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.of("Asia/Shanghai"));
+    @Autowired
+    private WorkFlowDao workFlowDao;
+    @Autowired
+    private TslDataDao tslDataDao;
+    @Autowired
+    private WorkFlowBasicDataMapper workFlowBasicDataMapper;
+    @Autowired
+    private SysDataDictionaryRepository sysDataDictionaryRepository;
+    @Autowired
+    private AvgDurationMapper avgDurationMapper;
 
-    public WorkFlowService(WorkFlowDao workFlowDao, TslDataDao tslDataDao) {
-        this.workFlowDao = workFlowDao;
-        this.tslDataDao = tslDataDao;
-    }
+    private final DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
+            .withZone(ZoneId.of("Asia/Shanghai"));
 
     /**
      * 任务名称:更新工作流数据
@@ -62,4 +79,119 @@ public class WorkFlowService {
         }
         return record;
     }
+
+    /**
+     * 超时工单情况
+     */
+    public List<List<Object>> getTimeoutCountInfo(String day) {
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
+        Date start, end;
+        try {
+            start = dateFormat.parse(day.substring(0, 6) + "01000000");
+            end = dateFormat.parse(day+"235959");
+        } catch (ParseException e) {
+            e.printStackTrace();
+            throw new RuntimeException(e.getMessage());
+        }
+        List<Map<String, Object>> data = workFlowBasicDataMapper.selectTimeoutTsCountForDay(start, end);
+        Map<String, Map<String, Object>> dayMap = new HashMap<>();
+        for (Map<String, Object> map : data) {
+            dayMap.put((String) map.get("city"), map);
+        }
+        List<List<Object>> result = new ArrayList<>();
+        // 各地市数据
+        for (String area : sysDataDictionaryRepository.findAllCityName()) {
+            // 地市 工单数 超时工单数 超时工单占比
+            List<Object> list = new ArrayList<>(4);
+            result.add(list);
+            list.add(0, area);
+            // 获取该地市的数据--可能为null
+            Map<String, Object> map = dayMap.get(area);
+            if (map == null) {
+                list.add(1, 0L);
+                list.add(2, 0L);
+                list.add(3, 0.0);
+            } else {
+                list.add(1, map.get("total_num"));
+                list.add(2, map.get("timeout_num"));
+                list.add(3, map.get("timeout_ratio"));
+            }
+        }
+        // 逆序排序
+        result.sort((o1, o2) -> Double.compare((double) o2.get(3), (double) o1.get(3)));
+        // 全省数据
+        List<Object> list = new ArrayList<>();
+        result.add(list);
+        // 地市
+        list.add(0, "全省");
+        // 工单数
+        list.add(1, dayMap.get("全省").get("total_num"));
+        // 超时工单数
+        list.add(2, dayMap.get("全省").get("timeout_num"));
+        // 超时工单占比
+        list.add(3, dayMap.get("全省").get("timeout_ratio"));
+        return result;
+    }
+
+    /**
+     * 平均处理时长
+     */
+    public List<List<Object>> getCostTimeInfo(String day) {
+        Calendar calendar = Calendar.getInstance(Locale.CHINA);
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
+        try {
+            calendar.setTime(dateFormat.parse(day));
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        // 获取上个月的时间
+        calendar.add(Calendar.MONTH, -1);
+        String oldMonthId = new SimpleDateFormat("yyyyMM").format(calendar.getTime());
+        List<Map<String, Object>> oldData = avgDurationMapper.selectOldTsDurationForMonth(oldMonthId);
+        // 如果上月的平均处理时长数据不存在,需要插入
+        if (oldData.size() == 0) {
+            avgDurationMapper.insertOldTsDurationForMonth(oldMonthId);
+            oldData = avgDurationMapper.selectOldTsDurationForMonth(oldMonthId);
+        }
+        // 这里输入的参数格式应为 2014-01-01 00:00:00
+        SimpleDateFormat dateFormat2 = new SimpleDateFormat("yyyyMMddHHmmss");
+        Date start, end;
+        try {
+            start = dateFormat2.parse(day.substring(0, 6) + "01000000");
+            end = dateFormat2.parse(day+"235959");
+        } catch (ParseException e) {
+            e.printStackTrace();
+            throw new RuntimeException(e.getMessage());
+        }
+        List<Map<String, Object>> dayData = workFlowBasicDataMapper.selectTsDurationForDay(start, end);
+        // 转化格式方便读取
+        Map<String, Map<String, Object>> dayMap = new HashMap<>();
+        Map<String, Map<String, Object>> preMap = new HashMap<>();
+        for (Map<String, Object> map : dayData) {
+            dayMap.put((String) map.get("city"), map);
+        }
+        for (Map<String, Object> map : oldData) {
+            preMap.put((String) map.get("city_name"), map);
+        }
+        List<List<Object>> result = new ArrayList<>();
+        // 各地市数据
+        for (String area : sysDataDictionaryRepository.findAllCityName()) {
+            // 地市 上月平均处理时长 当月平均处理时长 涨幅
+            List<Object> list = new ArrayList<>(4);
+            result.add(list);
+            list.add(0, area);
+            list.add(1, preMap.get(area).get("avg_duration"));
+            Map<String, Object> map = dayMap.get(area);
+            if (map == null) {
+                list.add(2, 0.0);
+                list.add(3, 0.0);
+            } else {
+                list.add(2, dayMap.get(area).get("avg_duration"));
+                list.add(3, ((double) list.get(2)) - (double) list.get(1));
+            }
+        }
+        // 逆序排序
+        result.sort((o1, o2) -> Double.compare((double) o2.get(3), (double) o1.get(3)));
+        return result;
+    }
 }

+ 0 - 47
src/test/java/com/nokia/tsl_data/TslDataApplicationTest.java

@@ -1,19 +1,10 @@
 package com.nokia.tsl_data;
 
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
 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.HighQualityCountMapper;
-import com.nokia.tsl_data.dao.TargetTsRatioMapper;
-import com.nokia.tsl_data.entity.TargetTsRatio;
 import com.nokia.tsl_data.service.TaskService;
-import com.nokia.tsl_data.service.TslDataService;
 
 @SpringBootTest
 class TslDataApplicationTest {
@@ -25,42 +16,4 @@ class TslDataApplicationTest {
     void test() {
         taskService.generateReportV3("20240101");
     }
-
-    @Autowired
-    private HighQualityCountMapper highQualityCountMapper;
-
-    @Test
-    void test1() {
-        List<Map<String, Object>> data = highQualityCountMapper.selectClientRatioForDay("2024-01-01");
-        data.forEach(System.out::println);
-    }
-
-    @Autowired
-    private TslDataService tslDataService;
-
-    @Test
-    void test2() {
-        List<List<List<Object>>> sheet4_6Data = tslDataService.getSheet4_6Data("20240101");
-        sheet4_6Data.forEach(list -> list.forEach(System.out::println));
-    }
-
-    @Autowired
-    private TargetTsRatioMapper targetTsRatioMapper;
-
-    // 全省 4.2 3.4 4.4 4.7 5.0 5.1 5.4 5.5 4.9 4.6 4.3 3.7
-    @Test
-    void test3() throws IOException {
-        String s = "4.2	3.4	4.4	4.7	5.0	5.1	5.4	5.5	4.9	4.6	4.3	3.7";
-        String[] split = s.split("\t");
-        System.out.println(Arrays.toString(split));
-        for (int i = 0; i < split.length; i++) {
-            double d = Double.parseDouble(split[i]);
-            TargetTsRatio targetTsRatio = new TargetTsRatio();
-            targetTsRatio.setCityName("全省");
-            targetTsRatio.setMonthId("2024" + (i < 9 ? "0" + (i + 1) : i + 1));
-            targetTsRatio.setManagementTargetRatio(d);
-            targetTsRatioMapper.insertOne(targetTsRatio);
-        }
-
-    }
 }