InspectionFillGroupFillMapper.java
1.9 KB
package com.skua.modules.inspection.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.skua.modules.inspection.vo.InspectionFillGroupFillVO;
import com.skua.modules.inspection.vo.InspectionPointFillGroupAndFillVO;
import org.apache.ibatis.annotations.Param;
import com.skua.modules.inspection.entity.InspectionFillGroupFill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
/**
* 巡检填报组-填报项
*/
public interface InspectionFillGroupFillMapper extends BaseMapper<InspectionFillGroupFill> {
@Select({"select *,iif.id id from inspection_fill_group_fill ifi left join inspection_fill iif on ifi.inspection_fill_id = iif.id ${ew.customSqlSegment}"})
List<InspectionFillGroupFillVO> getPage(Page<InspectionFillGroupFillVO> page, @Param(Constants.WRAPPER) QueryWrapper<InspectionFillGroupFillVO> inspectionFillGroupFillVOQueryWrapper);
@Select("SELECT " +
" ifg.id,group_name,fill_name,fill_type,fill_unit," +
" group_concat(choice_name order by ifc.sort SEPARATOR \"|\") choice_name,d.id as depart_id " +
" FROM " +
" inspection_fill_group ifg " +
" left join inspection_fill_group_fill ifgf on ifg.id = ifgf.inspection_fill_group_id " +
" left join sys_depart d on d.id = ifg.depart_id " +
" left join inspection_fill ifi on ifgf.inspection_fill_id = ifi.id and ifi.del_flag = '0' " +
" left join inspection_fill_choice ifc on ifi.id = ifc.inspection_fill_id ${ew.customSqlSegment}")
List<InspectionPointFillGroupAndFillVO> getList(@Param(Constants.WRAPPER) QueryWrapper<InspectionPointFillGroupAndFillVO> inspectionPointFillGroupAndFillVOQueryWrapper);
}