66621ea6 张雷

环保报表问题修改

1 个父辈 c415d7d7
......@@ -104,7 +104,7 @@ public interface FCustomReportDatasetMapper extends BaseMapper<FCustomReportData
List<DepartWeekReportVO> getWeekReportData(@Param(value="startDate") String startDate, @Param(value="endDate") String endDate);
List<JnhbReportData> getJnhbReport(@Param(value="dataViewName2") String dataViewName2, @Param(value="dataViewName3") String dataViewName3,
@Param(value="start") String start, @Param(value="end") String end);
@Param(value="start") String start, @Param(value="end") String end, @Param(value="departIds") String departIds);
String getChildDepartId(@Param(value="departId") String departId);
......
......@@ -308,6 +308,12 @@
) v3 ON v3.depart_id = d.id
WHERE
d.depart_type = 1
<if test="departIds != null and departIds !=''">
and d.id in
<foreach item="item" index="index" collection="departIds.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
ORDER BY
d.depart_order
</select>
......
......@@ -13,19 +13,15 @@ import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters;
import java.time.temporal.WeekFields;
import java.util.*;
import java.util.stream.Collectors;
import com.skua.modules.report.vo.*;
import com.skua.modules.report.vo.largeScreen.*;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
/**
* 数据集管理
*/
......@@ -254,7 +250,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
String departIds = mapper.getChildDepartId(departId);
String dataViewName2 = ReportViewUtil.buildView("2119ecbf53a1d2d0708258ff67cfd9e1","CSL", departIds, start, end);
String dataViewName3 = ReportViewUtil.buildView("3a243d5715b9e1a3753c180872ca0df9","DLHJ,GFFDL,QY,YSL,WNL,WNHSL,GFCZL,WFCSL,WFCZL", departIds, start, end);
List<JnhbReportData> list = mapper.getJnhbReport(dataViewName2, dataViewName3, start, end);
List<JnhbReportData> list = mapper.getJnhbReport(dataViewName2, dataViewName3, start, end, departIds);
return list;
}
......@@ -282,18 +278,18 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
//当月数据
String dataViewName2 = ReportViewUtil.buildView("2119ecbf53a1d2d0708258ff67cfd9e1","CSL", null, dataVO.getNowStartTime(), dataVO.getNowEndTime());
String dataViewName3 = ReportViewUtil.buildView("3a243d5715b9e1a3753c180872ca0df9","DLHJ,GFFDL,QY,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getNowStartTime(), dataVO.getNowEndTime());
List<JnhbReportData> jnhbReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getNowStartTime(), dataVO.getNowEndTime());
List<JnhbReportData> jnhbReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getNowStartTime(), dataVO.getNowEndTime(), null);
// 上月数据 同比
dataViewName2 = ReportViewUtil.buildView("2119ecbf53a1d2d0708258ff67cfd9e1","CSL", null, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime());
dataViewName3 = ReportViewUtil.buildView("3a243d5715b9e1a3753c180872ca0df9","DLHJ,GFFDL,QY,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime());
List<JnhbReportData> lastMonthReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime());
List<JnhbReportData> lastMonthReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getLastMonthStartTime(), dataVO.getLastMonthEndTime(), null);
Map<String,JnhbReportData> lastMonthMapData= convertJnhbReportDataMap(lastMonthReportDataList);
// 去年数据 环比
dataViewName2 = ReportViewUtil.buildView("2119ecbf53a1d2d0708258ff67cfd9e1","CSL", null, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime());
dataViewName3 = ReportViewUtil.buildView("3a243d5715b9e1a3753c180872ca0df9","DLHJ,GFFDL,QY,WNL,WNHSL,GFCZL,WFCSL,WFCZL", null, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime());
List<JnhbReportData> lastYearReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime());
List<JnhbReportData> lastYearReportDataList = mapper.getJnhbReport(dataViewName2, dataViewName3, dataVO.getLastYearStartTime(), dataVO.getLastYearEndTime(), null);
Map<String,JnhbReportData> lastYearMapData= convertJnhbReportDataMap(lastYearReportDataList);
LoadRateVO loadRateVO = null;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!