| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.iailab.framework.common.service.impl.BaseServiceImpl; |
| | | import com.iailab.module.data.api.point.dto.ApiPointDTO; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.iailab.module.model.mcs.pre.dao.MmItemResultDao; |
| | | import com.iailab.module.model.mcs.pre.entity.MmItemOutputEntity; |
| | | import com.iailab.module.model.mcs.pre.entity.MmItemResultEntity; |
| | | import com.iailab.module.model.mcs.pre.entity.MmItemResultJsonEntity; |
| | | import com.iailab.module.model.mcs.pre.service.MmItemOutputService; |
| | | import com.iailab.module.model.mcs.pre.service.MmItemResultService; |
| | | import com.iailab.module.model.mdk.vo.DataValueVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @author PanZhibao |
| | | * @date 2021年05月28日 10:34 |
| | | */ |
| | | @Service("mmItemResultService") |
| | | public class MmItemResultServiceImpl extends BaseServiceImpl<MmItemResultDao, MmItemResultEntity> |
| | | implements MmItemResultService { |
| | | @Service |
| | | public class MmItemResultServiceImpl extends ServiceImpl<MmItemResultDao, MmItemResultEntity> implements MmItemResultService { |
| | | |
| | | private final int max_group_count = 100; |
| | | |
| | | private final String T_MM_ITEM_RESULT = "T_MM_ITEM_RESULT"; |
| | | |
| | | @Autowired |
| | | private MmItemOutputService mmItemOutputService; |
| | | |
| | | private MmItemResultDao mmItemResultDao; |
| | | |
| | | @Override |
| | | public List<MmItemResultEntity> getListByOutputId(String outputid, Map<String, Object> params) { |
| | | |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | List<MmItemResultEntity> list = baseDao.selectList( |
| | | List<MmItemResultEntity> list = mmItemResultDao.selectList( |
| | | new QueryWrapper<MmItemResultEntity>() |
| | | .eq("outputid", outputid) |
| | | .between("datatime", startDateParam, endDateParam) |
| | |
| | | Map<String, Object> map4 = new HashMap(2); |
| | | map4.put("TABLENAME", "T_MM_ITEM_RESULT_JSON"); |
| | | map4.put("entity", resultJson); |
| | | baseDao.savePredictJsonValue(map4); |
| | | mmItemResultDao.savePredictJsonValue(map4); |
| | | } |
| | | |
| | | Map<String, Object> params = new HashMap(4); |
| | |
| | | params.put("OUTPUTID", importList.get(0).getOutputid()); |
| | | params.put("STARTTIME", importList.get(0).getDatatime()); |
| | | params.put("ENDTIME", importList.get(importList.size() - 1).getDatatime()); |
| | | baseDao.deletePredictValue(params); |
| | | mmItemResultDao.deletePredictValue(params); |
| | | |
| | | int num1 = importList.size() / max_group_count; |
| | | int num2 = importList.size() % max_group_count; |
| | |
| | | Map<String, Object> map2 = new HashMap<>(2); |
| | | map2.put("TABLENAME", T_MM_ITEM_RESULT); |
| | | map2.put("list", tempList); |
| | | baseDao.savePredictValue(map2); |
| | | mmItemResultDao.savePredictValue(map2); |
| | | } |
| | | |
| | | Map<String, Object> map3 = new HashMap<>(2); |
| | | map3.put("TABLENAME", "T_MM_ITEM_RESULT_LAST_POINT"); |
| | | map3.put("list", lastList); |
| | | baseDao.savePredictValue(map3); |
| | | mmItemResultDao.savePredictValue(map3); |
| | | } |
| | | |
| | | @Override |
| | |
| | | .eq("outputid", outputid) |
| | | .between("datatime", startTime, endTime) |
| | | .orderByAsc("datatime"); |
| | | List<MmItemResultEntity> list = baseDao.selectList(queryWrapper); |
| | | List<MmItemResultEntity> list = mmItemResultDao.selectList(queryWrapper); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | return result; |
| | | } |