|
|
@ -1,10 +1,13 @@ |
|
|
|
package com.epmet.service.evaluationindex.extract.toscreen.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
import com.epmet.dto.extract.form.ExtractOriginFormDTO; |
|
|
|
import com.epmet.dto.extract.form.ExtractScreenFormDTO; |
|
|
|
import com.epmet.dto.indexcal.CalculateCommonFormDTO; |
|
|
|
import com.epmet.service.evaluationindex.extract.toscreen.*; |
|
|
|
import com.epmet.service.evaluationindex.indexcal.IndexCalculateService; |
|
|
|
import com.epmet.service.stats.DimCustomerService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@ -15,6 +18,8 @@ import org.springframework.util.CollectionUtils; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
import java.util.concurrent.Executors; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Author zxc |
|
|
@ -40,6 +45,8 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { |
|
|
|
private GovernRankDataExtractService governRankDataExtractService; |
|
|
|
@Autowired |
|
|
|
private PublicPartiTotalDataExtractService publicPartiTotalDataExtractService; |
|
|
|
@Autowired |
|
|
|
private IndexCalculateService indexCalculateService; |
|
|
|
|
|
|
|
/** |
|
|
|
* @param extractOriginFormDTO |
|
|
@ -146,5 +153,18 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { |
|
|
|
orgRankExtractService.extractDistrictData(customerId, monthId); |
|
|
|
// 党建引领 screen_party_branch_data,screen_party_link_masses_data
|
|
|
|
partyGuideService.partyGuideExtract(formDTO); |
|
|
|
|
|
|
|
//计算分数 todo 优化 手动创建线程池 控制任务数量
|
|
|
|
ExecutorService pool = Executors.newSingleThreadExecutor(); |
|
|
|
pool.submit(() -> { |
|
|
|
CalculateCommonFormDTO formDTO1 = new CalculateCommonFormDTO(); |
|
|
|
try { |
|
|
|
formDTO1.setMonthId(monthId); |
|
|
|
formDTO1.setCustomerId(customerId); |
|
|
|
indexCalculateService.indexCalculate(formDTO1); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("extractMonthly 计算分数异常,参数:{}", JSON.toJSONString(formDTO1)); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|