| | |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入dept") |
| | | public R<DeptVO> detail(Dept dept) { |
| | | Dept detail = deptService.getOne(Condition.getQueryWrapper(dept)); |
| | | return R.data(DeptWrapper.build().entityVO(detail)); |
| | | DeptVO detail = deptService.getDetailWithAreaName(dept); |
| | | return R.data(detail); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | List<DeptExcel> exportDept(DeptExportParam deptExportParam); |
| | | |
| | | /** |
| | | * 获取部门详情(包含区域名称) |
| | | * |
| | | * @param dept 部门对象,包含查询条件 |
| | | * @return 部门详情VO,包含区域名称 |
| | | */ |
| | | DeptVO getDetailWithAreaName(@Param("dept") Dept dept); |
| | | } |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!--获取部门详情(包含区域名称)--> |
| | | <select id="getDetailWithAreaName" resultType="org.sxkj.system.vo.DeptVO"> |
| | | SELECT |
| | | bd.*, |
| | | br.name AS area_name |
| | | FROM |
| | | blade_dept bd |
| | | LEFT JOIN |
| | | blade_region br ON br.code = bd.area_code |
| | | WHERE |
| | | bd.is_deleted = 0 |
| | | <if test="dept.id!=null"> |
| | | and bd.id = #{dept.id} |
| | | </if> |
| | | <if test="dept.deptCode!=null and dept.deptCode!=''"> |
| | | and bd.dept_code = #{dept.deptCode} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | * @return |
| | | */ |
| | | List<DeptExcel> exportDept(DeptExportParam dept); |
| | | |
| | | /** |
| | | * 获取部门详情(包含区域名称) |
| | | * |
| | | * @param dept 部门对象,包含查询条件 |
| | | * @return 部门详情VO,包含区域名称 |
| | | */ |
| | | DeptVO getDetailWithAreaName(Dept dept); |
| | | } |
| | |
| | | public List<DeptExcel> exportDept(DeptExportParam dept) { |
| | | return baseMapper.exportDept(dept); |
| | | } |
| | | |
| | | @Override |
| | | public DeptVO getDetailWithAreaName(Dept dept) { |
| | | return baseMapper.getDetailWithAreaName(dept); |
| | | } |
| | | } |