Browse Source

钉钉 职位管理

hanzhuoyue 9 months ago
parent
commit
5b621e0a2e

+ 111 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TPostController.java

@@ -0,0 +1,111 @@
+package com.ruoyi.web.controller.tool;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.tool.domain.TPost;
+import com.ruoyi.tool.service.ITPostService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * 职位信息Controller
+ *
+ * @author ruoyi
+ * @date 2024-06-13
+ */
+@RestController
+@RequestMapping("/tool/post")
+public class TPostController extends BaseController {
+    @Autowired
+    private ITPostService tPostService;
+
+    /**
+     * 查询职位信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('tool:post:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TPost tPost) {
+        startPage();
+        List<TPost> list = tPostService.selectTPostList(tPost);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出职位信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('tool:post:export')")
+    @Log(title = "职位信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, TPost tPost) {
+        List<TPost> list = tPostService.selectTPostList(tPost);
+        ExcelUtil<TPost> util = new ExcelUtil<TPost>(TPost.class);
+        util.exportExcel(response, list, "职位信息数据");
+    }
+
+    /**
+     * 获取职位信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('tool:post:query')")
+    @GetMapping(value = "/{postId}")
+    public AjaxResult getInfo(@PathVariable("postId") Long postId) {
+        return success(tPostService.selectTPostByPostId(postId));
+    }
+
+    /**
+     * 新增职位信息
+     */
+    @PreAuthorize("@ss.hasPermi('tool:post:add')")
+    @Log(title = "职位信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TPost tPost) {
+        return toAjax(tPostService.insertTPost(tPost));
+    }
+
+    /**
+     * 修改职位信息
+     */
+    @PreAuthorize("@ss.hasPermi('tool:post:edit')")
+    @Log(title = "职位信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TPost tPost) {
+        return toAjax(tPostService.updateTPost(tPost));
+    }
+
+    /**
+     * 删除职位信息
+     */
+    @PreAuthorize("@ss.hasPermi('tool:post:remove')")
+    @Log(title = "职位信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{postIds}")
+    public AjaxResult remove(@PathVariable Long[] postIds) {
+        return toAjax(tPostService.deleteTPostByPostIds(postIds));
+    }
+
+    @Log(title = "职位信息", businessType = BusinessType.IMPORT)
+    @PreAuthorize("@ss.hasPermi('tool:post:import')")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file) throws Exception {
+        ExcelUtil<TPost> util = new ExcelUtil<TPost>(TPost.class);
+        List<TPost> userList = util.importExcel(file.getInputStream());
+        String operName = getUsername();
+        String message = tPostService.importPost(userList, operName);
+        return success(message);
+    }
+}

+ 364 - 0
ruoyi-system/src/main/java/com/ruoyi/tool/domain/TPost.java

@@ -0,0 +1,364 @@
+package com.ruoyi.tool.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 职位信息对象 t_post
+ * 
+ * @author ruoyi
+ * @date 2024-06-13
+ */
+public class TPost extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 岗位ID */
+    private Long postId;
+
+    /** 岗位编码 */
+    @Excel(name = "岗位编码")
+    private String postCode;
+
+    /** 岗位名称 */
+    @Excel(name = "岗位名称")
+    private String postName;
+
+    /** 显示顺序 */
+    @Excel(name = "显示顺序")
+    private Long postSort;
+
+    /** 职位性质 */
+    @Excel(name = "职位性质")
+    private String postNature;
+
+    /** 学历 */
+    @Excel(name = "学历")
+    private String education;
+
+    /** 最低薪资 */
+    @Excel(name = "最低薪资")
+    private String lowSalary;
+
+    /** 最高薪资 */
+    @Excel(name = "最高薪资")
+    private String highestSalary;
+
+    /** 薪资类型1 */
+    @Excel(name = "薪资类型1")
+    private String salaryType1;
+
+    /** 薪资类型2 */
+    @Excel(name = "薪资类型2")
+    private String salaryType2;
+
+    /** 工作地点 */
+    @Excel(name = "工作地点")
+    private String workplace;
+
+    /** 工作地点坐标 */
+    @Excel(name = "工作地点坐标")
+    private String workplaceCoordinate;
+
+    /** 工作年限 */
+    @Excel(name = "工作年限")
+    private String workYear;
+
+    /** 职位类别 */
+    @Excel(name = "职位类别")
+    private String postCategory;
+
+    /** 职位标签 */
+    @Excel(name = "职位标签")
+    private String postTag;
+
+    /** 招聘人数 */
+    @Excel(name = "招聘人数")
+    private Long recruitNum;
+
+    /** 工作日期类型 */
+    @Excel(name = "工作日期类型")
+    private String workDateType;
+
+    /** 工作日期时间段 */
+    @Excel(name = "工作日期时间段")
+    private String dateInterval;
+
+    /** 工作时间类型 */
+    @Excel(name = "工作时间类型")
+    private String workHourType;
+
+    /** 工作时段 */
+    @Excel(name = "工作时段")
+    private String workHour;
+
+    /** 联系电话 */
+    @Excel(name = "联系电话")
+    private String telephone;
+
+    /** 结算方式 */
+    @Excel(name = "结算方式")
+    private String settlementMethod;
+
+    /** 状态(0正常 1停用) */
+    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
+    private String status;
+
+    /** 钉钉用户所属的组织的企业corpId */
+    @Excel(name = "钉钉用户所属的组织的企业corpId")
+    private String corpId;
+
+    public void setPostId(Long postId) 
+    {
+        this.postId = postId;
+    }
+
+    public Long getPostId() 
+    {
+        return postId;
+    }
+    public void setPostCode(String postCode) 
+    {
+        this.postCode = postCode;
+    }
+
+    public String getPostCode() 
+    {
+        return postCode;
+    }
+    public void setPostName(String postName) 
+    {
+        this.postName = postName;
+    }
+
+    public String getPostName() 
+    {
+        return postName;
+    }
+    public void setPostSort(Long postSort) 
+    {
+        this.postSort = postSort;
+    }
+
+    public Long getPostSort() 
+    {
+        return postSort;
+    }
+    public void setPostNature(String postNature) 
+    {
+        this.postNature = postNature;
+    }
+
+    public String getPostNature() 
+    {
+        return postNature;
+    }
+    public void setEducation(String education) 
+    {
+        this.education = education;
+    }
+
+    public String getEducation() 
+    {
+        return education;
+    }
+    public void setLowSalary(String lowSalary) 
+    {
+        this.lowSalary = lowSalary;
+    }
+
+    public String getLowSalary() 
+    {
+        return lowSalary;
+    }
+    public void setHighestSalary(String highestSalary) 
+    {
+        this.highestSalary = highestSalary;
+    }
+
+    public String getHighestSalary() 
+    {
+        return highestSalary;
+    }
+    public void setSalaryType1(String salaryType1) 
+    {
+        this.salaryType1 = salaryType1;
+    }
+
+    public String getSalaryType1() 
+    {
+        return salaryType1;
+    }
+    public void setSalaryType2(String salaryType2) 
+    {
+        this.salaryType2 = salaryType2;
+    }
+
+    public String getSalaryType2() 
+    {
+        return salaryType2;
+    }
+    public void setWorkplace(String workplace) 
+    {
+        this.workplace = workplace;
+    }
+
+    public String getWorkplace() 
+    {
+        return workplace;
+    }
+    public void setWorkplaceCoordinate(String workplaceCoordinate) 
+    {
+        this.workplaceCoordinate = workplaceCoordinate;
+    }
+
+    public String getWorkplaceCoordinate() 
+    {
+        return workplaceCoordinate;
+    }
+    public void setWorkYear(String workYear) 
+    {
+        this.workYear = workYear;
+    }
+
+    public String getWorkYear() 
+    {
+        return workYear;
+    }
+    public void setPostCategory(String postCategory) 
+    {
+        this.postCategory = postCategory;
+    }
+
+    public String getPostCategory() 
+    {
+        return postCategory;
+    }
+    public void setPostTag(String postTag) 
+    {
+        this.postTag = postTag;
+    }
+
+    public String getPostTag() 
+    {
+        return postTag;
+    }
+    public void setRecruitNum(Long recruitNum) 
+    {
+        this.recruitNum = recruitNum;
+    }
+
+    public Long getRecruitNum() 
+    {
+        return recruitNum;
+    }
+    public void setWorkDateType(String workDateType) 
+    {
+        this.workDateType = workDateType;
+    }
+
+    public String getWorkDateType() 
+    {
+        return workDateType;
+    }
+    public void setDateInterval(String dateInterval) 
+    {
+        this.dateInterval = dateInterval;
+    }
+
+    public String getDateInterval() 
+    {
+        return dateInterval;
+    }
+    public void setWorkHourType(String workHourType) 
+    {
+        this.workHourType = workHourType;
+    }
+
+    public String getWorkHourType() 
+    {
+        return workHourType;
+    }
+    public void setWorkHour(String workHour) 
+    {
+        this.workHour = workHour;
+    }
+
+    public String getWorkHour() 
+    {
+        return workHour;
+    }
+    public void setTelephone(String telephone) 
+    {
+        this.telephone = telephone;
+    }
+
+    public String getTelephone() 
+    {
+        return telephone;
+    }
+    public void setSettlementMethod(String settlementMethod) 
+    {
+        this.settlementMethod = settlementMethod;
+    }
+
+    public String getSettlementMethod() 
+    {
+        return settlementMethod;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+    public void setCorpId(String corpId) 
+    {
+        this.corpId = corpId;
+    }
+
+    public String getCorpId() 
+    {
+        return corpId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("postId", getPostId())
+            .append("postCode", getPostCode())
+            .append("postName", getPostName())
+            .append("postSort", getPostSort())
+            .append("postNature", getPostNature())
+            .append("education", getEducation())
+            .append("lowSalary", getLowSalary())
+            .append("highestSalary", getHighestSalary())
+            .append("salaryType1", getSalaryType1())
+            .append("salaryType2", getSalaryType2())
+            .append("workplace", getWorkplace())
+            .append("workplaceCoordinate", getWorkplaceCoordinate())
+            .append("workYear", getWorkYear())
+            .append("postCategory", getPostCategory())
+            .append("postTag", getPostTag())
+            .append("recruitNum", getRecruitNum())
+            .append("workDateType", getWorkDateType())
+            .append("dateInterval", getDateInterval())
+            .append("workHourType", getWorkHourType())
+            .append("workHour", getWorkHour())
+            .append("telephone", getTelephone())
+            .append("settlementMethod", getSettlementMethod())
+            .append("remark", getRemark())
+            .append("status", getStatus())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("corpId", getCorpId())
+            .toString();
+    }
+}

+ 61 - 0
ruoyi-system/src/main/java/com/ruoyi/tool/mapper/TPostMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.tool.mapper;
+
+import java.util.List;
+import com.ruoyi.tool.domain.TPost;
+
+/**
+ * 职位信息Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2024-06-13
+ */
+public interface TPostMapper 
+{
+    /**
+     * 查询职位信息
+     * 
+     * @param postId 职位信息主键
+     * @return 职位信息
+     */
+    public TPost selectTPostByPostId(Long postId);
+
+    /**
+     * 查询职位信息列表
+     * 
+     * @param tPost 职位信息
+     * @return 职位信息集合
+     */
+    public List<TPost> selectTPostList(TPost tPost);
+
+    /**
+     * 新增职位信息
+     * 
+     * @param tPost 职位信息
+     * @return 结果
+     */
+    public int insertTPost(TPost tPost);
+
+    /**
+     * 修改职位信息
+     * 
+     * @param tPost 职位信息
+     * @return 结果
+     */
+    public int updateTPost(TPost tPost);
+
+    /**
+     * 删除职位信息
+     * 
+     * @param postId 职位信息主键
+     * @return 结果
+     */
+    public int deleteTPostByPostId(Long postId);
+
+    /**
+     * 批量删除职位信息
+     * 
+     * @param postIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTPostByPostIds(Long[] postIds);
+}

+ 64 - 0
ruoyi-system/src/main/java/com/ruoyi/tool/service/ITPostService.java

@@ -0,0 +1,64 @@
+package com.ruoyi.tool.service;
+
+import java.util.List;
+import com.ruoyi.tool.domain.TPost;
+
+/**
+ * 职位信息Service接口
+ * 
+ * @author ruoyi
+ * @date 2024-06-13
+ */
+public interface ITPostService 
+{
+    /**
+     * 查询职位信息
+     * 
+     * @param postId 职位信息主键
+     * @return 职位信息
+     */
+    public TPost selectTPostByPostId(Long postId);
+
+    /**
+     * 查询职位信息列表
+     * 
+     * @param tPost 职位信息
+     * @return 职位信息集合
+     */
+    public List<TPost> selectTPostList(TPost tPost);
+
+    /**
+     * 新增职位信息
+     * 
+     * @param tPost 职位信息
+     * @return 结果
+     */
+    public int insertTPost(TPost tPost);
+
+    /**
+     * 修改职位信息
+     * 
+     * @param tPost 职位信息
+     * @return 结果
+     */
+    public int updateTPost(TPost tPost);
+
+    /**
+     * 批量删除职位信息
+     * 
+     * @param postIds 需要删除的职位信息主键集合
+     * @return 结果
+     */
+    public int deleteTPostByPostIds(Long[] postIds);
+
+    /**
+     * 删除职位信息信息
+     * 
+     * @param postId 职位信息主键
+     * @return 结果
+     */
+    public int deleteTPostByPostId(Long postId);
+
+
+    String importPost(List<TPost> postList, String operName);
+}

+ 128 - 0
ruoyi-system/src/main/java/com/ruoyi/tool/service/impl/TPostServiceImpl.java

@@ -0,0 +1,128 @@
+package com.ruoyi.tool.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.bean.BeanValidators;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.tool.mapper.TPostMapper;
+import com.ruoyi.tool.domain.TPost;
+import com.ruoyi.tool.service.ITPostService;
+
+/**
+ * 职位信息Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2024-06-13
+ */
+@Service
+@Slf4j
+public class TPostServiceImpl implements ITPostService {
+    @Autowired
+    private TPostMapper tPostMapper;
+
+    /**
+     * 查询职位信息
+     *
+     * @param postId 职位信息主键
+     * @return 职位信息
+     */
+    @Override
+    public TPost selectTPostByPostId(Long postId) {
+        return tPostMapper.selectTPostByPostId(postId);
+    }
+
+    /**
+     * 查询职位信息列表
+     *
+     * @param tPost 职位信息
+     * @return 职位信息
+     */
+    @Override
+    public List<TPost> selectTPostList(TPost tPost) {
+        return tPostMapper.selectTPostList(tPost);
+    }
+
+    /**
+     * 新增职位信息
+     *
+     * @param tPost 职位信息
+     * @return 结果
+     */
+    @Override
+    public int insertTPost(TPost tPost) {
+        tPost.setCreateTime(DateUtils.getNowDate());
+        return tPostMapper.insertTPost(tPost);
+    }
+
+    /**
+     * 修改职位信息
+     *
+     * @param tPost 职位信息
+     * @return 结果
+     */
+    @Override
+    public int updateTPost(TPost tPost) {
+        tPost.setUpdateTime(DateUtils.getNowDate());
+        return tPostMapper.updateTPost(tPost);
+    }
+
+    /**
+     * 批量删除职位信息
+     *
+     * @param postIds 需要删除的职位信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTPostByPostIds(Long[] postIds) {
+        return tPostMapper.deleteTPostByPostIds(postIds);
+    }
+
+    /**
+     * 删除职位信息信息
+     *
+     * @param postId 职位信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteTPostByPostId(Long postId) {
+        return tPostMapper.deleteTPostByPostId(postId);
+    }
+
+
+    @Override
+    public String importPost(List<TPost> postList, String operName) {
+        if (StringUtils.isNull(postList) || postList.size() == 0) {
+            throw new ServiceException("导入职位数据数据不能为空!");
+        }
+        int successNum = 0;
+        int failureNum = 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+        for (TPost post : postList) {
+            try {
+                tPostMapper.insertTPost(post);
+                successMsg.append("<br/>" + successNum + "、职位 " + post.getPostName() + " 导入成功");
+
+            } catch (Exception e) {
+                failureNum++;
+                String msg = "<br/>" + failureNum + "、职位 " + post.getPostName() + " 导入失败:";
+                failureMsg.append(msg + e.getMessage());
+                log.error(msg, e);
+            }
+        }
+        if (failureNum > 0) {
+            failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:");
+            throw new ServiceException(failureMsg.toString());
+        } else {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:");
+        }
+        return successMsg.toString();
+    }
+}

+ 186 - 0
ruoyi-system/src/main/resources/mapper/tool/TPostMapper.xml

@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.tool.mapper.TPostMapper">
+    
+    <resultMap type="TPost" id="TPostResult">
+        <result property="postId"    column="post_id"    />
+        <result property="postCode"    column="post_code"    />
+        <result property="postName"    column="post_name"    />
+        <result property="postSort"    column="post_sort"    />
+        <result property="postNature"    column="post_nature"    />
+        <result property="education"    column="education"    />
+        <result property="lowSalary"    column="low_salary"    />
+        <result property="highestSalary"    column="highest_salary"    />
+        <result property="salaryType1"    column="salary_type1"    />
+        <result property="salaryType2"    column="salary_type2"    />
+        <result property="workplace"    column="workplace"    />
+        <result property="workplaceCoordinate"    column="workplace_coordinate"    />
+        <result property="workYear"    column="work_year"    />
+        <result property="postCategory"    column="post_category"    />
+        <result property="postTag"    column="post_tag"    />
+        <result property="recruitNum"    column="recruit_num"    />
+        <result property="workDateType"    column="work_date_type"    />
+        <result property="dateInterval"    column="date_interval"    />
+        <result property="workHourType"    column="work_hour_type"    />
+        <result property="workHour"    column="work_hour"    />
+        <result property="telephone"    column="telephone"    />
+        <result property="settlementMethod"    column="settlement_method"    />
+        <result property="remark"    column="remark"    />
+        <result property="status"    column="status"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="corpId"    column="corp_id"    />
+    </resultMap>
+
+    <sql id="selectTPostVo">
+        select post_id, post_code, post_name, post_sort, post_nature, education, low_salary, highest_salary, salary_type1, salary_type2, workplace, workplace_coordinate, work_year, post_category, post_tag, recruit_num, work_date_type, date_interval, work_hour_type, work_hour, telephone, settlement_method, remark, status, create_by, create_time, update_by, update_time, corp_id from t_post
+    </sql>
+
+    <select id="selectTPostList" parameterType="TPost" resultMap="TPostResult">
+        <include refid="selectTPostVo"/>
+        <where>  
+            <if test="postCode != null  and postCode != ''"> and post_code = #{postCode}</if>
+            <if test="postName != null  and postName != ''"> and post_name like concat('%', #{postName}, '%')</if>
+            <if test="postSort != null "> and post_sort = #{postSort}</if>
+            <if test="postNature != null  and postNature != ''"> and post_nature = #{postNature}</if>
+            <if test="education != null  and education != ''"> and education = #{education}</if>
+            <if test="lowSalary != null  and lowSalary != ''"> and low_salary = #{lowSalary}</if>
+            <if test="highestSalary != null  and highestSalary != ''"> and highest_salary = #{highestSalary}</if>
+            <if test="salaryType1 != null  and salaryType1 != ''"> and salary_type1 = #{salaryType1}</if>
+            <if test="salaryType2 != null  and salaryType2 != ''"> and salary_type2 = #{salaryType2}</if>
+            <if test="workplace != null  and workplace != ''"> and workplace = #{workplace}</if>
+            <if test="workplaceCoordinate != null  and workplaceCoordinate != ''"> and workplace_coordinate = #{workplaceCoordinate}</if>
+            <if test="workYear != null  and workYear != ''"> and work_year = #{workYear}</if>
+            <if test="postCategory != null  and postCategory != ''"> and post_category = #{postCategory}</if>
+            <if test="postTag != null  and postTag != ''"> and post_tag = #{postTag}</if>
+            <if test="recruitNum != null "> and recruit_num = #{recruitNum}</if>
+            <if test="workDateType != null  and workDateType != ''"> and work_date_type = #{workDateType}</if>
+            <if test="dateInterval != null  and dateInterval != ''"> and date_interval = #{dateInterval}</if>
+            <if test="workHourType != null  and workHourType != ''"> and work_hour_type = #{workHourType}</if>
+            <if test="workHour != null  and workHour != ''"> and work_hour = #{workHour}</if>
+            <if test="telephone != null  and telephone != ''"> and telephone = #{telephone}</if>
+            <if test="settlementMethod != null  and settlementMethod != ''"> and settlement_method = #{settlementMethod}</if>
+            <if test="status != null  and status != ''"> and status = #{status}</if>
+            <if test="corpId != null  and corpId != ''"> and corp_id = #{corpId}</if>
+        </where>
+    </select>
+    
+    <select id="selectTPostByPostId" parameterType="Long" resultMap="TPostResult">
+        <include refid="selectTPostVo"/>
+        where post_id = #{postId}
+    </select>
+        
+    <insert id="insertTPost" parameterType="TPost" useGeneratedKeys="true" keyProperty="postId">
+        insert into t_post
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="postCode != null and postCode != ''">post_code,</if>
+            <if test="postName != null and postName != ''">post_name,</if>
+            <if test="postSort != null">post_sort,</if>
+            <if test="postNature != null and postNature != ''">post_nature,</if>
+            <if test="education != null and education != ''">education,</if>
+            <if test="lowSalary != null and lowSalary != ''">low_salary,</if>
+            <if test="highestSalary != null and highestSalary != ''">highest_salary,</if>
+            <if test="salaryType1 != null">salary_type1,</if>
+            <if test="salaryType2 != null">salary_type2,</if>
+            <if test="workplace != null">workplace,</if>
+            <if test="workplaceCoordinate != null">workplace_coordinate,</if>
+            <if test="workYear != null">work_year,</if>
+            <if test="postCategory != null">post_category,</if>
+            <if test="postTag != null">post_tag,</if>
+            <if test="recruitNum != null">recruit_num,</if>
+            <if test="workDateType != null">work_date_type,</if>
+            <if test="dateInterval != null">date_interval,</if>
+            <if test="workHourType != null">work_hour_type,</if>
+            <if test="workHour != null">work_hour,</if>
+            <if test="telephone != null">telephone,</if>
+            <if test="settlementMethod != null">settlement_method,</if>
+            <if test="remark != null">remark,</if>
+            <if test="status != null and status != ''">status,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="corpId != null">corp_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="postCode != null and postCode != ''">#{postCode},</if>
+            <if test="postName != null and postName != ''">#{postName},</if>
+            <if test="postSort != null">#{postSort},</if>
+            <if test="postNature != null and postNature != ''">#{postNature},</if>
+            <if test="education != null and education != ''">#{education},</if>
+            <if test="lowSalary != null and lowSalary != ''">#{lowSalary},</if>
+            <if test="highestSalary != null and highestSalary != ''">#{highestSalary},</if>
+            <if test="salaryType1 != null">#{salaryType1},</if>
+            <if test="salaryType2 != null">#{salaryType2},</if>
+            <if test="workplace != null">#{workplace},</if>
+            <if test="workplaceCoordinate != null">#{workplaceCoordinate},</if>
+            <if test="workYear != null">#{workYear},</if>
+            <if test="postCategory != null">#{postCategory},</if>
+            <if test="postTag != null">#{postTag},</if>
+            <if test="recruitNum != null">#{recruitNum},</if>
+            <if test="workDateType != null">#{workDateType},</if>
+            <if test="dateInterval != null">#{dateInterval},</if>
+            <if test="workHourType != null">#{workHourType},</if>
+            <if test="workHour != null">#{workHour},</if>
+            <if test="telephone != null">#{telephone},</if>
+            <if test="settlementMethod != null">#{settlementMethod},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="status != null and status != ''">#{status},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="corpId != null">#{corpId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTPost" parameterType="TPost">
+        update t_post
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
+            <if test="postName != null and postName != ''">post_name = #{postName},</if>
+            <if test="postSort != null">post_sort = #{postSort},</if>
+            <if test="postNature != null and postNature != ''">post_nature = #{postNature},</if>
+            <if test="education != null and education != ''">education = #{education},</if>
+            <if test="lowSalary != null and lowSalary != ''">low_salary = #{lowSalary},</if>
+            <if test="highestSalary != null and highestSalary != ''">highest_salary = #{highestSalary},</if>
+            <if test="salaryType1 != null">salary_type1 = #{salaryType1},</if>
+            <if test="salaryType2 != null">salary_type2 = #{salaryType2},</if>
+            <if test="workplace != null">workplace = #{workplace},</if>
+            <if test="workplaceCoordinate != null">workplace_coordinate = #{workplaceCoordinate},</if>
+            <if test="workYear != null">work_year = #{workYear},</if>
+            <if test="postCategory != null">post_category = #{postCategory},</if>
+            <if test="postTag != null">post_tag = #{postTag},</if>
+            <if test="recruitNum != null">recruit_num = #{recruitNum},</if>
+            <if test="workDateType != null">work_date_type = #{workDateType},</if>
+            <if test="dateInterval != null">date_interval = #{dateInterval},</if>
+            <if test="workHourType != null">work_hour_type = #{workHourType},</if>
+            <if test="workHour != null">work_hour = #{workHour},</if>
+            <if test="telephone != null">telephone = #{telephone},</if>
+            <if test="settlementMethod != null">settlement_method = #{settlementMethod},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="status != null and status != ''">status = #{status},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="corpId != null">corp_id = #{corpId},</if>
+        </trim>
+        where post_id = #{postId}
+    </update>
+
+    <delete id="deleteTPostByPostId" parameterType="Long">
+        delete from t_post where post_id = #{postId}
+    </delete>
+
+    <delete id="deleteTPostByPostIds" parameterType="String">
+        delete from t_post where post_id in 
+        <foreach item="postId" collection="array" open="(" separator="," close=")">
+            #{postId}
+        </foreach>
+    </delete>
+</mapper>

+ 44 - 0
ruoyi-ui/src/api/tool/post.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询职位信息列表
+export function listPost(query) {
+  return request({
+    url: '/tool/post/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询职位信息详细
+export function getPost(postId) {
+  return request({
+    url: '/tool/post/' + postId,
+    method: 'get'
+  })
+}
+
+// 新增职位信息
+export function addPost(data) {
+  return request({
+    url: '/tool/post',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改职位信息
+export function updatePost(data) {
+  return request({
+    url: '/tool/post',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除职位信息
+export function delPost(postId) {
+  return request({
+    url: '/tool/post/' + postId,
+    method: 'delete'
+  })
+}

+ 680 - 0
ruoyi-ui/src/views/tool/post/index.vue

@@ -0,0 +1,680 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="岗位编码" prop="postCode">
+        <el-input
+          v-model="queryParams.postCode"
+          placeholder="请输入岗位编码"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="岗位名称" prop="postName">
+        <el-input
+          v-model="queryParams.postName"
+          placeholder="请输入岗位名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="显示顺序" prop="postSort">
+        <el-input
+          v-model="queryParams.postSort"
+          placeholder="请输入显示顺序"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="职位性质" prop="postNature">
+        <el-select v-model="queryParams.postNature" placeholder="请选择职位性质" clearable>
+          <el-option
+            v-for="dict in dict.type.post_nature"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="学历" prop="education">
+        <el-select v-model="queryParams.education" placeholder="请选择学历" clearable>
+          <el-option
+            v-for="dict in dict.type.education"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="最低薪资" prop="lowSalary">
+        <el-input
+          v-model="queryParams.lowSalary"
+          placeholder="请输入最低薪资"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="最高薪资" prop="highestSalary">
+        <el-input
+          v-model="queryParams.highestSalary"
+          placeholder="请输入最高薪资"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="薪资类型1" prop="salaryType1">
+        <el-select v-model="queryParams.salaryType1" placeholder="请选择薪资类型1" clearable>
+          <el-option
+            v-for="dict in dict.type.salary_type1"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="薪资类型2" prop="salaryType2">
+        <el-select v-model="queryParams.salaryType2" placeholder="请选择薪资类型2" clearable>
+          <el-option
+            v-for="dict in dict.type.salary_type2"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="工作地点" prop="workplace">
+        <el-input
+          v-model="queryParams.workplace"
+          placeholder="请输入工作地点"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="工作地点坐标" prop="workplaceCoordinate">
+        <el-input
+          v-model="queryParams.workplaceCoordinate"
+          placeholder="请输入工作地点坐标"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="工作年限" prop="workYear">
+        <el-select v-model="queryParams.workYear" placeholder="请选择工作年限" clearable>
+          <el-option
+            v-for="dict in dict.type.work_year"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="职位标签" prop="postTag">
+        <el-select v-model="queryParams.postTag" placeholder="请选择职位标签" clearable>
+          <el-option
+            v-for="dict in dict.type.post_tag"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="招聘人数" prop="recruitNum">
+        <el-input
+          v-model="queryParams.recruitNum"
+          placeholder="请输入招聘人数"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="工作日期类型" prop="workDateType">
+        <el-select v-model="queryParams.workDateType" placeholder="请选择工作日期类型" clearable>
+          <el-option
+            v-for="dict in dict.type.work_date_type"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="工作日期时间段" prop="dateInterval">
+        <el-input
+          v-model="queryParams.dateInterval"
+          placeholder="请输入工作日期时间段"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="工作时间类型" prop="workHourType">
+        <el-select v-model="queryParams.workHourType" placeholder="请选择工作时间类型" clearable>
+          <el-option
+            v-for="dict in dict.type.work_hour_type"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="工作时段" prop="workHour">
+        <el-input
+          v-model="queryParams.workHour"
+          placeholder="请输入工作时段"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="联系电话" prop="telephone">
+        <el-input
+          v-model="queryParams.telephone"
+          placeholder="请输入联系电话"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="结算方式" prop="settlementMethod">
+        <el-select v-model="queryParams.settlementMethod" placeholder="请选择结算方式" clearable>
+          <el-option
+            v-for="dict in dict.type.settlement_method"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="钉钉用户所属的组织的企业corpId" prop="corpId">
+        <el-input
+          v-model="queryParams.corpId"
+          placeholder="请输入钉钉用户所属的组织的企业corpId"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['tool:post:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['tool:post:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['tool:post:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['tool:post:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="岗位ID" align="center" prop="postId" />
+      <el-table-column label="岗位编码" align="center" prop="postCode" />
+      <el-table-column label="岗位名称" align="center" prop="postName" />
+      <el-table-column label="显示顺序" align="center" prop="postSort" />
+      <el-table-column label="职位性质" align="center" prop="postNature">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.post_nature" :value="scope.row.postNature"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="学历" align="center" prop="education">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.education" :value="scope.row.education"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="最低薪资" align="center" prop="lowSalary" />
+      <el-table-column label="最高薪资" align="center" prop="highestSalary" />
+      <el-table-column label="薪资类型1" align="center" prop="salaryType1">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.salary_type1" :value="scope.row.salaryType1"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="薪资类型2" align="center" prop="salaryType2">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.salary_type2" :value="scope.row.salaryType2"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="工作地点" align="center" prop="workplace" />
+      <el-table-column label="工作地点坐标" align="center" prop="workplaceCoordinate" />
+      <el-table-column label="工作年限" align="center" prop="workYear">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.work_year" :value="scope.row.workYear"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="职位类别" align="center" prop="postCategory" />
+      <el-table-column label="职位标签" align="center" prop="postTag">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.post_tag" :value="scope.row.postTag"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="招聘人数" align="center" prop="recruitNum" />
+      <el-table-column label="工作日期类型" align="center" prop="workDateType">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.work_date_type" :value="scope.row.workDateType"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="工作日期时间段" align="center" prop="dateInterval" />
+      <el-table-column label="工作时间类型" align="center" prop="workHourType">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.work_hour_type" :value="scope.row.workHourType"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="工作时段" align="center" prop="workHour" />
+      <el-table-column label="联系电话" align="center" prop="telephone" />
+      <el-table-column label="结算方式" align="center" prop="settlementMethod">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.settlement_method" :value="scope.row.settlementMethod"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="状态" align="center" prop="status" />
+      <el-table-column label="钉钉用户所属的组织的企业corpId" align="center" prop="corpId" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['tool:post:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['tool:post:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改职位信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="岗位编码" prop="postCode">
+          <el-input v-model="form.postCode" placeholder="请输入岗位编码" />
+        </el-form-item>
+        <el-form-item label="岗位名称" prop="postName">
+          <el-input v-model="form.postName" placeholder="请输入岗位名称" />
+        </el-form-item>
+        <el-form-item label="显示顺序" prop="postSort">
+          <el-input v-model="form.postSort" placeholder="请输入显示顺序" />
+        </el-form-item>
+        <el-form-item label="职位性质" prop="postNature">
+          <el-select v-model="form.postNature" placeholder="请选择职位性质">
+            <el-option
+              v-for="dict in dict.type.post_nature"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="学历" prop="education">
+          <el-select v-model="form.education" placeholder="请选择学历">
+            <el-option
+              v-for="dict in dict.type.education"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="最低薪资" prop="lowSalary">
+          <el-input v-model="form.lowSalary" placeholder="请输入最低薪资" />
+        </el-form-item>
+        <el-form-item label="最高薪资" prop="highestSalary">
+          <el-input v-model="form.highestSalary" placeholder="请输入最高薪资" />
+        </el-form-item>
+        <el-form-item label="薪资类型1" prop="salaryType1">
+          <el-select v-model="form.salaryType1" placeholder="请选择薪资类型1">
+            <el-option
+              v-for="dict in dict.type.salary_type1"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="薪资类型2" prop="salaryType2">
+          <el-select v-model="form.salaryType2" placeholder="请选择薪资类型2">
+            <el-option
+              v-for="dict in dict.type.salary_type2"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="工作地点" prop="workplace">
+          <el-input v-model="form.workplace" placeholder="请输入工作地点" />
+        </el-form-item>
+        <el-form-item label="工作地点坐标" prop="workplaceCoordinate">
+          <el-input v-model="form.workplaceCoordinate" placeholder="请输入工作地点坐标" />
+        </el-form-item>
+        <el-form-item label="工作年限" prop="workYear">
+          <el-select v-model="form.workYear" placeholder="请选择工作年限">
+            <el-option
+              v-for="dict in dict.type.work_year"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="职位标签" prop="postTag">
+          <el-select v-model="form.postTag" placeholder="请选择职位标签">
+            <el-option
+              v-for="dict in dict.type.post_tag"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="招聘人数" prop="recruitNum">
+          <el-input v-model="form.recruitNum" placeholder="请输入招聘人数" />
+        </el-form-item>
+        <el-form-item label="工作日期类型" prop="workDateType">
+          <el-radio-group v-model="form.workDateType">
+            <el-radio
+              v-for="dict in dict.type.work_date_type"
+              :key="dict.value"
+              :label="dict.value"
+            >{{dict.label}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="工作日期时间段" prop="dateInterval">
+          <el-input v-model="form.dateInterval" placeholder="请输入工作日期时间段" />
+        </el-form-item>
+        <el-form-item label="工作时间类型" prop="workHourType">
+          <el-radio-group v-model="form.workHourType">
+            <el-radio
+              v-for="dict in dict.type.work_hour_type"
+              :key="dict.value"
+              :label="dict.value"
+            >{{dict.label}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="工作时段" prop="workHour">
+          <el-input v-model="form.workHour" placeholder="请输入工作时段" />
+        </el-form-item>
+        <el-form-item label="联系电话" prop="telephone">
+          <el-input v-model="form.telephone" placeholder="请输入联系电话" />
+        </el-form-item>
+        <el-form-item label="结算方式" prop="settlementMethod">
+          <el-select v-model="form.settlementMethod" placeholder="请选择结算方式">
+            <el-option
+              v-for="dict in dict.type.settlement_method"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="钉钉用户所属的组织的企业corpId" prop="corpId">
+          <el-input v-model="form.corpId" placeholder="请输入钉钉用户所属的组织的企业corpId" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listPost, getPost, delPost, addPost, updatePost } from "@/api/tool/post";
+
+export default {
+  name: "Post",
+  dicts: ['salary_type1', 'salary_type2', 'post_tag', 'work_hour_type', 'settlement_method', 'post_nature', 'education', 'work_year', 'work_date_type'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 职位信息表格数据
+      postList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        postCode: null,
+        postName: null,
+        postSort: null,
+        postNature: null,
+        education: null,
+        lowSalary: null,
+        highestSalary: null,
+        salaryType1: null,
+        salaryType2: null,
+        workplace: null,
+        workplaceCoordinate: null,
+        workYear: null,
+        postCategory: null,
+        postTag: null,
+        recruitNum: null,
+        workDateType: null,
+        dateInterval: null,
+        workHourType: null,
+        workHour: null,
+        telephone: null,
+        settlementMethod: null,
+        status: null,
+        corpId: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        postCode: [
+          { required: true, message: "岗位编码不能为空", trigger: "blur" }
+        ],
+        postName: [
+          { required: true, message: "岗位名称不能为空", trigger: "blur" }
+        ],
+        postNature: [
+          { required: true, message: "职位性质不能为空", trigger: "change" }
+        ],
+        education: [
+          { required: true, message: "学历不能为空", trigger: "change" }
+        ],
+        lowSalary: [
+          { required: true, message: "最低薪资不能为空", trigger: "blur" }
+        ],
+        highestSalary: [
+          { required: true, message: "最高薪资不能为空", trigger: "blur" }
+        ],
+        recruitNum: [
+          { required: true, message: "招聘人数不能为空", trigger: "blur" }
+        ],
+        status: [
+          { required: true, message: "状态不能为空", trigger: "change" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询职位信息列表 */
+    getList() {
+      this.loading = true;
+      listPost(this.queryParams).then(response => {
+        this.postList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        postId: null,
+        postCode: null,
+        postName: null,
+        postSort: null,
+        postNature: null,
+        education: null,
+        lowSalary: null,
+        highestSalary: null,
+        salaryType1: null,
+        salaryType2: null,
+        workplace: null,
+        workplaceCoordinate: null,
+        workYear: null,
+        postCategory: null,
+        postTag: null,
+        recruitNum: null,
+        workDateType: null,
+        dateInterval: null,
+        workHourType: null,
+        workHour: null,
+        telephone: null,
+        settlementMethod: null,
+        remark: null,
+        status: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        corpId: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.postId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加职位信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const postId = row.postId || this.ids
+      getPost(postId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改职位信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.postId != null) {
+            updatePost(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addPost(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const postIds = row.postId || this.ids;
+      this.$modal.confirm('是否确认删除职位信息编号为"' + postIds + '"的数据项?').then(function() {
+        return delPost(postIds);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('tool/post/export', {
+        ...this.queryParams
+      }, `post_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>