main
tamguo 7 years ago
parent 328cbc8487
commit 5419e8d107

@ -2,9 +2,38 @@ package com.tamguo.modules.sys.model.condition;
public class SysPostCondition { public class SysPostCondition {
private String code;
private String name;
private String postType;
private String status;
private Integer pageNo; private Integer pageNo;
private Integer pageSize; private Integer pageSize;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPostType() {
return postType;
}
public void setPostType(String postType) {
this.postType = postType;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Integer getPageNo() { public Integer getPageNo() {
return pageNo; return pageNo;
} }

@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.enums.IEnum;
*/ */
public enum SysPostStatusEnum implements IEnum { public enum SysPostStatusEnum implements IEnum {
NORMAL("normal", "正常"), NORMAL("normal", "正常"),
LOCKED("locked", "锁定"),
DISABLED("disable" , "禁用"); DISABLED("disable" , "禁用");
private String value; private String value;

@ -15,6 +15,21 @@
p.status p.status
FROM FROM
sys_post p sys_post p
<where>
1 = 1
<if test="code != null and code != ''">
and p.code = #{code}
</if>
<if test="name != null and name != ''">
and p.name like #{name}
</if>
<if test="postType != null and postType != ''">
and p.post_type like #{postType}
</if>
<if test="status != null and status != ''">
and p.status like #{status}
</if>
</where>
</select> </select>
</mapper> </mapper>

@ -33,28 +33,36 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
<div class="form-group"> <div class="form-group">
<label class="control-label">岗位编码:</label> <label class="control-label">岗位编码:</label>
<div class="control-inline"> <div class="control-inline">
<input type="text" id="postCode" name="postCode" value="" maxlength="64" class="form-control width-120"/> <input type="text" id="code" name="code" value="" maxlength="64" class="form-control width-120"/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label">岗位名称:</label> <label class="control-label">岗位名称:</label>
<div class="control-inline"> <div class="control-inline">
<input type="text" id="postName" name="postName" value="" maxlength="100" class="form-control width-120"/> <input type="text" id="name" name="name" value="" maxlength="100" class="form-control width-120"/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label">岗位分类:</label> <label class="control-label">岗位分类:</label>
<div class="control-inline width-90"> <div class="control-inline width-90">
<select id="postType" name="postType" class="form-control">
<select id="postType" name="postType" class="form-control"> <option value="">&nbsp;</option>
<option value="">&nbsp;</option><option value="1">高管</option><option value="2">中层</option><option value="3">基层</option><option value="4">其它</option></select> </div> <option value="gaoguan">高管</option>
<option value="zhongceng">中层</option>
<option value="jiceng">基层</option>
<option value="qita">其它</option>
</select>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label">状态:</label> <label class="control-label">状态:</label>
<div class="control-inline width-60"> <div class="control-inline width-60">
<select id="status" name="status" class="form-control">
<select id="status" name="status" class="form-control"> <option value="">&nbsp;</option>
<option value="">&nbsp;</option><option value="0">正常</option><option value="2">停用</option></select> </div> <option value="normal">正常</option>
<option value="disabled">停用</option>
</select>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<button type="submit" class="btn btn-primary btn-sm">查询</button> <button type="submit" class="btn btn-primary btn-sm">查询</button>
@ -108,8 +116,6 @@ $('#dataGrid').dataGrid({
{header:'状态', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){ {header:'状态', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
if(val == "normal"){ if(val == "normal"){
return '正常'; return '正常';
}else if(val == "locked"){
return '锁定';
}else if(val == "disabled"){ }else if(val == "disabled"){
return '禁用'; return '禁用';
}else{ }else{

Loading…
Cancel
Save