| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.iailab.framework.common.util.date.DateUtils; |
| | | import com.iailab.framework.common.util.object.ConvertUtils; |
| | | import com.iailab.module.ansteel.api.dao.MainProcessIndexDayDao; |
| | | import com.iailab.module.ansteel.api.dao.MainProcessIndexTeamDao; |
| | | import com.iailab.module.ansteel.api.dao.PowerRunStateDao; |
| | | import com.iailab.module.ansteel.api.dao.*; |
| | | import com.iailab.module.ansteel.api.dto.*; |
| | | import com.iailab.module.ansteel.api.service.DataApi; |
| | | import com.iailab.module.ansteel.api.entity.PowerCapacitorStatusEntity; |
| | | import com.iailab.module.ansteel.api.entity.PowerControlDetEntity; |
| | | import com.iailab.module.ansteel.api.entity.PowerControlMainEntity; |
| | | import com.iailab.module.ansteel.api.entity.PowerNetFactorEntity; |
| | | import com.iailab.module.ansteel.api.service.DataService; |
| | | import com.iailab.module.ansteel.common.constant.CommonConstant; |
| | | import com.iailab.module.data.api.plan.PlanItemApi; |
| | | import com.iailab.module.data.api.plan.dto.ApiPlanDataDTO; |
| | |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class DataServiceImpl implements DataApi { |
| | | public class DataServiceImpl implements DataService { |
| | | |
| | | @Autowired |
| | | private DataPointApi dataPointApi; |
| | |
| | | |
| | | @Autowired |
| | | private MainProcessIndexTeamDao mainProcessIndexTeamDao; |
| | | |
| | | @Autowired |
| | | private PowerNetFactorDao powerNetFactorDao; |
| | | |
| | | @Autowired |
| | | private PowerCapacitorStatusDao powerCapacitorStatusDao; |
| | | |
| | | @Autowired |
| | | private PowerControlMainDao powerControlMainDao; |
| | | |
| | | @Autowired |
| | | private PowerControlDetDao powerControlDetDao; |
| | | |
| | | @Override |
| | | public List<PowerRunStateDTO> getPowerRunState() { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Boolean updateSuggestStatus(StAlarmAndSuggestReqVO ReqVO) { |
| | | return mcsApi.updateSuggestStatus(ReqVO); |
| | | public Boolean useSuggest(StAlarmAndSuggestReqVO ReqVO) { |
| | | return mcsApi.useSuggest(ReqVO); |
| | | } |
| | | |
| | | @Override |
| | |
| | | }); |
| | | preDataView.setTrendsDataL(newList); |
| | | } |
| | | MmItemOutputDTO outputDTO = mcsApi.getItemOutputByItemid(predictItem.getId(), resultStr, resultIndex); |
| | | |
| | | PreItemResultReqVO preItemResultReqVO = new PreItemResultReqVO(); |
| | | preItemResultReqVO.setOutputid(outputDTO.getId()); |
| | | preItemResultReqVO.setStartTime(startTime); |
| | | preItemResultReqVO.setEndTime(endTime); |
| | | preItemResultReqVO.setTimeFormat(timeFormat); |
| | | |
| | | preDataView.setPreData(resultOld.getDataView().getPreDataL()); |
| | | |
| | |
| | | } |
| | | return endTime; |
| | | } |
| | | |
| | | @Override |
| | | public List<PowerNetFactorDTO> getPowerNetFactorList() { |
| | | return ConvertUtils.sourceToTarget(powerNetFactorDao.selectList(new QueryWrapper<PowerNetFactorEntity>().orderByAsc("sort")), PowerNetFactorDTO.class); |
| | | } |
| | | |
| | | @Override |
| | | public List<PowerCapacitorStatusDTO> getPowerCapacitorStatusList() { |
| | | return ConvertUtils.sourceToTarget(powerCapacitorStatusDao.selectList(new QueryWrapper<PowerCapacitorStatusEntity>().orderByAsc("sort")), PowerCapacitorStatusDTO.class); |
| | | } |
| | | |
| | | @Override |
| | | public List<PowerControlMainDTO> getPowerControlMainList() { |
| | | return ConvertUtils.sourceToTarget(powerControlMainDao.selectList(new QueryWrapper<PowerControlMainEntity>().orderByAsc("sort")), PowerControlMainDTO.class); |
| | | } |
| | | |
| | | @Override |
| | | public List<PowerControlDetDTO> getPowerControlDetList(Map<String, Object> params) { |
| | | QueryWrapper<PowerControlDetEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("control_id", params.get("control_id")); |
| | | wrapper.orderByAsc("sort"); |
| | | return ConvertUtils.sourceToTarget(powerControlDetDao.selectList(wrapper), PowerControlDetDTO.class); |
| | | } |
| | | } |