Merge pull request #20 from Andy-Yin/zt_from_develop1.0
Zt from develop1.0
| | |
| | | public static List<TypeTime> getDateTimeList(String timeType, Date dataTime) { |
| | | |
| | | List<TypeTime> resultList = new ArrayList<>(); |
| | | |
| | | Date beginTime = DateUtil.beginOfDay(dataTime); |
| | | Date beginTime; |
| | | switch (timeType) { |
| | | case TimeTypeConst.TIME_TYPE_HOUR: |
| | | beginTime = DateUtil.beginOfDay(dataTime); |
| | | for (int i = 1; i <= 24; i++) { |
| | | TypeTime typeTime = new TypeTime(); |
| | | typeTime.setDataTime(DateUtil.format(beginTime, COMMON_PATTERN)); |
| | |
| | | } |
| | | break; |
| | | case TimeTypeConst.TIME_TYPE_DAY: |
| | | beginTime = DateUtil.beginOfMonth(dataTime); |
| | | for (int i = 1; i <= 31; i++) { |
| | | TypeTime typeTime = new TypeTime(); |
| | | typeTime.setDataTime(DateUtil.format(beginTime, COMMON_PATTERN)); |
| | |
| | | } |
| | | break; |
| | | case TimeTypeConst.TIME_TYPE_MONTH: |
| | | beginTime = DateUtil.beginOfYear(dataTime); |
| | | for (int i = 1; i <= 12; i++) { |
| | | TypeTime typeTime = new TypeTime(); |
| | | typeTime.setDataTime(DateUtil.format(beginTime, COMMON_PATTERN)); |
| | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | *重点设备能耗统计 年 |
| | | * 重点设备能耗统计 年 |
| | | * |
| | | * @author sys |
| | | * @date 2021-01-11 |
| | | */ |
| | | public interface IYearKeyEquipmentService { |
| | | public List<YearKeyEquipment> getYearKeyEquipmentList(List<String> indexIds, List<TypeTime> dataList, Date beginTime, Date endTime, String timeType, String indexStorageId); |
| | | List<YearKeyEquipment> getYearKeyEquipmentList(List<String> indexIds, List<TypeTime> dataList, Date beginTime, Date endTime, String timeType, String indexStorageId); |
| | | |
| | | List<YearKeyEquipment> getListChart(DataItemQueryDTO queryDto); |
| | | } |
| | |
| | | AND di.index_id IN <foreach item="indexId" index="index" collection="indexIds" open="(" separator="," close=")">#{indexId} </foreach> |
| | | AND di.time_type = #{timeType} |
| | | <if test="indexStorageId !='' and indexStorageId !=null"> |
| | | and ci.equipment=#{indexStorageId} |
| | | and ci.energy_id=#{indexStorageId} |
| | | </if> |
| | | ) aa |
| | | GROUP BY |
| | |
| | | AND di.index_id IN <foreach item="indexId" index="index" collection="indexIds" open="(" separator="," close=")">#{indexId} </foreach> |
| | | AND di.time_type = #{timeType} |
| | | <if test="indexStorageId !='' and indexStorageId !=null"> |
| | | and ci.equipment=#{indexStorageId} |
| | | and ci.energy_id=#{indexStorageId} |
| | | </if> |
| | | ) aa |
| | | GROUP BY |
| | |
| | | AND di.index_id IN <foreach item="indexId" index="index" collection="indexIds" open="(" separator="," close=")">#{indexId} </foreach> |
| | | AND di.time_type = #{timeType} |
| | | <if test="indexStorageId !='' and indexStorageId !=null"> |
| | | and ci.equipment=#{indexStorageId} |
| | | and ci.energy_id=#{indexStorageId} |
| | | </if> |
| | | ) aa |
| | | GROUP BY |
| | |
| | | AND di.index_id IN <foreach item="indexId" index="index" collection="indexIds" open="(" separator="," close=")">#{indexId} </foreach> |
| | | AND di.time_type = #{timeType} |
| | | <if test="indexStorageId !='' and indexStorageId !=null"> |
| | | and ci.equipment=#{indexStorageId} |
| | | and ci.energy_id=#{indexStorageId} |
| | | </if> |
| | | ) aa |
| | | GROUP BY |
| | |
| | | AND di.index_id IN <foreach item="indexId" index="index" collection="indexIds" open="(" separator="," close=")">#{indexId} </foreach> |
| | | AND di.time_type = #{timeType} |
| | | <if test="indexStorageId !='' and indexStorageId !=null"> |
| | | and ci.equipment=#{indexStorageId} |
| | | and ci.energy_id=#{indexStorageId} |
| | | </if> |
| | | ) aa |
| | | GROUP BY |
| | |
| | | </foreach> |
| | | AND di.time_type = #{timeType} |
| | | <if test="indexStorageId !='' and indexStorageId !=null"> |
| | | and ci.equipment=#{indexStorageId} |
| | | and ci.energy_id=#{indexStorageId} |
| | | </if> |
| | | ) aa |
| | | GROUP BY |