Browse Source

Merge remote-tracking branch 'origin/dev_screen_data_2.0' into dev_screen_data_2.0

master
zxc 5 years ago
parent
commit
035b0f1605
  1. 43
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  2. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java
  3. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactIndexServiceAbilityGridMonthlyServiceImpl.java

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

@ -14,6 +14,7 @@ import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthly
import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao;
import com.epmet.dao.stats.DimCustomerDao;
import com.epmet.dao.stats.DimDateDao;
import com.epmet.dao.stats.DimMonthDao;
import com.epmet.dto.AgencySubTreeDto;
import com.epmet.dto.extract.form.ExtractFormDTO;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
@ -25,7 +26,9 @@ import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity;
import com.epmet.entity.stats.DimAgencyEntity;
import com.epmet.entity.stats.DimCustomerEntity;
import com.epmet.entity.stats.DimDateEntity;
import com.epmet.entity.stats.DimMonthEntity;
import com.epmet.service.StatsDemoService;
import com.epmet.service.evaluationindex.extract.CalCpcIndexService;
import com.epmet.service.evaluationindex.extract.CalGridIndexService;
import com.epmet.service.evaluationindex.extract.FactOriginProjectLogDailyService;
import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService;
@ -82,6 +85,8 @@ public class DemoController {
@Autowired
private DimDateDao dimDateDao;
@Autowired
private DimMonthDao dimMonthDao;
@Autowired
private DimCustomerDao dimCustomerDao;
@Autowired
private FactOriginTopicMainDailyService factOriginTopicMainDailyService;
@ -571,5 +576,43 @@ public class DemoController {
);
}
@Autowired
private CalCpcIndexService calCpcIndexService;
@PostMapping("calCpcPartyAbility")
public Result calCpcPartyAbility(@RequestParam("customerId") String customerId, @RequestParam("monthId")String monthId) {
if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(monthId)) {
calCpcIndexService.calCpcPartyAbility(customerId,monthId);
}else{
QueryWrapper<DimCustomerEntity> customerEntityQueryWrapper = new QueryWrapper<>();
List<DimCustomerEntity> customerEntityList=dimCustomerDao.selectList(customerEntityQueryWrapper);
QueryWrapper<DimMonthEntity> wrapper = new QueryWrapper<>();
List<DimMonthEntity> dimMonthEntityList= dimMonthDao.selectList(wrapper);
for(DimCustomerEntity customerEntity:customerEntityList){
for(DimMonthEntity monthEntity:dimMonthEntityList) {
calCpcIndexService.calCpcPartyAbility(customerEntity.getId(),monthEntity.getId());
}
}
}
return new Result();
}
@PostMapping("calGridIndexServiceAbility")
public Result calGridIndexServiceAbility(@RequestParam("customerId") String customerId, @RequestParam("monthId")String monthId) {
if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(monthId)) {
calGridIndexService.calGridIndexServiceAbility(customerId,monthId);
}else{
QueryWrapper<DimCustomerEntity> customerEntityQueryWrapper = new QueryWrapper<>();
List<DimCustomerEntity> customerEntityList=dimCustomerDao.selectList(customerEntityQueryWrapper);
QueryWrapper<DimMonthEntity> wrapper = new QueryWrapper<>();
List<DimMonthEntity> dimMonthEntityList= dimMonthDao.selectList(wrapper);
// for(DimCustomerEntity customerEntity:customerEntityList){
for(DimMonthEntity monthEntity:dimMonthEntityList) {
calGridIndexService.calGridIndexServiceAbility("3ef7e4bb195eb9e622d68b52509aa940",monthEntity.getId());
}
// }
}
return new Result();
}
}

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/CalGridIndexServiceImpl.java

@ -404,7 +404,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
//1、构造好初始数据,各指标赋值0
List<FactIndexServiceAblityGridMonthlyEntity> entityList=factIndexServiceAbilityGridMonthlyService.initAllGridList(customerId);
if(CollectionUtils.isEmpty(entityList)){
log.info("screen_customer_grid do not any records");
log.info("customerId:"+customerId+",screen_customer_grid do not any records");
return true;
}
String quarterId= DateUtils.getQuarterId(monthId);

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/impl/FactIndexServiceAbilityGridMonthlyServiceImpl.java

@ -32,6 +32,7 @@ public class FactIndexServiceAbilityGridMonthlyServiceImpl implements FactIndexS
* @Date 2020/9/21 9:38
**/
@Override
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public List<FactIndexServiceAblityGridMonthlyEntity> initAllGridList(String customerId) {
return baseDao.initAllGridList(customerId);
}
@ -44,6 +45,7 @@ public class FactIndexServiceAbilityGridMonthlyServiceImpl implements FactIndexS
* @Date 2020/9/21 10:05
**/
@Override
@DataSource(DataSourceConstant.EVALUATION_INDEX)
public void insertBatchEntity(List<FactIndexServiceAblityGridMonthlyEntity> list) {
baseDao.insertBatchEntity(list);
}

Loading…
Cancel
Save