Bläddra i källkod

修复了全省平均处理时长的错误

“lifuquan” 1 år sedan
förälder
incheckning
53a9f3d654

+ 8 - 8
doc/开发环境/2023年适配/2024年适配.md

@@ -157,7 +157,7 @@ from t1 group by real_name order by real_name
 POST http://192.168.10.7:22222/tsl_data/report/generate/v3
 POST http://192.168.10.7:22222/tsl_data/report/generate/v3
 Content-Type: application/json
 Content-Type: application/json
 
 
-20240105
+20240118
 ```
 ```
 
 
 ### 2. 数据入库
 ### 2. 数据入库
@@ -168,7 +168,7 @@ Content-Type: application/json
 POST http://192.168.10.7:22222/tsl_data/source/warehouse/mobile_complaint
 POST http://192.168.10.7:22222/tsl_data/source/warehouse/mobile_complaint
 Content-Type: application/json
 Content-Type: application/json
 
 
-20240105
+20240117
 ```
 ```
 
 
 ### 2.2 high_quality_count
 ### 2.2 high_quality_count
@@ -177,7 +177,7 @@ Content-Type: application/json
 POST http://192.168.10.7:22222/tsl_data/source/warehouse/high_quality_count
 POST http://192.168.10.7:22222/tsl_data/source/warehouse/high_quality_count
 Content-Type: application/json
 Content-Type: application/json
 
 
-20240105
+20240117
 ```
 ```
 
 
 ### 2.3 high_quality_list
 ### 2.3 high_quality_list
@@ -186,7 +186,7 @@ Content-Type: application/json
 POST http://192.168.10.7:22222/tsl_data/source/warehouse/high_quality_list
 POST http://192.168.10.7:22222/tsl_data/source/warehouse/high_quality_list
 Content-Type: application/json
 Content-Type: application/json
 
 
-20240105
+20240117
 ```
 ```
 
 
 ### 2.4 complaint_details_fix_ywd
 ### 2.4 complaint_details_fix_ywd
@@ -195,7 +195,7 @@ Content-Type: application/json
 POST http://192.168.10.7:22222/tsl_data/source/warehouse/complaint_details_fix_ywd
 POST http://192.168.10.7:22222/tsl_data/source/warehouse/complaint_details_fix_ywd
 Content-Type: application/json
 Content-Type: application/json
 
 
-20240107
+20240117
 ```
 ```
 
 
 ### 2.5 management_detail
 ### 2.5 management_detail
@@ -204,7 +204,7 @@ Content-Type: application/json
 POST http://192.168.10.7:22222/tsl_data/source/update/management_detail
 POST http://192.168.10.7:22222/tsl_data/source/update/management_detail
 Content-Type: application/json
 Content-Type: application/json
 
 
-20240107
+20240117
 ```
 ```
 
 
 ### 2.6 highQualityData
 ### 2.6 highQualityData
@@ -213,7 +213,7 @@ Content-Type: application/json
 POST http://192.168.10.7:22222/tsl_data/source/highQualityData/generate
 POST http://192.168.10.7:22222/tsl_data/source/highQualityData/generate
 Content-Type: application/json
 Content-Type: application/json
 
 
-20240104
+20240117
 ```
 ```
 
 
 ### 2.7 work_flow_basic_data
 ### 2.7 work_flow_basic_data
@@ -230,7 +230,7 @@ Content-Type: application/json
 POST http://192.168.10.7:22222/tsl_data/source/warehouse/cem_mobile_experience_list
 POST http://192.168.10.7:22222/tsl_data/source/warehouse/cem_mobile_experience_list
 Content-Type: application/json
 Content-Type: application/json
 
 
-20240107
+20240117
 ```
 ```
 
 
 ## 取消sheet2客户端考核, 新增 服务请求压降
 ## 取消sheet2客户端考核, 新增 服务请求压降

+ 13 - 14
doc/数据订阅/客户提供/abc.txt

@@ -1,14 +1,13 @@
-石家庄	18.0	23.0	24.7	25.7	23.1	25.7	25.7	24.6	21.7	17.7	17.6	21.8
-唐山	17.6	19.5	21.4	19.8	20.8	19.8	19.8	22.0	19.7	16.8	15.6	20.2
-秦皇岛	17.4	16.8	21.0	20.4	20.6	20.4	20.4	20.1	18.3	15.8	16.9	23.2
-邯郸	15.3	16.2	17.9	17.9	18.0	17.9	17.9	17.4	16.3	13.6	13.1	20.1
-邢台	13.3	14.6	15.6	16.0	18.2	16.0	16.0	17.4	16.0	13.5	13.0	17.8
-保定	19.2	22.2	19.7	21.0	21.2	21.0	21.0	26.7	20.5	16.5	15.3	18.1
-张家口	14.7	14.4	16.2	18.9	19.9	18.9	18.9	19.7	15.9	13.2	12.0	15.3
-承德	17.7	18.0	21.6	24.5	24.0	24.5	24.5	25.4	19.7	17.0	15.9	21.0
-廊坊	16.4	16.9	19.5	20.5	21.5	20.5	20.5	22.3	17.7	15.2	14.1	16.3
-沧州	15.5	17.4	18.2	21.5	25.6	21.5	21.5	19.3	16.8	15.3	13.7	16.1
-衡水	13.9	14.7	15.0	17.0	16.4	17.0	17.0	17.4	13.3	11.2	10.0	13.2
-雄安	12.5	14.3	14.9	17.5	18.2	17.5	17.5	16.8	12.9	10.8	10.8	13.9
-全省	17.3	21.1	21.9	22.6	22.8	16.6	18.0	23.7	19.1	16.1	15.2	19.5
-
+保定	22.7	22.2	19.7	21.0	21.2	21.0	21.0	26.7	20.5	16.5	15.3	18.1
+沧州	20.0	17.4	18.2	21.5	25.6	21.5	21.5	19.3	16.8	15.3	13.7	16.1
+承德	34.5	18.0	21.6	24.5	24.0	24.5	24.5	25.4	19.7	17.0	15.9	21.0
+邯郸	22.8	16.2	17.9	17.9	18.0	17.9	17.9	17.4	16.3	13.6	13.1	20.1
+衡水	17.4	14.7	15.0	17.0	16.4	17.0	17.0	17.4	13.3	11.2	10.0	13.2
+廊坊	20.5	16.9	19.5	20.5	21.5	20.5	20.5	22.3	17.7	15.2	14.1	16.3
+秦皇岛	23.3	16.8	21.0	20.4	20.6	20.4	20.4	20.1	18.3	15.8	16.9	23.2
+石家庄	23.6	23.0	24.7	25.7	23.1	25.7	25.7	24.6	21.7	17.7	17.6	21.8
+唐山	25.3	19.5	21.4	19.8	20.8	19.8	19.8	22.0	19.7	16.8	15.6	20.2
+邢台	20.4	14.6	15.6	16.0	18.2	16.0	16.0	17.4	16.0	13.5	13.0	17.8
+雄安	15.5	14.3	14.9	17.5	18.2	17.5	17.5	16.8	12.9	10.8	10.8	13.9
+张家口	20.3	14.4	16.2	18.9	19.9	18.9	18.9	19.7	15.9	13.2	12.0	15.3
+全省	22.5	21.1	21.9	22.6	22.8	22.6	22.6	22.4	19.1	16.1	15.2	19.5

BIN
doc/数据订阅/客户提供/地市目标.xlsx


+ 2 - 1
src/main/java/com/nokia/tsl_data/service/WorkFlowService.java

@@ -215,7 +215,8 @@ public class WorkFlowService {
         } else {
         } else {
             allCity.add(dayMap.get("全省").get("avg_duration"));
             allCity.add(dayMap.get("全省").get("avg_duration"));
             allCity.add(tslDataProperties.getDuration());
             allCity.add(tslDataProperties.getDuration());
-            allCity.add((double) allCity.get(2) - (double) allCity.get(1));
+            // 修改为与目标差距
+            allCity.add((double) allCity.get(2) - (int) allCity.get(3));
         }
         }
         return result;
         return result;
     }
     }

+ 17 - 10
src/test/java/com/nokia/tsl_data/TslDataApplicationTest.java

@@ -1,15 +1,14 @@
 package com.nokia.tsl_data;
 package com.nokia.tsl_data;
 
 
-import java.time.Instant;
-import java.time.ZoneId;
-import java.time.format.DateTimeFormatter;
+import java.util.List;
 
 
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest;
 
 
+import com.nokia.tsl_data.dao.TargetTsRatioMapper;
 import com.nokia.tsl_data.service.TaskService;
 import com.nokia.tsl_data.service.TaskService;
-import com.nokia.tsl_data.service.WorkFlowService;
+import com.nokia.tsl_data.util.TextUtil;
 
 
 @SpringBootTest
 @SpringBootTest
 class TslDataApplicationTest {
 class TslDataApplicationTest {
@@ -23,13 +22,21 @@ class TslDataApplicationTest {
     }
     }
 
 
     @Autowired
     @Autowired
-    private WorkFlowService workFlowService;
+    private TargetTsRatioMapper targetTsRatioMapper;
 
 
     @Test
     @Test
-    void test1() {
-        DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
-                .withZone(ZoneId.of("Asia/Shanghai"));
-        Instant start = Instant.from(dateFormat.parse("2023-12-01 00:00:00"));
-        workFlowService.updateWorkFlowBasicData(start, Instant.now());
+    void test2() {
+        String path = "/home/lfq/Documents/code/tsl-data/doc/数据订阅/客户提供/abc.txt";
+        List<String> lines = TextUtil.readLines(path);
+        lines.forEach(line -> {
+            String[] split = line.split("\t");
+            String city = split[0];
+            for (int i = 1; i < split.length; i++) {
+                String month = "2024" + (i >= 10 ? i : "0" + i);
+                double target = Double.parseDouble(split[i]);
+                System.out.println(city + "==" + month + "==" + target);
+                targetTsRatioMapper.updateServiceRequestTargetRatio(month, city, target);
+            }
+        });
     }
     }
 }
 }