|
|
@ -5,9 +5,7 @@ import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
import com.epmet.dto.extract.form.ExtractOriginFormDTO; |
|
|
|
import com.epmet.dto.group.form.GroupTotalFormDTO; |
|
|
|
import com.epmet.dto.stats.form.CustomerIdAndDateIdFormDTO; |
|
|
|
import com.epmet.dto.stats.topic.form.TopicStatusFormDTO; |
|
|
|
import com.epmet.service.StatsGroupService; |
|
|
|
import com.epmet.service.StatsTopicService; |
|
|
|
import com.epmet.service.evaluationindex.extract.todata.*; |
|
|
@ -94,6 +92,7 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { |
|
|
|
} |
|
|
|
|
|
|
|
private void submitJob(ExtractOriginFormDTO param) { |
|
|
|
CountDownLatch countDownLatch = new CountDownLatch(NumConstant.FIVE); |
|
|
|
boolean isRange = StringUtils.isBlank(param.getDateId()); |
|
|
|
List<String> daysBetween = null; |
|
|
|
if (isRange) { |
|
|
@ -101,6 +100,7 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { |
|
|
|
} |
|
|
|
List<String> finalDaysBetween = daysBetween; |
|
|
|
threadPool.submit(() -> { |
|
|
|
try { |
|
|
|
CustomerIdAndDateIdFormDTO formDTO = new CustomerIdAndDateIdFormDTO(); |
|
|
|
formDTO.setCustomerId(param.getCustomerId()); |
|
|
|
if (!isRange) { |
|
|
@ -121,8 +121,12 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { |
|
|
|
log.error("抽取【党员数据】发生异常,参数:" + JSON.toJSONString(param), e); |
|
|
|
} |
|
|
|
} |
|
|
|
} finally { |
|
|
|
countDownLatch.countDown(); |
|
|
|
} |
|
|
|
}); |
|
|
|
threadPool.submit(() -> { |
|
|
|
try { |
|
|
|
ExtractOriginFormDTO paramNew = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); |
|
|
|
if (!isRange) { |
|
|
|
try { |
|
|
@ -141,8 +145,12 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { |
|
|
|
log.error("抽取【小组数据】发生异常,参数:" + JSON.toJSONString(paramNew), e); |
|
|
|
} |
|
|
|
} |
|
|
|
} finally { |
|
|
|
countDownLatch.countDown(); |
|
|
|
} |
|
|
|
}); |
|
|
|
threadPool.submit(() -> { |
|
|
|
try { |
|
|
|
log.debug("extractAll start param:{}", JSON.toJSONString(param)); |
|
|
|
ExtractOriginFormDTO paramNew = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); |
|
|
|
if (!isRange) { |
|
|
@ -164,8 +172,12 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { |
|
|
|
} |
|
|
|
} |
|
|
|
log.debug("extractAll end param:{}", JSON.toJSONString(paramNew)); |
|
|
|
} finally { |
|
|
|
countDownLatch.countDown(); |
|
|
|
} |
|
|
|
}); |
|
|
|
threadPool.submit(() -> { |
|
|
|
try { |
|
|
|
ExtractOriginFormDTO paramNew = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); |
|
|
|
if (!isRange) { |
|
|
|
try { |
|
|
@ -198,9 +210,13 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { |
|
|
|
log.error("抽取【议题数据附表】发生异常,参数:" + JSON.toJSONString(paramNew), e); |
|
|
|
} |
|
|
|
} |
|
|
|
} finally { |
|
|
|
countDownLatch.countDown(); |
|
|
|
} |
|
|
|
}); |
|
|
|
//小组活动
|
|
|
|
threadPool.submit(() -> { |
|
|
|
try { |
|
|
|
ExtractOriginFormDTO extractOriginFormDTO = ConvertUtils.sourceToTarget(param, ExtractOriginFormDTO.class); |
|
|
|
if (!isRange) { |
|
|
|
//截止到当前dateId
|
|
|
@ -235,6 +251,9 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { |
|
|
|
log.error("抽取【fact_group_act_daily】发生异常,参数:" + JSON.toJSONString(extractOriginFormDTO), e); |
|
|
|
} |
|
|
|
} |
|
|
|
} finally { |
|
|
|
countDownLatch.countDown(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
/* //网格、组织小组总数日统计
|
|
|
@ -297,7 +316,18 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService { |
|
|
|
} |
|
|
|
});*/ |
|
|
|
|
|
|
|
submitProjectRelationData(param, finalDaysBetween); |
|
|
|
Future<?> future = submitProjectRelationData(param, finalDaysBetween); |
|
|
|
try { |
|
|
|
future.get(); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("submitProjectRelationData exception:{}",e); |
|
|
|
} |
|
|
|
try { |
|
|
|
countDownLatch.await(); |
|
|
|
log.info("extractAll submitJob execute end,param:{}",JSON.toJSONString(param)); |
|
|
|
} catch (InterruptedException e) { |
|
|
|
log.error("extractAll daily InterruptedException:{}", e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|