|
@@ -23,7 +23,7 @@ class TslDataApplicationTest {
|
|
|
|
|
|
@Test
|
|
|
void test1() {
|
|
|
- taskService.runTaskForDay("20241031");
|
|
|
+ taskService.runTaskForDay("20241205");
|
|
|
}
|
|
|
|
|
|
@Autowired
|
|
@@ -36,7 +36,7 @@ class TslDataApplicationTest {
|
|
|
lines.forEach(line -> {
|
|
|
String[] split = line.split("\t");
|
|
|
System.out.println(split[0] + "==" + split[2]);
|
|
|
- userCountService.updateManagementUserCount("202411", split[0], Double.parseDouble(split[2]));
|
|
|
+ userCountService.updateManagementUserCount("202501", split[0], Double.parseDouble(split[2]));
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -45,35 +45,37 @@ class TslDataApplicationTest {
|
|
|
|
|
|
@Test
|
|
|
void test3() {
|
|
|
- String path = "D:/abc.txt";
|
|
|
+ String path = "/data/abc.txt";
|
|
|
List<String> lines = TextUtil.readLines(path, "utf8");
|
|
|
lines.forEach(line -> {
|
|
|
String[] split = line.split("\t");
|
|
|
for (int i = 1; i < split.length; i++) {
|
|
|
String city = split[0];
|
|
|
- String month = i < 5 ? "20240" + (i + 5) : "2024" + (i + 5);
|
|
|
+ String month = i < 10 ? "20250" + i : "2025" + i;
|
|
|
Double target = Double.parseDouble(split[i]);
|
|
|
System.out.println("地市: " + city + " 月分: " + month + " 率值: " + target);
|
|
|
- targetTsRatioMapper.updateManagementTargetRatio(month, city, target);
|
|
|
+ int r = targetTsRatioMapper.updateManagementTargetRatio(month, city, target);
|
|
|
+ if (r == 1) {
|
|
|
+ System.out.println("更新成功");
|
|
|
+ } else {
|
|
|
+ targetTsRatioMapper.insertManagementTargetRatio(month, city, target);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
void test4() {
|
|
|
- String path = "D:/data/abc.txt";
|
|
|
+ String path = "/data/abc.txt";
|
|
|
List<String> lines = TextUtil.readLines(path, "utf8");
|
|
|
lines.forEach(line -> {
|
|
|
String[] split = line.split("\t");
|
|
|
for (int i = 1; i < split.length; i++) {
|
|
|
String city = split[0];
|
|
|
- String month = i < 10 ? "20240" + i : "2024" + i;
|
|
|
+ String month = i < 10 ? "20250" + i : "2025" + i;
|
|
|
Double target = Double.parseDouble(split[i]);
|
|
|
System.out.println("地市: " + city + " 月分: " + month + " 率值: " + target);
|
|
|
- if (i >= 7) {
|
|
|
- targetTsRatioMapper.updateServiceRequestTargetRatio(month, city, target);
|
|
|
- }
|
|
|
- // targetTsRatioMapper.updateManagementTargetRatio(month, city, target);
|
|
|
+ targetTsRatioMapper.updateServiceRequestTargetRatio(month, city, target);
|
|
|
}
|
|
|
});
|
|
|
}
|