TcAssetVerificationJava/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetTaskMapper.java

180 lines
4.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.ruoyi.tc.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.tc.entity.AssetTask;
import com.ruoyi.tc.entity.po.AssetCurrentCpPo;
import com.ruoyi.tc.entity.request.AssestTaskXqRequest;
import com.ruoyi.tc.entity.request.AssetCurrentShRequest;
import com.ruoyi.tc.entity.request.AssetTaskPageRequest;
import com.ruoyi.tc.entity.request.AssetdwHcRequest;
import com.ruoyi.tc.entity.response.AssestTaskXqresponse;
import com.ruoyi.tc.entity.response.AssetTaskResponse;
import com.ruoyi.tc.entity.response.AssetTaskStatusResponse;
import com.ruoyi.tc.entity.response.AssetdwHcResponse;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.time.LocalDateTime;
import java.util.List;
/**
* 任务主表(AssetTask)表数据库访问层
*
* @author makejava
* @since 2024-11-18 13:22:58
*/
public interface AssetTaskMapper extends BaseMapper<AssetTask> {
/**
* 页条件查询
*
* @param page 分页条件
* @param pageRequest 查询条件
* @return 填报任务
*/
Page<AssetTask> queryByPage(Page<AssetTask> page, @Param("req") AssetTaskPageRequest pageRequest);
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
AssetTaskResponse queryById(Integer id);
/**
* 查询指定行数据
*
* @param assetTask 查询条件
* @param pageable 分页对象
* @return 对象列表
*/
List<AssetTask> queryAllByLimit(AssetTask assetTask, @Param("pageable") Pageable pageable);
/**
* 统计总行数
*
* @param assetTask 查询条件
* @return 总行数
*/
long count(AssetTask assetTask);
/**
* 新增数据
*
* @param assetTask 实例对象
* @return 影响行数
*/
int insert(AssetTask assetTask);
/**
* 批量新增数据MyBatis原生foreach方法
*
* @param entities List<AssetTask> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<AssetTask> entities);
/**
* 批量新增或按主键更新数据MyBatis原生foreach方法
*
* @param entities List<AssetTask> 实例对象列表
* @return 影响行数
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常请自行校验入参
*/
int insertOrUpdateBatch(@Param("entities") List<AssetTask> entities);
/**
* 修改数据
*
* @param assetTask 实例对象
* @return 影响行数
*/
int update(AssetTask assetTask);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 影响行数
*/
int deleteById(Integer id);
/**
* 根据单位名称查询资产
*
* @param dwmc 单位名称
* @return
*/
List<AssetCurrentCpPo> findByDwmcAssetCurrent(String dwmc);
/**
* 资产核查信息
*
* @param page 分页参数
* @param pageRequest 查询条件
* @return
*/
Page<AssestTaskXqresponse> zcHc(Page<AssestTaskXqresponse> page, @Param("req") AssestTaskXqRequest pageRequest);
/**
* 根据任务id资产id查询资产主表信息
*
* @param taskId 任务id
* @param assetId 资产id
* @return
*/
AssetCurrentCpPo findBytaskIdandAssestId(@Param("taskId") int taskId, @Param("assetId") int assetId);
/**
* 管理端审核
*
* @param req 请求类
* @return
*/
int sh(@Param("req") AssetCurrentShRequest req);
/**
* 管理端-单位核查情况
*
* @return
*/
Page<AssetdwHcResponse> dwHc(Page<AssetdwHcResponse> assetdwHcResponsePage, @Param("req") AssetdwHcRequest req);
/**
* 查询当前任务下的所有资产状态和完成时间
*
* @param taskId 任务id
* @return
*/
List<AssetTaskStatusResponse> findByTaskId(Integer taskId);
/**
* 修改主表任务状态
*
* @param taskStatus 任务状态
* @param taskId 任务id
* @return
*/
int updateByTaskId(@Param("taskStatus") Integer taskStatus, @Param("taskId") Integer taskId, @Param("finishTime") LocalDateTime finishTime);
/**
* 根据单位名称查询是否有进行中的任务
*
* @param dwmc 单位名称
* @return
*/
List<AssetTask> taskList(@Param("dwmc") String dwmc);
}