Browse Source

这些事不正常的

dev_shibei_match
jianjun 4 years ago
parent
commit
91bd27cf39
  1. 24
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  2. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java
  3. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/biz/impl/BizDataStatsServiceImpl.java
  4. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java
  5. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java
  6. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java
  7. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java

24
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java

@ -1,5 +1,6 @@
package com.epmet.controller; package com.epmet.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
@ -63,9 +64,6 @@ import java.math.BigDecimal;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future; import java.util.concurrent.Future;
@ -896,7 +894,15 @@ public class DemoController {
if (StringUtils.isNotBlank(param.getCustomerId())) { if (StringUtils.isNotBlank(param.getCustomerId())) {
customerIds.add(param.getCustomerId()); customerIds.add(param.getCustomerId());
} else { } else {
customerIds = dimCustomerService.selectCustomerIdPage(1, 100); int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED;
List<String> customerIdList = null;
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)){
customerIds.addAll(customerIdList);
}
} while (!CollectionUtil.isEmpty(customerIdList) && customerIdList.size() == pageSize);
} }
for (String customerId : customerIds) { for (String customerId : customerIds) {
dateIds.forEach(dateId -> { dateIds.forEach(dateId -> {
@ -943,7 +949,15 @@ public class DemoController {
if (StringUtils.isNotBlank(formDTO.getCustomerId())) { if (StringUtils.isNotBlank(formDTO.getCustomerId())) {
customerIds.add(formDTO.getCustomerId()); customerIds.add(formDTO.getCustomerId());
} else { } else {
customerIds = dimCustomerService.selectCustomerIdPage(1, 100); int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED;
List<String> customerIdList = null;
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)){
customerIds.addAll(customerIdList);
}
} while (!CollectionUtil.isEmpty(customerIdList) && customerIdList.size() == pageSize);
} }
for (String customerId : customerIds) { for (String customerId : customerIds) {
ExtractOriginFormDTO paramDTO = new ExtractOriginFormDTO(); ExtractOriginFormDTO paramDTO = new ExtractOriginFormDTO();

15
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/FactOriginExtractController.java

@ -1,5 +1,7 @@
package com.epmet.controller; package com.epmet.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
@ -8,6 +10,7 @@ import com.epmet.dto.extract.form.ExtractOriginFormDTO;
import com.epmet.service.evaluationindex.extract.todata.*; import com.epmet.service.evaluationindex.extract.todata.*;
import com.epmet.service.stats.DimCustomerService; import com.epmet.service.stats.DimCustomerService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
@ -15,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -111,7 +115,16 @@ public class FactOriginExtractController {
} }
} else { } else {
List<String> customerIds = dimCustomerService.selectCustomerIdPage(1, 100); int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED;
List<String> customerIds = new ArrayList();
List<String> customerIdList = null;
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)){
customerIds.addAll(customerIdList);
}
} while (!CollectionUtil.isEmpty(customerIdList) && customerIdList.size() == pageSize);
customerIds.forEach(customerId -> { customerIds.forEach(customerId -> {
ExtractOriginFormDTO dto = new ExtractOriginFormDTO(); ExtractOriginFormDTO dto = new ExtractOriginFormDTO();
dto.setCustomerId(customerId); dto.setCustomerId(customerId);

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/biz/impl/BizDataStatsServiceImpl.java

@ -1,5 +1,6 @@
package com.epmet.service.evaluationindex.extract.biz.impl; package com.epmet.service.evaluationindex.extract.biz.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
@ -72,8 +73,14 @@ public class BizDataStatsServiceImpl implements BizDataStatsService {
} else { } else {
//查询全部客户 //查询全部客户
int pageNo = NumConstant.ONE; int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED; int pageSize = NumConstant.ONE_THOUSAND;
customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize); List<String> customerIdList = null;
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)){
customerIds.addAll(customerIdList);
}
} while (!CollectionUtil.isEmpty(customerIdList) && customerIdList.size() == pageSize);
if (org.springframework.util.CollectionUtils.isEmpty(customerIds)) { if (org.springframework.util.CollectionUtils.isEmpty(customerIds)) {
log.error("exeDailyAll 获取客户Id为空"); log.error("exeDailyAll 获取客户Id为空");
return; return;

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/IndexOriginExtractServiceImpl.java

@ -1,5 +1,6 @@
package com.epmet.service.evaluationindex.extract.dataToIndex.impl; package com.epmet.service.evaluationindex.extract.dataToIndex.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.CustomerIdConstant; import com.epmet.commons.tools.constant.CustomerIdConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
@ -63,7 +64,13 @@ public class IndexOriginExtractServiceImpl implements IndexOriginExtractService
} else { } else {
int pageNo = NumConstant.ONE; int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED; int pageSize = NumConstant.ONE_HUNDRED;
customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize); List<String> customerIdList = null;
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)){
customerIds.addAll(customerIdList);
}
} while (!CollectionUtil.isEmpty(customerIdList) && customerIdList.size() == pageSize);
if (CollectionUtils.isEmpty(customerIds)) { if (CollectionUtils.isEmpty(customerIds)) {
log.error("indexOriginExtractAll 获取客户Id为空"); log.error("indexOriginExtractAll 获取客户Id为空");
return; return;

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginExtractServiceImpl.java

@ -1,5 +1,6 @@
package com.epmet.service.evaluationindex.extract.todata.impl; package com.epmet.service.evaluationindex.extract.todata.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
@ -73,7 +74,13 @@ public class FactOriginExtractServiceImpl implements FactOriginExtractService {
//查询全部客户 //查询全部客户
int pageNo = NumConstant.ONE; int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED; int pageSize = NumConstant.ONE_HUNDRED;
customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize); List<String> customerIdList = null;
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)){
customerIds.addAll(customerIdList);
}
} while (!CollectionUtil.isEmpty(customerIdList) && customerIdList.size() == pageSize);
if (CollectionUtils.isEmpty(customerIds)) { if (CollectionUtils.isEmpty(customerIds)) {
log.error("extractAll 获取客户Id为空"); log.error("extractAll 获取客户Id为空");
return; return;

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

@ -1,5 +1,6 @@
package com.epmet.service.evaluationindex.extract.toscreen.impl; package com.epmet.service.evaluationindex.extract.toscreen.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.constant.CustomerIdConstant; import com.epmet.commons.tools.constant.CustomerIdConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
@ -107,7 +108,7 @@ public class ScreenExtractServiceImpl implements ScreenExtractService {
customerIds.add(extractOriginFormDTO.getCustomerId()); customerIds.add(extractOriginFormDTO.getCustomerId());
} else { } else {
int pageNo = NumConstant.ONE; int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED; int pageSize = NumConstant.ONE_THOUSAND;
customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize); customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize);
} }
if (!CollectionUtils.isEmpty(customerIds)) { if (!CollectionUtils.isEmpty(customerIds)) {
@ -141,7 +142,13 @@ public class ScreenExtractServiceImpl implements ScreenExtractService {
} else { } else {
int pageNo = NumConstant.ONE; int pageNo = NumConstant.ONE;
int pageSize = NumConstant.ONE_HUNDRED; int pageSize = NumConstant.ONE_HUNDRED;
customerIds = dimCustomerService.selectCustomerIdPage(pageNo, pageSize); List<String> customerIdList = null;
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)){
customerIds.addAll(customerIdList);
}
} while (!CollectionUtil.isEmpty(customerIdList) && customerIdList.size() == pageSize);
} }
if (!CollectionUtils.isEmpty(customerIds)) { if (!CollectionUtils.isEmpty(customerIds)) {
customerIds.forEach(customerId -> { customerIds.forEach(customerId -> {

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java

@ -1,5 +1,6 @@
package com.epmet.service.impl; package com.epmet.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.GroupConstant; import com.epmet.constant.GroupConstant;
@ -115,7 +116,14 @@ public class StatsGroupServiceImpl implements StatsGroupService {
if (StringUtils.isNotBlank(formDTO.getCustomerId())) { if (StringUtils.isNotBlank(formDTO.getCustomerId())) {
customerIds.add(formDTO.getCustomerId()); customerIds.add(formDTO.getCustomerId());
} else { } else {
customerIds = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize); List<String> customerIdList = null;
do {
customerIdList = dimCustomerService.selectCustomerIdPage(pageNo++, pageSize);
if (!CollectionUtils.isEmpty(customerIdList)){
customerIds.addAll(customerIdList);
}
} while (!CollectionUtil.isEmpty(customerIdList) && customerIdList.size() == pageSize);
} }
do { do {
if (customerIds.size() != NumConstant.ZERO) { if (customerIds.size() != NumConstant.ZERO) {

Loading…
Cancel
Save