|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.epmet.controller; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
@ -11,6 +12,8 @@ import com.epmet.dao.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyDa |
|
|
|
import com.epmet.dao.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthlyDao; |
|
|
|
import com.epmet.dao.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyDao; |
|
|
|
import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao; |
|
|
|
import com.epmet.dao.stats.DimCustomerDao; |
|
|
|
import com.epmet.dao.stats.DimDateDao; |
|
|
|
import com.epmet.dto.AgencySubTreeDto; |
|
|
|
import com.epmet.dto.indexcal.CalculateCommonFormDTO; |
|
|
|
import com.epmet.entity.evaluationindex.indexcoll.FactIndexGovrnAblityGridMonthlyEntity; |
|
|
@ -18,15 +21,16 @@ import com.epmet.entity.evaluationindex.indexcoll.FactIndexPartyAblityGridMonthl |
|
|
|
import com.epmet.entity.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyEntity; |
|
|
|
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.service.StatsDemoService; |
|
|
|
import com.epmet.service.evaluationindex.extract.FactOriginTopicMainDailyService; |
|
|
|
import com.epmet.service.evaluationindex.indexcal.*; |
|
|
|
import com.epmet.service.stats.DimAgencyService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.time.LocalDateTime; |
|
|
@ -57,6 +61,24 @@ public class DemoController { |
|
|
|
private DeptScoreService deptScoreService; |
|
|
|
@Autowired |
|
|
|
private IndexCalculateDistrictService indexCalculateDistrictService; |
|
|
|
@Autowired |
|
|
|
private GridScoreDao gridScoreDao; |
|
|
|
@Autowired |
|
|
|
private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao; |
|
|
|
@Autowired |
|
|
|
private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; |
|
|
|
@Autowired |
|
|
|
private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao; |
|
|
|
@Autowired |
|
|
|
private ScreenCustomerGridDao screenCustomerGridDao; |
|
|
|
@Autowired |
|
|
|
private CpcIndexCalculateService cpcIndexCalculateService; |
|
|
|
@Autowired |
|
|
|
private DimDateDao dimDateDao; |
|
|
|
@Autowired |
|
|
|
private DimCustomerDao dimCustomerDao; |
|
|
|
@Autowired |
|
|
|
private FactOriginTopicMainDailyService factOriginTopicMainDailyService; |
|
|
|
|
|
|
|
@GetMapping("testAlarm") |
|
|
|
public void testAlarm() { |
|
|
@ -147,19 +169,6 @@ public class DemoController { |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private GridScoreDao gridScoreDao; |
|
|
|
@Autowired |
|
|
|
private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao; |
|
|
|
@Autowired |
|
|
|
private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao; |
|
|
|
@Autowired |
|
|
|
private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao; |
|
|
|
@Autowired |
|
|
|
private ScreenCustomerGridDao screenCustomerGridDao; |
|
|
|
@Autowired |
|
|
|
private CpcIndexCalculateService cpcIndexCalculateService; |
|
|
|
// private static Integer testcal=100;
|
|
|
|
|
|
|
|
@PostMapping("testcal") |
|
|
|
public Result testCal(){ |
|
|
@ -487,4 +496,23 @@ public class DemoController { |
|
|
|
c.setMonthId(monthId); |
|
|
|
deptScoreService.calculateDeptCorreLation(c); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("inserttopicorigin") |
|
|
|
public Result topicDataCleaning(@RequestParam("customerId") String customerId, @RequestParam("dateId")String dateId) { |
|
|
|
if (StringUtils.isNotBlank(customerId) && StringUtils.isNotBlank(dateId)) { |
|
|
|
factOriginTopicMainDailyService.topicCleaning(customerId,dateId); |
|
|
|
}else{ |
|
|
|
QueryWrapper<DimCustomerEntity> customerEntityQueryWrapper = new QueryWrapper<>(); |
|
|
|
List<DimCustomerEntity> customerEntityList=dimCustomerDao.selectList(customerEntityQueryWrapper); |
|
|
|
QueryWrapper<DimDateEntity> wrapper = new QueryWrapper<>(); |
|
|
|
List<DimDateEntity> dimDateEntityList= dimDateDao.selectList(wrapper); |
|
|
|
for(DimCustomerEntity customerEntity:customerEntityList){ |
|
|
|
for(DimDateEntity dateEntity:dimDateEntityList){ |
|
|
|
factOriginTopicMainDailyService.topicCleaning(customerEntity.getId(),dateEntity.getId()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
} |
|
|
|