|
|
@ -32,6 +32,7 @@ import com.epmet.support.normalizing.batch.IndexInputVO; |
|
|
|
import com.epmet.support.normalizing.batch.IndexOutputVO; |
|
|
|
import com.epmet.support.normalizing.batch.SampleValue; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.collections4.ListUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -359,7 +360,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { |
|
|
|
} |
|
|
|
if (!CollectionUtils.isEmpty(gridScoreEntityList)) { |
|
|
|
gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, isTotal); |
|
|
|
gridScoreDao.insertBatches(gridScoreEntityList); |
|
|
|
//批量插入
|
|
|
|
List<List<GridScoreEntity>> partition = ListUtils.partition(gridScoreEntityList, 100); |
|
|
|
partition.forEach(list -> { |
|
|
|
gridScoreDao.insertBatches(list); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -628,7 +633,11 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { |
|
|
|
} |
|
|
|
if (!CollectionUtils.isEmpty(gridScoreEntityList)) { |
|
|
|
gridScoreDao.deleteByCusAndMonthId(formDTO.getCustomerId(), formDTO.getMonthId(), indexCode, NumConstant.ONE_STR); |
|
|
|
gridScoreDao.insertBatches(gridScoreEntityList); |
|
|
|
//批量插入
|
|
|
|
List<List<GridScoreEntity>> partition = ListUtils.partition(gridScoreEntityList, 100); |
|
|
|
partition.forEach(list -> { |
|
|
|
gridScoreDao.insertBatches(list); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|