Browse Source

Merge remote-tracking branch 'origin/dev_screen_data' into dev_screen_data

master
yinzuomei 5 years ago
parent
commit
68595ca048
  1. 18
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java
  2. 38
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java

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

@ -465,4 +465,22 @@ public class DemoController {
String monthId = "202008";
indexCalculateDistrictService.calDistrictAll(customerId,monthId);
}
@PostMapping("gridZxc")
public void getGrid(){
String customerId = "b09527201c4409e19d1dbc5e3c3429a1";
String monthId = "202008";
CalculateCommonFormDTO c = new CalculateCommonFormDTO();
c.setCustomerId(customerId);
c.setMonthId(monthId);
gridCorreLationService.calculateGridCorreLation(c);
}
@PostMapping("deptZxc")
public void getDept(){
String customerId = "b09527201c4409e19d1dbc5e3c3429a1";
String monthId = "202008";
CalculateCommonFormDTO c = new CalculateCommonFormDTO();
c.setCustomerId(customerId);
c.setMonthId(monthId);
deptScoreService.calculateDeptCorreLation(c);
}
}

38
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateServiceImpl.java

@ -9,10 +9,7 @@ import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.screen.form.IndexCalculateForm;
import com.epmet.feign.EpmetCommonServiceOpenFeignClient;
import com.epmet.redis.IndexCodeFieldReRedis;
import com.epmet.service.evaluationindex.indexcal.CpcIndexCalculateService;
import com.epmet.service.evaluationindex.indexcal.GridCorreLationService;
import com.epmet.service.evaluationindex.indexcal.IndexCalculateCommunityService;
import com.epmet.service.evaluationindex.indexcal.IndexCalculateService;
import com.epmet.service.evaluationindex.indexcal.*;
import com.epmet.util.DimIdGenerator;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
@ -41,6 +38,12 @@ public class IndexCalculateServiceImpl implements IndexCalculateService {
private IndexCodeFieldReRedis indexCodeFieldReRedis;
@Autowired
private IndexCalculateCommunityService indexCalculateCommunityService;
@Autowired
private IndexCalculateStreetService indexCalculateStreetService;
@Autowired
private IndexCalculateDistrictService indexCalculateDistrictService;
@Autowired
private DeptScoreService deptScoreService;
@Override
public Boolean indexCalculate(IndexCalculateForm formDTO) {
@ -87,6 +90,33 @@ public class IndexCalculateServiceImpl implements IndexCalculateService {
log.error("indexCalculate calAll exception", e);
break;
}
//计算街道
try {
indexCalculateStreetService.calStreetAll(customerId,formDTO.getMonthId());
log.info("indexCalculate calAll return result:{}", flag);
} catch (Exception e) {
log.error("indexCalculate calAll exception", e);
break;
}
//计算区直属
try {
deptScoreService.calculateDeptCorreLation(calculateCommonFormDTO);
log.info("indexCalculate calAll return result:{}", flag);
} catch (Exception e) {
log.error("indexCalculate calAll exception", e);
break;
}
//计算全区
try {
indexCalculateDistrictService.calDistrictAll(customerId,formDTO.getMonthId());
log.info("indexCalculate calAll return result:{}", flag);
} catch (Exception e) {
log.error("indexCalculate calAll exception", e);
break;
}
}
return flag;
} catch (Exception e) {

Loading…
Cancel
Save