package com.gkhy.safePlatform.doublePrevention.service.baseService.impl; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.gkhy.safePlatform.commons.enums.E; import com.gkhy.safePlatform.commons.exception.AusinessException; import com.gkhy.safePlatform.doublePrevention.entity.PreventReportCheckRecordFromTask; import com.gkhy.safePlatform.doublePrevention.entity.dto.report.req.PreventReportCheckRecordFromTaskReqDTO; import com.gkhy.safePlatform.doublePrevention.repository.PreventReportCheckRecordFromTaskRepository; import com.gkhy.safePlatform.doublePrevention.repository.param.HandlerReportParam; import com.gkhy.safePlatform.doublePrevention.service.baseService.PreventReportCheckRecordFromTaskService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service("PreventReportCheckRecordFromTaskService") public class PreventReportCheckRecordFromTaskServiceImpl extends ServiceImpl implements PreventReportCheckRecordFromTaskService { @Autowired private PreventReportCheckRecordFromTaskRepository preventReportCheckRecordFromTaskRepository; /** * 批量插入任务记录 * */ @Override public int insert(PreventReportCheckRecordFromTask recordFromTasks) { return preventReportCheckRecordFromTaskRepository.insert(recordFromTasks); } /** * 任务记录-分页查询 * */ @Override public IPage getReportTaskFromWorkPage(Page objectPage, PreventReportCheckRecordFromTaskReqDTO queryReqDTO) { return preventReportCheckRecordFromTaskRepository.getReportTaskFromWorkPage(objectPage, queryReqDTO); } /** * 任务-查询待上报 * */ @Override public List listReportTaskRecordDate() { return preventReportCheckRecordFromTaskRepository.listReportTaskRecordDate(); } /** * 任务-待上报状态变更 * */ @Override public void updateTaskReportStatus(HandlerReportParam handlerReportParam) { int result = preventReportCheckRecordFromTaskRepository.updateTaskReportStatus(handlerReportParam); if (result < 1){ throw new AusinessException(E.UPDATE_FAIL, "修改任务配置数据上报状态失败"); } } }