职务信息 禁用标识接口 表结构更新
This commit is contained in:
parent
fae1bd776b
commit
273e29fbe9
|
|
@ -79,6 +79,7 @@ CREATE TABLE JCL_ORG_POST_INFO (
|
|||
post_info_qualification text null,
|
||||
post_id int null,
|
||||
description text NULL,
|
||||
forbidden_tag int NULL,
|
||||
creator int null,
|
||||
delete_type int null,
|
||||
create_time date null,
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ CREATE TABLE JCL_ORG_POST_INFO (
|
|||
POST_INFO_QUALIFICATION NVARCHAR2(1000) NULL,
|
||||
POST_ID NUMBER NULL,
|
||||
DESCRIPTION NVARCHAR2(1000) NULL,
|
||||
FORBIDDEN_TAG NUMBER NULL,
|
||||
CREATOR NUMBER NULL,
|
||||
DELETE_TYPE NUMBER NULL,
|
||||
CREATE_TIME DATE NULL,
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ CREATE TABLE JCL_ORG_POST_INFO (
|
|||
post_info_qualification text null,
|
||||
post_id int null,
|
||||
description text COLLATE Chinese_PRC_CI_AS NULL,
|
||||
forbidden_tag int NULL,
|
||||
creator int null,
|
||||
delete_type int null,
|
||||
create_time date null,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
package com.engine.organization.entity.comp.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/16
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CompPO {
|
||||
private Long id;
|
||||
private String compNo;
|
||||
private String compName;
|
||||
private String compNameShort;
|
||||
private Long parentCompany;
|
||||
private String orgCode;
|
||||
private Integer industry;
|
||||
private Integer compPrincipal;
|
||||
private String description;
|
||||
private String forbiddenTag;
|
||||
private Long creator;
|
||||
private int deleteType;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
}
|
||||
|
|
@ -25,6 +25,7 @@ public class PostInfoDTO {
|
|||
.postInfoQualification(param.getPostInfoQualification() == null ? null : param.getPostInfoQualification())
|
||||
.postId(param.getPostId() == null ? null : param.getPostId())
|
||||
.description(param.getDescription() == null ? null : param.getDescription())
|
||||
.forbiddenTag(param.getForbiddenTag() == null ? 0 : param.getForbiddenTag() ? 0 : 1)
|
||||
.deleteType(0)
|
||||
.createTime(new Date())
|
||||
.updateTime(new Date())
|
||||
|
|
|
|||
|
|
@ -48,4 +48,8 @@ public class PostInfoSearchParam {
|
|||
* 说明
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
private Boolean forbiddenTag;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,11 @@ public class PostInfoPO {
|
|||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
private Integer forbiddenTag;
|
||||
|
||||
private Long creator;
|
||||
private int deleteType;
|
||||
private Date createTime;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ import lombok.NoArgsConstructor;
|
|||
" t.post_info_duty," +
|
||||
" t.post_info_qualification," +
|
||||
" a.post_name," +
|
||||
" t.description",
|
||||
" t.description," +
|
||||
" t.forbidden_tag",
|
||||
fromSql = " from jcl_org_post_info t inner join jcl_org_post a on t.post_id = a.id ",
|
||||
orderby = "id desc",
|
||||
primarykey = "id",
|
||||
|
|
@ -36,44 +37,50 @@ import lombok.NoArgsConstructor;
|
|||
}
|
||||
)
|
||||
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;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@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;
|
||||
|
||||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
@OrganizationTableColumn(text = "禁用标记", width = "20%", column = "forbidden_tag")
|
||||
private Integer forbiddenTag;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,14 @@ public interface PostInfoMapper {
|
|||
* @return
|
||||
*/
|
||||
int updatePostInfo(PostInfoPO postInfoPO);
|
||||
|
||||
|
||||
/**
|
||||
* 更新禁用标记
|
||||
*
|
||||
* @param postInfoPO
|
||||
* @return
|
||||
*/
|
||||
int updateForbiddenTagById(PostInfoPO postInfoPO);
|
||||
/**
|
||||
* 批量删除职务信息方案
|
||||
*
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<result column="post_info_qualification" property="postInfoQualification"/>
|
||||
<result column="post_id" property="postId"/>
|
||||
<result column="description" property="description"/>
|
||||
<result column="forbidden_tag" property="forbiddenTag"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
|
|
@ -28,6 +29,7 @@
|
|||
, t.post_info_qualification
|
||||
, t.post_id
|
||||
, t.description
|
||||
, t.forbidden_tag
|
||||
, t.creator
|
||||
, t.delete_type
|
||||
, t.create_time
|
||||
|
|
@ -112,7 +114,7 @@
|
|||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
|
||||
forbidden_tag,
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="creator != null">
|
||||
|
|
@ -148,10 +150,18 @@
|
|||
<if test="description != null">
|
||||
#{description},
|
||||
</if>
|
||||
|
||||
0,
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateForbiddenTagById" parameterType="com.engine.organization.entity.sequence.po.SequencePO">
|
||||
update jcl_org_sequence
|
||||
<set>
|
||||
forbidden_tag=#{forbiddenTag},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
<update id="deleteByIds">
|
||||
UPDATE jcl_org_post_info
|
||||
SET delete_type = 1
|
||||
|
|
|
|||
|
|
@ -35,6 +35,13 @@ public interface PostInfoService {
|
|||
*/
|
||||
int updatePostInfo(PostInfoSearchParam param);
|
||||
|
||||
/**
|
||||
* 更新禁用标记
|
||||
*
|
||||
* @param params
|
||||
*/
|
||||
int updateForbiddenTagById(PostInfoSearchParam params);
|
||||
|
||||
|
||||
/**
|
||||
* 根据ID批量删除
|
||||
|
|
|
|||
|
|
@ -69,6 +69,12 @@ public class PostInfoServiceImpl extends Service implements PostInfoService {
|
|||
return getPostInfoMapper().updatePostInfo(postInfoPO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateForbiddenTagById(PostInfoSearchParam params) {
|
||||
PostInfoPO postInfoPO = PostInfoPO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build();
|
||||
return getPostInfoMapper().updateForbiddenTagById(postInfoPO);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
|
|
|
|||
|
|
@ -90,6 +90,26 @@ public class PostInfoController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新禁用标记
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/updateForbiddenTagById")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult updateForbiddenTagById(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody PostInfoSearchParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getPostInfoWrapper(user).updateForbiddenTagById(param));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据ID批量删除数据
|
||||
|
|
|
|||
|
|
@ -52,6 +52,15 @@ public class PostInfoWrapper extends Service {
|
|||
return getPostInfoService(user).updatePostInfo(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新禁用标记
|
||||
*
|
||||
* @param params
|
||||
*/
|
||||
public int updateForbiddenTagById(PostInfoSearchParam params) {
|
||||
return getPostInfoService(user).updateForbiddenTagById(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID批量删除
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue