| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.iailab.framework.common.service.impl.BaseServiceImpl; |
| | | import com.iailab.framework.common.util.date.DateUtils; |
| | | import com.iailab.module.model.mcs.pre.dao.MmItemResultJsonDao; |
| | | import com.iailab.module.model.mcs.pre.entity.MmItemResultJsonEntity; |
| | | import com.iailab.module.model.mcs.pre.service.MmItemResultJsonService; |
| | |
| | | implements MmItemResultJsonService { |
| | | |
| | | @Override |
| | | public List<Object[]> getData(String outputId, Date predictTime) { |
| | | public List<Object[]> getData(String outputId, Date predictTime, String timeFormat) { |
| | | List<Object[]> result = new ArrayList<>(); |
| | | QueryWrapper<MmItemResultJsonEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("outputid", outputId) |
| | |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(predictTime); |
| | | valueList.forEach(value -> { |
| | | Object[] dv = { calendar.getTime(), value}; |
| | | Object[] dv = {DateUtils.format(calendar.getTime(), timeFormat), value}; |
| | | calendar.add(Calendar.MINUTE, 1); |
| | | result.add(dv); |
| | | }); |