Browse Source

日志打印

master
jianjun 5 years ago
parent
commit
b1eb4d07c0
  1. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java
  2. 3
      epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java

@ -94,7 +94,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
private void extractGridUserJoin(ExtractScreenFormDTO formDTO) { private void extractGridUserJoin(ExtractScreenFormDTO formDTO) {
List<DimGridEntity> orgList = dimGridService.getGridListByCustomerId(formDTO.getCustomerId()); List<DimGridEntity> orgList = dimGridService.getGridListByCustomerId(formDTO.getCustomerId());
if (CollectionUtils.isEmpty(orgList)) { if (CollectionUtils.isEmpty(orgList)) {
log.warn("抽取【公众参与-人均议题】,获取组织数据失败"); log.warn("抽取【公众参与-人均议题】,获取组织数据失败,客户Id:{}", formDTO.getCustomerId());
return; return;
} }
//构建组织数据 //构建组织数据
@ -103,12 +103,12 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
//获取议题月份增量 //获取议题月份增量
List<FactIssueGridMonthlyEntity> issueTotal = factIssueGridMonthlyService.getIssueIncCountAndTotalByMonthId(formDTO.getCustomerId(), formDTO.getMonthId()); List<FactIssueGridMonthlyEntity> issueTotal = factIssueGridMonthlyService.getIssueIncCountAndTotalByMonthId(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(issueTotal)) { if (CollectionUtils.isEmpty(issueTotal)) {
log.error("抽取【公众参与-人均议题】,获取议题增量为空"); log.error("抽取【公众参与-人均议题】,获取议题增量为空,客户Id:{}", formDTO.getCustomerId());
return; return;
} }
List<GridUserCountResultDTO> userCountList = factRegUserGridMonthlyService.selectGridUserCount(formDTO.getCustomerId(), formDTO.getMonthId()); List<GridUserCountResultDTO> userCountList = factRegUserGridMonthlyService.selectGridUserCount(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(userCountList)) { if (CollectionUtils.isEmpty(userCountList)) {
log.error("抽取【公众参与-人均议题】,获取注册用户数为空"); log.error("抽取【公众参与-人均议题】,获取注册用户数为空,客户Id:{}", formDTO.getCustomerId());
return; return;
} }
Map<String, GridUserCountResultDTO> userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o)); Map<String, GridUserCountResultDTO> userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o));
@ -143,7 +143,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
//获取每个网格的应表决人数 //获取每个网格的应表决人数
List<GridGroupUserCountResultDTO> memberCountList = factOriginGroupMainDailyService.selectDistinctGroupMemberCount(formDTO.getCustomerId(), ProjectConstant.AGENCY_ID); List<GridGroupUserCountResultDTO> memberCountList = factOriginGroupMainDailyService.selectDistinctGroupMemberCount(formDTO.getCustomerId(), ProjectConstant.AGENCY_ID);
if (CollectionUtils.isEmpty(memberCountList)) { if (CollectionUtils.isEmpty(memberCountList)) {
log.warn("抽取【公众参与-人均议题】,获取应表决人数为空"); log.warn("抽取【公众参与-人均议题】,获取应表决人数为空,客户Id:{}", formDTO.getCustomerId());
return; return;
} }
gridMemberCount = memberCountList.stream().collect(Collectors.toMap(GridGroupUserCountResultDTO::getOrgId, o -> o.getMemberCount())); gridMemberCount = memberCountList.stream().collect(Collectors.toMap(GridGroupUserCountResultDTO::getOrgId, o -> o.getMemberCount()));
@ -184,7 +184,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
private void extractAgencyUserJoin(ExtractScreenFormDTO formDTO) { private void extractAgencyUserJoin(ExtractScreenFormDTO formDTO) {
List<DimAgencyEntity> orgList = dimAgencyService.getAgencyListByCustomerId(formDTO.getCustomerId()); List<DimAgencyEntity> orgList = dimAgencyService.getAgencyListByCustomerId(formDTO.getCustomerId());
if (CollectionUtils.isEmpty(orgList)) { if (CollectionUtils.isEmpty(orgList)) {
log.warn("抽取【公众参与-人均议题】,获取组织数据失败"); log.warn("抽取【公众参与-人均议题】,获取组织数据失败,客户Id:{}", formDTO.getCustomerId());
return; return;
} }
//构建组织数据 //构建组织数据
@ -196,7 +196,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
Map<String, GridUserCountResultDTO> userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o)); Map<String, GridUserCountResultDTO> userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o));
Set<String> agencyIdSet = new HashSet<>(); Set<String> agencyIdSet = new HashSet<>();
if (!CollectionUtils.isEmpty(issueTotal)) { if (!CollectionUtils.isEmpty(issueTotal)) {
log.error("抽取【公众参与-人均议题】,获取注册用户数为空"); log.error("抽取【公众参与-人均议题】,获取注册用户数为空,客户Id:{}", formDTO.getCustomerId());
issueTotal.forEach(issue -> { issueTotal.forEach(issue -> {
String agencyId = issue.getAgencyId(); String agencyId = issue.getAgencyId();
agencyIdSet.add(agencyId); agencyIdSet.add(agencyId);
@ -219,7 +219,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
//获取每个网格的应表决人数 //获取每个网格的应表决人数
List<GridGroupUserCountResultDTO> memberCountList = factOriginGroupMainDailyService.selectDistinctGroupMemberCount(formDTO.getCustomerId(), ProjectConstant.AGENCY_ID); List<GridGroupUserCountResultDTO> memberCountList = factOriginGroupMainDailyService.selectDistinctGroupMemberCount(formDTO.getCustomerId(), ProjectConstant.AGENCY_ID);
if (CollectionUtils.isEmpty(memberCountList)) { if (CollectionUtils.isEmpty(memberCountList)) {
log.warn("抽取【公众参与-人均议题】,获取应表决人数为空"); log.warn("抽取【公众参与-人均议题】,获取应表决人数为空,客户Id:{}", formDTO.getCustomerId());
return; return;
} }
orgMemberCount = memberCountList.stream().collect(Collectors.toMap(GridGroupUserCountResultDTO::getOrgId, o -> o.getMemberCount())); orgMemberCount = memberCountList.stream().collect(Collectors.toMap(GridGroupUserCountResultDTO::getOrgId, o -> o.getMemberCount()));

3
epmet-openapi/epmet-openapi-scan/src/main/java/com/epmet/openapi/scan/service/impl/ScanServiceImpl.java

@ -8,6 +8,7 @@ import com.aliyuncs.green.model.v20180509.ImageSyncScanRequest;
import com.aliyuncs.green.model.v20180509.TextScanRequest; import com.aliyuncs.green.model.v20180509.TextScanRequest;
import com.aliyuncs.http.FormatType; import com.aliyuncs.http.FormatType;
import com.aliyuncs.http.HttpResponse; import com.aliyuncs.http.HttpResponse;
import com.aliyuncs.http.MethodType;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.openapi.scan.common.constant.SysConstant; import com.epmet.openapi.scan.common.constant.SysConstant;
import com.epmet.openapi.scan.common.enu.ImgSceneEnum; import com.epmet.openapi.scan.common.enu.ImgSceneEnum;
@ -152,7 +153,7 @@ public class ScanServiceImpl implements ScanService {
private ImageSyncScanRequest getImgScanRequest() { private ImageSyncScanRequest getImgScanRequest() {
ImageSyncScanRequest imageSyncScanRequest = new ImageSyncScanRequest(); ImageSyncScanRequest imageSyncScanRequest = new ImageSyncScanRequest();
imageSyncScanRequest.setAcceptFormat(FormatType.JSON); // 指定api返回格式 imageSyncScanRequest.setAcceptFormat(FormatType.JSON); // 指定api返回格式
imageSyncScanRequest.setMethod(com.aliyuncs.http.MethodType.POST); // 指定请求方法 imageSyncScanRequest.setMethod(MethodType.POST); // 指定请求方法
imageSyncScanRequest.setEncoding(SysConstant.UTF8); imageSyncScanRequest.setEncoding(SysConstant.UTF8);
imageSyncScanRequest.setRegionId(regionId); imageSyncScanRequest.setRegionId(regionId);
imageSyncScanRequest.setConnectTimeout(3000); imageSyncScanRequest.setConnectTimeout(3000);

Loading…
Cancel
Save