package com.qianwen.smartman.modules.mdc.mapper;
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
|
|
import java.util.Date;
|
import java.util.List;
|
import org.apache.ibatis.annotations.Param;
|
import com.qianwen.smartman.common.constant.FmsConstant;
|
import com.qianwen.smartman.modules.mdc.dto.IntervalDateDto;
|
import com.qianwen.smartman.modules.mdc.entity.SuperAggregateState;
|
import com.qianwen.smartman.modules.mdc.vo.DeviceStatusStatisticsVO;
|
import com.qianwen.smartman.modules.mdc.vo.StatusAnalysisWorkstationVO;
|
|
//@DS("tdengine")
|
@DS("iotdb")
|
@InterceptorIgnore(tenantLine = FmsConstant.AUTOMATIC)
|
public interface SuperAggregateStateMapper {
|
//void createTable(@Param("workstationId") Long workstationId);
|
|
void insertData(@Param("workstationId") Long workstationId, @Param("sql") String sql);
|
|
List<SuperAggregateState> countStatsShift(@Param("workstationId") String workstationId, @Param("factoryDate") String factoryDate, @Param("shiftIndex") Integer shiftIndex, @Param("calendarCode") String calendarCode);
|
|
List<StatusAnalysisWorkstationVO> statusByWorkstation(@Param("workstationId") String workstationId, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
|
List<StatusAnalysisWorkstationVO> statusByWorkstationByNull(@Param("workstationId") String workstationId, @Param("startTime") String startTime);
|
|
/**
|
* 查询指定工位符合factoryDate的数据 用时分析
|
* @param factoryDate
|
* @param ids
|
* @return
|
*/
|
List<SuperAggregateState> dateState(@Param("factoryDate") int factoryDate, @Param("ids") List<Long> ids);
|
|
/**
|
* 查询指定工位符合星期的数据 用时分析
|
* @param ids
|
* @param year
|
* @param week
|
* @return
|
*/
|
List<SuperAggregateState> weekState(@Param("ids") List<Long> ids, @Param("year") Integer year, @Param("week") Integer week);
|
|
/**
|
* 查询指定工位符合年份和月份的数据 用时分析
|
* @param ids
|
* @param year
|
* @param month
|
* @return
|
*/
|
List<SuperAggregateState> yearState(@Param("ids") List<Long> ids, @Param("year") Integer year, @Param("month") Integer month);
|
/**
|
* 查询指定工位符合班次和factoryDate的数据,用时分析中使用
|
* @param workStationIds
|
* @param factoryDate
|
* @param shiftIndex
|
* @param calendarCode
|
* @return
|
*/
|
List<SuperAggregateState> shiftState(@Param("ids") List<Long> workStationIds, @Param("factoryDate") Integer factoryDate, @Param("shiftIndex") Integer shiftIndex, @Param("calendarCode") String calendarCode);
|
|
List<StatusAnalysisWorkstationVO> statusByWorkstationList(@Param("workstationIdList") List<Long> workstationIdList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
|
List<StatusAnalysisWorkstationVO> statusByWorkstationListByNull(@Param("workstationIdList") List<Long> workstationIdList, @Param("startTime") String startTime);
|
|
List<DeviceStatusStatisticsVO> deviceStatusStatisticsList(@Param("startTime") String startTime);
|
|
List<SuperAggregateState> getStatusDataMonth(@Param("intervalDateDtoList") List<IntervalDateDto> intervalDateDtoList, @Param("workstationIds") List<Long> workstationIds);
|
|
List<SuperAggregateState> getStatusDataWeek(@Param("intervalDateDtoList") List<IntervalDateDto> intervalDateDtoList, @Param("workstationIds") List<Long> workstationIds);
|
|
List<SuperAggregateState> getStatusDataDay(@Param("dayList") List<String> dayList, @Param("workstationIds") List<Long> workstationIds);
|
|
List<SuperAggregateState> getStatusDataShift(@Param("factoryDate") Integer factoryDate, @Param("shiftIndex") Integer shiftIndex, @Param("workstationIds") List<Long> workstationIds);
|
|
List<SuperAggregateState> getStatusByFactory(@Param("factoryDate") Integer factoryDate, @Param("shiftIndex") Integer shiftIndex, @Param("workstationIds") List<Long> workstationIds);
|
|
/**
|
* 查询状态数据
|
* @param workstationIds 指定的工位id集合
|
* @param startDate 开始时间
|
* @param endDate 截至时间
|
* @return 数据列表
|
*/
|
List<SuperAggregateState> getStatusData(@Param("workstationIds") List<Long> workstationIds, @Param("startDate") java.util.Date startDate, @Param("endDate") java.util.Date endDate);
|
|
/**
|
* 根据工位id列表和时间节点获取状态数据yys,首页稼动率时使用的
|
* @param workstationIds
|
* @param startDate
|
* @param endDate
|
* @return
|
*/
|
List<SuperAggregateState> getStatusDataByTimeSection(@Param("workstationIds") List<Long> workstationIds, @Param("startDate") java.util.Date startDate, @Param("endDate") java.util.Date endDate);
|
|
/**
|
* 根据工厂日期获取聚合状态数据
|
* @param workstationIds
|
* @param startDate
|
* @param endDate
|
* @return
|
*/
|
List<SuperAggregateState> getStatusDataByFactoryDate(@Param("workstationIds") List<Long> workstationIds, @Param("startFactoryDate") int startFactoryDate, @Param("endFactoryDate") int endFactoryDate);
|
|
List<SuperAggregateState> getStatusDataByFactoryDateAndWorkstationId(@Param("workstationId") Long workstationId, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
|
/**
|
* 获取设备运行时长所需全部状态数据,欢迎页面小部件调用.yys ,日期参数由string改为localdatetime
|
* @param workstationIds
|
* @param startDate 开始时间
|
* @param endDate 截至时间
|
* @param status 指定的状态
|
* @return
|
*/
|
//List<SuperAggregateState> getEquipmentStatusDuration(@Param("workstationIds") List<Long> workstationIds, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("status") Integer status);
|
List<SuperAggregateState> getEquipmentStatusDuration(@Param("workstationIds") List<Long> workstationIds, @Param("startDate") java.util.Date startDate, @Param("endDate") java.util.Date endDate, @Param("status") Integer status);
|
|
List<SuperAggregateState> getEquipmentStatusRecord(@Param("workstationIds") List<Long> workstationIds, @Param("shiftIndex") Integer shiftIndex, @Param("factoryDate") Integer factoryDate);
|
|
List<SuperAggregateState> listsState(@Param("factoryDate") Integer factoryDate, @Param("workstationIds") List<Long> workstationIds, @Param("shiftIndex") List<Integer> shiftIndex);
|
|
List<SuperAggregateState> getDataByWeek(@Param("workstationIds") List<Long> workstationIds, @Param("year") Integer year, @Param("weekList") List<Integer> weekList);
|
|
List<SuperAggregateState> getDataByMonth(@Param("workstationIds") List<Long> workstationIds, @Param("year") Integer year, @Param("monthList") List<Integer> monthList);
|
|
List<SuperAggregateState> listCrossDay(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
|
//void saveState(@Param("workstationId") Long workstationId, @Param("list") List<SuperAggregateState> list);
|
|
List<SuperAggregateState> listInTime(@Param("workstationIds") List<Long> workstationIdList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
|
List<SuperAggregateState> listTsInTime(@Param("workstationIds") List<Long> workstationIdList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
|
List<SuperAggregateState> listEndTimeInTime(@Param("workstationIds") List<Long> workstationIdList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
|
List<SuperAggregateState> listOutTime(@Param("workstationIds") List<Long> workstationIdList, @Param("startTime") String startTime, @Param("endTime") String endTime);
|
|
List<SuperAggregateState> queryPerfByDay(@Param("workstationId") Long workstationId, @Param("startTime") String startTime, @Param("endTime") String endTime, @Param("employeeId") Long employeeId);
|
|
List<SuperAggregateState> queryPerfByWeek(@Param("workstationId") Long workstationId, @Param("weeks") List<Integer> weeks, @Param("employeeId") Long employeeId);
|
|
List<SuperAggregateState> queryPerfByMonth(@Param("workstationId") Long workstationId, @Param("months") List<Integer> months, @Param("employeeId") Long employeeId);
|
|
List<SuperAggregateState> queryPerfByEtDay(@Param("employeeId") Long employeeId, @Param("queryTime") String queryTime);
|
|
List<SuperAggregateState> queryPerfByEtWeek(@Param("employeeId") Long employeeId, @Param("week") Integer week);
|
|
List<SuperAggregateState> queryPerfByEtMonth(@Param("employeeId") Long employeeId, @Param("month") Integer month);
|
|
List<SuperAggregateState> queryPerfByWtDay(@Param("workstationId") Long workstationId, @Param("time") String time);
|
|
List<SuperAggregateState> queryPerfByWtWeek(@Param("workstationId") Long workstationId, @Param("week") Integer week);
|
|
List<SuperAggregateState> queryPerfByWtMonth(@Param("workstationId") Long workstationId, @Param("month") Integer month);
|
|
List<SuperAggregateState> getCurrMonthState(@Param("ids") List<Long> ids, @Param("month") Integer month);
|
|
List<SuperAggregateState> getCurrMonthAlarmState(@Param("workIds") List<Long> workIds, @Param("month") Integer month, @Param("code") Integer code);
|
|
List<SuperAggregateState> getCurrWeekAlarmState(@Param("workIds") List<Long> workIds, @Param("week") Integer week, @Param("code") Integer code);
|
}
|