Browse Source

fix adm 数据迁移

lvxianyun 3 years ago
parent
commit
05a2b0a36f

+ 2 - 2
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/MigrationAbstractServiceImpl.java

@@ -298,7 +298,7 @@ public class MigrationAbstractServiceImpl<T> implements IMigrationAbstractServic
         }else{
             int count= vos.size() / MigrationConstant.BATCH_SUBMIT_DATA_COUNT;
             for(int k = 0; k< count + 1 ;k++){
-                int end = (k+1)  * MigrationConstant.BATCH_SUBMIT_DATA_COUNT - 1;
+                int end = (k+1)  * MigrationConstant.BATCH_SUBMIT_DATA_COUNT;
                 if(end > vos.size()){
                     end = vos.size();
                 }
@@ -409,7 +409,7 @@ public class MigrationAbstractServiceImpl<T> implements IMigrationAbstractServic
         }else{
             int count= syncDataList.size() / MigrationConstant.BATCH_SUBMIT_DATA_COUNT;
             for(int k = 0; k < count + 1 ;k++){
-                int end = (k+1)  * MigrationConstant.BATCH_SUBMIT_DATA_COUNT - 1;
+                int end = (k+1)  * MigrationConstant.BATCH_SUBMIT_DATA_COUNT;
                 if(end > syncDataList.size()){
                     end = syncDataList.size();
                 }

+ 1 - 1
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/ObjectDigitalMigration.java

@@ -203,7 +203,7 @@ public class ObjectDigitalMigration extends MigrationAbstractServiceImpl<ObjectD
         }
 
         //因获取的数据均有主键 使用更新
-        String insertUrl = requestUrl(context, migrationInfo, MigrationType.UPDATE.getCode());
+        String insertUrl = requestUrl(context, migrationInfo, MigrationType.CREATE.getCode());
         if(CollUtil.isEmpty(projObjectNodeList)){
             //调用中台验证待新增的数据
             List<ObjectDigital> digitalList = validateInfoCode(admData, context);