Explorar el Código

feat: 跳过空行

weijianghai hace 11 meses
padre
commit
ee9717c0ab

+ 1 - 1
src/main/java/com/nokia/finance/tasks/jobs/car/ruixing/CarBaoFeiJob.java

@@ -154,7 +154,7 @@ public class CarBaoFeiJob {
             // 遍历行
             for (int i = 1; i <= lastRowNum; i++) {
                 Row row = sheet.getRow(i);
-                if (row == null) {
+                if (row == null || row.getCell(0) == null) {
                     continue;
                 }
                 Map<String, String> rowMap = new LinkedHashMap<>();

+ 1 - 1
src/main/java/com/nokia/finance/tasks/jobs/car/ruixing/CarBaseDataDayJob.java

@@ -162,7 +162,7 @@ public class CarBaseDataDayJob {
             // 遍历行
             for (int i = 1; i <= lastRowNum; i++) {
                 Row row = sheet.getRow(i);
-                if (row == null) {
+                if (row == null || row.getCell(0) == null) {
                     continue;
                 }
                 Map<String, String> rowMap = new LinkedHashMap<>();

+ 1 - 1
src/main/java/com/nokia/finance/tasks/jobs/car/ruixing/CarLiChengDayJob.java

@@ -152,7 +152,7 @@ public class CarLiChengDayJob {
             // 遍历行
             for (int i = 1; i <= lastRowNum; i++) {
                 Row row = sheet.getRow(i);
-                if (row == null) {
+                if (row == null || row.getCell(0) == null) {
                     continue;
                 }
                 Map<String, String> rowMap = new LinkedHashMap<>();

+ 1 - 1
src/main/java/com/nokia/finance/tasks/jobs/car/ruixing/CarLiChengMonthJob.java

@@ -164,7 +164,7 @@ public class CarLiChengMonthJob {
             // 遍历行
             for (int i = 1; i <= lastRowNum; i++) {
                 Row row = sheet.getRow(i);
-                if (row == null) {
+                if (row == null || row.getCell(0) == null) {
                     continue;
                 }
                 Map<String, String> rowMap = new LinkedHashMap<>();

+ 1 - 1
src/main/java/com/nokia/finance/tasks/jobs/car/ruixing/CarWuDanYongCheJob.java

@@ -151,7 +151,7 @@ public class CarWuDanYongCheJob {
             // 遍历行
             for (int i = 1; i <= lastRowNum; i++) {
                 Row row = sheet.getRow(i);
-                if (row == null) {
+                if (row == null || row.getCell(0) == null) {
                     continue;
                 }
                 Map<String, String> rowMap = new LinkedHashMap<>();

+ 1 - 1
src/main/java/com/nokia/finance/tasks/jobs/car/ruixing/CarYongCheJob.java

@@ -163,7 +163,7 @@ public class CarYongCheJob {
             // 遍历行
             for (int i = 1; i <= lastRowNum; i++) {
                 Row row = sheet.getRow(i);
-                if (row == null) {
+                if (row == null || row.getCell(0) == null) {
                     continue;
                 }
                 Map<String, String> rowMap = new LinkedHashMap<>();

+ 3 - 3
src/main/java/com/nokia/finance/tasks/jobs/car/ruixing/CarYueJieJob.java

@@ -106,8 +106,8 @@ public class CarYueJieJob {
         List<Map<String, String>> list = readFile(path);
         List<Map<String, String>> distinctList = dataProcessing(path, list);
         Path csvPath = toCsv(path, distinctList);
-        copyCsv(csvPath);
-        move(path);
+//        copyCsv(csvPath);
+//        move(path);
     }
 
     /**
@@ -152,7 +152,7 @@ public class CarYueJieJob {
             // 遍历行
             for (int i = 1; i <= lastRowNum; i++) {
                 Row row = sheet.getRow(i);
-                if (row == null) {
+                if (row == null || row.getCell(0) == null) {
                     continue;
                 }
                 Map<String, String> rowMap = new LinkedHashMap<>();

+ 1 - 1
src/main/java/com/nokia/finance/tasks/jobs/house/fcdp/HouseBuildingAreaStatJob.java

@@ -38,7 +38,7 @@ public class HouseBuildingAreaStatJob {
     /**
      * 执行任务
      */
-    @Scheduled(cron = "0 0 0 10 * ?")
+    @Scheduled(cron = "0 0 0 12 * ?")
     @Transactional(timeout = 60, rollbackFor = Exception.class)
     public void runJob() {
         log.info("执行房产大屏建筑面积统计定时任务");

+ 1 - 1
src/main/java/com/nokia/finance/tasks/jobs/house/fcdp/HouseBuildingLandCountJob.java

@@ -37,7 +37,7 @@ public class HouseBuildingLandCountJob {
     /**
      * 执行任务
      */
-    @Scheduled(cron = "0 2 0 10 * ?")
+    @Scheduled(cron = "0 2 0 12 * ?")
     @Transactional(timeout = 60, rollbackFor = Exception.class)
     public void runJob() {
         log.info("执行房产大屏建筑和土地数量统计定时任务");

+ 1 - 1
src/main/java/com/nokia/finance/tasks/jobs/house/fcdp/HouseRentalIncomeJob.java

@@ -33,7 +33,7 @@ public class HouseRentalIncomeJob {
     /**
      * 执行任务
      */
-    @Scheduled(cron = "0 4 0 10 * ?")
+    @Scheduled(cron = "0 4 0 12 * ?")
 //    @Transactional(timeout = 60, rollbackFor = Exception.class)
     public void runJob() {
         try {

+ 1 - 1
src/main/java/com/nokia/finance/tasks/jobs/house/strategy/HouseBuildingIdleStrategyJob.java

@@ -38,7 +38,7 @@ public class HouseBuildingIdleStrategyJob {
     /**
      * 执行任务
      */
-    @Scheduled(cron = "0 6 0 10 * ?")
+    @Scheduled(cron = "0 6 0 12 * ?")
     @Transactional(timeout = 60, rollbackFor = Exception.class)
     public void runJob() {
         log.info("执行闲置建筑面积超过1000平米策略定时任务");

+ 1 - 1
src/test/java/com/nokia/finance/tasks/car/procedure/CarBaseDataMonthProcJobTests.java

@@ -9,7 +9,7 @@ import org.springframework.test.context.ActiveProfiles;
 
 @Slf4j
 @SpringBootTest
-@ActiveProfiles("dev")
+@ActiveProfiles("prod")
 class CarBaseDataMonthProcJobTests {
     @Autowired
     CarBaseDataMonthProcJob carBaseDataMonthProcJob;

+ 1 - 1
src/test/java/com/nokia/finance/tasks/car/procedure/CarPaiDanProcJobTests.java

@@ -9,7 +9,7 @@ import org.springframework.test.context.ActiveProfiles;
 
 @Slf4j
 @SpringBootTest
-@ActiveProfiles("dev")
+@ActiveProfiles("prod")
 class CarPaiDanProcJobTests {
     @Autowired
     CarPaiDanProcJob carPaiDanProcJob;