职务信息 禁用标识接口 表结构更新

pull/8/MERGE^2
dxfeng 3 years ago
parent fae1bd776b
commit 273e29fbe9

@ -79,6 +79,7 @@ CREATE TABLE JCL_ORG_POST_INFO (
post_info_qualification text null, post_info_qualification text null,
post_id int null, post_id int null,
description text NULL, description text NULL,
forbidden_tag int NULL,
creator int null, creator int null,
delete_type int null, delete_type int null,
create_time date null, create_time date null,

@ -81,6 +81,7 @@ CREATE TABLE JCL_ORG_POST_INFO (
POST_INFO_QUALIFICATION NVARCHAR2(1000) NULL, POST_INFO_QUALIFICATION NVARCHAR2(1000) NULL,
POST_ID NUMBER NULL, POST_ID NUMBER NULL,
DESCRIPTION NVARCHAR2(1000) NULL, DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
CREATOR NUMBER NULL, CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL, DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL, CREATE_TIME DATE NULL,

@ -79,6 +79,7 @@ CREATE TABLE JCL_ORG_POST_INFO (
post_info_qualification text null, post_info_qualification text null,
post_id int null, post_id int null,
description text COLLATE Chinese_PRC_CI_AS NULL, description text COLLATE Chinese_PRC_CI_AS NULL,
forbidden_tag int NULL,
creator int null, creator int null,
delete_type int null, delete_type int null,
create_time date 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()) .postInfoQualification(param.getPostInfoQualification() == null ? null : param.getPostInfoQualification())
.postId(param.getPostId() == null ? null : param.getPostId()) .postId(param.getPostId() == null ? null : param.getPostId())
.description(param.getDescription() == null ? null : param.getDescription()) .description(param.getDescription() == null ? null : param.getDescription())
.forbiddenTag(param.getForbiddenTag() == null ? 0 : param.getForbiddenTag() ? 0 : 1)
.deleteType(0) .deleteType(0)
.createTime(new Date()) .createTime(new Date())
.updateTime(new Date()) .updateTime(new Date())

@ -48,4 +48,8 @@ public class PostInfoSearchParam {
* *
*/ */
private String description; private String description;
/**
*
*/
private Boolean forbiddenTag;
} }

@ -51,6 +51,11 @@ public class PostInfoPO {
*/ */
private String description; private String description;
/**
*
*/
private Integer forbiddenTag;
private Long creator; private Long creator;
private int deleteType; private int deleteType;
private Date createTime; private Date createTime;

@ -26,7 +26,8 @@ import lombok.NoArgsConstructor;
" t.post_info_duty," + " t.post_info_duty," +
" t.post_info_qualification," + " t.post_info_qualification," +
" a.post_name," + " 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 ", fromSql = " from jcl_org_post_info t inner join jcl_org_post a on t.post_id = a.id ",
orderby = "id desc", orderby = "id desc",
primarykey = "id", primarykey = "id",
@ -36,44 +37,50 @@ import lombok.NoArgsConstructor;
} }
) )
public class PostInfoTableVO { public class PostInfoTableVO {
/** /**
* *
*/ */
@OrganizationTableColumn(column = "id", display = false) @OrganizationTableColumn(column = "id", display = false)
private Long id; private Long id;
/** /**
* *
*/ */
@OrganizationTableColumn(text = "编号", width = "20%", column = "post_info_no") @OrganizationTableColumn(text = "编号", width = "20%", column = "post_info_no")
private String postInfoNo; private String postInfoNo;
/** /**
* *
*/ */
@OrganizationTableColumn(text = "名称", width = "20%", column = "post_info_name") @OrganizationTableColumn(text = "名称", width = "20%", column = "post_info_name")
private String postInfoName; private String postInfoName;
/** /**
* *
*/ */
@OrganizationTableColumn(text = "权限", width = "20%", column = "post_info_authority") @OrganizationTableColumn(text = "权限", width = "20%", column = "post_info_authority")
private String postInfoAuthority; private String postInfoAuthority;
/** /**
* *
*/ */
@OrganizationTableColumn(text = "责任", width = "20%", column = "post_info_duty") @OrganizationTableColumn(text = "责任", width = "20%", column = "post_info_duty")
private String postInfoDuty; private String postInfoDuty;
/** /**
* *
*/ */
@OrganizationTableColumn(text = "资格", width = "20%", column = "post_info_qualification") @OrganizationTableColumn(text = "资格", width = "20%", column = "post_info_qualification")
private String postInfoQualification; private String postInfoQualification;
/** /**
* *
*/ */
@OrganizationTableColumn(text = "职务分类", width = "20%", column = "post_name") @OrganizationTableColumn(text = "职务分类", width = "20%", column = "post_name")
private Integer postName; private Integer postName;
/** /**
* *
*/ */
@OrganizationTableColumn(text = "说明", width = "20%", column = "description") @OrganizationTableColumn(text = "说明", width = "20%", column = "description")
private String description; private String description;
/**
*
*/
@OrganizationTableColumn(text = "禁用标记", width = "20%", column = "forbidden_tag")
private Integer forbiddenTag;
} }

@ -56,6 +56,13 @@ public interface PostInfoMapper {
*/ */
int updatePostInfo(PostInfoPO postInfoPO); 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_info_qualification" property="postInfoQualification"/>
<result column="post_id" property="postId"/> <result column="post_id" property="postId"/>
<result column="description" property="description"/> <result column="description" property="description"/>
<result column="forbidden_tag" property="forbiddenTag"/>
<result column="creator" property="creator"/> <result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/> <result column="delete_type" property="deleteType"/>
<result column="create_time" property="createTime"/> <result column="create_time" property="createTime"/>
@ -28,6 +29,7 @@
, t.post_info_qualification , t.post_info_qualification
, t.post_id , t.post_id
, t.description , t.description
, t.forbidden_tag
, t.creator , t.creator
, t.delete_type , t.delete_type
, t.create_time , t.create_time
@ -112,7 +114,7 @@
<if test="description != null"> <if test="description != null">
description, description,
</if> </if>
forbidden_tag,
</trim> </trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=","> <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="creator != null"> <if test="creator != null">
@ -148,10 +150,18 @@
<if test="description != null"> <if test="description != null">
#{description}, #{description},
</if> </if>
0,
</trim> </trim>
</insert> </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 id="deleteByIds">
UPDATE jcl_org_post_info UPDATE jcl_org_post_info
SET delete_type = 1 SET delete_type = 1

@ -35,6 +35,13 @@ public interface PostInfoService {
*/ */
int updatePostInfo(PostInfoSearchParam param); int updatePostInfo(PostInfoSearchParam param);
/**
*
*
* @param params
*/
int updateForbiddenTagById(PostInfoSearchParam params);
/** /**
* ID * ID

@ -69,6 +69,12 @@ public class PostInfoServiceImpl extends Service implements PostInfoService {
return getPostInfoMapper().updatePostInfo(postInfoPO); 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 @Override
public int deleteByIds(Collection<Long> ids) { 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 * ID

@ -52,6 +52,15 @@ public class PostInfoWrapper extends Service {
return getPostInfoService(user).updatePostInfo(param); return getPostInfoService(user).updatePostInfo(param);
} }
/**
*
*
* @param params
*/
public int updateForbiddenTagById(PostInfoSearchParam params) {
return getPostInfoService(user).updateForbiddenTagById(params);
}
/** /**
* ID * ID
* *

Loading…
Cancel
Save