职务信息接口
parent
8e4d698217
commit
f576df3495
@ -0,0 +1,15 @@
|
||||
package com.api.organization.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
*
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/bs/hrmorganization/postinfo")
|
||||
public class PostInfoController extends com.engine.organization.web.PostInfoController {
|
||||
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package com.engine.organization.entity.post.dto;
|
||||
|
||||
import com.engine.organization.entity.post.param.PostInfoSearchParam;
|
||||
import com.engine.organization.entity.post.po.PostInfoPO;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class PostInfoDTO {
|
||||
public static PostInfoPO convertParamToPO(PostInfoSearchParam param, Long employeeId) {
|
||||
if (param == null) {
|
||||
return null;
|
||||
}
|
||||
return PostInfoPO.builder()
|
||||
.id(param.getId() == null ? 0 : param.getId())
|
||||
.postInfoNo(param.getPostInfoNo() == null ? null : param.getPostInfoNo())
|
||||
.postInfoName(param.getPostInfoName() == null ? null : param.getPostInfoName())
|
||||
.postInfoAuthority(param.getPostInfoAuthority() == null ? null : param.getPostInfoAuthority())
|
||||
.postInfoDuty(param.getPostInfoDuty() == null ? null : param.getPostInfoDuty())
|
||||
.postInfoQualification(param.getPostInfoQualification() == null ? null : param.getPostInfoQualification())
|
||||
.postId(param.getPostId() == null ? null : param.getPostId())
|
||||
.description(param.getDescription() == null ? null : param.getDescription())
|
||||
.deleteType(0)
|
||||
.createTime(new Date())
|
||||
.updateTime(new Date())
|
||||
.creator(employeeId)
|
||||
.build();
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.engine.organization.entity.post.param;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PostInfoSearchParam {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String postInfoNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String postInfoName;
|
||||
/**
|
||||
* 权限
|
||||
*/
|
||||
private String postInfoAuthority;
|
||||
/**
|
||||
* 责任
|
||||
*/
|
||||
private String postInfoDuty;
|
||||
/**
|
||||
* 资格
|
||||
*/
|
||||
private String postInfoQualification;
|
||||
/**
|
||||
* 职务分类
|
||||
*/
|
||||
private Integer postId;
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
private String description;
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.engine.organization.entity.post.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PostInfoPO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String postInfoNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String postInfoName;
|
||||
/**
|
||||
* 权限
|
||||
*/
|
||||
private String postInfoAuthority;
|
||||
/**
|
||||
* 责任
|
||||
*/
|
||||
private String postInfoDuty;
|
||||
/**
|
||||
* 资格
|
||||
*/
|
||||
private String postInfoQualification;
|
||||
/**
|
||||
* 职务分类
|
||||
*/
|
||||
private Integer postId;
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
private String description;
|
||||
|
||||
private Long creator;
|
||||
private int deleteType;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.engine.organization.entity.post.vo;
|
||||
|
||||
import com.engine.organization.annotation.OrganizationTable;
|
||||
import com.engine.organization.annotation.OrganizationTableColumn;
|
||||
import com.engine.organization.annotation.OrganizationTableOperate;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@OrganizationTable(pageId = "fa30e916-d285-11ec-bc87-00ffcbed7508",
|
||||
fields = " t.id," +
|
||||
" t.post_info_no," +
|
||||
" t.post_info_name," +
|
||||
" t.post_info_authority," +
|
||||
" t.post_info_duty," +
|
||||
" t.post_info_qualification," +
|
||||
" a.post_name," +
|
||||
" t.description",
|
||||
fromSql = " from jcl_org_post_info t inner join jcl_org_post a on t.post_id = a.id ",
|
||||
orderby = "id desc",
|
||||
primarykey = "id",
|
||||
operates = {
|
||||
@OrganizationTableOperate(index = "0", text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除")
|
||||
}
|
||||
)
|
||||
public class PostInfoTableVO {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@OrganizationTableColumn(column = "id", display = false)
|
||||
private Long id;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@OrganizationTableColumn(text = "编号", width = "20%", column = "post_info_no")
|
||||
private String postInfoNo;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@OrganizationTableColumn(text = "名称", width = "20%", column = "post_info_name")
|
||||
private String postInfoName;
|
||||
/**
|
||||
* 权限
|
||||
*/
|
||||
@OrganizationTableColumn(text = "权限", width = "20%", column = "post_info_authority")
|
||||
private String postInfoAuthority;
|
||||
/**
|
||||
* 责任
|
||||
*/
|
||||
@OrganizationTableColumn(text = "责任", width = "20%", column = "post_info_duty")
|
||||
private String postInfoDuty;
|
||||
/**
|
||||
* 资格
|
||||
*/
|
||||
@OrganizationTableColumn(text = "资格", width = "20%", column = "post_info_qualification")
|
||||
private String postInfoQualification;
|
||||
/**
|
||||
* 职务分类
|
||||
*/
|
||||
@OrganizationTableColumn(text = "职务分类", width = "20%", column = "post_name")
|
||||
private Integer postName;
|
||||
/**
|
||||
* 说明
|
||||
*/
|
||||
@OrganizationTableColumn(text = "说明", width = "20%", column = "description")
|
||||
private String description;
|
||||
}
|
@ -0,0 +1,165 @@
|
||||
<?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.engine.organization.mapper.post.PostInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.organization.entity.post.po.PostInfoPO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="post_info_no" property="postInfoNo"/>
|
||||
<result column="post_info_name" property="postInfoName"/>
|
||||
<result column="post_info_authority" property="postInfoAuthority"/>
|
||||
<result column="post_info_duty" property="postInfoDuty"/>
|
||||
<result column="post_info_qualification" property="postInfoQualification"/>
|
||||
<result column="post_id" property="postId"/>
|
||||
<result column="description" property="description"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t
|
||||
.
|
||||
id
|
||||
, t.post_info_no
|
||||
, t.post_info_name
|
||||
, t.post_info_authority
|
||||
, t.post_info_duty
|
||||
, t.post_info_qualification
|
||||
, t.post_id
|
||||
, t.description
|
||||
, t.creator
|
||||
, t.delete_type
|
||||
, t.create_time
|
||||
, t.update_time
|
||||
</sql>
|
||||
<select id="getPostInfoByID" parameterType="com.engine.organization.entity.post.po.PostInfoPO"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_post_info t where id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<select id="listByNo" parameterType="com.engine.organization.entity.post.po.PostInfoPO"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_post_info t where post_info_no = #{postInfoNo} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<select id="listPostInfosByIds" resultType="java.util.Map">
|
||||
select
|
||||
id,
|
||||
post_info_name as name
|
||||
from jcl_org_post_info t
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<update id="updatePostInfo" parameterType="com.engine.organization.entity.post.po.PostInfoPO">
|
||||
update jcl_org_post_info
|
||||
<set>
|
||||
creator=#{creator},
|
||||
update_time=#{updateTime},
|
||||
post_info_no=#{postInfoNo},
|
||||
post_info_name=#{postInfoName},
|
||||
post_info_authority=#{postInfoAuthority},
|
||||
post_info_duty=#{postInfoDuty},
|
||||
post_info_qualification=#{postInfoQualification},
|
||||
post_id=#{postId},
|
||||
description=#{description},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.post.po.PostInfoPO" keyProperty="id"
|
||||
keyColumn="id" useGeneratedKeys="true">
|
||||
INSERT INTO jcl_org_post_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="postInfoNo != null">
|
||||
post_info_no,
|
||||
</if>
|
||||
<if test="postInfoName != null">
|
||||
post_info_name,
|
||||
</if>
|
||||
<if test="postInfoAuthority != null">
|
||||
post_info_authority,
|
||||
</if>
|
||||
<if test="postInfoDuty != null">
|
||||
post_info_duty,
|
||||
</if>
|
||||
<if test="postInfoQualification != null">
|
||||
post_info_qualification,
|
||||
</if>
|
||||
<if test="postId != null">
|
||||
post_id,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="postInfoNo != null">
|
||||
#{postInfoNo},
|
||||
</if>
|
||||
<if test="postInfoName != null">
|
||||
#{postInfoName},
|
||||
</if>
|
||||
<if test="postInfoAuthority != null">
|
||||
#{postInfoAuthority},
|
||||
</if>
|
||||
<if test="postInfoDuty != null">
|
||||
#{postInfoDuty},
|
||||
</if>
|
||||
<if test="postInfoQualification != null">
|
||||
#{postInfoQualification},
|
||||
</if>
|
||||
<if test="postId != null">
|
||||
#{postId},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description},
|
||||
</if>
|
||||
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="deleteByIds">
|
||||
UPDATE jcl_org_post_info
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,70 @@
|
||||
package com.engine.organization.service;
|
||||
|
||||
import com.engine.organization.entity.post.param.PostInfoSearchParam;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface PostInfoService {
|
||||
/**
|
||||
* 职务信息列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> listPage(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 新增职务信息
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int savePostInfo(PostInfoSearchParam param);
|
||||
|
||||
/**
|
||||
* 更新职务信息信息
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int updatePostInfo(PostInfoSearchParam param);
|
||||
|
||||
|
||||
/**
|
||||
* 根据ID批量删除
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
int deleteByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获取搜索条件
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getSearchCondition(Map<String, Object> params);
|
||||
|
||||
|
||||
/**
|
||||
* 获取新增表单
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getPostInfoForm(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 获取列表页面按钮信息
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getHasRight();
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,176 @@
|
||||
package com.engine.organization.service.impl;
|
||||
|
||||
import com.api.browser.bean.BrowserBean;
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.component.OrganizationWeaTable;
|
||||
import com.engine.organization.entity.QueryParam;
|
||||
import com.engine.organization.entity.post.dto.PostInfoDTO;
|
||||
import com.engine.organization.entity.post.param.PostInfoSearchParam;
|
||||
import com.engine.organization.entity.post.po.PostInfoPO;
|
||||
import com.engine.organization.entity.post.vo.PostInfoTableVO;
|
||||
import com.engine.organization.mapper.post.PostInfoMapper;
|
||||
import com.engine.organization.mapper.post.PostMapper;
|
||||
import com.engine.organization.service.PostInfoService;
|
||||
import com.engine.organization.util.MenuBtn;
|
||||
import com.engine.organization.util.OrganizationAssert;
|
||||
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||
import com.engine.organization.util.db.DBType;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.StringUtil;
|
||||
import weaver.general.Util;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class PostInfoServiceImpl extends Service implements PostInfoService {
|
||||
|
||||
private PostInfoMapper getPostInfoMapper() {
|
||||
return MapperProxyFactory.getProxy(PostInfoMapper.class);
|
||||
}
|
||||
|
||||
private PostMapper getPostMapper() {
|
||||
return MapperProxyFactory.getProxy(PostMapper.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listPage(Map<String, Object> params) {
|
||||
OrganizationWeaTable<PostInfoTableVO> table = new OrganizationWeaTable<>(user, PostInfoTableVO.class);
|
||||
String sqlWhere = buildSqlWhere(params);
|
||||
table.setSqlwhere(sqlWhere);
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
return result.getResultMap();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int savePostInfo(PostInfoSearchParam param) {
|
||||
List<PostInfoPO> list = getPostInfoMapper().listByNo(Util.null2String(param.getPostInfoNo()));
|
||||
OrganizationAssert.isEmpty(list, "编号不允许重复");
|
||||
PostInfoPO postInfoPO = PostInfoDTO.convertParamToPO(param, (long) user.getUID());
|
||||
return getPostInfoMapper().insertIgnoreNull(postInfoPO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updatePostInfo(PostInfoSearchParam param) {
|
||||
PostInfoPO postInfoPO = PostInfoDTO.convertParamToPO(param, (long) user.getUID());
|
||||
return getPostInfoMapper().updatePostInfo(postInfoPO);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
|
||||
return getPostInfoMapper().deleteByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getSearchCondition(Map<String, Object> params) {
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||
SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "职务分类", "161", "postId", "postBrowser");
|
||||
SearchConditionItem nameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "postInfoName");
|
||||
conditionItems.add(browserItem);
|
||||
conditionItems.add(nameCondition);
|
||||
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
|
||||
apiDatas.put("conditions", addGroups);
|
||||
return apiDatas;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getPostInfoForm(Map<String, Object> params) {
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
List<SearchConditionItem> selectItems = new ArrayList<>();
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
// 编号
|
||||
SearchConditionItem noItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "编号", "postInfoNo");
|
||||
noItem.setRules("required|string");
|
||||
// 名称
|
||||
SearchConditionItem nameItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "名称", "postInfoName");
|
||||
nameItem.setRules("required|string");
|
||||
// 权限
|
||||
SearchConditionItem authorityItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "权限", "postInfoAuthority");
|
||||
// 责任
|
||||
SearchConditionItem dutyItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "责任", "postInfoDuty");
|
||||
// 资格
|
||||
SearchConditionItem qualificationItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "资格", "postInfoQualification");
|
||||
// 职务分类
|
||||
SearchConditionItem postIdBrowser = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "职务分类", "161", "postId", "postBrowser");
|
||||
// 说明
|
||||
SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 60, "描述说明", "description");
|
||||
|
||||
// 编辑状态下赋值操作
|
||||
String id = Util.null2String(params.get("id"));
|
||||
if (!StringUtil.isEmpty(id)) {
|
||||
PostInfoPO postInfoPO = getPostInfoMapper().getPostInfoByID(Integer.parseInt(id));
|
||||
OrganizationAssert.notNull(postInfoPO, "选择的数据不存在,或数据已删除");
|
||||
|
||||
noItem.setValue(postInfoPO.getPostInfoNo());
|
||||
nameItem.setValue(postInfoPO.getPostInfoName());
|
||||
authorityItem.setValue(postInfoPO.getPostInfoAuthority());
|
||||
dutyItem.setValue(postInfoPO.getPostInfoDuty());
|
||||
qualificationItem.setValue(postInfoPO.getPostInfoQualification());
|
||||
descriptionItem.setValue(postInfoPO.getDescription());
|
||||
|
||||
BrowserBean browserBean = postIdBrowser.getBrowserConditionParam();
|
||||
List<Map<String, Object>> maps = getPostMapper().listPostsByIds(QueryParam.builder().ids(postInfoPO.getPostId().toString()).build().getIds());
|
||||
|
||||
browserBean.setReplaceDatas(maps);
|
||||
postIdBrowser.setBrowserConditionParam(browserBean);
|
||||
// 编辑状态下,编号只读
|
||||
noItem.setViewAttr(1);
|
||||
}
|
||||
|
||||
selectItems.add(noItem);
|
||||
selectItems.add(nameItem);
|
||||
selectItems.add(authorityItem);
|
||||
selectItems.add(dutyItem);
|
||||
selectItems.add(qualificationItem);
|
||||
selectItems.add(postIdBrowser);
|
||||
selectItems.add(descriptionItem);
|
||||
addGroups.add(new SearchConditionGroup("基本信息", true, selectItems));
|
||||
apiDatas.put("condition", addGroups);
|
||||
return apiDatas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getHasRight() {
|
||||
return MenuBtn.getCommonBtnDatas();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询条件
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
private String buildSqlWhere(Map<String, Object> params) {
|
||||
DBType dbType = DBType.get(new RecordSet().getDBType());
|
||||
String sqlWhere = " where t.delete_type ='0' ";
|
||||
String sequenceName = (String) params.get("postInfoName");
|
||||
if (StringUtils.isNotBlank(sequenceName)) {
|
||||
sqlWhere += " AND t.post_info_name " + dbType.like(sequenceName);
|
||||
}
|
||||
String postId = (String) params.get("postId");
|
||||
if (StringUtils.isNotBlank(postId)) {
|
||||
sqlWhere += " AND t.post_id ='" + postId + "'";
|
||||
}
|
||||
return sqlWhere;
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.entity.post.param.PostInfoSearchParam;
|
||||
import com.engine.organization.service.PostInfoService;
|
||||
import com.engine.organization.service.impl.PostInfoServiceImpl;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/13
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class PostInfoWrapper extends Service {
|
||||
private PostInfoService getPostInfoService(User user) {
|
||||
return ServiceUtil.getService(PostInfoServiceImpl.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 职务信息列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> listPage(Map<String, Object> params) {
|
||||
return getPostInfoService(user).listPage(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增职务信息
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public int savePostInfo(PostInfoSearchParam param) {
|
||||
return getPostInfoService(user).savePostInfo(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新职务信息
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public int updatePostInfo(PostInfoSearchParam param) {
|
||||
return getPostInfoService(user).updatePostInfo(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID批量删除
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
public int deleteByIds(@Param("ids") Collection<Long> ids) {
|
||||
return getPostInfoService(user).deleteByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取搜索条件
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getSearchCondition(Map<String, Object> params) {
|
||||
return getPostInfoService(user).getSearchCondition(params);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取新增表单
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getPostInfoForm(Map<String, Object> params) {
|
||||
return getPostInfoService(user).getPostInfoForm(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表页面按钮信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getHasRight() {
|
||||
return getPostInfoService(user).getHasRight();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue