| | |
| | | @ApiOperation("导出学校列表") |
| | | @PreAuthorize("@ss.hasPermi('oa:school:export')") |
| | | @Log(title = "学校", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public void export(@Validated BsSchoolBo bo, HttpServletResponse response) { |
| | | List<BsSchoolVo> list = iBsSchoolService.queryList(bo); |
| | | @PostMapping("/export") |
| | | public void export(BsSchoolBo bo, HttpServletResponse response) { |
| | | List<BsSchoolVo> list = iBsSchoolService.exportList(bo); |
| | | ExcelUtil.exportExcel(list, "学校", BsSchoolVo.class, response); |
| | | } |
| | | |
| | |
| | | /** |
| | | * id |
| | | */ |
| | | @ExcelProperty(value = "id") |
| | | @ApiModelProperty("id") |
| | | private Long id; |
| | | |
| | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ExcelProperty(value = "备注") |
| | | @ApiModelProperty("备注") |
| | | private String remarks; |
| | | |
| | |
| | | |
| | | import com.ruoyi.oa.domain.BsSchool; |
| | | import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; |
| | | import com.ruoyi.oa.domain.bo.BsSchoolBo; |
| | | import com.ruoyi.oa.domain.vo.BsSchoolVo; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 学校Mapper接口 |
| | |
| | | @Mapper |
| | | public interface BsSchoolMapper extends BaseMapperPlus<BsSchool> { |
| | | |
| | | List<BsSchoolVo> exportList(@Param("p") BsSchoolBo bo); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); |
| | | |
| | | List<BsSchoolVo> exportList(BsSchoolBo bo); |
| | | } |
| | |
| | | } |
| | | return removeByIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<BsSchoolVo> exportList(BsSchoolBo bo) { |
| | | return baseMapper.exportList(bo); |
| | | } |
| | | } |
| | |
| | | <result property="version" column="version"/> |
| | | </resultMap> |
| | | |
| | | <select id="exportList" resultType="com.ruoyi.oa.domain.vo.BsSchoolVo"> |
| | | select |
| | | a.id, |
| | | a.code, |
| | | a.name, |
| | | (select b.PROVINCE_NAME from bs_province b where a.province_code = b.PROVINCE_CODE) as provinceCode, |
| | | (select c.CITY_NAME from bs_city c where a.city_code = c.CITY_CODE) as cityCode, |
| | | a.school_run_level as schoolRunLevel, |
| | | a.discipline_scope as disciplineScope |
| | | from bs_school a |
| | | where |
| | | 1=1 |
| | | <if test="p.code != null and p.code != null"> |
| | | and a.code like concat('%', #{p.code}, '%') |
| | | </if> |
| | | <if test="p.name != null and p.name != null"> |
| | | and a.name like concat('%', #{p.name}, '%') |
| | | </if> |
| | | order by a.update_time desc |
| | | </select> |
| | | |
| | | |
| | | </mapper> |