Browse Source

月度指数分析-饼状图 修改

dev_shibei_match
zxc 4 years ago
parent
commit
c2a583b6ae
  1. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
  2. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java
  3. 1
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java

@ -39,7 +39,7 @@ public interface ScreenIndexDataMonthlyDao{
* @author zxc
* @date 2020/8/19 3:43 下午
*/
MonthPieChartResultDTO selectMonthPieChart(@Param("agencyId")String agencyId,@Param("monthId")String monthId);
MonthPieChartResultDTO selectMonthPieChart(@Param("agencyId")String agencyId,@Param("monthId")String monthId,@Param("customerId")String customerId);
/**
* @Description 查询近一年的指数值不包括本月

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java

@ -73,15 +73,15 @@ public class IndexServiceImpl implements IndexService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public MonthPieChartResultDTO monthPieChart(MonthPieChartFormDTO monthPieChartFormDTO) {
MonthPieChartResultDTO pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(), null);
String customerId = monthPieChartFormDTO.getCustomerId();
MonthPieChartResultDTO pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(), null,customerId);
String monthId = dateUtils.getCurrentMonthId();
int time = NumConstant.TWELVE;
//保证获取月度指数数据的最大可能性
while ((null == pieChartDTO || StringUtils.isBlank(pieChartDTO.getMonthId())) && time > NumConstant.ONE) {
time--;
monthId = dateUtils.getPreviousMonthIdByDest(null, monthId);
pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(), monthId);
pieChartDTO = screenIndexDataMonthlyDao.selectMonthPieChart(monthPieChartFormDTO.getAgencyId(), monthId,customerId);
}
if (null == pieChartDTO) {
return new MonthPieChartResultDTO();

1
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

@ -16,6 +16,7 @@
del_flag = '0'
AND org_type = 'agency'
AND org_id = #{agencyId}
AND CUSTOMER_ID = #{customerId}
<choose>
<when test='null == monthId or "" == monthId'>
AND month_id = DATE_FORMAT(NOW(),'%Y%m')

Loading…
Cancel
Save