|
|
@ -1,6 +1,7 @@
|
|
|
|
package com.ruoyi.project.system.post.controller;
|
|
|
|
package com.ruoyi.project.system.post.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
@ -10,6 +11,8 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
|
|
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
|
|
|
import com.ruoyi.framework.aspectj.lang.constant.BusinessType;
|
|
|
|
import com.ruoyi.framework.aspectj.lang.constant.BusinessType;
|
|
|
@ -127,4 +130,34 @@ public class PostController extends BaseController
|
|
|
|
return toAjax(postService.updatePost(post));
|
|
|
|
return toAjax(postService.updatePost(post));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 校验岗位名称
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/checkPostNameUnique")
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
public String checkPostNameUnique(Post post)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
String uniqueFlag = "0";
|
|
|
|
|
|
|
|
if (StringUtils.isNotNull(post))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uniqueFlag = postService.checkPostNameUnique(post);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return uniqueFlag;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 校验岗位编码
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/checkPostCodeUnique")
|
|
|
|
|
|
|
|
@ResponseBody
|
|
|
|
|
|
|
|
public String checkPostCodeUnique(Post post)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
String uniqueFlag = "0";
|
|
|
|
|
|
|
|
if (StringUtils.isNotNull(post))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
uniqueFlag = postService.checkPostCodeUnique(post);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return uniqueFlag;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|