| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.SysPost; |
| | | import com.ruoyi.system.service.ISysPostService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public void export(SysPost post, HttpServletResponse response) |
| | | { |
| | | List<SysPost> list = postService.selectPostList(post); |
| | | ExcelUtils.exportExcel(list, "岗位数据", SysPost.class, response); |
| | | ExcelUtil.exportExcel(list, "岗位数据", SysPost.class, response); |
| | | } |
| | | |
| | | /** |
| | |
| | | { |
| | | return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在"); |
| | | } |
| | | post.setCreateBy(SecurityUtils.getUsername()); |
| | | post.setCreateBy(getUsername()); |
| | | return toAjax(postService.insertPost(post)); |
| | | } |
| | | |
| | |
| | | { |
| | | return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在"); |
| | | } |
| | | post.setUpdateBy(SecurityUtils.getUsername()); |
| | | post.setUpdateBy(getUsername()); |
| | | return toAjax(postService.updatePost(post)); |
| | | } |
| | | |