提交 a72be830 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 部署微服务接口

上级 91b9599e
...@@ -37,6 +37,11 @@ ...@@ -37,6 +37,11 @@
git clone -b master $para2 ibzou/ git clone -b master $para2 ibzou/
export NODE_OPTIONS=--max-old-space-size=4096 export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/ cd ibzou/
mvn clean package -Papi
cd ibzou-provider/ibzou-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-provider-api.yaml ibzlab-rt --with-registry-auth
</command> </command>
</hudson.tasks.Shell> </hudson.tasks.Shell>
</builders> </builders>
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
FROM openjdk:8-jre-alpine FROM openjdk:8-jre-alpine
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \ ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
IBZ_SLEEP=0 \ IBIZ_SLEEP=0 \
JAVA_OPTS="" JAVA_OPTS=""
CMD echo "The application will start in ${IBZ_SLEEP}s..." && \ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-app-web.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-app-web.jar
EXPOSE 8080 EXPOSE 8080
......
...@@ -7,6 +7,10 @@ zuul: ...@@ -7,6 +7,10 @@ zuul:
path: /ibzdeptmembers/** path: /ibzdeptmembers/**
serviceId: ibzou-api serviceId: ibzou-api
stripPrefix: false stripPrefix: false
ibzteammember:
path: /ibzteammembers/**
serviceId: ibzou-api
stripPrefix: false
ibzdept: ibzdept:
path: /ibzdepartments/** path: /ibzdepartments/**
serviceId: ibzou-api serviceId: ibzou-api
...@@ -19,6 +23,10 @@ zuul: ...@@ -19,6 +23,10 @@ zuul:
path: /ibzorganizations/** path: /ibzorganizations/**
serviceId: ibzou-api serviceId: ibzou-api
stripPrefix: false stripPrefix: false
ibzteam:
path: /ibzteams/**
serviceId: ibzou-api
stripPrefix: false
loginv7: loginv7:
path: /v7/login path: /v7/login
serviceId: ibzuaa-api serviceId: ibzuaa-api
......
package cn.ibizlab.core.ou.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.util.domain.EntityBase;
import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/**
* 实体[岗位]
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "IBZPOST",resultMap = "IBZPostResultMap")
public class IBZPost extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* POSTID
*/
@DEField(isKeyField=true)
@TableId(value= "postid",type=IdType.UUID)
@JSONField(name = "postid")
@JsonProperty("postid")
private String postid;
/**
* 岗位编码
*/
@TableField(value = "postcode")
@JSONField(name = "postcode")
@JsonProperty("postcode")
private String postcode;
/**
* 岗位名称
*/
@TableField(value = "postname")
@JSONField(name = "postname")
@JsonProperty("postname")
private String postname;
/**
* 设置 [岗位编码]
*/
public void setPostcode(String postcode){
this.postcode = postcode ;
this.modify("postcode",postcode);
}
/**
* 设置 [岗位名称]
*/
public void setPostname(String postname){
this.postname = postname ;
this.modify("postname",postname);
}
}
package cn.ibizlab.core.ou.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.util.domain.EntityBase;
import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/**
* 实体[组]
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "IBZTEAM",resultMap = "IBZTeamResultMap")
public class IBZTeam extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* TEAMID
*/
@DEField(isKeyField=true)
@TableId(value= "teamid",type=IdType.UUID)
@JSONField(name = "teamid")
@JsonProperty("teamid")
private String teamid;
/**
* 组名称
*/
@TableField(value = "teamname")
@JSONField(name = "teamname")
@JsonProperty("teamname")
private String teamname;
/**
* 设置 [组名称]
*/
public void setTeamname(String teamname){
this.teamname = teamname ;
this.modify("teamname",teamname);
}
}
package cn.ibizlab.core.ou.domain;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import java.math.BigDecimal;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.util.ObjectUtils;
import org.springframework.util.DigestUtils;
import cn.ibizlab.util.domain.EntityBase;
import cn.ibizlab.util.annotation.DEField;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import java.io.Serializable;
import lombok.*;
import org.springframework.data.annotation.Transient;
import com.baomidou.mybatisplus.annotation.*;
import cn.ibizlab.util.domain.EntityMP;
/**
* 实体[组成员]
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "IBZTEAMMEMBER",resultMap = "IBZTeamMemberResultMap")
public class IBZTeamMember extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L;
/**
* TEAMMEMBER
*/
@DEField(isKeyField=true)
@TableId(value= "teammemberid",type=IdType.UUID)
@JSONField(name = "teammemberid")
@JsonProperty("teammemberid")
private String teammemberid;
/**
* TEAMID
*/
@TableField(value = "teamid")
@JSONField(name = "teamid")
@JsonProperty("teamid")
private String teamid;
/**
* 用户标识
*/
@TableField(value = "userid")
@JSONField(name = "userid")
@JsonProperty("userid")
private String userid;
/**
* 组名称
*/
@TableField(exist = false)
@JSONField(name = "teamname")
@JsonProperty("teamname")
private String teamname;
/**
* 姓名
*/
@TableField(exist = false)
@JSONField(name = "personname")
@JsonProperty("personname")
private String personname;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.core.ou.domain.IBZEmployee emp;
/**
*
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private cn.ibizlab.core.ou.domain.IBZTeam team;
/**
* 设置 [TEAMID]
*/
public void setTeamid(String teamid){
this.teamid = teamid ;
this.modify("teamid",teamid);
}
/**
* 设置 [用户标识]
*/
public void setUserid(String userid){
this.userid = userid ;
this.modify("userid",userid);
}
}
package cn.ibizlab.core.ou.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.ou.domain.IBZPost;
/**
* 关系型数据实体[IBZPost] 查询条件对象
*/
@Slf4j
@Data
public class IBZPostSearchContext extends QueryWrapperContext<IBZPost> {
private String n_postcode_like;//[岗位编码]
public void setN_postcode_like(String n_postcode_like) {
this.n_postcode_like = n_postcode_like;
if(!ObjectUtils.isEmpty(this.n_postcode_like)){
this.getSelectCond().like("postcode", n_postcode_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().and( wrapper ->
wrapper.like("postcode", query)
);
}
}
}
package cn.ibizlab.core.ou.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.ou.domain.IBZTeamMember;
/**
* 关系型数据实体[IBZTeamMember] 查询条件对象
*/
@Slf4j
@Data
public class IBZTeamMemberSearchContext extends QueryWrapperContext<IBZTeamMember> {
private String n_teammemberid_like;//[TEAMMEMBER]
public void setN_teammemberid_like(String n_teammemberid_like) {
this.n_teammemberid_like = n_teammemberid_like;
if(!ObjectUtils.isEmpty(this.n_teammemberid_like)){
this.getSelectCond().like("teammemberid", n_teammemberid_like);
}
}
private String n_teamid_eq;//[TEAMID]
public void setN_teamid_eq(String n_teamid_eq) {
this.n_teamid_eq = n_teamid_eq;
if(!ObjectUtils.isEmpty(this.n_teamid_eq)){
this.getSelectCond().eq("teamid", n_teamid_eq);
}
}
private String n_userid_eq;//[用户标识]
public void setN_userid_eq(String n_userid_eq) {
this.n_userid_eq = n_userid_eq;
if(!ObjectUtils.isEmpty(this.n_userid_eq)){
this.getSelectCond().eq("userid", n_userid_eq);
}
}
private String n_teamname_eq;//[组名称]
public void setN_teamname_eq(String n_teamname_eq) {
this.n_teamname_eq = n_teamname_eq;
if(!ObjectUtils.isEmpty(this.n_teamname_eq)){
this.getSelectCond().eq("teamname", n_teamname_eq);
}
}
private String n_teamname_like;//[组名称]
public void setN_teamname_like(String n_teamname_like) {
this.n_teamname_like = n_teamname_like;
if(!ObjectUtils.isEmpty(this.n_teamname_like)){
this.getSelectCond().like("teamname", n_teamname_like);
}
}
private String n_personname_eq;//[姓名]
public void setN_personname_eq(String n_personname_eq) {
this.n_personname_eq = n_personname_eq;
if(!ObjectUtils.isEmpty(this.n_personname_eq)){
this.getSelectCond().eq("personname", n_personname_eq);
}
}
private String n_personname_like;//[姓名]
public void setN_personname_like(String n_personname_like) {
this.n_personname_like = n_personname_like;
if(!ObjectUtils.isEmpty(this.n_personname_like)){
this.getSelectCond().like("personname", n_personname_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().and( wrapper ->
wrapper.like("teammemberid", query)
);
}
}
}
package cn.ibizlab.core.ou.filter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import lombok.*;
import lombok.extern.slf4j.Slf4j;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import cn.ibizlab.util.filter.QueryWrapperContext;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.ibizlab.core.ou.domain.IBZTeam;
/**
* 关系型数据实体[IBZTeam] 查询条件对象
*/
@Slf4j
@Data
public class IBZTeamSearchContext extends QueryWrapperContext<IBZTeam> {
private String n_teamid_like;//[TEAMID]
public void setN_teamid_like(String n_teamid_like) {
this.n_teamid_like = n_teamid_like;
if(!ObjectUtils.isEmpty(this.n_teamid_like)){
this.getSelectCond().like("teamid", n_teamid_like);
}
}
/**
* 启用快速搜索
*/
public void setQuery(String query)
{
this.query=query;
if(!StringUtils.isEmpty(query)){
this.getSelectCond().and( wrapper ->
wrapper.like("teamname", query)
);
}
}
}
package cn.ibizlab.core.ou.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.ou.domain.IBZPost;
import cn.ibizlab.core.ou.filter.IBZPostSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface IBZPostMapper extends BaseMapper<IBZPost>{
Page<IBZPost> searchDefault(IPage page, @Param("srf") IBZPostSearchContext context, @Param("ew") Wrapper<IBZPost> wrapper) ;
@Override
IBZPost selectById(Serializable id);
@Override
int insert(IBZPost entity);
@Override
int updateById(@Param(Constants.ENTITY) IBZPost entity);
@Override
int update(@Param(Constants.ENTITY) IBZPost entity, @Param("ew") Wrapper<IBZPost> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
package cn.ibizlab.core.ou.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.ou.domain.IBZTeam;
import cn.ibizlab.core.ou.filter.IBZTeamSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface IBZTeamMapper extends BaseMapper<IBZTeam>{
Page<IBZTeam> searchDefault(IPage page, @Param("srf") IBZTeamSearchContext context, @Param("ew") Wrapper<IBZTeam> wrapper) ;
@Override
IBZTeam selectById(Serializable id);
@Override
int insert(IBZTeam entity);
@Override
int updateById(@Param(Constants.ENTITY) IBZTeam entity);
@Override
int update(@Param(Constants.ENTITY) IBZTeam entity, @Param("ew") Wrapper<IBZTeam> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
}
package cn.ibizlab.core.ou.mapper;
import java.util.List;
import org.apache.ibatis.annotations.*;
import java.util.Map;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import java.util.HashMap;
import org.apache.ibatis.annotations.Select;
import cn.ibizlab.core.ou.domain.IBZTeamMember;
import cn.ibizlab.core.ou.filter.IBZTeamMemberSearchContext;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.alibaba.fastjson.JSONObject;
public interface IBZTeamMemberMapper extends BaseMapper<IBZTeamMember>{
Page<IBZTeamMember> searchDefault(IPage page, @Param("srf") IBZTeamMemberSearchContext context, @Param("ew") Wrapper<IBZTeamMember> wrapper) ;
@Override
IBZTeamMember selectById(Serializable id);
@Override
int insert(IBZTeamMember entity);
@Override
int updateById(@Param(Constants.ENTITY) IBZTeamMember entity);
@Override
int update(@Param(Constants.ENTITY) IBZTeamMember entity, @Param("ew") Wrapper<IBZTeamMember> updateWrapper);
@Override
int deleteById(Serializable id);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select("${sql}")
List<JSONObject> selectBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update("${sql}")
boolean updateBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert("${sql}")
boolean insertBySQL(@Param("sql") String sql, @Param("et")Map param);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete("${sql}")
boolean deleteBySQL(@Param("sql") String sql, @Param("et")Map param);
List<IBZTeamMember> selectByUserid(@Param("userid") Serializable userid) ;
List<IBZTeamMember> selectByTeamid(@Param("teamid") Serializable teamid) ;
}
package cn.ibizlab.core.ou.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.ou.domain.IBZPost;
import cn.ibizlab.core.ou.filter.IBZPostSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[IBZPost] 服务对象接口
*/
public interface IIBZPostService extends IService<IBZPost>{
boolean update(IBZPost et) ;
void updateBatch(List<IBZPost> list) ;
IBZPost getDraft(IBZPost et) ;
boolean save(IBZPost et) ;
void saveBatch(List<IBZPost> list) ;
boolean checkKey(IBZPost et) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
IBZPost get(String key) ;
boolean create(IBZPost et) ;
void createBatch(List<IBZPost> list) ;
Page<IBZPost> searchDefault(IBZPostSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
}
package cn.ibizlab.core.ou.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.ou.domain.IBZTeamMember;
import cn.ibizlab.core.ou.filter.IBZTeamMemberSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[IBZTeamMember] 服务对象接口
*/
public interface IIBZTeamMemberService extends IService<IBZTeamMember>{
boolean checkKey(IBZTeamMember et) ;
boolean save(IBZTeamMember et) ;
void saveBatch(List<IBZTeamMember> list) ;
IBZTeamMember getDraft(IBZTeamMember et) ;
boolean update(IBZTeamMember et) ;
void updateBatch(List<IBZTeamMember> list) ;
IBZTeamMember get(String key) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
boolean create(IBZTeamMember et) ;
void createBatch(List<IBZTeamMember> list) ;
Page<IBZTeamMember> searchDefault(IBZTeamMemberSearchContext context) ;
List<IBZTeamMember> selectByUserid(String userid) ;
void removeByUserid(String userid) ;
List<IBZTeamMember> selectByTeamid(String teamid) ;
void removeByTeamid(String teamid) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
}
package cn.ibizlab.core.ou.service;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
import java.math.BigInteger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cache.annotation.CacheEvict;
import cn.ibizlab.core.ou.domain.IBZTeam;
import cn.ibizlab.core.ou.filter.IBZTeamSearchContext;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* 实体[IBZTeam] 服务对象接口
*/
public interface IIBZTeamService extends IService<IBZTeam>{
boolean update(IBZTeam et) ;
void updateBatch(List<IBZTeam> list) ;
boolean remove(String key) ;
void removeBatch(Collection<String> idList) ;
IBZTeam get(String key) ;
boolean save(IBZTeam et) ;
void saveBatch(List<IBZTeam> list) ;
IBZTeam getDraft(IBZTeam et) ;
boolean checkKey(IBZTeam et) ;
boolean create(IBZTeam et) ;
void createBatch(List<IBZTeam> list) ;
Page<IBZTeam> searchDefault(IBZTeamSearchContext context) ;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List<JSONObject> select(String sql, Map param);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean execute(String sql, Map param);
}
...@@ -49,6 +49,9 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm ...@@ -49,6 +49,9 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
private cn.ibizlab.core.ou.service.IIBZDeptMemberService ibzdeptmemberService; private cn.ibizlab.core.ou.service.IIBZDeptMemberService ibzdeptmemberService;
@Autowired @Autowired
@Lazy @Lazy
private cn.ibizlab.core.ou.service.IIBZTeamMemberService ibzteammemberService;
@Autowired
@Lazy
private cn.ibizlab.core.ou.service.IIBZDepartmentService ibzdepartmentService; private cn.ibizlab.core.ou.service.IIBZDepartmentService ibzdepartmentService;
@Autowired @Autowired
@Lazy @Lazy
......
package cn.ibizlab.core.ou.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.ou.domain.IBZPost;
import cn.ibizlab.core.ou.filter.IBZPostSearchContext;
import cn.ibizlab.core.ou.service.IIBZPostService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.ou.mapper.IBZPostMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[岗位] 服务对象接口实现
*/
@Slf4j
@Service("IBZPostServiceImpl")
public class IBZPostServiceImpl extends ServiceImpl<IBZPostMapper, IBZPost> implements IIBZPostService {
private int batchSize = 500;
@Override
@Transactional
public boolean update(IBZPost et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("postid",et.getPostid())))
return false;
CachedBeanCopier.copy(get(et.getPostid()),et);
return true;
}
@Override
public void updateBatch(List<IBZPost> list) {
updateBatchById(list,batchSize);
}
@Override
public IBZPost getDraft(IBZPost et) {
return et;
}
@Override
@Transactional
public boolean save(IBZPost et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(IBZPost et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<IBZPost> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<IBZPost> list) {
saveOrUpdateBatch(list,batchSize);
}
@Override
public boolean checkKey(IBZPost et) {
return (!ObjectUtils.isEmpty(et.getPostid()))&&(!Objects.isNull(this.getById(et.getPostid())));
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public IBZPost get(String key) {
IBZPost et = getById(key);
if(et==null){
et=new IBZPost();
et.setPostid(key);
}
else{
}
return et;
}
@Override
@Transactional
public boolean create(IBZPost et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getPostid()),et);
return true;
}
@Override
public void createBatch(List<IBZPost> list) {
this.saveBatch(list,batchSize);
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<IBZPost> searchDefault(IBZPostSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZPost> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<IBZPost>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
}
package cn.ibizlab.core.ou.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.ou.domain.IBZTeamMember;
import cn.ibizlab.core.ou.filter.IBZTeamMemberSearchContext;
import cn.ibizlab.core.ou.service.IIBZTeamMemberService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.ou.mapper.IBZTeamMemberMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[组成员] 服务对象接口实现
*/
@Slf4j
@Service("IBZTeamMemberServiceImpl")
public class IBZTeamMemberServiceImpl extends ServiceImpl<IBZTeamMemberMapper, IBZTeamMember> implements IIBZTeamMemberService {
@Autowired
@Lazy
private cn.ibizlab.core.ou.service.IIBZEmployeeService ibzemployeeService;
@Autowired
@Lazy
private cn.ibizlab.core.ou.service.IIBZTeamService ibzteamService;
private int batchSize = 500;
@Override
public boolean checkKey(IBZTeamMember et) {
return (!ObjectUtils.isEmpty(et.getTeammemberid()))&&(!Objects.isNull(this.getById(et.getTeammemberid())));
}
@Override
@Transactional
public boolean save(IBZTeamMember et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(IBZTeamMember et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<IBZTeamMember> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<IBZTeamMember> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
}
@Override
public IBZTeamMember getDraft(IBZTeamMember et) {
fillParentData(et);
return et;
}
@Override
@Transactional
public boolean update(IBZTeamMember et) {
fillParentData(et);
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("teammemberid",et.getTeammemberid())))
return false;
CachedBeanCopier.copy(get(et.getTeammemberid()),et);
return true;
}
@Override
public void updateBatch(List<IBZTeamMember> list) {
list.forEach(item->fillParentData(item));
updateBatchById(list,batchSize);
}
@Override
@Transactional
public IBZTeamMember get(String key) {
IBZTeamMember et = getById(key);
if(et==null){
et=new IBZTeamMember();
et.setTeammemberid(key);
}
else{
}
return et;
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public boolean create(IBZTeamMember et) {
fillParentData(et);
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getTeammemberid()),et);
return true;
}
@Override
public void createBatch(List<IBZTeamMember> list) {
list.forEach(item->fillParentData(item));
this.saveBatch(list,batchSize);
}
@Override
public List<IBZTeamMember> selectByUserid(String userid) {
return baseMapper.selectByUserid(userid);
}
@Override
public void removeByUserid(String userid) {
this.remove(new QueryWrapper<IBZTeamMember>().eq("userid",userid));
}
@Override
public List<IBZTeamMember> selectByTeamid(String teamid) {
return baseMapper.selectByTeamid(teamid);
}
@Override
public void removeByTeamid(String teamid) {
this.remove(new QueryWrapper<IBZTeamMember>().eq("teamid",teamid));
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<IBZTeamMember> searchDefault(IBZTeamMemberSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZTeamMember> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<IBZTeamMember>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private void fillParentData(IBZTeamMember et){
//实体关系[DER1N_IBZTEAMMEMBER_IBZEMP_USERID]
if(!ObjectUtils.isEmpty(et.getUserid())){
cn.ibizlab.core.ou.domain.IBZEmployee emp=et.getEmp();
if(ObjectUtils.isEmpty(emp)){
cn.ibizlab.core.ou.domain.IBZEmployee majorEntity=ibzemployeeService.get(et.getUserid());
et.setEmp(majorEntity);
emp=majorEntity;
}
et.setPersonname(emp.getPersonname());
}
//实体关系[DER1N_IBZTEAMMEMBER_IBZTEAM_TEAMID]
if(!ObjectUtils.isEmpty(et.getTeamid())){
cn.ibizlab.core.ou.domain.IBZTeam team=et.getTeam();
if(ObjectUtils.isEmpty(team)){
cn.ibizlab.core.ou.domain.IBZTeam majorEntity=ibzteamService.get(et.getTeamid());
et.setTeam(majorEntity);
team=majorEntity;
}
et.setTeamname(team.getTeamname());
}
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
}
package cn.ibizlab.core.ou.service.impl;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashSet;
import java.util.HashMap;
import java.util.Collection;
import java.util.Objects;
import java.util.Optional;
import java.math.BigInteger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.ObjectUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Lazy;
import cn.ibizlab.core.ou.domain.IBZTeam;
import cn.ibizlab.core.ou.filter.IBZTeamSearchContext;
import cn.ibizlab.core.ou.service.IIBZTeamService;
import cn.ibizlab.util.helper.CachedBeanCopier;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.ibizlab.core.ou.mapper.IBZTeamMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.alibaba.fastjson.JSONObject;
import org.springframework.util.StringUtils;
/**
* 实体[组] 服务对象接口实现
*/
@Slf4j
@Service("IBZTeamServiceImpl")
public class IBZTeamServiceImpl extends ServiceImpl<IBZTeamMapper, IBZTeam> implements IIBZTeamService {
@Autowired
@Lazy
private cn.ibizlab.core.ou.service.IIBZTeamMemberService ibzteammemberService;
private int batchSize = 500;
@Override
@Transactional
public boolean update(IBZTeam et) {
if(!update(et,(Wrapper) et.getUpdateWrapper(true).eq("teamid",et.getTeamid())))
return false;
CachedBeanCopier.copy(get(et.getTeamid()),et);
return true;
}
@Override
public void updateBatch(List<IBZTeam> list) {
updateBatchById(list,batchSize);
}
@Override
@Transactional
public boolean remove(String key) {
boolean result=removeById(key);
return result ;
}
@Override
public void removeBatch(Collection<String> idList) {
removeByIds(idList);
}
@Override
@Transactional
public IBZTeam get(String key) {
IBZTeam et = getById(key);
if(et==null){
et=new IBZTeam();
et.setTeamid(key);
}
else{
}
return et;
}
@Override
@Transactional
public boolean save(IBZTeam et) {
if(!saveOrUpdate(et))
return false;
return true;
}
@Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean saveOrUpdate(IBZTeam et) {
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
}
}
@Override
public boolean saveBatch(Collection<IBZTeam> list) {
saveOrUpdateBatch(list,batchSize);
return true;
}
@Override
public void saveBatch(List<IBZTeam> list) {
saveOrUpdateBatch(list,batchSize);
}
@Override
public IBZTeam getDraft(IBZTeam et) {
return et;
}
@Override
public boolean checkKey(IBZTeam et) {
return (!ObjectUtils.isEmpty(et.getTeamid()))&&(!Objects.isNull(this.getById(et.getTeamid())));
}
@Override
@Transactional
public boolean create(IBZTeam et) {
if(!this.retBool(this.baseMapper.insert(et)))
return false;
CachedBeanCopier.copy(get(et.getTeamid()),et);
return true;
}
@Override
public void createBatch(List<IBZTeam> list) {
this.saveBatch(list,batchSize);
}
/**
* 查询集合 DEFAULT
*/
@Override
public Page<IBZTeam> searchDefault(IBZTeamSearchContext context) {
com.baomidou.mybatisplus.extension.plugins.pagination.Page<IBZTeam> pages=baseMapper.searchDefault(context.getPages(),context,context.getSelectCond());
return new PageImpl<IBZTeam>(pages.getRecords(), context.getPageable(), pages.getTotal());
}
@Override
public List<JSONObject> select(String sql, Map param){
return this.baseMapper.selectBySQL(sql,param);
}
@Override
@Transactional
public boolean execute(String sql , Map param){
if (sql == null || sql.isEmpty()) {
return false;
}
if (sql.toLowerCase().trim().startsWith("insert")) {
return this.baseMapper.insertBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("update")) {
return this.baseMapper.updateBySQL(sql,param);
}
if (sql.toLowerCase().trim().startsWith("delete")) {
return this.baseMapper.deleteBySQL(sql,param);
}
log.warn("暂未支持的SQL语法");
return true;
}
}
package cn.ibizlab.core.util.config;
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.StringUtils;
/**
* xxl-job config
* 分布式任务调度平台XXL-JOB配置加载
* @author xuxueli 2017-04-28
*/
@Configuration
public class XxlJobConfig {
private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
@Value("${xxl.job.admin.addresses:}")
private String adminAddresses;
@Value("${xxl.job.accessToken:}")
private String accessToken;
@Value("${xxl.job.executor.appname:ibzou}")
private String appName;
@Value("${xxl.job.executor.ip:127.0.0.1}")
private String ip;
@Value("${xxl.job.executor.port:9999}")
private int port;
@Value("${xxl.job.executor.logpath:/app/joblog}")
private String logPath;
@Value("${xxl.job.executor.logretentiondays:-1}")
private int logRetentionDays;
@Bean(initMethod = "start", destroyMethod = "destroy")
public XxlJobSpringExecutor xxlJobExecutor() {
if(!StringUtils.isEmpty(adminAddresses)){
logger.info(">>>>>>>>>>> xxl-job config init.");
logger.info(">>>>>>>>>>> adminAddresses:"+adminAddresses);
logger.info(">>>>>>>>>>> appName:"+appName);
logger.info(">>>>>>>>>>> ip:"+ip);
logger.info(">>>>>>>>>>> port:"+port);
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
xxlJobSpringExecutor.setAppName(appName);
xxlJobSpringExecutor.setIp(ip);
xxlJobSpringExecutor.setPort(port);
xxlJobSpringExecutor.setAccessToken(accessToken);
xxlJobSpringExecutor.setLogPath(logPath);
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
return xxlJobSpringExecutor;
}
logger.info(">>>>>>>>>>> xxl-job config not init.");
return null;
}
/**
* 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
*
* 1、引入依赖:
* <dependency>
* <groupId>org.springframework.cloud</groupId>
* <artifactId>spring-cloud-commons</artifactId>
* <version>${version}"</version>
* </dependency>
*
* 2、配置文件,或者容器启动变量
* spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
*
* 3、获取IP
* String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
*/
}
...@@ -31,8 +31,20 @@ ...@@ -31,8 +31,20 @@
</changeSet> </changeSet>
<!--输出实体[IBZTEAM]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzteam-32-2">
<createTable tableName="IBZTEAM">
<column name="TEAMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZTEAM_TEAMID"/>
</column>
<column name="TEAMNAME" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
<!--输出实体[IBZEMP]数据结构 --> <!--输出实体[IBZEMP]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzemp-644-2"> <changeSet author="a_A_5d9d78509" id="tab-ibzemp-647-3">
<createTable tableName="IBZEMP"> <createTable tableName="IBZEMP">
<column name="USERID" remarks="" type="VARCHAR(100)"> <column name="USERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZEMP_USERID"/> <constraints primaryKey="true" primaryKeyName="PK_IBZEMP_USERID"/>
...@@ -111,8 +123,22 @@ ...@@ -111,8 +123,22 @@
</changeSet> </changeSet>
<!--输出实体[IBZPOST]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzpost-7-4">
<createTable tableName="IBZPOST">
<column name="POSTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZPOST_POSTID"/>
</column>
<column name="POSTCODE" remarks="" type="VARCHAR(100)">
</column>
<column name="POSTNAME" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
<!--输出实体[IBZDEPTMEMBER]数据结构 --> <!--输出实体[IBZDEPTMEMBER]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzdeptmember-30-3"> <changeSet author="a_A_5d9d78509" id="tab-ibzdeptmember-30-5">
<createTable tableName="IBZDEPTMEMBER"> <createTable tableName="IBZDEPTMEMBER">
<column name="MEMBERID" remarks="" type="VARCHAR(100)"> <column name="MEMBERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZDEPTMEMBER_MEMBERID"/> <constraints primaryKey="true" primaryKeyName="PK_IBZDEPTMEMBER_MEMBERID"/>
...@@ -126,7 +152,7 @@ ...@@ -126,7 +152,7 @@
<!--输出实体[IBZDEPT]数据结构 --> <!--输出实体[IBZDEPT]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzdept-701-4"> <changeSet author="a_A_5d9d78509" id="tab-ibzdept-701-6">
<createTable tableName="IBZDEPT"> <createTable tableName="IBZDEPT">
<column name="DEPTID" remarks="" type="VARCHAR(100)"> <column name="DEPTID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZDEPT_DEPTID"/> <constraints primaryKey="true" primaryKeyName="PK_IBZDEPT_DEPTID"/>
...@@ -160,30 +186,53 @@ ...@@ -160,30 +186,53 @@
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[IBZTEAMMEMBER]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-ibzteammember-24-7">
<createTable tableName="IBZTEAMMEMBER">
<column name="TEAMMEMBERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZTEAMMEMBER_TEAMMEMBERID"/>
</column>
<column name="TEAMID" remarks="" type="VARCHAR(100)">
</column>
<column name="USERID" remarks="" type="VARCHAR(100)">
</column>
</createTable>
</changeSet>
<!--输出实体[IBZORG]外键关系 --> <!--输出实体[IBZORG]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzorg-445-5"> <changeSet author="a_A_5d9d78509" id="fk-ibzorg-445-8">
<addForeignKeyConstraint baseColumnNames="PORGID" baseTableName="IBZORG" constraintName="DER1N_IBZORG_IBZORG_PORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/> <addForeignKeyConstraint baseColumnNames="PORGID" baseTableName="IBZORG" constraintName="DER1N_IBZORG_IBZORG_PORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[IBZTEAM]外键关系 -->
<!--输出实体[IBZEMP]外键关系 --> <!--输出实体[IBZEMP]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzemp-644-6"> <changeSet author="a_A_5d9d78509" id="fk-ibzemp-647-9">
<addForeignKeyConstraint baseColumnNames="MDEPTID" baseTableName="IBZEMP" constraintName="DER1N_IBZEMP_IBZDEPT_MDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/> <addForeignKeyConstraint baseColumnNames="MDEPTID" baseTableName="IBZEMP" constraintName="DER1N_IBZEMP_IBZDEPT_MDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_A_5d9d78509" id="fk-ibzemp-644-7"> <changeSet author="a_A_5d9d78509" id="fk-ibzemp-647-10">
<addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZEMP" constraintName="DER1N_IBZEMP_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/> <addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZEMP" constraintName="DER1N_IBZEMP_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[IBZPOST]外键关系 -->
<!--输出实体[IBZDEPTMEMBER]外键关系 --> <!--输出实体[IBZDEPTMEMBER]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzdeptmember-30-8"> <changeSet author="a_A_5d9d78509" id="fk-ibzdeptmember-30-11">
<addForeignKeyConstraint baseColumnNames="DEPTID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_IBZDEPTMEMBER_IBZDEPT_DE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/> <addForeignKeyConstraint baseColumnNames="DEPTID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_IBZDEPTMEMBER_IBZDEPT_DE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_A_5d9d78509" id="fk-ibzdeptmember-30-9"> <changeSet author="a_A_5d9d78509" id="fk-ibzdeptmember-30-12">
<addForeignKeyConstraint baseColumnNames="USERID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_IBZDEPTMEMBER_IBZEMP_USE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="USERID" referencedTableName="IBZEMP" validate="true"/> <addForeignKeyConstraint baseColumnNames="USERID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_IBZDEPTMEMBER_IBZEMP_USE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="USERID" referencedTableName="IBZEMP" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[IBZDEPT]外键关系 --> <!--输出实体[IBZDEPT]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-701-10"> <changeSet author="a_A_5d9d78509" id="fk-ibzdept-701-13">
<addForeignKeyConstraint baseColumnNames="PDEPTID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZDEPT_PDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/> <addForeignKeyConstraint baseColumnNames="PDEPTID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZDEPT_PDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet> </changeSet>
<changeSet author="a_A_5d9d78509" id="fk-ibzdept-701-11"> <changeSet author="a_A_5d9d78509" id="fk-ibzdept-701-14">
<addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/> <addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZDEPT" constraintName="DER1N_IBZDEPT_IBZORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet> </changeSet>
<!--输出实体[IBZTEAMMEMBER]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-ibzteammember-24-15">
<addForeignKeyConstraint baseColumnNames="USERID" baseTableName="IBZTEAMMEMBER" constraintName="DER1N_IBZTEAMMEMBER_IBZEMP_USE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="USERID" referencedTableName="IBZEMP" validate="true"/>
</changeSet>
<changeSet author="a_A_5d9d78509" id="fk-ibzteammember-24-16">
<addForeignKeyConstraint baseColumnNames="TEAMID" baseTableName="IBZTEAMMEMBER" constraintName="DER1N_IBZTEAMMEMBER_IBZTEAM_TE" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="TEAMID" referencedTableName="IBZTEAM" validate="true"/>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
<?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="cn.ibizlab.core.ou.mapper.IBZPostMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="IBZPostResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`POSTCODE`, t1.`POSTID`, t1.`POSTNAME` FROM `IBZPOST` t1 ) t1 where postid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="IBZPostResultMap" type="cn.ibizlab.core.ou.domain.IBZPost" autoMapping="true">
<id property="postid" column="postid" /><!--主键字段映射-->
</resultMap>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.core.ou.filter.IBZPostSearchContext" resultMap="IBZPostResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`POSTCODE`, t1.`POSTID`, t1.`POSTNAME` FROM `IBZPOST` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`POSTCODE`, t1.`POSTID`, t1.`POSTNAME` FROM `IBZPOST` t1
]]>
</sql>
</mapper>
<?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="cn.ibizlab.core.ou.mapper.IBZTeamMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="IBZTeamResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`TEAMID`, t1.`TEAMNAME` FROM `IBZTEAM` t1 ) t1 where teamid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="IBZTeamResultMap" type="cn.ibizlab.core.ou.domain.IBZTeam" autoMapping="true">
<id property="teamid" column="teamid" /><!--主键字段映射-->
</resultMap>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.core.ou.filter.IBZTeamSearchContext" resultMap="IBZTeamResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`TEAMID`, t1.`TEAMNAME` FROM `IBZTEAM` t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`TEAMID`, t1.`TEAMNAME` FROM `IBZTEAM` t1
]]>
</sql>
</mapper>
<?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="cn.ibizlab.core.ou.mapper.IBZTeamMemberMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="IBZTeamMemberResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t21.`PERSONNAME`, t1.`TEAMID`, t1.`TEAMMEMBERID`, t11.`TEAMNAME`, t1.`USERID` FROM `IBZTEAMMEMBER` t1 LEFT JOIN IBZTEAM t11 ON t1.TEAMID = t11.TEAMID LEFT JOIN IBZEMP t21 ON t1.USERID = t21.USERID ) t1 where teammemberid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="IBZTeamMemberResultMap" type="cn.ibizlab.core.ou.domain.IBZTeamMember" autoMapping="true">
<id property="teammemberid" column="teammemberid" /><!--主键字段映射-->
<result property="teamid" column="teamid" />
<result property="userid" column="userid" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="emp" javaType="cn.ibizlab.core.ou.domain.IBZEmployee" column="userid" select="cn.ibizlab.core.ou.mapper.IBZEmployeeMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="team" javaType="cn.ibizlab.core.ou.domain.IBZTeam" column="teamid" select="cn.ibizlab.core.ou.mapper.IBZTeamMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IBZTEAMMEMBER_IBZEMP_USERID] -->
<select id="selectByUserid" resultMap="IBZTeamMemberResultMap">
select t1.* from (
<include refid="Default" />
) t1
where userid=#{userid}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_IBZTEAMMEMBER_IBZTEAM_TEAMID] -->
<select id="selectByTeamid" resultMap="IBZTeamMemberResultMap">
select t1.* from (
<include refid="Default" />
) t1
where teamid=#{teamid}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.core.ou.filter.IBZTeamMemberSearchContext" resultMap="IBZTeamMemberResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t21.`PERSONNAME`, t1.`TEAMID`, t1.`TEAMMEMBERID`, t11.`TEAMNAME`, t1.`USERID` FROM `IBZTEAMMEMBER` t1 LEFT JOIN IBZTEAM t11 ON t1.TEAMID = t11.TEAMID LEFT JOIN IBZEMP t21 ON t1.USERID = t21.USERID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="mysql">
<![CDATA[ SELECT t21.`PERSONNAME`, t1.`TEAMID`, t1.`TEAMMEMBERID`, t11.`TEAMNAME`, t1.`USERID` FROM `IBZTEAMMEMBER` t1 LEFT JOIN IBZTEAM t11 ON t1.TEAMID = t11.TEAMID LEFT JOIN IBZEMP t21 ON t1.USERID = t21.USERID
]]>
</sql>
</mapper>
...@@ -12,6 +12,14 @@ ...@@ -12,6 +12,14 @@
"datascope":[{"id":"all","name":"全部数据"}] "datascope":[{"id":"all","name":"全部数据"}]
} }
, { , {
"dename":"IBZTeamMember",
"delogicname":"组成员",
"sysmoudle":{"id":"OU","name":"ou"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}]
}
, {
"dename":"IBZDepartment", "dename":"IBZDepartment",
"delogicname":"部门", "delogicname":"部门",
"sysmoudle":{"id":"OU","name":"ou"}, "sysmoudle":{"id":"OU","name":"ou"},
...@@ -35,6 +43,14 @@ ...@@ -35,6 +43,14 @@
"deaction":[{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" }], "deaction":[{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}, {"id":"curorg","name":"当前单位"},{"id":"porg","name":"上级单位"},{"id":"sorg","name":"下级单位"} ] "datascope":[{"id":"all","name":"全部数据"}, {"id":"curorg","name":"当前单位"},{"id":"porg","name":"上级单位"},{"id":"sorg","name":"下级单位"} ]
} }
, {
"dename":"IBZTeam",
"delogicname":"组",
"sysmoudle":{"id":"OU","name":"ou"},
"dedataset":[{"id":"Default" , "name":"DEFAULT"}],
"deaction":[{"id":"Update" , "name":"Update" , "type":"BUILTIN" },{"id":"Remove" , "name":"Remove" , "type":"BUILTIN" },{"id":"Get" , "name":"Get" , "type":"BUILTIN" },{"id":"Save" , "name":"Save" , "type":"BUILTIN" },{"id":"GetDraft" , "name":"GetDraft" , "type":"BUILTIN" },{"id":"CheckKey" , "name":"CheckKey" , "type":"BUILTIN" },{"id":"Create" , "name":"Create" , "type":"BUILTIN" }],
"datascope":[{"id":"all","name":"全部数据"}]
}
], ],
"appmenus":[ "appmenus":[
......
...@@ -74,6 +74,9 @@ ...@@ -74,6 +74,9 @@
<!--httpClient --> <!--httpClient -->
<openfeign-httpclient.version>11.0</openfeign-httpclient.version> <openfeign-httpclient.version>11.0</openfeign-httpclient.version>
<!--xxl-job定时服务 -->
<xxl-job.version>2.1.0</xxl-job.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
...@@ -249,6 +252,12 @@ ...@@ -249,6 +252,12 @@
<version>${openfeign-httpclient.version}</version> <version>${openfeign-httpclient.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
<version>${xxl-job.version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
...@@ -308,6 +317,12 @@ ...@@ -308,6 +317,12 @@
<artifactId>h2</artifactId> <artifactId>h2</artifactId>
</dependency> </dependency>
<!--xxl-job定时服务 -->
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
</dependency>
<!-- Error --> <!-- Error -->
<!-- Security --> <!-- Security -->
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
FROM openjdk:8-jre-alpine FROM openjdk:8-jre-alpine
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \ ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
IBZ_SLEEP=0 \ IBIZ_SLEEP=0 \
JAVA_OPTS="" JAVA_OPTS=""
CMD echo "The application will start in ${IBZ_SLEEP}s..." && \ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \ sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-provider-api.jar java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-provider-api.jar
EXPOSE 8081 EXPOSE 40001
ADD ibzou-provider-api.jar /ibzou-provider-api.jar ADD ibzou-provider-api.jar /ibzou-provider-api.jar
...@@ -3,9 +3,21 @@ services: ...@@ -3,9 +3,21 @@ services:
ibzou-provider-api: ibzou-provider-api:
image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest image: registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest
ports: ports:
- "8081:8081" - "40001:40001"
networks: networks:
- agent_network - agent_network
environment:
- SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
- SERVER_PORT=40001
- SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
- SPRING_REDIS_HOST=172.16.100.243
- SPRING_REDIS_PORT=6379
- SPRING_REDIS_DATABASE=0
- SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
- SPRING_DATASOURCE_PASSWORD=@6dEfb3@
- SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
- SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
- SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
deploy: deploy:
mode: replicated mode: replicated
replicas: 1 replicas: 1
......
package cn.ibizlab.api.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[IBZPostDTO]
*/
@Data
public class IBZPostDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [POSTID]
*
*/
@JSONField(name = "postid")
@JsonProperty("postid")
private String postid;
/**
* 属性 [POSTCODE]
*
*/
@JSONField(name = "postcode")
@JsonProperty("postcode")
private String postcode;
/**
* 属性 [POSTNAME]
*
*/
@JSONField(name = "postname")
@JsonProperty("postname")
private String postname;
/**
* 设置 [POSTCODE]
*/
public void setPostcode(String postcode){
this.postcode = postcode ;
this.modify("postcode",postcode);
}
/**
* 设置 [POSTNAME]
*/
public void setPostname(String postname){
this.postname = postname ;
this.modify("postname",postname);
}
}
package cn.ibizlab.api.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[IBZTeamDTO]
*/
@Data
public class IBZTeamDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [TEAMID]
*
*/
@JSONField(name = "teamid")
@JsonProperty("teamid")
private String teamid;
/**
* 属性 [TEAMNAME]
*
*/
@JSONField(name = "teamname")
@JsonProperty("teamname")
private String teamname;
/**
* 设置 [TEAMNAME]
*/
public void setTeamname(String teamname){
this.teamname = teamname ;
this.modify("teamname",teamname);
}
}
package cn.ibizlab.api.dto;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.fastjson.annotation.JSONField;
import cn.ibizlab.util.domain.DTOBase;
import lombok.Data;
/**
* 服务DTO对象[IBZTeamMemberDTO]
*/
@Data
public class IBZTeamMemberDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 属性 [TEAMMEMBERID]
*
*/
@JSONField(name = "teammemberid")
@JsonProperty("teammemberid")
private String teammemberid;
/**
* 属性 [TEAMID]
*
*/
@JSONField(name = "teamid")
@JsonProperty("teamid")
private String teamid;
/**
* 属性 [USERID]
*
*/
@JSONField(name = "userid")
@JsonProperty("userid")
private String userid;
/**
* 属性 [TEAMNAME]
*
*/
@JSONField(name = "teamname")
@JsonProperty("teamname")
private String teamname;
/**
* 属性 [PERSONNAME]
*
*/
@JSONField(name = "personname")
@JsonProperty("personname")
private String personname;
/**
* 设置 [TEAMID]
*/
public void setTeamid(String teamid){
this.teamid = teamid ;
this.modify("teamid",teamid);
}
/**
* 设置 [USERID]
*/
public void setUserid(String userid){
this.userid = userid ;
this.modify("userid",userid);
}
}
package cn.ibizlab.api.mapping;
import org.mapstruct.*;
import cn.ibizlab.core.ou.domain.IBZPost;
import cn.ibizlab.api.dto.IBZPostDTO;
import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface IBZPostMapping extends MappingBase<IBZPostDTO, IBZPost> {
}
package cn.ibizlab.api.mapping;
import org.mapstruct.*;
import cn.ibizlab.core.ou.domain.IBZTeam;
import cn.ibizlab.api.dto.IBZTeamDTO;
import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface IBZTeamMapping extends MappingBase<IBZTeamDTO, IBZTeam> {
}
package cn.ibizlab.api.mapping;
import org.mapstruct.*;
import cn.ibizlab.core.ou.domain.IBZTeamMember;
import cn.ibizlab.api.dto.IBZTeamMemberDTO;
import cn.ibizlab.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {},
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface IBZTeamMemberMapping extends MappingBase<IBZTeamMemberDTO, IBZTeamMember> {
}
...@@ -34,7 +34,7 @@ import cn.ibizlab.core.ou.service.IIBZDepartmentService; ...@@ -34,7 +34,7 @@ import cn.ibizlab.core.ou.service.IIBZDepartmentService;
import cn.ibizlab.core.ou.filter.IBZDepartmentSearchContext; import cn.ibizlab.core.ou.filter.IBZDepartmentSearchContext;
@Slf4j @Slf4j
@Api(tags = {"IBZDepartment" }) @Api(tags = {"部门" })
@RestController("api-ibzdepartment") @RestController("api-ibzdepartment")
@RequestMapping("") @RequestMapping("")
public class IBZDepartmentResource { public class IBZDepartmentResource {
...@@ -47,7 +47,7 @@ public class IBZDepartmentResource { ...@@ -47,7 +47,7 @@ public class IBZDepartmentResource {
public IBZDepartmentMapping ibzdepartmentMapping; public IBZDepartmentMapping ibzdepartmentMapping;
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzou-IBZDepartment-Create')") @PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzou-IBZDepartment-Create')")
@ApiOperation(value = "Create", tags = {"IBZDepartment" }, notes = "Create") @ApiOperation(value = "新建部门", tags = {"部门" }, notes = "新建部门")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments")
@Transactional @Transactional
public ResponseEntity<IBZDepartmentDTO> create(@RequestBody IBZDepartmentDTO ibzdepartmentdto) { public ResponseEntity<IBZDepartmentDTO> create(@RequestBody IBZDepartmentDTO ibzdepartmentdto) {
...@@ -58,7 +58,7 @@ public class IBZDepartmentResource { ...@@ -58,7 +58,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos),'ibzou-IBZDepartment-Create')") @PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos),'ibzou-IBZDepartment-Create')")
@ApiOperation(value = "createBatch", tags = {"IBZDepartment" }, notes = "createBatch") @ApiOperation(value = "批量新建部门", tags = {"部门" }, notes = "批量新建部门")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
ibzdepartmentService.createBatch(ibzdepartmentMapping.toDomain(ibzdepartmentdtos)); ibzdepartmentService.createBatch(ibzdepartmentMapping.toDomain(ibzdepartmentdtos));
...@@ -66,7 +66,7 @@ public class IBZDepartmentResource { ...@@ -66,7 +66,7 @@ public class IBZDepartmentResource {
} }
@PostAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(returnObject.body),'ibzou-IBZDepartment-Get')") @PostAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(returnObject.body),'ibzou-IBZDepartment-Get')")
@ApiOperation(value = "Get", tags = {"IBZDepartment" }, notes = "Get") @ApiOperation(value = "获取部门", tags = {"部门" }, notes = "获取部门")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}")
public ResponseEntity<IBZDepartmentDTO> get(@PathVariable("ibzdepartment_id") String ibzdepartment_id) { public ResponseEntity<IBZDepartmentDTO> get(@PathVariable("ibzdepartment_id") String ibzdepartment_id) {
IBZDepartment domain = ibzdepartmentService.get(ibzdepartment_id); IBZDepartment domain = ibzdepartmentService.get(ibzdepartment_id);
...@@ -75,34 +75,34 @@ public class IBZDepartmentResource { ...@@ -75,34 +75,34 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzou-IBZDepartment-Save')") @PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzou-IBZDepartment-Save')")
@ApiOperation(value = "Save", tags = {"IBZDepartment" }, notes = "Save") @ApiOperation(value = "保存部门", tags = {"部门" }, notes = "保存部门")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/save")
public ResponseEntity<Boolean> save(@RequestBody IBZDepartmentDTO ibzdepartmentdto) { public ResponseEntity<Boolean> save(@RequestBody IBZDepartmentDTO ibzdepartmentdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.save(ibzdepartmentMapping.toDomain(ibzdepartmentdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.save(ibzdepartmentMapping.toDomain(ibzdepartmentdto)));
} }
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos),'ibzou-IBZDepartment-Save')") @PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos),'ibzou-IBZDepartment-Save')")
@ApiOperation(value = "SaveBatch", tags = {"IBZDepartment" }, notes = "SaveBatch") @ApiOperation(value = "批量保存部门", tags = {"部门" }, notes = "批量保存部门")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
ibzdepartmentService.saveBatch(ibzdepartmentMapping.toDomain(ibzdepartmentdtos)); ibzdepartmentService.saveBatch(ibzdepartmentMapping.toDomain(ibzdepartmentdtos));
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKey", tags = {"IBZDepartment" }, notes = "CheckKey") @ApiOperation(value = "检查部门", tags = {"部门" }, notes = "检查部门")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody IBZDepartmentDTO ibzdepartmentdto) { public ResponseEntity<Boolean> checkKey(@RequestBody IBZDepartmentDTO ibzdepartmentdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.checkKey(ibzdepartmentMapping.toDomain(ibzdepartmentdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.checkKey(ibzdepartmentMapping.toDomain(ibzdepartmentdto)));
} }
@ApiOperation(value = "GetDraft", tags = {"IBZDepartment" }, notes = "GetDraft") @ApiOperation(value = "获取部门草稿", tags = {"部门" }, notes = "获取部门草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/getdraft")
public ResponseEntity<IBZDepartmentDTO> getDraft() { public ResponseEntity<IBZDepartmentDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentMapping.toDto(ibzdepartmentService.getDraft(new IBZDepartment()))); return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentMapping.toDto(ibzdepartmentService.getDraft(new IBZDepartment())));
} }
@PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Remove')") @PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Remove')")
@ApiOperation(value = "Remove", tags = {"IBZDepartment" }, notes = "Remove") @ApiOperation(value = "删除部门", tags = {"部门" }, notes = "删除部门")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzdepartment_id") String ibzdepartment_id) { public ResponseEntity<Boolean> remove(@PathVariable("ibzdepartment_id") String ibzdepartment_id) {
...@@ -110,7 +110,7 @@ public class IBZDepartmentResource { ...@@ -110,7 +110,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasPermission(this.ibzdepartmentService.getIbzdepartmentByIds(#ids),'ibzou-IBZDepartment-Remove')") @PreAuthorize("hasPermission(this.ibzdepartmentService.getIbzdepartmentByIds(#ids),'ibzou-IBZDepartment-Remove')")
@ApiOperation(value = "RemoveBatch", tags = {"IBZDepartment" }, notes = "RemoveBatch") @ApiOperation(value = "批量删除部门", tags = {"部门" }, notes = "批量删除部门")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
ibzdepartmentService.removeBatch(ids); ibzdepartmentService.removeBatch(ids);
...@@ -118,7 +118,7 @@ public class IBZDepartmentResource { ...@@ -118,7 +118,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Update')") @PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Update')")
@ApiOperation(value = "Update", tags = {"IBZDepartment" }, notes = "Update") @ApiOperation(value = "更新部门", tags = {"部门" }, notes = "更新部门")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}")
@Transactional @Transactional
public ResponseEntity<IBZDepartmentDTO> update(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) { public ResponseEntity<IBZDepartmentDTO> update(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) {
...@@ -130,7 +130,7 @@ public class IBZDepartmentResource { ...@@ -130,7 +130,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasPermission(this.ibzdepartmentService.getIbzdepartmentByEntities(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos)),'ibzou-IBZDepartment-Update')") @PreAuthorize("hasPermission(this.ibzdepartmentService.getIbzdepartmentByEntities(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos)),'ibzou-IBZDepartment-Update')")
@ApiOperation(value = "UpdateBatch", tags = {"IBZDepartment" }, notes = "UpdateBatch") @ApiOperation(value = "批量更新部门", tags = {"部门" }, notes = "批量更新部门")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
ibzdepartmentService.updateBatch(ibzdepartmentMapping.toDomain(ibzdepartmentdtos)); ibzdepartmentService.updateBatch(ibzdepartmentMapping.toDomain(ibzdepartmentdtos));
...@@ -138,7 +138,7 @@ public class IBZDepartmentResource { ...@@ -138,7 +138,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CurDept-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CurDept-all')")
@ApiOperation(value = "fetchCurDept", tags = {"IBZDepartment" } ,notes = "fetchCurDept") @ApiOperation(value = "获取CurDept", tags = {"部门" } ,notes = "获取CurDept")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchcurdept") @RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchcurdept")
public ResponseEntity<List<IBZDepartmentDTO>> fetchCurDept(IBZDepartmentSearchContext context) { public ResponseEntity<List<IBZDepartmentDTO>> fetchCurDept(IBZDepartmentSearchContext context) {
Page<IBZDepartment> domains = ibzdepartmentService.searchCurDept(context) ; Page<IBZDepartment> domains = ibzdepartmentService.searchCurDept(context) ;
...@@ -151,7 +151,7 @@ public class IBZDepartmentResource { ...@@ -151,7 +151,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CurDept-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CurDept-all')")
@ApiOperation(value = "searchCurDept", tags = {"IBZDepartment" } ,notes = "searchCurDept") @ApiOperation(value = "查询CurDept", tags = {"部门" } ,notes = "查询CurDept")
@RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/searchcurdept") @RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/searchcurdept")
public ResponseEntity<Page<IBZDepartmentDTO>> searchCurDept(@RequestBody IBZDepartmentSearchContext context) { public ResponseEntity<Page<IBZDepartmentDTO>> searchCurDept(@RequestBody IBZDepartmentSearchContext context) {
Page<IBZDepartment> domains = ibzdepartmentService.searchCurDept(context) ; Page<IBZDepartment> domains = ibzdepartmentService.searchCurDept(context) ;
...@@ -159,7 +159,7 @@ public class IBZDepartmentResource { ...@@ -159,7 +159,7 @@ public class IBZDepartmentResource {
.body(new PageImpl(ibzdepartmentMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzdepartmentMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZDepartment" } ,notes = "fetchDEFAULT") @ApiOperation(value = "获取DEFAULT", tags = {"部门" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/fetchdefault")
public ResponseEntity<List<IBZDepartmentDTO>> fetchDefault(IBZDepartmentSearchContext context) { public ResponseEntity<List<IBZDepartmentDTO>> fetchDefault(IBZDepartmentSearchContext context) {
Page<IBZDepartment> domains = ibzdepartmentService.searchDefault(context) ; Page<IBZDepartment> domains = ibzdepartmentService.searchDefault(context) ;
...@@ -172,7 +172,7 @@ public class IBZDepartmentResource { ...@@ -172,7 +172,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZDepartment" } ,notes = "searchDEFAULT") @ApiOperation(value = "查询DEFAULT", tags = {"部门" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/searchdefault")
public ResponseEntity<Page<IBZDepartmentDTO>> searchDefault(@RequestBody IBZDepartmentSearchContext context) { public ResponseEntity<Page<IBZDepartmentDTO>> searchDefault(@RequestBody IBZDepartmentSearchContext context) {
Page<IBZDepartment> domains = ibzdepartmentService.searchDefault(context) ; Page<IBZDepartment> domains = ibzdepartmentService.searchDefault(context) ;
...@@ -180,7 +180,7 @@ public class IBZDepartmentResource { ...@@ -180,7 +180,7 @@ public class IBZDepartmentResource {
.body(new PageImpl(ibzdepartmentMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzdepartmentMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzou-IBZDepartment-Create')") @PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzou-IBZDepartment-Create')")
@ApiOperation(value = "CreateByIBZOrganization", tags = {"IBZDepartment" }, notes = "CreateByIBZOrganization") @ApiOperation(value = "根据单位机构建立部门", tags = {"部门" }, notes = "根据单位机构建立部门")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments")
@Transactional @Transactional
public ResponseEntity<IBZDepartmentDTO> createByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) { public ResponseEntity<IBZDepartmentDTO> createByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) {
...@@ -192,7 +192,7 @@ public class IBZDepartmentResource { ...@@ -192,7 +192,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos),'ibzou-IBZDepartment-Create')") @PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos),'ibzou-IBZDepartment-Create')")
@ApiOperation(value = "createBatchByIBZOrganization", tags = {"IBZDepartment" }, notes = "createBatchByIBZOrganization") @ApiOperation(value = "根据单位机构批量建立部门", tags = {"部门" }, notes = "根据单位机构批量建立部门")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/batch")
public ResponseEntity<Boolean> createBatchByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) { public ResponseEntity<Boolean> createBatchByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
List<IBZDepartment> domainlist=ibzdepartmentMapping.toDomain(ibzdepartmentdtos); List<IBZDepartment> domainlist=ibzdepartmentMapping.toDomain(ibzdepartmentdtos);
...@@ -204,7 +204,7 @@ public class IBZDepartmentResource { ...@@ -204,7 +204,7 @@ public class IBZDepartmentResource {
} }
@PostAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(returnObject.body),'ibzou-IBZDepartment-Get')") @PostAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(returnObject.body),'ibzou-IBZDepartment-Get')")
@ApiOperation(value = "GetByIBZOrganization", tags = {"IBZDepartment" }, notes = "GetByIBZOrganization") @ApiOperation(value = "根据单位机构获取部门", tags = {"部门" }, notes = "根据单位机构获取部门")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}")
public ResponseEntity<IBZDepartmentDTO> getByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id) { public ResponseEntity<IBZDepartmentDTO> getByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id) {
IBZDepartment domain = ibzdepartmentService.get(ibzdepartment_id); IBZDepartment domain = ibzdepartmentService.get(ibzdepartment_id);
...@@ -213,7 +213,7 @@ public class IBZDepartmentResource { ...@@ -213,7 +213,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzou-IBZDepartment-Save')") @PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzou-IBZDepartment-Save')")
@ApiOperation(value = "SaveByIBZOrganization", tags = {"IBZDepartment" }, notes = "SaveByIBZOrganization") @ApiOperation(value = "根据单位机构保存部门", tags = {"部门" }, notes = "根据单位机构保存部门")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/save")
public ResponseEntity<Boolean> saveByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) { public ResponseEntity<Boolean> saveByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) {
IBZDepartment domain = ibzdepartmentMapping.toDomain(ibzdepartmentdto); IBZDepartment domain = ibzdepartmentMapping.toDomain(ibzdepartmentdto);
...@@ -222,7 +222,7 @@ public class IBZDepartmentResource { ...@@ -222,7 +222,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos),'ibzou-IBZDepartment-Save')") @PreAuthorize("hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos),'ibzou-IBZDepartment-Save')")
@ApiOperation(value = "SaveBatchByIBZOrganization", tags = {"IBZDepartment" }, notes = "SaveBatchByIBZOrganization") @ApiOperation(value = "根据单位机构批量保存部门", tags = {"部门" }, notes = "根据单位机构批量保存部门")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/savebatch")
public ResponseEntity<Boolean> saveBatchByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) { public ResponseEntity<Boolean> saveBatchByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
List<IBZDepartment> domainlist=ibzdepartmentMapping.toDomain(ibzdepartmentdtos); List<IBZDepartment> domainlist=ibzdepartmentMapping.toDomain(ibzdepartmentdtos);
...@@ -233,13 +233,13 @@ public class IBZDepartmentResource { ...@@ -233,13 +233,13 @@ public class IBZDepartmentResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKeyByIBZOrganization", tags = {"IBZDepartment" }, notes = "CheckKeyByIBZOrganization") @ApiOperation(value = "根据单位机构检查部门", tags = {"部门" }, notes = "根据单位机构检查部门")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/checkkey")
public ResponseEntity<Boolean> checkKeyByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) { public ResponseEntity<Boolean> checkKeyByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.checkKey(ibzdepartmentMapping.toDomain(ibzdepartmentdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdepartmentService.checkKey(ibzdepartmentMapping.toDomain(ibzdepartmentdto)));
} }
@ApiOperation(value = "GetDraftByIBZOrganization", tags = {"IBZDepartment" }, notes = "GetDraftByIBZOrganization") @ApiOperation(value = "根据单位机构获取部门草稿", tags = {"部门" }, notes = "根据单位机构获取部门草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/getdraft")
public ResponseEntity<IBZDepartmentDTO> getDraftByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id) { public ResponseEntity<IBZDepartmentDTO> getDraftByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id) {
IBZDepartment domain = new IBZDepartment(); IBZDepartment domain = new IBZDepartment();
...@@ -248,7 +248,7 @@ public class IBZDepartmentResource { ...@@ -248,7 +248,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Remove')") @PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Remove')")
@ApiOperation(value = "RemoveByIBZOrganization", tags = {"IBZDepartment" }, notes = "RemoveByIBZOrganization") @ApiOperation(value = "根据单位机构删除部门", tags = {"部门" }, notes = "根据单位机构删除部门")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> removeByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id) { public ResponseEntity<Boolean> removeByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id) {
...@@ -256,7 +256,7 @@ public class IBZDepartmentResource { ...@@ -256,7 +256,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasPermission(this.ibzdepartmentService.getIbzdepartmentByIds(#ids),'ibzou-IBZDepartment-Remove')") @PreAuthorize("hasPermission(this.ibzdepartmentService.getIbzdepartmentByIds(#ids),'ibzou-IBZDepartment-Remove')")
@ApiOperation(value = "RemoveBatchByIBZOrganization", tags = {"IBZDepartment" }, notes = "RemoveBatchByIBZOrganization") @ApiOperation(value = "根据单位机构批量删除部门", tags = {"部门" }, notes = "根据单位机构批量删除部门")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/batch")
public ResponseEntity<Boolean> removeBatchByIBZOrganization(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatchByIBZOrganization(@RequestBody List<String> ids) {
ibzdepartmentService.removeBatch(ids); ibzdepartmentService.removeBatch(ids);
...@@ -264,7 +264,7 @@ public class IBZDepartmentResource { ...@@ -264,7 +264,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Update')") @PreAuthorize("hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Update')")
@ApiOperation(value = "UpdateByIBZOrganization", tags = {"IBZDepartment" }, notes = "UpdateByIBZOrganization") @ApiOperation(value = "根据单位机构更新部门", tags = {"部门" }, notes = "根据单位机构更新部门")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}")
@Transactional @Transactional
public ResponseEntity<IBZDepartmentDTO> updateByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) { public ResponseEntity<IBZDepartmentDTO> updateByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDepartmentDTO ibzdepartmentdto) {
...@@ -277,7 +277,7 @@ public class IBZDepartmentResource { ...@@ -277,7 +277,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasPermission(this.ibzdepartmentService.getIbzdepartmentByEntities(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos)),'ibzou-IBZDepartment-Update')") @PreAuthorize("hasPermission(this.ibzdepartmentService.getIbzdepartmentByEntities(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdtos)),'ibzou-IBZDepartment-Update')")
@ApiOperation(value = "UpdateBatchByIBZOrganization", tags = {"IBZDepartment" }, notes = "UpdateBatchByIBZOrganization") @ApiOperation(value = "根据单位机构批量更新部门", tags = {"部门" }, notes = "根据单位机构批量更新部门")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/batch")
public ResponseEntity<Boolean> updateBatchByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) { public ResponseEntity<Boolean> updateBatchByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody List<IBZDepartmentDTO> ibzdepartmentdtos) {
List<IBZDepartment> domainlist=ibzdepartmentMapping.toDomain(ibzdepartmentdtos); List<IBZDepartment> domainlist=ibzdepartmentMapping.toDomain(ibzdepartmentdtos);
...@@ -289,7 +289,7 @@ public class IBZDepartmentResource { ...@@ -289,7 +289,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CurDept-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CurDept-all')")
@ApiOperation(value = "fetchCurDeptByIBZOrganization", tags = {"IBZDepartment" } ,notes = "fetchCurDeptByIBZOrganization") @ApiOperation(value = "根据单位机构获取CurDept", tags = {"部门" } ,notes = "根据单位机构获取CurDept")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/fetchcurdept") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/fetchcurdept")
public ResponseEntity<List<IBZDepartmentDTO>> fetchIBZDepartmentCurDeptByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id,IBZDepartmentSearchContext context) { public ResponseEntity<List<IBZDepartmentDTO>> fetchIBZDepartmentCurDeptByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id,IBZDepartmentSearchContext context) {
context.setN_orgid_eq(ibzorganization_id); context.setN_orgid_eq(ibzorganization_id);
...@@ -303,7 +303,7 @@ public class IBZDepartmentResource { ...@@ -303,7 +303,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CurDept-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-CurDept-all')")
@ApiOperation(value = "searchCurDeptByIBZOrganization", tags = {"IBZDepartment" } ,notes = "searchCurDeptByIBZOrganization") @ApiOperation(value = "根据单位机构查询CurDept", tags = {"部门" } ,notes = "根据单位机构查询CurDept")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/searchcurdept") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/searchcurdept")
public ResponseEntity<Page<IBZDepartmentDTO>> searchIBZDepartmentCurDeptByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZDepartmentSearchContext context) { public ResponseEntity<Page<IBZDepartmentDTO>> searchIBZDepartmentCurDeptByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZDepartmentSearchContext context) {
context.setN_orgid_eq(ibzorganization_id); context.setN_orgid_eq(ibzorganization_id);
...@@ -312,7 +312,7 @@ public class IBZDepartmentResource { ...@@ -312,7 +312,7 @@ public class IBZDepartmentResource {
.body(new PageImpl(ibzdepartmentMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzdepartmentMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-Default-all')")
@ApiOperation(value = "fetchDEFAULTByIBZOrganization", tags = {"IBZDepartment" } ,notes = "fetchDEFAULTByIBZOrganization") @ApiOperation(value = "根据单位机构获取DEFAULT", tags = {"部门" } ,notes = "根据单位机构获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/fetchdefault")
public ResponseEntity<List<IBZDepartmentDTO>> fetchIBZDepartmentDefaultByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id,IBZDepartmentSearchContext context) { public ResponseEntity<List<IBZDepartmentDTO>> fetchIBZDepartmentDefaultByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id,IBZDepartmentSearchContext context) {
context.setN_orgid_eq(ibzorganization_id); context.setN_orgid_eq(ibzorganization_id);
...@@ -326,7 +326,7 @@ public class IBZDepartmentResource { ...@@ -326,7 +326,7 @@ public class IBZDepartmentResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDepartment-Default-all')")
@ApiOperation(value = "searchDEFAULTByIBZOrganization", tags = {"IBZDepartment" } ,notes = "searchDEFAULTByIBZOrganization") @ApiOperation(value = "根据单位机构查询DEFAULT", tags = {"部门" } ,notes = "根据单位机构查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/searchdefault")
public ResponseEntity<Page<IBZDepartmentDTO>> searchIBZDepartmentDefaultByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZDepartmentSearchContext context) { public ResponseEntity<Page<IBZDepartmentDTO>> searchIBZDepartmentDefaultByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZDepartmentSearchContext context) {
context.setN_orgid_eq(ibzorganization_id); context.setN_orgid_eq(ibzorganization_id);
......
...@@ -34,7 +34,7 @@ import cn.ibizlab.core.ou.service.IIBZDeptMemberService; ...@@ -34,7 +34,7 @@ import cn.ibizlab.core.ou.service.IIBZDeptMemberService;
import cn.ibizlab.core.ou.filter.IBZDeptMemberSearchContext; import cn.ibizlab.core.ou.filter.IBZDeptMemberSearchContext;
@Slf4j @Slf4j
@Api(tags = {"IBZDeptMember" }) @Api(tags = {"部门成员" })
@RestController("api-ibzdeptmember") @RestController("api-ibzdeptmember")
@RequestMapping("") @RequestMapping("")
public class IBZDeptMemberResource { public class IBZDeptMemberResource {
...@@ -47,7 +47,7 @@ public class IBZDeptMemberResource { ...@@ -47,7 +47,7 @@ public class IBZDeptMemberResource {
public IBZDeptMemberMapping ibzdeptmemberMapping; public IBZDeptMemberMapping ibzdeptmemberMapping;
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "Update", tags = {"IBZDeptMember" }, notes = "Update") @ApiOperation(value = "更新部门成员", tags = {"部门成员" }, notes = "更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> update(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> update(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -59,7 +59,7 @@ public class IBZDeptMemberResource { ...@@ -59,7 +59,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateBatch", tags = {"IBZDeptMember" }, notes = "UpdateBatch") @ApiOperation(value = "批量更新部门成员", tags = {"部门成员" }, notes = "批量更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdeptmembers/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
ibzdeptmemberService.updateBatch(ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos)); ibzdeptmemberService.updateBatch(ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos));
...@@ -67,7 +67,7 @@ public class IBZDeptMemberResource { ...@@ -67,7 +67,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "Create", tags = {"IBZDeptMember" }, notes = "Create") @ApiOperation(value = "新建部门成员", tags = {"部门成员" }, notes = "新建部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers") @RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> create(@RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> create(@RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -78,7 +78,7 @@ public class IBZDeptMemberResource { ...@@ -78,7 +78,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "createBatch", tags = {"IBZDeptMember" }, notes = "createBatch") @ApiOperation(value = "批量新建部门成员", tags = {"部门成员" }, notes = "批量新建部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
ibzdeptmemberService.createBatch(ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos)); ibzdeptmemberService.createBatch(ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos));
...@@ -86,28 +86,28 @@ public class IBZDeptMemberResource { ...@@ -86,28 +86,28 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "Save", tags = {"IBZDeptMember" }, notes = "Save") @ApiOperation(value = "保存部门成员", tags = {"部门成员" }, notes = "保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/save")
public ResponseEntity<Boolean> save(@RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> save(@RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.save(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.save(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveBatch", tags = {"IBZDeptMember" }, notes = "SaveBatch") @ApiOperation(value = "批量保存部门成员", tags = {"部门成员" }, notes = "批量保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
ibzdeptmemberService.saveBatch(ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos)); ibzdeptmemberService.saveBatch(ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos));
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "GetDraft", tags = {"IBZDeptMember" }, notes = "GetDraft") @ApiOperation(value = "获取部门成员草稿", tags = {"部门成员" }, notes = "获取部门成员草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdeptmembers/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzdeptmembers/getdraft")
public ResponseEntity<IBZDeptMemberDTO> getDraft() { public ResponseEntity<IBZDeptMemberDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberMapping.toDto(ibzdeptmemberService.getDraft(new IBZDeptMember()))); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberMapping.toDto(ibzdeptmemberService.getDraft(new IBZDeptMember())));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')")
@ApiOperation(value = "Get", tags = {"IBZDeptMember" }, notes = "Get") @ApiOperation(value = "获取部门成员", tags = {"部门成员" }, notes = "获取部门成员")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzdeptmembers/{ibzdeptmember_id}")
public ResponseEntity<IBZDeptMemberDTO> get(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<IBZDeptMemberDTO> get(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id); IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id);
...@@ -116,7 +116,7 @@ public class IBZDeptMemberResource { ...@@ -116,7 +116,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "Remove", tags = {"IBZDeptMember" }, notes = "Remove") @ApiOperation(value = "删除部门成员", tags = {"部门成员" }, notes = "删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<Boolean> remove(@PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
...@@ -124,21 +124,21 @@ public class IBZDeptMemberResource { ...@@ -124,21 +124,21 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveBatch", tags = {"IBZDeptMember" }, notes = "RemoveBatch") @ApiOperation(value = "批量删除部门成员", tags = {"部门成员" }, notes = "批量删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdeptmembers/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
ibzdeptmemberService.removeBatch(ids); ibzdeptmemberService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKey", tags = {"IBZDeptMember" }, notes = "CheckKey") @ApiOperation(value = "检查部门成员", tags = {"部门成员" }, notes = "检查部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzdeptmembers/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> checkKey(@RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZDeptMember" } ,notes = "fetchDEFAULT") @ApiOperation(value = "获取DEFAULT", tags = {"部门成员" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzdeptmembers/fetchdefault")
public ResponseEntity<List<IBZDeptMemberDTO>> fetchDefault(IBZDeptMemberSearchContext context) { public ResponseEntity<List<IBZDeptMemberDTO>> fetchDefault(IBZDeptMemberSearchContext context) {
Page<IBZDeptMember> domains = ibzdeptmemberService.searchDefault(context) ; Page<IBZDeptMember> domains = ibzdeptmemberService.searchDefault(context) ;
...@@ -151,7 +151,7 @@ public class IBZDeptMemberResource { ...@@ -151,7 +151,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZDeptMember" } ,notes = "searchDEFAULT") @ApiOperation(value = "查询DEFAULT", tags = {"部门成员" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzdeptmembers/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzdeptmembers/searchdefault")
public ResponseEntity<Page<IBZDeptMemberDTO>> searchDefault(@RequestBody IBZDeptMemberSearchContext context) { public ResponseEntity<Page<IBZDeptMemberDTO>> searchDefault(@RequestBody IBZDeptMemberSearchContext context) {
Page<IBZDeptMember> domains = ibzdeptmemberService.searchDefault(context) ; Page<IBZDeptMember> domains = ibzdeptmemberService.searchDefault(context) ;
...@@ -159,7 +159,7 @@ public class IBZDeptMemberResource { ...@@ -159,7 +159,7 @@ public class IBZDeptMemberResource {
.body(new PageImpl(ibzdeptmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzdeptmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateByIBZDepartment", tags = {"IBZDeptMember" }, notes = "UpdateByIBZDepartment") @ApiOperation(value = "根据部门更新部门成员", tags = {"部门成员" }, notes = "根据部门更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> updateByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> updateByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -172,7 +172,7 @@ public class IBZDeptMemberResource { ...@@ -172,7 +172,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateBatchByIBZDepartment", tags = {"IBZDeptMember" }, notes = "UpdateBatchByIBZDepartment") @ApiOperation(value = "根据部门批量更新部门成员", tags = {"部门成员" }, notes = "根据部门批量更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> updateBatchByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> updateBatchByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -184,7 +184,7 @@ public class IBZDeptMemberResource { ...@@ -184,7 +184,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "CreateByIBZDepartment", tags = {"IBZDeptMember" }, notes = "CreateByIBZDepartment") @ApiOperation(value = "根据部门建立部门成员", tags = {"部门成员" }, notes = "根据部门建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> createByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> createByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -196,7 +196,7 @@ public class IBZDeptMemberResource { ...@@ -196,7 +196,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "createBatchByIBZDepartment", tags = {"IBZDeptMember" }, notes = "createBatchByIBZDepartment") @ApiOperation(value = "根据部门批量建立部门成员", tags = {"部门成员" }, notes = "根据部门批量建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> createBatchByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> createBatchByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -208,7 +208,7 @@ public class IBZDeptMemberResource { ...@@ -208,7 +208,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveByIBZDepartment", tags = {"IBZDeptMember" }, notes = "SaveByIBZDepartment") @ApiOperation(value = "根据部门保存部门成员", tags = {"部门成员" }, notes = "根据部门保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/save")
public ResponseEntity<Boolean> saveByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> saveByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto); IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
...@@ -217,7 +217,7 @@ public class IBZDeptMemberResource { ...@@ -217,7 +217,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveBatchByIBZDepartment", tags = {"IBZDeptMember" }, notes = "SaveBatchByIBZDepartment") @ApiOperation(value = "根据部门批量保存部门成员", tags = {"部门成员" }, notes = "根据部门批量保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/savebatch")
public ResponseEntity<Boolean> saveBatchByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> saveBatchByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -228,7 +228,7 @@ public class IBZDeptMemberResource { ...@@ -228,7 +228,7 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "GetDraftByIBZDepartment", tags = {"IBZDeptMember" }, notes = "GetDraftByIBZDepartment") @ApiOperation(value = "根据部门获取部门成员草稿", tags = {"部门成员" }, notes = "根据部门获取部门成员草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/getdraft")
public ResponseEntity<IBZDeptMemberDTO> getDraftByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id) { public ResponseEntity<IBZDeptMemberDTO> getDraftByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id) {
IBZDeptMember domain = new IBZDeptMember(); IBZDeptMember domain = new IBZDeptMember();
...@@ -237,7 +237,7 @@ public class IBZDeptMemberResource { ...@@ -237,7 +237,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')")
@ApiOperation(value = "GetByIBZDepartment", tags = {"IBZDeptMember" }, notes = "GetByIBZDepartment") @ApiOperation(value = "根据部门获取部门成员", tags = {"部门成员" }, notes = "根据部门获取部门成员")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}")
public ResponseEntity<IBZDeptMemberDTO> getByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<IBZDeptMemberDTO> getByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id); IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id);
...@@ -246,7 +246,7 @@ public class IBZDeptMemberResource { ...@@ -246,7 +246,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveByIBZDepartment", tags = {"IBZDeptMember" }, notes = "RemoveByIBZDepartment") @ApiOperation(value = "根据部门删除部门成员", tags = {"部门成员" }, notes = "根据部门删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> removeByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<Boolean> removeByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
...@@ -254,21 +254,21 @@ public class IBZDeptMemberResource { ...@@ -254,21 +254,21 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveBatchByIBZDepartment", tags = {"IBZDeptMember" }, notes = "RemoveBatchByIBZDepartment") @ApiOperation(value = "根据部门批量删除部门成员", tags = {"部门成员" }, notes = "根据部门批量删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> removeBatchByIBZDepartment(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatchByIBZDepartment(@RequestBody List<String> ids) {
ibzdeptmemberService.removeBatch(ids); ibzdeptmemberService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKeyByIBZDepartment", tags = {"IBZDeptMember" }, notes = "CheckKeyByIBZDepartment") @ApiOperation(value = "根据部门检查部门成员", tags = {"部门成员" }, notes = "根据部门检查部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/checkkey")
public ResponseEntity<Boolean> checkKeyByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> checkKeyByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "fetchDEFAULTByIBZDepartment", tags = {"IBZDeptMember" } ,notes = "fetchDEFAULTByIBZDepartment") @ApiOperation(value = "根据部门获取DEFAULT", tags = {"部门成员" } ,notes = "根据部门获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/fetchdefault")
public ResponseEntity<List<IBZDeptMemberDTO>> fetchIBZDeptMemberDefaultByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id,IBZDeptMemberSearchContext context) { public ResponseEntity<List<IBZDeptMemberDTO>> fetchIBZDeptMemberDefaultByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id,IBZDeptMemberSearchContext context) {
context.setN_userid_eq(ibzdepartment_id); context.setN_userid_eq(ibzdepartment_id);
...@@ -282,7 +282,7 @@ public class IBZDeptMemberResource { ...@@ -282,7 +282,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "searchDEFAULTByIBZDepartment", tags = {"IBZDeptMember" } ,notes = "searchDEFAULTByIBZDepartment") @ApiOperation(value = "根据部门查询DEFAULT", tags = {"部门成员" } ,notes = "根据部门查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/searchdefault")
public ResponseEntity<Page<IBZDeptMemberDTO>> searchIBZDeptMemberDefaultByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberSearchContext context) { public ResponseEntity<Page<IBZDeptMemberDTO>> searchIBZDeptMemberDefaultByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberSearchContext context) {
context.setN_userid_eq(ibzdepartment_id); context.setN_userid_eq(ibzdepartment_id);
...@@ -291,7 +291,7 @@ public class IBZDeptMemberResource { ...@@ -291,7 +291,7 @@ public class IBZDeptMemberResource {
.body(new PageImpl(ibzdeptmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzdeptmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateByIBZEmployee", tags = {"IBZDeptMember" }, notes = "UpdateByIBZEmployee") @ApiOperation(value = "根据人员更新部门成员", tags = {"部门成员" }, notes = "根据人员更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> updateByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> updateByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -304,7 +304,7 @@ public class IBZDeptMemberResource { ...@@ -304,7 +304,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateBatchByIBZEmployee", tags = {"IBZDeptMember" }, notes = "UpdateBatchByIBZEmployee") @ApiOperation(value = "根据人员批量更新部门成员", tags = {"部门成员" }, notes = "根据人员批量更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> updateBatchByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> updateBatchByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -316,7 +316,7 @@ public class IBZDeptMemberResource { ...@@ -316,7 +316,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "CreateByIBZEmployee", tags = {"IBZDeptMember" }, notes = "CreateByIBZEmployee") @ApiOperation(value = "根据人员建立部门成员", tags = {"部门成员" }, notes = "根据人员建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> createByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> createByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -328,7 +328,7 @@ public class IBZDeptMemberResource { ...@@ -328,7 +328,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "createBatchByIBZEmployee", tags = {"IBZDeptMember" }, notes = "createBatchByIBZEmployee") @ApiOperation(value = "根据人员批量建立部门成员", tags = {"部门成员" }, notes = "根据人员批量建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> createBatchByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> createBatchByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -340,7 +340,7 @@ public class IBZDeptMemberResource { ...@@ -340,7 +340,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveByIBZEmployee", tags = {"IBZDeptMember" }, notes = "SaveByIBZEmployee") @ApiOperation(value = "根据人员保存部门成员", tags = {"部门成员" }, notes = "根据人员保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/save")
public ResponseEntity<Boolean> saveByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> saveByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto); IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
...@@ -349,7 +349,7 @@ public class IBZDeptMemberResource { ...@@ -349,7 +349,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveBatchByIBZEmployee", tags = {"IBZDeptMember" }, notes = "SaveBatchByIBZEmployee") @ApiOperation(value = "根据人员批量保存部门成员", tags = {"部门成员" }, notes = "根据人员批量保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/savebatch")
public ResponseEntity<Boolean> saveBatchByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> saveBatchByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -360,7 +360,7 @@ public class IBZDeptMemberResource { ...@@ -360,7 +360,7 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "GetDraftByIBZEmployee", tags = {"IBZDeptMember" }, notes = "GetDraftByIBZEmployee") @ApiOperation(value = "根据人员获取部门成员草稿", tags = {"部门成员" }, notes = "根据人员获取部门成员草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/getdraft")
public ResponseEntity<IBZDeptMemberDTO> getDraftByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<IBZDeptMemberDTO> getDraftByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id) {
IBZDeptMember domain = new IBZDeptMember(); IBZDeptMember domain = new IBZDeptMember();
...@@ -369,7 +369,7 @@ public class IBZDeptMemberResource { ...@@ -369,7 +369,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')")
@ApiOperation(value = "GetByIBZEmployee", tags = {"IBZDeptMember" }, notes = "GetByIBZEmployee") @ApiOperation(value = "根据人员获取部门成员", tags = {"部门成员" }, notes = "根据人员获取部门成员")
@RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
public ResponseEntity<IBZDeptMemberDTO> getByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<IBZDeptMemberDTO> getByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id); IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id);
...@@ -378,7 +378,7 @@ public class IBZDeptMemberResource { ...@@ -378,7 +378,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveByIBZEmployee", tags = {"IBZDeptMember" }, notes = "RemoveByIBZEmployee") @ApiOperation(value = "根据人员删除部门成员", tags = {"部门成员" }, notes = "根据人员删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> removeByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<Boolean> removeByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
...@@ -386,21 +386,21 @@ public class IBZDeptMemberResource { ...@@ -386,21 +386,21 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveBatchByIBZEmployee", tags = {"IBZDeptMember" }, notes = "RemoveBatchByIBZEmployee") @ApiOperation(value = "根据人员批量删除部门成员", tags = {"部门成员" }, notes = "根据人员批量删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> removeBatchByIBZEmployee(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatchByIBZEmployee(@RequestBody List<String> ids) {
ibzdeptmemberService.removeBatch(ids); ibzdeptmemberService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKeyByIBZEmployee", tags = {"IBZDeptMember" }, notes = "CheckKeyByIBZEmployee") @ApiOperation(value = "根据人员检查部门成员", tags = {"部门成员" }, notes = "根据人员检查部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/ibzdeptmembers/checkkey")
public ResponseEntity<Boolean> checkKeyByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> checkKeyByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "fetchDEFAULTByIBZEmployee", tags = {"IBZDeptMember" } ,notes = "fetchDEFAULTByIBZEmployee") @ApiOperation(value = "根据人员获取DEFAULT", tags = {"部门成员" } ,notes = "根据人员获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzemployees/{ibzemployee_id}/ibzdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzemployees/{ibzemployee_id}/ibzdeptmembers/fetchdefault")
public ResponseEntity<List<IBZDeptMemberDTO>> fetchIBZDeptMemberDefaultByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id,IBZDeptMemberSearchContext context) { public ResponseEntity<List<IBZDeptMemberDTO>> fetchIBZDeptMemberDefaultByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id,IBZDeptMemberSearchContext context) {
context.setN_userid_eq(ibzemployee_id); context.setN_userid_eq(ibzemployee_id);
...@@ -414,7 +414,7 @@ public class IBZDeptMemberResource { ...@@ -414,7 +414,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "searchDEFAULTByIBZEmployee", tags = {"IBZDeptMember" } ,notes = "searchDEFAULTByIBZEmployee") @ApiOperation(value = "根据人员查询DEFAULT", tags = {"部门成员" } ,notes = "根据人员查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzemployees/{ibzemployee_id}/ibzdeptmembers/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzemployees/{ibzemployee_id}/ibzdeptmembers/searchdefault")
public ResponseEntity<Page<IBZDeptMemberDTO>> searchIBZDeptMemberDefaultByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberSearchContext context) { public ResponseEntity<Page<IBZDeptMemberDTO>> searchIBZDeptMemberDefaultByIBZEmployee(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberSearchContext context) {
context.setN_userid_eq(ibzemployee_id); context.setN_userid_eq(ibzemployee_id);
...@@ -423,7 +423,7 @@ public class IBZDeptMemberResource { ...@@ -423,7 +423,7 @@ public class IBZDeptMemberResource {
.body(new PageImpl(ibzdeptmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzdeptmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "UpdateByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员更新部门成员", tags = {"部门成员" }, notes = "根据部门人员更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> updateByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> updateByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -436,7 +436,7 @@ public class IBZDeptMemberResource { ...@@ -436,7 +436,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateBatchByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "UpdateBatchByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员批量更新部门成员", tags = {"部门成员" }, notes = "根据部门人员批量更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> updateBatchByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> updateBatchByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -448,7 +448,7 @@ public class IBZDeptMemberResource { ...@@ -448,7 +448,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "CreateByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "CreateByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员建立部门成员", tags = {"部门成员" }, notes = "根据部门人员建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> createByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> createByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -460,7 +460,7 @@ public class IBZDeptMemberResource { ...@@ -460,7 +460,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "createBatchByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "createBatchByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员批量建立部门成员", tags = {"部门成员" }, notes = "根据部门人员批量建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> createBatchByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> createBatchByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -472,7 +472,7 @@ public class IBZDeptMemberResource { ...@@ -472,7 +472,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "SaveByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员保存部门成员", tags = {"部门成员" }, notes = "根据部门人员保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/save")
public ResponseEntity<Boolean> saveByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> saveByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto); IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
...@@ -481,7 +481,7 @@ public class IBZDeptMemberResource { ...@@ -481,7 +481,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveBatchByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "SaveBatchByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员批量保存部门成员", tags = {"部门成员" }, notes = "根据部门人员批量保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/savebatch")
public ResponseEntity<Boolean> saveBatchByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> saveBatchByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -492,7 +492,7 @@ public class IBZDeptMemberResource { ...@@ -492,7 +492,7 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "GetDraftByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "GetDraftByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员获取部门成员草稿", tags = {"部门成员" }, notes = "根据部门人员获取部门成员草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/getdraft")
public ResponseEntity<IBZDeptMemberDTO> getDraftByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<IBZDeptMemberDTO> getDraftByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) {
IBZDeptMember domain = new IBZDeptMember(); IBZDeptMember domain = new IBZDeptMember();
...@@ -501,7 +501,7 @@ public class IBZDeptMemberResource { ...@@ -501,7 +501,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')")
@ApiOperation(value = "GetByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "GetByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员获取部门成员", tags = {"部门成员" }, notes = "根据部门人员获取部门成员")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
public ResponseEntity<IBZDeptMemberDTO> getByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<IBZDeptMemberDTO> getByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id); IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id);
...@@ -510,7 +510,7 @@ public class IBZDeptMemberResource { ...@@ -510,7 +510,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "RemoveByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员删除部门成员", tags = {"部门成员" }, notes = "根据部门人员删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> removeByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<Boolean> removeByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
...@@ -518,21 +518,21 @@ public class IBZDeptMemberResource { ...@@ -518,21 +518,21 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveBatchByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "RemoveBatchByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员批量删除部门成员", tags = {"部门成员" }, notes = "根据部门人员批量删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> removeBatchByIBZDepartmentIBZEmployee(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatchByIBZDepartmentIBZEmployee(@RequestBody List<String> ids) {
ibzdeptmemberService.removeBatch(ids); ibzdeptmemberService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKeyByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "CheckKeyByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员检查部门成员", tags = {"部门成员" }, notes = "根据部门人员检查部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/checkkey")
public ResponseEntity<Boolean> checkKeyByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> checkKeyByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "fetchDEFAULTByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" } ,notes = "fetchDEFAULTByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员获取DEFAULT", tags = {"部门成员" } ,notes = "根据部门人员获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/fetchdefault")
public ResponseEntity<List<IBZDeptMemberDTO>> fetchIBZDeptMemberDefaultByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id,IBZDeptMemberSearchContext context) { public ResponseEntity<List<IBZDeptMemberDTO>> fetchIBZDeptMemberDefaultByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id,IBZDeptMemberSearchContext context) {
context.setN_userid_eq(ibzemployee_id); context.setN_userid_eq(ibzemployee_id);
...@@ -546,7 +546,7 @@ public class IBZDeptMemberResource { ...@@ -546,7 +546,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "searchDEFAULTByIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" } ,notes = "searchDEFAULTByIBZDepartmentIBZEmployee") @ApiOperation(value = "根据部门人员查询DEFAULT", tags = {"部门成员" } ,notes = "根据部门人员查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/searchdefault")
public ResponseEntity<Page<IBZDeptMemberDTO>> searchIBZDeptMemberDefaultByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberSearchContext context) { public ResponseEntity<Page<IBZDeptMemberDTO>> searchIBZDeptMemberDefaultByIBZDepartmentIBZEmployee(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberSearchContext context) {
context.setN_userid_eq(ibzemployee_id); context.setN_userid_eq(ibzemployee_id);
...@@ -555,7 +555,7 @@ public class IBZDeptMemberResource { ...@@ -555,7 +555,7 @@ public class IBZDeptMemberResource {
.body(new PageImpl(ibzdeptmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzdeptmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" }, notes = "UpdateByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门更新部门成员", tags = {"部门成员" }, notes = "根据单位机构部门更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> updateByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> updateByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -568,7 +568,7 @@ public class IBZDeptMemberResource { ...@@ -568,7 +568,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateBatchByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" }, notes = "UpdateBatchByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门批量更新部门成员", tags = {"部门成员" }, notes = "根据单位机构部门批量更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> updateBatchByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> updateBatchByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -580,7 +580,7 @@ public class IBZDeptMemberResource { ...@@ -580,7 +580,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "CreateByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" }, notes = "CreateByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门建立部门成员", tags = {"部门成员" }, notes = "根据单位机构部门建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> createByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> createByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -592,7 +592,7 @@ public class IBZDeptMemberResource { ...@@ -592,7 +592,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "createBatchByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" }, notes = "createBatchByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门批量建立部门成员", tags = {"部门成员" }, notes = "根据单位机构部门批量建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> createBatchByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> createBatchByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -604,7 +604,7 @@ public class IBZDeptMemberResource { ...@@ -604,7 +604,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" }, notes = "SaveByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门保存部门成员", tags = {"部门成员" }, notes = "根据单位机构部门保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/save")
public ResponseEntity<Boolean> saveByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> saveByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto); IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
...@@ -613,7 +613,7 @@ public class IBZDeptMemberResource { ...@@ -613,7 +613,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveBatchByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" }, notes = "SaveBatchByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门批量保存部门成员", tags = {"部门成员" }, notes = "根据单位机构部门批量保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/savebatch")
public ResponseEntity<Boolean> saveBatchByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> saveBatchByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -624,7 +624,7 @@ public class IBZDeptMemberResource { ...@@ -624,7 +624,7 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "GetDraftByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" }, notes = "GetDraftByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门获取部门成员草稿", tags = {"部门成员" }, notes = "根据单位机构部门获取部门成员草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/getdraft")
public ResponseEntity<IBZDeptMemberDTO> getDraftByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id) { public ResponseEntity<IBZDeptMemberDTO> getDraftByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id) {
IBZDeptMember domain = new IBZDeptMember(); IBZDeptMember domain = new IBZDeptMember();
...@@ -633,7 +633,7 @@ public class IBZDeptMemberResource { ...@@ -633,7 +633,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')")
@ApiOperation(value = "GetByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" }, notes = "GetByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门获取部门成员", tags = {"部门成员" }, notes = "根据单位机构部门获取部门成员")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}")
public ResponseEntity<IBZDeptMemberDTO> getByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<IBZDeptMemberDTO> getByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id); IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id);
...@@ -642,7 +642,7 @@ public class IBZDeptMemberResource { ...@@ -642,7 +642,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" }, notes = "RemoveByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门删除部门成员", tags = {"部门成员" }, notes = "根据单位机构部门删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> removeByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<Boolean> removeByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
...@@ -650,21 +650,21 @@ public class IBZDeptMemberResource { ...@@ -650,21 +650,21 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveBatchByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" }, notes = "RemoveBatchByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门批量删除部门成员", tags = {"部门成员" }, notes = "根据单位机构部门批量删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> removeBatchByIBZOrganizationIBZDepartment(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatchByIBZOrganizationIBZDepartment(@RequestBody List<String> ids) {
ibzdeptmemberService.removeBatch(ids); ibzdeptmemberService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKeyByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" }, notes = "CheckKeyByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门检查部门成员", tags = {"部门成员" }, notes = "根据单位机构部门检查部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/checkkey")
public ResponseEntity<Boolean> checkKeyByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> checkKeyByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "fetchDEFAULTByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" } ,notes = "fetchDEFAULTByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门获取DEFAULT", tags = {"部门成员" } ,notes = "根据单位机构部门获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/fetchdefault")
public ResponseEntity<List<IBZDeptMemberDTO>> fetchIBZDeptMemberDefaultByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id,IBZDeptMemberSearchContext context) { public ResponseEntity<List<IBZDeptMemberDTO>> fetchIBZDeptMemberDefaultByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id,IBZDeptMemberSearchContext context) {
context.setN_userid_eq(ibzdepartment_id); context.setN_userid_eq(ibzdepartment_id);
...@@ -678,7 +678,7 @@ public class IBZDeptMemberResource { ...@@ -678,7 +678,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "searchDEFAULTByIBZOrganizationIBZDepartment", tags = {"IBZDeptMember" } ,notes = "searchDEFAULTByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门查询DEFAULT", tags = {"部门成员" } ,notes = "根据单位机构部门查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzdeptmembers/searchdefault")
public ResponseEntity<Page<IBZDeptMemberDTO>> searchIBZDeptMemberDefaultByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberSearchContext context) { public ResponseEntity<Page<IBZDeptMemberDTO>> searchIBZDeptMemberDefaultByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZDeptMemberSearchContext context) {
context.setN_userid_eq(ibzdepartment_id); context.setN_userid_eq(ibzdepartment_id);
...@@ -687,7 +687,7 @@ public class IBZDeptMemberResource { ...@@ -687,7 +687,7 @@ public class IBZDeptMemberResource {
.body(new PageImpl(ibzdeptmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzdeptmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" }, notes = "UpdateByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员更新部门成员", tags = {"部门成员" }, notes = "根据单位机构人员更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> updateByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> updateByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -700,7 +700,7 @@ public class IBZDeptMemberResource { ...@@ -700,7 +700,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateBatchByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" }, notes = "UpdateBatchByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员批量更新部门成员", tags = {"部门成员" }, notes = "根据单位机构人员批量更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> updateBatchByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> updateBatchByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -712,7 +712,7 @@ public class IBZDeptMemberResource { ...@@ -712,7 +712,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "CreateByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" }, notes = "CreateByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员建立部门成员", tags = {"部门成员" }, notes = "根据单位机构人员建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> createByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> createByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -724,7 +724,7 @@ public class IBZDeptMemberResource { ...@@ -724,7 +724,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "createBatchByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" }, notes = "createBatchByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员批量建立部门成员", tags = {"部门成员" }, notes = "根据单位机构人员批量建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> createBatchByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> createBatchByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -736,7 +736,7 @@ public class IBZDeptMemberResource { ...@@ -736,7 +736,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" }, notes = "SaveByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员保存部门成员", tags = {"部门成员" }, notes = "根据单位机构人员保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/save")
public ResponseEntity<Boolean> saveByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> saveByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto); IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
...@@ -745,7 +745,7 @@ public class IBZDeptMemberResource { ...@@ -745,7 +745,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveBatchByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" }, notes = "SaveBatchByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员批量保存部门成员", tags = {"部门成员" }, notes = "根据单位机构人员批量保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/savebatch")
public ResponseEntity<Boolean> saveBatchByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> saveBatchByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -756,7 +756,7 @@ public class IBZDeptMemberResource { ...@@ -756,7 +756,7 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "GetDraftByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" }, notes = "GetDraftByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员获取部门成员草稿", tags = {"部门成员" }, notes = "根据单位机构人员获取部门成员草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/getdraft")
public ResponseEntity<IBZDeptMemberDTO> getDraftByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<IBZDeptMemberDTO> getDraftByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id) {
IBZDeptMember domain = new IBZDeptMember(); IBZDeptMember domain = new IBZDeptMember();
...@@ -765,7 +765,7 @@ public class IBZDeptMemberResource { ...@@ -765,7 +765,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')")
@ApiOperation(value = "GetByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" }, notes = "GetByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员获取部门成员", tags = {"部门成员" }, notes = "根据单位机构人员获取部门成员")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
public ResponseEntity<IBZDeptMemberDTO> getByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<IBZDeptMemberDTO> getByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id); IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id);
...@@ -774,7 +774,7 @@ public class IBZDeptMemberResource { ...@@ -774,7 +774,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" }, notes = "RemoveByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员删除部门成员", tags = {"部门成员" }, notes = "根据单位机构人员删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> removeByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<Boolean> removeByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
...@@ -782,21 +782,21 @@ public class IBZDeptMemberResource { ...@@ -782,21 +782,21 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveBatchByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" }, notes = "RemoveBatchByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员批量删除部门成员", tags = {"部门成员" }, notes = "根据单位机构人员批量删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> removeBatchByIBZOrganizationIBZEmployee(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatchByIBZOrganizationIBZEmployee(@RequestBody List<String> ids) {
ibzdeptmemberService.removeBatch(ids); ibzdeptmemberService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKeyByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" }, notes = "CheckKeyByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员检查部门成员", tags = {"部门成员" }, notes = "根据单位机构人员检查部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/checkkey")
public ResponseEntity<Boolean> checkKeyByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> checkKeyByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "fetchDEFAULTByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" } ,notes = "fetchDEFAULTByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员获取DEFAULT", tags = {"部门成员" } ,notes = "根据单位机构人员获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/fetchdefault")
public ResponseEntity<List<IBZDeptMemberDTO>> fetchIBZDeptMemberDefaultByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id,IBZDeptMemberSearchContext context) { public ResponseEntity<List<IBZDeptMemberDTO>> fetchIBZDeptMemberDefaultByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id,IBZDeptMemberSearchContext context) {
context.setN_userid_eq(ibzemployee_id); context.setN_userid_eq(ibzemployee_id);
...@@ -810,7 +810,7 @@ public class IBZDeptMemberResource { ...@@ -810,7 +810,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "searchDEFAULTByIBZOrganizationIBZEmployee", tags = {"IBZDeptMember" } ,notes = "searchDEFAULTByIBZOrganizationIBZEmployee") @ApiOperation(value = "根据单位机构人员查询DEFAULT", tags = {"部门成员" } ,notes = "根据单位机构人员查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/searchdefault")
public ResponseEntity<Page<IBZDeptMemberDTO>> searchIBZDeptMemberDefaultByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberSearchContext context) { public ResponseEntity<Page<IBZDeptMemberDTO>> searchIBZDeptMemberDefaultByIBZOrganizationIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberSearchContext context) {
context.setN_userid_eq(ibzemployee_id); context.setN_userid_eq(ibzemployee_id);
...@@ -819,7 +819,7 @@ public class IBZDeptMemberResource { ...@@ -819,7 +819,7 @@ public class IBZDeptMemberResource {
.body(new PageImpl(ibzdeptmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzdeptmemberMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "UpdateByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员更新部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> updateByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> updateByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -832,7 +832,7 @@ public class IBZDeptMemberResource { ...@@ -832,7 +832,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Update-all')")
@ApiOperation(value = "UpdateBatchByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "UpdateBatchByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员批量更新部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员批量更新部门成员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> updateBatchByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> updateBatchByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -844,7 +844,7 @@ public class IBZDeptMemberResource { ...@@ -844,7 +844,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "CreateByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "CreateByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员建立部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers")
@Transactional @Transactional
public ResponseEntity<IBZDeptMemberDTO> createByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<IBZDeptMemberDTO> createByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
...@@ -856,7 +856,7 @@ public class IBZDeptMemberResource { ...@@ -856,7 +856,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Create-all')")
@ApiOperation(value = "createBatchByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "createBatchByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员批量建立部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员批量建立部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> createBatchByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> createBatchByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -868,7 +868,7 @@ public class IBZDeptMemberResource { ...@@ -868,7 +868,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "SaveByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员保存部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/save")
public ResponseEntity<Boolean> saveByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> saveByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto); IBZDeptMember domain = ibzdeptmemberMapping.toDomain(ibzdeptmemberdto);
...@@ -877,7 +877,7 @@ public class IBZDeptMemberResource { ...@@ -877,7 +877,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Save-all')")
@ApiOperation(value = "SaveBatchByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "SaveBatchByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员批量保存部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员批量保存部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/savebatch")
public ResponseEntity<Boolean> saveBatchByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) { public ResponseEntity<Boolean> saveBatchByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody List<IBZDeptMemberDTO> ibzdeptmemberdtos) {
List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos); List<IBZDeptMember> domainlist=ibzdeptmemberMapping.toDomain(ibzdeptmemberdtos);
...@@ -888,7 +888,7 @@ public class IBZDeptMemberResource { ...@@ -888,7 +888,7 @@ public class IBZDeptMemberResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "GetDraftByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "GetDraftByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员获取部门成员草稿", tags = {"部门成员" }, notes = "根据单位机构部门人员获取部门成员草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/getdraft")
public ResponseEntity<IBZDeptMemberDTO> getDraftByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<IBZDeptMemberDTO> getDraftByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) {
IBZDeptMember domain = new IBZDeptMember(); IBZDeptMember domain = new IBZDeptMember();
...@@ -897,7 +897,7 @@ public class IBZDeptMemberResource { ...@@ -897,7 +897,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Get-all')")
@ApiOperation(value = "GetByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "GetByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员获取部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员获取部门成员")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
public ResponseEntity<IBZDeptMemberDTO> getByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<IBZDeptMemberDTO> getByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id); IBZDeptMember domain = ibzdeptmemberService.get(ibzdeptmember_id);
...@@ -906,7 +906,7 @@ public class IBZDeptMemberResource { ...@@ -906,7 +906,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "RemoveByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员删除部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/{ibzdeptmember_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> removeByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) { public ResponseEntity<Boolean> removeByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @PathVariable("ibzdeptmember_id") String ibzdeptmember_id) {
...@@ -914,21 +914,21 @@ public class IBZDeptMemberResource { ...@@ -914,21 +914,21 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Remove-all')")
@ApiOperation(value = "RemoveBatchByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "RemoveBatchByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员批量删除部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员批量删除部门成员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/batch")
public ResponseEntity<Boolean> removeBatchByIBZOrganizationIBZDepartmentIBZEmployee(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatchByIBZOrganizationIBZDepartmentIBZEmployee(@RequestBody List<String> ids) {
ibzdeptmemberService.removeBatch(ids); ibzdeptmemberService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKeyByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" }, notes = "CheckKeyByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员检查部门成员", tags = {"部门成员" }, notes = "根据单位机构部门人员检查部门成员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/checkkey")
public ResponseEntity<Boolean> checkKeyByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) { public ResponseEntity<Boolean> checkKeyByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberDTO ibzdeptmemberdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzdeptmemberService.checkKey(ibzdeptmemberMapping.toDomain(ibzdeptmemberdto)));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "fetchDEFAULTByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" } ,notes = "fetchDEFAULTByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员获取DEFAULT", tags = {"部门成员" } ,notes = "根据单位机构部门人员获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/fetchdefault")
public ResponseEntity<List<IBZDeptMemberDTO>> fetchIBZDeptMemberDefaultByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id,IBZDeptMemberSearchContext context) { public ResponseEntity<List<IBZDeptMemberDTO>> fetchIBZDeptMemberDefaultByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id,IBZDeptMemberSearchContext context) {
context.setN_userid_eq(ibzemployee_id); context.setN_userid_eq(ibzemployee_id);
...@@ -942,7 +942,7 @@ public class IBZDeptMemberResource { ...@@ -942,7 +942,7 @@ public class IBZDeptMemberResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZDeptMember-Default-all')")
@ApiOperation(value = "searchDEFAULTByIBZOrganizationIBZDepartmentIBZEmployee", tags = {"IBZDeptMember" } ,notes = "searchDEFAULTByIBZOrganizationIBZDepartmentIBZEmployee") @ApiOperation(value = "根据单位机构部门人员查询DEFAULT", tags = {"部门成员" } ,notes = "根据单位机构部门人员查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzdeptmembers/searchdefault")
public ResponseEntity<Page<IBZDeptMemberDTO>> searchIBZDeptMemberDefaultByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberSearchContext context) { public ResponseEntity<Page<IBZDeptMemberDTO>> searchIBZDeptMemberDefaultByIBZOrganizationIBZDepartmentIBZEmployee(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZDeptMemberSearchContext context) {
context.setN_userid_eq(ibzemployee_id); context.setN_userid_eq(ibzemployee_id);
......
...@@ -34,7 +34,7 @@ import cn.ibizlab.core.ou.service.IIBZEmployeeService; ...@@ -34,7 +34,7 @@ import cn.ibizlab.core.ou.service.IIBZEmployeeService;
import cn.ibizlab.core.ou.filter.IBZEmployeeSearchContext; import cn.ibizlab.core.ou.filter.IBZEmployeeSearchContext;
@Slf4j @Slf4j
@Api(tags = {"IBZEmployee" }) @Api(tags = {"人员" })
@RestController("api-ibzemployee") @RestController("api-ibzemployee")
@RequestMapping("") @RequestMapping("")
public class IBZEmployeeResource { public class IBZEmployeeResource {
...@@ -47,7 +47,7 @@ public class IBZEmployeeResource { ...@@ -47,7 +47,7 @@ public class IBZEmployeeResource {
public IBZEmployeeMapping ibzemployeeMapping; public IBZEmployeeMapping ibzemployeeMapping;
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Remove')") @PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Remove')")
@ApiOperation(value = "Remove", tags = {"IBZEmployee" }, notes = "Remove") @ApiOperation(value = "删除人员", tags = {"人员" }, notes = "删除人员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/{ibzemployee_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<Boolean> remove(@PathVariable("ibzemployee_id") String ibzemployee_id) {
...@@ -55,7 +55,7 @@ public class IBZEmployeeResource { ...@@ -55,7 +55,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByIds(#ids),'ibzou-IBZEmployee-Remove')") @PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByIds(#ids),'ibzou-IBZEmployee-Remove')")
@ApiOperation(value = "RemoveBatch", tags = {"IBZEmployee" }, notes = "RemoveBatch") @ApiOperation(value = "批量删除人员", tags = {"人员" }, notes = "批量删除人员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzemployees/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
ibzemployeeService.removeBatch(ids); ibzemployeeService.removeBatch(ids);
...@@ -63,7 +63,7 @@ public class IBZEmployeeResource { ...@@ -63,7 +63,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')")
@ApiOperation(value = "初始化密码", tags = {"IBZEmployee" }, notes = "初始化密码") @ApiOperation(value = "初始化密码", tags = {"人员" }, notes = "初始化密码")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/initpwd") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/{ibzemployee_id}/initpwd")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> initPwd(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> initPwd(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
...@@ -75,7 +75,7 @@ public class IBZEmployeeResource { ...@@ -75,7 +75,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Create')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Create')")
@ApiOperation(value = "Create", tags = {"IBZEmployee" }, notes = "Create") @ApiOperation(value = "新建人员", tags = {"人员" }, notes = "新建人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> create(@RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> create(@RequestBody IBZEmployeeDTO ibzemployeedto) {
...@@ -86,21 +86,21 @@ public class IBZEmployeeResource { ...@@ -86,21 +86,21 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Create')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Create')")
@ApiOperation(value = "createBatch", tags = {"IBZEmployee" }, notes = "createBatch") @ApiOperation(value = "批量新建人员", tags = {"人员" }, notes = "批量新建人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
ibzemployeeService.createBatch(ibzemployeeMapping.toDomain(ibzemployeedtos)); ibzemployeeService.createBatch(ibzemployeeMapping.toDomain(ibzemployeedtos));
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKey", tags = {"IBZEmployee" }, notes = "CheckKey") @ApiOperation(value = "检查人员", tags = {"人员" }, notes = "检查人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<Boolean> checkKey(@RequestBody IBZEmployeeDTO ibzemployeedto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.checkKey(ibzemployeeMapping.toDomain(ibzemployeedto))); return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.checkKey(ibzemployeeMapping.toDomain(ibzemployeedto)));
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Update')") @PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Update')")
@ApiOperation(value = "Update", tags = {"IBZEmployee" }, notes = "Update") @ApiOperation(value = "更新人员", tags = {"人员" }, notes = "更新人员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/{ibzemployee_id}")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> update(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> update(@PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
...@@ -112,7 +112,7 @@ public class IBZEmployeeResource { ...@@ -112,7 +112,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByEntities(this.ibzemployeeMapping.toDomain(#ibzemployeedtos)),'ibzou-IBZEmployee-Update')") @PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByEntities(this.ibzemployeeMapping.toDomain(#ibzemployeedtos)),'ibzou-IBZEmployee-Update')")
@ApiOperation(value = "UpdateBatch", tags = {"IBZEmployee" }, notes = "UpdateBatch") @ApiOperation(value = "批量更新人员", tags = {"人员" }, notes = "批量更新人员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzemployees/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
ibzemployeeService.updateBatch(ibzemployeeMapping.toDomain(ibzemployeedtos)); ibzemployeeService.updateBatch(ibzemployeeMapping.toDomain(ibzemployeedtos));
...@@ -120,14 +120,14 @@ public class IBZEmployeeResource { ...@@ -120,14 +120,14 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Save')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Save')")
@ApiOperation(value = "Save", tags = {"IBZEmployee" }, notes = "Save") @ApiOperation(value = "保存人员", tags = {"人员" }, notes = "保存人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/save")
public ResponseEntity<Boolean> save(@RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<Boolean> save(@RequestBody IBZEmployeeDTO ibzemployeedto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.save(ibzemployeeMapping.toDomain(ibzemployeedto))); return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.save(ibzemployeeMapping.toDomain(ibzemployeedto)));
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Save')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Save')")
@ApiOperation(value = "SaveBatch", tags = {"IBZEmployee" }, notes = "SaveBatch") @ApiOperation(value = "批量保存人员", tags = {"人员" }, notes = "批量保存人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzemployees/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
ibzemployeeService.saveBatch(ibzemployeeMapping.toDomain(ibzemployeedtos)); ibzemployeeService.saveBatch(ibzemployeeMapping.toDomain(ibzemployeedtos));
...@@ -135,7 +135,7 @@ public class IBZEmployeeResource { ...@@ -135,7 +135,7 @@ public class IBZEmployeeResource {
} }
@PostAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(returnObject.body),'ibzou-IBZEmployee-Get')") @PostAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(returnObject.body),'ibzou-IBZEmployee-Get')")
@ApiOperation(value = "Get", tags = {"IBZEmployee" }, notes = "Get") @ApiOperation(value = "获取人员", tags = {"人员" }, notes = "获取人员")
@RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/{ibzemployee_id}")
public ResponseEntity<IBZEmployeeDTO> get(@PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<IBZEmployeeDTO> get(@PathVariable("ibzemployee_id") String ibzemployee_id) {
IBZEmployee domain = ibzemployeeService.get(ibzemployee_id); IBZEmployee domain = ibzemployeeService.get(ibzemployee_id);
...@@ -143,14 +143,14 @@ public class IBZEmployeeResource { ...@@ -143,14 +143,14 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "GetDraft", tags = {"IBZEmployee" }, notes = "GetDraft") @ApiOperation(value = "获取人员草稿", tags = {"人员" }, notes = "获取人员草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzemployees/getdraft")
public ResponseEntity<IBZEmployeeDTO> getDraft() { public ResponseEntity<IBZEmployeeDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeMapping.toDto(ibzemployeeService.getDraft(new IBZEmployee()))); return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeMapping.toDto(ibzemployeeService.getDraft(new IBZEmployee())));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZEmployee" } ,notes = "fetchDEFAULT") @ApiOperation(value = "获取DEFAULT", tags = {"人员" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzemployees/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzemployees/fetchdefault")
public ResponseEntity<List<IBZEmployeeDTO>> fetchDefault(IBZEmployeeSearchContext context) { public ResponseEntity<List<IBZEmployeeDTO>> fetchDefault(IBZEmployeeSearchContext context) {
Page<IBZEmployee> domains = ibzemployeeService.searchDefault(context) ; Page<IBZEmployee> domains = ibzemployeeService.searchDefault(context) ;
...@@ -163,7 +163,7 @@ public class IBZEmployeeResource { ...@@ -163,7 +163,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZEmployee" } ,notes = "searchDEFAULT") @ApiOperation(value = "查询DEFAULT", tags = {"人员" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzemployees/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzemployees/searchdefault")
public ResponseEntity<Page<IBZEmployeeDTO>> searchDefault(@RequestBody IBZEmployeeSearchContext context) { public ResponseEntity<Page<IBZEmployeeDTO>> searchDefault(@RequestBody IBZEmployeeSearchContext context) {
Page<IBZEmployee> domains = ibzemployeeService.searchDefault(context) ; Page<IBZEmployee> domains = ibzemployeeService.searchDefault(context) ;
...@@ -171,7 +171,7 @@ public class IBZEmployeeResource { ...@@ -171,7 +171,7 @@ public class IBZEmployeeResource {
.body(new PageImpl(ibzemployeeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzemployeeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Remove')") @PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Remove')")
@ApiOperation(value = "RemoveByIBZDepartment", tags = {"IBZEmployee" }, notes = "RemoveByIBZDepartment") @ApiOperation(value = "根据部门删除人员", tags = {"人员" }, notes = "根据部门删除人员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> removeByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<Boolean> removeByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) {
...@@ -179,7 +179,7 @@ public class IBZEmployeeResource { ...@@ -179,7 +179,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByIds(#ids),'ibzou-IBZEmployee-Remove')") @PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByIds(#ids),'ibzou-IBZEmployee-Remove')")
@ApiOperation(value = "RemoveBatchByIBZDepartment", tags = {"IBZEmployee" }, notes = "RemoveBatchByIBZDepartment") @ApiOperation(value = "根据部门批量删除人员", tags = {"人员" }, notes = "根据部门批量删除人员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/batch")
public ResponseEntity<Boolean> removeBatchByIBZDepartment(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatchByIBZDepartment(@RequestBody List<String> ids) {
ibzemployeeService.removeBatch(ids); ibzemployeeService.removeBatch(ids);
...@@ -187,7 +187,7 @@ public class IBZEmployeeResource { ...@@ -187,7 +187,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')")
@ApiOperation(value = "初始化密码ByIBZDepartment", tags = {"IBZEmployee" }, notes = "初始化密码ByIBZDepartment") @ApiOperation(value = "根据部门人员", tags = {"人员" }, notes = "根据部门人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/initpwd") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/initpwd")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> initPwdByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> initPwdByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
...@@ -199,7 +199,7 @@ public class IBZEmployeeResource { ...@@ -199,7 +199,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Create')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Create')")
@ApiOperation(value = "CreateByIBZDepartment", tags = {"IBZEmployee" }, notes = "CreateByIBZDepartment") @ApiOperation(value = "根据部门建立人员", tags = {"人员" }, notes = "根据部门建立人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> createByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> createByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
...@@ -211,7 +211,7 @@ public class IBZEmployeeResource { ...@@ -211,7 +211,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Create')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Create')")
@ApiOperation(value = "createBatchByIBZDepartment", tags = {"IBZEmployee" }, notes = "createBatchByIBZDepartment") @ApiOperation(value = "根据部门批量建立人员", tags = {"人员" }, notes = "根据部门批量建立人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/batch")
public ResponseEntity<Boolean> createBatchByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> createBatchByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos); List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos);
...@@ -222,14 +222,14 @@ public class IBZEmployeeResource { ...@@ -222,14 +222,14 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKeyByIBZDepartment", tags = {"IBZEmployee" }, notes = "CheckKeyByIBZDepartment") @ApiOperation(value = "根据部门检查人员", tags = {"人员" }, notes = "根据部门检查人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/checkkey")
public ResponseEntity<Boolean> checkKeyByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<Boolean> checkKeyByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.checkKey(ibzemployeeMapping.toDomain(ibzemployeedto))); return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.checkKey(ibzemployeeMapping.toDomain(ibzemployeedto)));
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Update')") @PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Update')")
@ApiOperation(value = "UpdateByIBZDepartment", tags = {"IBZEmployee" }, notes = "UpdateByIBZDepartment") @ApiOperation(value = "根据部门更新人员", tags = {"人员" }, notes = "根据部门更新人员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> updateByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> updateByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
...@@ -242,7 +242,7 @@ public class IBZEmployeeResource { ...@@ -242,7 +242,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByEntities(this.ibzemployeeMapping.toDomain(#ibzemployeedtos)),'ibzou-IBZEmployee-Update')") @PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByEntities(this.ibzemployeeMapping.toDomain(#ibzemployeedtos)),'ibzou-IBZEmployee-Update')")
@ApiOperation(value = "UpdateBatchByIBZDepartment", tags = {"IBZEmployee" }, notes = "UpdateBatchByIBZDepartment") @ApiOperation(value = "根据部门批量更新人员", tags = {"人员" }, notes = "根据部门批量更新人员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/batch")
public ResponseEntity<Boolean> updateBatchByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> updateBatchByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos); List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos);
...@@ -254,7 +254,7 @@ public class IBZEmployeeResource { ...@@ -254,7 +254,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Save')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Save')")
@ApiOperation(value = "SaveByIBZDepartment", tags = {"IBZEmployee" }, notes = "SaveByIBZDepartment") @ApiOperation(value = "根据部门保存人员", tags = {"人员" }, notes = "根据部门保存人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/save")
public ResponseEntity<Boolean> saveByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<Boolean> saveByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto); IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
...@@ -263,7 +263,7 @@ public class IBZEmployeeResource { ...@@ -263,7 +263,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Save')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Save')")
@ApiOperation(value = "SaveBatchByIBZDepartment", tags = {"IBZEmployee" }, notes = "SaveBatchByIBZDepartment") @ApiOperation(value = "根据部门批量保存人员", tags = {"人员" }, notes = "根据部门批量保存人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/savebatch")
public ResponseEntity<Boolean> saveBatchByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> saveBatchByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos); List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos);
...@@ -275,7 +275,7 @@ public class IBZEmployeeResource { ...@@ -275,7 +275,7 @@ public class IBZEmployeeResource {
} }
@PostAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(returnObject.body),'ibzou-IBZEmployee-Get')") @PostAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(returnObject.body),'ibzou-IBZEmployee-Get')")
@ApiOperation(value = "GetByIBZDepartment", tags = {"IBZEmployee" }, notes = "GetByIBZDepartment") @ApiOperation(value = "根据部门获取人员", tags = {"人员" }, notes = "根据部门获取人员")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}")
public ResponseEntity<IBZEmployeeDTO> getByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<IBZEmployeeDTO> getByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) {
IBZEmployee domain = ibzemployeeService.get(ibzemployee_id); IBZEmployee domain = ibzemployeeService.get(ibzemployee_id);
...@@ -283,7 +283,7 @@ public class IBZEmployeeResource { ...@@ -283,7 +283,7 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "GetDraftByIBZDepartment", tags = {"IBZEmployee" }, notes = "GetDraftByIBZDepartment") @ApiOperation(value = "根据部门获取人员草稿", tags = {"人员" }, notes = "根据部门获取人员草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzdepartments/{ibzdepartment_id}/ibzemployees/getdraft")
public ResponseEntity<IBZEmployeeDTO> getDraftByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id) { public ResponseEntity<IBZEmployeeDTO> getDraftByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id) {
IBZEmployee domain = new IBZEmployee(); IBZEmployee domain = new IBZEmployee();
...@@ -292,7 +292,7 @@ public class IBZEmployeeResource { ...@@ -292,7 +292,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')")
@ApiOperation(value = "fetchDEFAULTByIBZDepartment", tags = {"IBZEmployee" } ,notes = "fetchDEFAULTByIBZDepartment") @ApiOperation(value = "根据部门获取DEFAULT", tags = {"人员" } ,notes = "根据部门获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/{ibzdepartment_id}/ibzemployees/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzdepartments/{ibzdepartment_id}/ibzemployees/fetchdefault")
public ResponseEntity<List<IBZEmployeeDTO>> fetchIBZEmployeeDefaultByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id,IBZEmployeeSearchContext context) { public ResponseEntity<List<IBZEmployeeDTO>> fetchIBZEmployeeDefaultByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id,IBZEmployeeSearchContext context) {
context.setN_mdeptid_eq(ibzdepartment_id); context.setN_mdeptid_eq(ibzdepartment_id);
...@@ -306,7 +306,7 @@ public class IBZEmployeeResource { ...@@ -306,7 +306,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')")
@ApiOperation(value = "searchDEFAULTByIBZDepartment", tags = {"IBZEmployee" } ,notes = "searchDEFAULTByIBZDepartment") @ApiOperation(value = "根据部门查询DEFAULT", tags = {"人员" } ,notes = "根据部门查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/{ibzdepartment_id}/ibzemployees/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzdepartments/{ibzdepartment_id}/ibzemployees/searchdefault")
public ResponseEntity<Page<IBZEmployeeDTO>> searchIBZEmployeeDefaultByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeSearchContext context) { public ResponseEntity<Page<IBZEmployeeDTO>> searchIBZEmployeeDefaultByIBZDepartment(@PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeSearchContext context) {
context.setN_mdeptid_eq(ibzdepartment_id); context.setN_mdeptid_eq(ibzdepartment_id);
...@@ -315,7 +315,7 @@ public class IBZEmployeeResource { ...@@ -315,7 +315,7 @@ public class IBZEmployeeResource {
.body(new PageImpl(ibzemployeeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzemployeeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Remove')") @PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Remove')")
@ApiOperation(value = "RemoveByIBZOrganization", tags = {"IBZEmployee" }, notes = "RemoveByIBZOrganization") @ApiOperation(value = "根据单位机构删除人员", tags = {"人员" }, notes = "根据单位机构删除人员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> removeByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<Boolean> removeByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id) {
...@@ -323,7 +323,7 @@ public class IBZEmployeeResource { ...@@ -323,7 +323,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByIds(#ids),'ibzou-IBZEmployee-Remove')") @PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByIds(#ids),'ibzou-IBZEmployee-Remove')")
@ApiOperation(value = "RemoveBatchByIBZOrganization", tags = {"IBZEmployee" }, notes = "RemoveBatchByIBZOrganization") @ApiOperation(value = "根据单位机构批量删除人员", tags = {"人员" }, notes = "根据单位机构批量删除人员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/batch")
public ResponseEntity<Boolean> removeBatchByIBZOrganization(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatchByIBZOrganization(@RequestBody List<String> ids) {
ibzemployeeService.removeBatch(ids); ibzemployeeService.removeBatch(ids);
...@@ -331,7 +331,7 @@ public class IBZEmployeeResource { ...@@ -331,7 +331,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')")
@ApiOperation(value = "初始化密码ByIBZOrganization", tags = {"IBZEmployee" }, notes = "初始化密码ByIBZOrganization") @ApiOperation(value = "根据单位机构人员", tags = {"人员" }, notes = "根据单位机构人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/initpwd") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/initpwd")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> initPwdByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> initPwdByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
...@@ -343,7 +343,7 @@ public class IBZEmployeeResource { ...@@ -343,7 +343,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Create')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Create')")
@ApiOperation(value = "CreateByIBZOrganization", tags = {"IBZEmployee" }, notes = "CreateByIBZOrganization") @ApiOperation(value = "根据单位机构建立人员", tags = {"人员" }, notes = "根据单位机构建立人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> createByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> createByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
...@@ -355,7 +355,7 @@ public class IBZEmployeeResource { ...@@ -355,7 +355,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Create')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Create')")
@ApiOperation(value = "createBatchByIBZOrganization", tags = {"IBZEmployee" }, notes = "createBatchByIBZOrganization") @ApiOperation(value = "根据单位机构批量建立人员", tags = {"人员" }, notes = "根据单位机构批量建立人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/batch")
public ResponseEntity<Boolean> createBatchByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> createBatchByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos); List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos);
...@@ -366,14 +366,14 @@ public class IBZEmployeeResource { ...@@ -366,14 +366,14 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKeyByIBZOrganization", tags = {"IBZEmployee" }, notes = "CheckKeyByIBZOrganization") @ApiOperation(value = "根据单位机构检查人员", tags = {"人员" }, notes = "根据单位机构检查人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/checkkey")
public ResponseEntity<Boolean> checkKeyByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<Boolean> checkKeyByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.checkKey(ibzemployeeMapping.toDomain(ibzemployeedto))); return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.checkKey(ibzemployeeMapping.toDomain(ibzemployeedto)));
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Update')") @PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Update')")
@ApiOperation(value = "UpdateByIBZOrganization", tags = {"IBZEmployee" }, notes = "UpdateByIBZOrganization") @ApiOperation(value = "根据单位机构更新人员", tags = {"人员" }, notes = "根据单位机构更新人员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> updateByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> updateByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
...@@ -386,7 +386,7 @@ public class IBZEmployeeResource { ...@@ -386,7 +386,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByEntities(this.ibzemployeeMapping.toDomain(#ibzemployeedtos)),'ibzou-IBZEmployee-Update')") @PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByEntities(this.ibzemployeeMapping.toDomain(#ibzemployeedtos)),'ibzou-IBZEmployee-Update')")
@ApiOperation(value = "UpdateBatchByIBZOrganization", tags = {"IBZEmployee" }, notes = "UpdateBatchByIBZOrganization") @ApiOperation(value = "根据单位机构批量更新人员", tags = {"人员" }, notes = "根据单位机构批量更新人员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/batch")
public ResponseEntity<Boolean> updateBatchByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> updateBatchByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos); List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos);
...@@ -398,7 +398,7 @@ public class IBZEmployeeResource { ...@@ -398,7 +398,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Save')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Save')")
@ApiOperation(value = "SaveByIBZOrganization", tags = {"IBZEmployee" }, notes = "SaveByIBZOrganization") @ApiOperation(value = "根据单位机构保存人员", tags = {"人员" }, notes = "根据单位机构保存人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/save")
public ResponseEntity<Boolean> saveByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<Boolean> saveByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto); IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
...@@ -407,7 +407,7 @@ public class IBZEmployeeResource { ...@@ -407,7 +407,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Save')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Save')")
@ApiOperation(value = "SaveBatchByIBZOrganization", tags = {"IBZEmployee" }, notes = "SaveBatchByIBZOrganization") @ApiOperation(value = "根据单位机构批量保存人员", tags = {"人员" }, notes = "根据单位机构批量保存人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/savebatch")
public ResponseEntity<Boolean> saveBatchByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> saveBatchByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos); List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos);
...@@ -419,7 +419,7 @@ public class IBZEmployeeResource { ...@@ -419,7 +419,7 @@ public class IBZEmployeeResource {
} }
@PostAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(returnObject.body),'ibzou-IBZEmployee-Get')") @PostAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(returnObject.body),'ibzou-IBZEmployee-Get')")
@ApiOperation(value = "GetByIBZOrganization", tags = {"IBZEmployee" }, notes = "GetByIBZOrganization") @ApiOperation(value = "根据单位机构获取人员", tags = {"人员" }, notes = "根据单位机构获取人员")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}")
public ResponseEntity<IBZEmployeeDTO> getByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<IBZEmployeeDTO> getByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzemployee_id") String ibzemployee_id) {
IBZEmployee domain = ibzemployeeService.get(ibzemployee_id); IBZEmployee domain = ibzemployeeService.get(ibzemployee_id);
...@@ -427,7 +427,7 @@ public class IBZEmployeeResource { ...@@ -427,7 +427,7 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "GetDraftByIBZOrganization", tags = {"IBZEmployee" }, notes = "GetDraftByIBZOrganization") @ApiOperation(value = "根据单位机构获取人员草稿", tags = {"人员" }, notes = "根据单位机构获取人员草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzemployees/getdraft")
public ResponseEntity<IBZEmployeeDTO> getDraftByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id) { public ResponseEntity<IBZEmployeeDTO> getDraftByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id) {
IBZEmployee domain = new IBZEmployee(); IBZEmployee domain = new IBZEmployee();
...@@ -436,7 +436,7 @@ public class IBZEmployeeResource { ...@@ -436,7 +436,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')")
@ApiOperation(value = "fetchDEFAULTByIBZOrganization", tags = {"IBZEmployee" } ,notes = "fetchDEFAULTByIBZOrganization") @ApiOperation(value = "根据单位机构获取DEFAULT", tags = {"人员" } ,notes = "根据单位机构获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzemployees/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzemployees/fetchdefault")
public ResponseEntity<List<IBZEmployeeDTO>> fetchIBZEmployeeDefaultByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id,IBZEmployeeSearchContext context) { public ResponseEntity<List<IBZEmployeeDTO>> fetchIBZEmployeeDefaultByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id,IBZEmployeeSearchContext context) {
context.setN_orgid_eq(ibzorganization_id); context.setN_orgid_eq(ibzorganization_id);
...@@ -450,7 +450,7 @@ public class IBZEmployeeResource { ...@@ -450,7 +450,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')")
@ApiOperation(value = "searchDEFAULTByIBZOrganization", tags = {"IBZEmployee" } ,notes = "searchDEFAULTByIBZOrganization") @ApiOperation(value = "根据单位机构查询DEFAULT", tags = {"人员" } ,notes = "根据单位机构查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzemployees/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzemployees/searchdefault")
public ResponseEntity<Page<IBZEmployeeDTO>> searchIBZEmployeeDefaultByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZEmployeeSearchContext context) { public ResponseEntity<Page<IBZEmployeeDTO>> searchIBZEmployeeDefaultByIBZOrganization(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZEmployeeSearchContext context) {
context.setN_orgid_eq(ibzorganization_id); context.setN_orgid_eq(ibzorganization_id);
...@@ -459,7 +459,7 @@ public class IBZEmployeeResource { ...@@ -459,7 +459,7 @@ public class IBZEmployeeResource {
.body(new PageImpl(ibzemployeeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzemployeeMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Remove')") @PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Remove')")
@ApiOperation(value = "RemoveByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "RemoveByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门删除人员", tags = {"人员" }, notes = "根据单位机构部门删除人员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> removeByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<Boolean> removeByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) {
...@@ -467,7 +467,7 @@ public class IBZEmployeeResource { ...@@ -467,7 +467,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByIds(#ids),'ibzou-IBZEmployee-Remove')") @PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByIds(#ids),'ibzou-IBZEmployee-Remove')")
@ApiOperation(value = "RemoveBatchByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "RemoveBatchByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门批量删除人员", tags = {"人员" }, notes = "根据单位机构部门批量删除人员")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/batch")
public ResponseEntity<Boolean> removeBatchByIBZOrganizationIBZDepartment(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatchByIBZOrganizationIBZDepartment(@RequestBody List<String> ids) {
ibzemployeeService.removeBatch(ids); ibzemployeeService.removeBatch(ids);
...@@ -475,7 +475,7 @@ public class IBZEmployeeResource { ...@@ -475,7 +475,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-InitPwd-all')")
@ApiOperation(value = "初始化密码ByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "初始化密码ByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门人员", tags = {"人员" }, notes = "根据单位机构部门人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/initpwd") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/initpwd")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> initPwdByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> initPwdByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
...@@ -487,7 +487,7 @@ public class IBZEmployeeResource { ...@@ -487,7 +487,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Create')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Create')")
@ApiOperation(value = "CreateByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "CreateByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门建立人员", tags = {"人员" }, notes = "根据单位机构部门建立人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> createByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> createByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
...@@ -499,7 +499,7 @@ public class IBZEmployeeResource { ...@@ -499,7 +499,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Create')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Create')")
@ApiOperation(value = "createBatchByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "createBatchByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门批量建立人员", tags = {"人员" }, notes = "根据单位机构部门批量建立人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/batch")
public ResponseEntity<Boolean> createBatchByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> createBatchByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos); List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos);
...@@ -510,14 +510,14 @@ public class IBZEmployeeResource { ...@@ -510,14 +510,14 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(true); return ResponseEntity.status(HttpStatus.OK).body(true);
} }
@ApiOperation(value = "CheckKeyByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "CheckKeyByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门检查人员", tags = {"人员" }, notes = "根据单位机构部门检查人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/checkkey")
public ResponseEntity<Boolean> checkKeyByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<Boolean> checkKeyByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.checkKey(ibzemployeeMapping.toDomain(ibzemployeedto))); return ResponseEntity.status(HttpStatus.OK).body(ibzemployeeService.checkKey(ibzemployeeMapping.toDomain(ibzemployeedto)));
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Update')") @PreAuthorize("hasPermission(this.ibzemployeeService.get(#ibzemployee_id),'ibzou-IBZEmployee-Update')")
@ApiOperation(value = "UpdateByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "UpdateByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门更新人员", tags = {"人员" }, notes = "根据单位机构部门更新人员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}")
@Transactional @Transactional
public ResponseEntity<IBZEmployeeDTO> updateByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<IBZEmployeeDTO> updateByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
...@@ -530,7 +530,7 @@ public class IBZEmployeeResource { ...@@ -530,7 +530,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByEntities(this.ibzemployeeMapping.toDomain(#ibzemployeedtos)),'ibzou-IBZEmployee-Update')") @PreAuthorize("hasPermission(this.ibzemployeeService.getIbzemployeeByEntities(this.ibzemployeeMapping.toDomain(#ibzemployeedtos)),'ibzou-IBZEmployee-Update')")
@ApiOperation(value = "UpdateBatchByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "UpdateBatchByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门批量更新人员", tags = {"人员" }, notes = "根据单位机构部门批量更新人员")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/batch")
public ResponseEntity<Boolean> updateBatchByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> updateBatchByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos); List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos);
...@@ -542,7 +542,7 @@ public class IBZEmployeeResource { ...@@ -542,7 +542,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Save')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedto),'ibzou-IBZEmployee-Save')")
@ApiOperation(value = "SaveByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "SaveByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门保存人员", tags = {"人员" }, notes = "根据单位机构部门保存人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/save")
public ResponseEntity<Boolean> saveByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) { public ResponseEntity<Boolean> saveByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeDTO ibzemployeedto) {
IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto); IBZEmployee domain = ibzemployeeMapping.toDomain(ibzemployeedto);
...@@ -551,7 +551,7 @@ public class IBZEmployeeResource { ...@@ -551,7 +551,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Save')") @PreAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(#ibzemployeedtos),'ibzou-IBZEmployee-Save')")
@ApiOperation(value = "SaveBatchByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "SaveBatchByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门批量保存人员", tags = {"人员" }, notes = "根据单位机构部门批量保存人员")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/savebatch")
public ResponseEntity<Boolean> saveBatchByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) { public ResponseEntity<Boolean> saveBatchByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody List<IBZEmployeeDTO> ibzemployeedtos) {
List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos); List<IBZEmployee> domainlist=ibzemployeeMapping.toDomain(ibzemployeedtos);
...@@ -563,7 +563,7 @@ public class IBZEmployeeResource { ...@@ -563,7 +563,7 @@ public class IBZEmployeeResource {
} }
@PostAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(returnObject.body),'ibzou-IBZEmployee-Get')") @PostAuthorize("hasPermission(this.ibzemployeeMapping.toDomain(returnObject.body),'ibzou-IBZEmployee-Get')")
@ApiOperation(value = "GetByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "GetByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门获取人员", tags = {"人员" }, notes = "根据单位机构部门获取人员")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}")
public ResponseEntity<IBZEmployeeDTO> getByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) { public ResponseEntity<IBZEmployeeDTO> getByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @PathVariable("ibzemployee_id") String ibzemployee_id) {
IBZEmployee domain = ibzemployeeService.get(ibzemployee_id); IBZEmployee domain = ibzemployeeService.get(ibzemployee_id);
...@@ -571,7 +571,7 @@ public class IBZEmployeeResource { ...@@ -571,7 +571,7 @@ public class IBZEmployeeResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "GetDraftByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" }, notes = "GetDraftByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门获取人员草稿", tags = {"人员" }, notes = "根据单位机构部门获取人员草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/getdraft")
public ResponseEntity<IBZEmployeeDTO> getDraftByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id) { public ResponseEntity<IBZEmployeeDTO> getDraftByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id) {
IBZEmployee domain = new IBZEmployee(); IBZEmployee domain = new IBZEmployee();
...@@ -580,7 +580,7 @@ public class IBZEmployeeResource { ...@@ -580,7 +580,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')")
@ApiOperation(value = "fetchDEFAULTByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" } ,notes = "fetchDEFAULTByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门获取DEFAULT", tags = {"人员" } ,notes = "根据单位机构部门获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/fetchdefault")
public ResponseEntity<List<IBZEmployeeDTO>> fetchIBZEmployeeDefaultByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id,IBZEmployeeSearchContext context) { public ResponseEntity<List<IBZEmployeeDTO>> fetchIBZEmployeeDefaultByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id,IBZEmployeeSearchContext context) {
context.setN_mdeptid_eq(ibzdepartment_id); context.setN_mdeptid_eq(ibzdepartment_id);
...@@ -594,7 +594,7 @@ public class IBZEmployeeResource { ...@@ -594,7 +594,7 @@ public class IBZEmployeeResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZEmployee-Default-all')")
@ApiOperation(value = "searchDEFAULTByIBZOrganizationIBZDepartment", tags = {"IBZEmployee" } ,notes = "searchDEFAULTByIBZOrganizationIBZDepartment") @ApiOperation(value = "根据单位机构部门查询DEFAULT", tags = {"人员" } ,notes = "根据单位机构部门查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/searchdefault")
public ResponseEntity<Page<IBZEmployeeDTO>> searchIBZEmployeeDefaultByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeSearchContext context) { public ResponseEntity<Page<IBZEmployeeDTO>> searchIBZEmployeeDefaultByIBZOrganizationIBZDepartment(@PathVariable("ibzorganization_id") String ibzorganization_id, @PathVariable("ibzdepartment_id") String ibzdepartment_id, @RequestBody IBZEmployeeSearchContext context) {
context.setN_mdeptid_eq(ibzdepartment_id); context.setN_mdeptid_eq(ibzdepartment_id);
......
...@@ -34,7 +34,7 @@ import cn.ibizlab.core.ou.service.IIBZOrganizationService; ...@@ -34,7 +34,7 @@ import cn.ibizlab.core.ou.service.IIBZOrganizationService;
import cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext; import cn.ibizlab.core.ou.filter.IBZOrganizationSearchContext;
@Slf4j @Slf4j
@Api(tags = {"IBZOrganization" }) @Api(tags = {"单位机构" })
@RestController("api-ibzorganization") @RestController("api-ibzorganization")
@RequestMapping("") @RequestMapping("")
public class IBZOrganizationResource { public class IBZOrganizationResource {
...@@ -46,14 +46,14 @@ public class IBZOrganizationResource { ...@@ -46,14 +46,14 @@ public class IBZOrganizationResource {
@Lazy @Lazy
public IBZOrganizationMapping ibzorganizationMapping; public IBZOrganizationMapping ibzorganizationMapping;
@ApiOperation(value = "CheckKey", tags = {"IBZOrganization" }, notes = "CheckKey") @ApiOperation(value = "检查单位机构", tags = {"单位机构" }, notes = "检查单位机构")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/checkkey") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/checkkey")
public ResponseEntity<Boolean> checkKey(@RequestBody IBZOrganizationDTO ibzorganizationdto) { public ResponseEntity<Boolean> checkKey(@RequestBody IBZOrganizationDTO ibzorganizationdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.checkKey(ibzorganizationMapping.toDomain(ibzorganizationdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.checkKey(ibzorganizationMapping.toDomain(ibzorganizationdto)));
} }
@PreAuthorize("hasPermission(this.ibzorganizationService.get(#ibzorganization_id),'ibzou-IBZOrganization-Update')") @PreAuthorize("hasPermission(this.ibzorganizationService.get(#ibzorganization_id),'ibzou-IBZOrganization-Update')")
@ApiOperation(value = "Update", tags = {"IBZOrganization" }, notes = "Update") @ApiOperation(value = "更新单位机构", tags = {"单位机构" }, notes = "更新单位机构")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/{ibzorganization_id}")
@Transactional @Transactional
public ResponseEntity<IBZOrganizationDTO> update(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZOrganizationDTO ibzorganizationdto) { public ResponseEntity<IBZOrganizationDTO> update(@PathVariable("ibzorganization_id") String ibzorganization_id, @RequestBody IBZOrganizationDTO ibzorganizationdto) {
...@@ -65,7 +65,7 @@ public class IBZOrganizationResource { ...@@ -65,7 +65,7 @@ public class IBZOrganizationResource {
} }
@PreAuthorize("hasPermission(this.ibzorganizationService.getIbzorganizationByEntities(this.ibzorganizationMapping.toDomain(#ibzorganizationdtos)),'ibzou-IBZOrganization-Update')") @PreAuthorize("hasPermission(this.ibzorganizationService.getIbzorganizationByEntities(this.ibzorganizationMapping.toDomain(#ibzorganizationdtos)),'ibzou-IBZOrganization-Update')")
@ApiOperation(value = "UpdateBatch", tags = {"IBZOrganization" }, notes = "UpdateBatch") @ApiOperation(value = "批量更新单位机构", tags = {"单位机构" }, notes = "批量更新单位机构")
@RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/batch") @RequestMapping(method = RequestMethod.PUT, value = "/ibzorganizations/batch")
public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) { public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
ibzorganizationService.updateBatch(ibzorganizationMapping.toDomain(ibzorganizationdtos)); ibzorganizationService.updateBatch(ibzorganizationMapping.toDomain(ibzorganizationdtos));
...@@ -73,7 +73,7 @@ public class IBZOrganizationResource { ...@@ -73,7 +73,7 @@ public class IBZOrganizationResource {
} }
@PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdto),'ibzou-IBZOrganization-Create')") @PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdto),'ibzou-IBZOrganization-Create')")
@ApiOperation(value = "Create", tags = {"IBZOrganization" }, notes = "Create") @ApiOperation(value = "新建单位机构", tags = {"单位机构" }, notes = "新建单位机构")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations")
@Transactional @Transactional
public ResponseEntity<IBZOrganizationDTO> create(@RequestBody IBZOrganizationDTO ibzorganizationdto) { public ResponseEntity<IBZOrganizationDTO> create(@RequestBody IBZOrganizationDTO ibzorganizationdto) {
...@@ -84,7 +84,7 @@ public class IBZOrganizationResource { ...@@ -84,7 +84,7 @@ public class IBZOrganizationResource {
} }
@PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdtos),'ibzou-IBZOrganization-Create')") @PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdtos),'ibzou-IBZOrganization-Create')")
@ApiOperation(value = "createBatch", tags = {"IBZOrganization" }, notes = "createBatch") @ApiOperation(value = "批量新建单位机构", tags = {"单位机构" }, notes = "批量新建单位机构")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/batch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/batch")
public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) { public ResponseEntity<Boolean> createBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
ibzorganizationService.createBatch(ibzorganizationMapping.toDomain(ibzorganizationdtos)); ibzorganizationService.createBatch(ibzorganizationMapping.toDomain(ibzorganizationdtos));
...@@ -92,14 +92,14 @@ public class IBZOrganizationResource { ...@@ -92,14 +92,14 @@ public class IBZOrganizationResource {
} }
@PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdto),'ibzou-IBZOrganization-Save')") @PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdto),'ibzou-IBZOrganization-Save')")
@ApiOperation(value = "Save", tags = {"IBZOrganization" }, notes = "Save") @ApiOperation(value = "保存单位机构", tags = {"单位机构" }, notes = "保存单位机构")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/save") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/save")
public ResponseEntity<Boolean> save(@RequestBody IBZOrganizationDTO ibzorganizationdto) { public ResponseEntity<Boolean> save(@RequestBody IBZOrganizationDTO ibzorganizationdto) {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.save(ibzorganizationMapping.toDomain(ibzorganizationdto))); return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationService.save(ibzorganizationMapping.toDomain(ibzorganizationdto)));
} }
@PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdtos),'ibzou-IBZOrganization-Save')") @PreAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdtos),'ibzou-IBZOrganization-Save')")
@ApiOperation(value = "SaveBatch", tags = {"IBZOrganization" }, notes = "SaveBatch") @ApiOperation(value = "批量保存单位机构", tags = {"单位机构" }, notes = "批量保存单位机构")
@RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/savebatch") @RequestMapping(method = RequestMethod.POST, value = "/ibzorganizations/savebatch")
public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) { public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBZOrganizationDTO> ibzorganizationdtos) {
ibzorganizationService.saveBatch(ibzorganizationMapping.toDomain(ibzorganizationdtos)); ibzorganizationService.saveBatch(ibzorganizationMapping.toDomain(ibzorganizationdtos));
...@@ -107,7 +107,7 @@ public class IBZOrganizationResource { ...@@ -107,7 +107,7 @@ public class IBZOrganizationResource {
} }
@PreAuthorize("hasPermission(this.ibzorganizationService.get(#ibzorganization_id),'ibzou-IBZOrganization-Remove')") @PreAuthorize("hasPermission(this.ibzorganizationService.get(#ibzorganization_id),'ibzou-IBZOrganization-Remove')")
@ApiOperation(value = "Remove", tags = {"IBZOrganization" }, notes = "Remove") @ApiOperation(value = "删除单位机构", tags = {"单位机构" }, notes = "删除单位机构")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/{ibzorganization_id}")
@Transactional @Transactional
public ResponseEntity<Boolean> remove(@PathVariable("ibzorganization_id") String ibzorganization_id) { public ResponseEntity<Boolean> remove(@PathVariable("ibzorganization_id") String ibzorganization_id) {
...@@ -115,7 +115,7 @@ public class IBZOrganizationResource { ...@@ -115,7 +115,7 @@ public class IBZOrganizationResource {
} }
@PreAuthorize("hasPermission(this.ibzorganizationService.getIbzorganizationByIds(#ids),'ibzou-IBZOrganization-Remove')") @PreAuthorize("hasPermission(this.ibzorganizationService.getIbzorganizationByIds(#ids),'ibzou-IBZOrganization-Remove')")
@ApiOperation(value = "RemoveBatch", tags = {"IBZOrganization" }, notes = "RemoveBatch") @ApiOperation(value = "批量删除单位机构", tags = {"单位机构" }, notes = "批量删除单位机构")
@RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/batch") @RequestMapping(method = RequestMethod.DELETE, value = "/ibzorganizations/batch")
public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) { public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
ibzorganizationService.removeBatch(ids); ibzorganizationService.removeBatch(ids);
...@@ -123,7 +123,7 @@ public class IBZOrganizationResource { ...@@ -123,7 +123,7 @@ public class IBZOrganizationResource {
} }
@PostAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(returnObject.body),'ibzou-IBZOrganization-Get')") @PostAuthorize("hasPermission(this.ibzorganizationMapping.toDomain(returnObject.body),'ibzou-IBZOrganization-Get')")
@ApiOperation(value = "Get", tags = {"IBZOrganization" }, notes = "Get") @ApiOperation(value = "获取单位机构", tags = {"单位机构" }, notes = "获取单位机构")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/{ibzorganization_id}")
public ResponseEntity<IBZOrganizationDTO> get(@PathVariable("ibzorganization_id") String ibzorganization_id) { public ResponseEntity<IBZOrganizationDTO> get(@PathVariable("ibzorganization_id") String ibzorganization_id) {
IBZOrganization domain = ibzorganizationService.get(ibzorganization_id); IBZOrganization domain = ibzorganizationService.get(ibzorganization_id);
...@@ -131,14 +131,14 @@ public class IBZOrganizationResource { ...@@ -131,14 +131,14 @@ public class IBZOrganizationResource {
return ResponseEntity.status(HttpStatus.OK).body(dto); return ResponseEntity.status(HttpStatus.OK).body(dto);
} }
@ApiOperation(value = "GetDraft", tags = {"IBZOrganization" }, notes = "GetDraft") @ApiOperation(value = "获取单位机构草稿", tags = {"单位机构" }, notes = "获取单位机构草稿")
@RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/getdraft") @RequestMapping(method = RequestMethod.GET, value = "/ibzorganizations/getdraft")
public ResponseEntity<IBZOrganizationDTO> getDraft() { public ResponseEntity<IBZOrganizationDTO> getDraft() {
return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationMapping.toDto(ibzorganizationService.getDraft(new IBZOrganization()))); return ResponseEntity.status(HttpStatus.OK).body(ibzorganizationMapping.toDto(ibzorganizationService.getDraft(new IBZOrganization())));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectSOrg-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectSOrg-all')")
@ApiOperation(value = "fetch查询下级单位", tags = {"IBZOrganization" } ,notes = "fetch查询下级单位") @ApiOperation(value = "获取查询下级单位", tags = {"单位机构" } ,notes = "获取查询下级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectsorg") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectsorg")
public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectSOrg(IBZOrganizationSearchContext context) { public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectSOrg(IBZOrganizationSearchContext context) {
Page<IBZOrganization> domains = ibzorganizationService.searchSelectSOrg(context) ; Page<IBZOrganization> domains = ibzorganizationService.searchSelectSOrg(context) ;
...@@ -151,7 +151,7 @@ public class IBZOrganizationResource { ...@@ -151,7 +151,7 @@ public class IBZOrganizationResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectSOrg-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectSOrg-all')")
@ApiOperation(value = "search查询下级单位", tags = {"IBZOrganization" } ,notes = "search查询下级单位") @ApiOperation(value = "查询查询下级单位", tags = {"单位机构" } ,notes = "查询查询下级单位")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchselectsorg") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchselectsorg")
public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectSOrg(@RequestBody IBZOrganizationSearchContext context) { public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectSOrg(@RequestBody IBZOrganizationSearchContext context) {
Page<IBZOrganization> domains = ibzorganizationService.searchSelectSOrg(context) ; Page<IBZOrganization> domains = ibzorganizationService.searchSelectSOrg(context) ;
...@@ -159,7 +159,7 @@ public class IBZOrganizationResource { ...@@ -159,7 +159,7 @@ public class IBZOrganizationResource {
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectPOrg-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectPOrg-all')")
@ApiOperation(value = "fetch查询上级单位", tags = {"IBZOrganization" } ,notes = "fetch查询上级单位") @ApiOperation(value = "获取查询上级单位", tags = {"单位机构" } ,notes = "获取查询上级单位")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectporg") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchselectporg")
public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectPOrg(IBZOrganizationSearchContext context) { public ResponseEntity<List<IBZOrganizationDTO>> fetchSelectPOrg(IBZOrganizationSearchContext context) {
Page<IBZOrganization> domains = ibzorganizationService.searchSelectPOrg(context) ; Page<IBZOrganization> domains = ibzorganizationService.searchSelectPOrg(context) ;
...@@ -172,7 +172,7 @@ public class IBZOrganizationResource { ...@@ -172,7 +172,7 @@ public class IBZOrganizationResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectPOrg-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-SelectPOrg-all')")
@ApiOperation(value = "search查询上级单位", tags = {"IBZOrganization" } ,notes = "search查询上级单位") @ApiOperation(value = "查询查询上级单位", tags = {"单位机构" } ,notes = "查询查询上级单位")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchselectporg") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchselectporg")
public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectPOrg(@RequestBody IBZOrganizationSearchContext context) { public ResponseEntity<Page<IBZOrganizationDTO>> searchSelectPOrg(@RequestBody IBZOrganizationSearchContext context) {
Page<IBZOrganization> domains = ibzorganizationService.searchSelectPOrg(context) ; Page<IBZOrganization> domains = ibzorganizationService.searchSelectPOrg(context) ;
...@@ -180,7 +180,7 @@ public class IBZOrganizationResource { ...@@ -180,7 +180,7 @@ public class IBZOrganizationResource {
.body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements())); .body(new PageImpl(ibzorganizationMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-Default-all')")
@ApiOperation(value = "fetchDEFAULT", tags = {"IBZOrganization" } ,notes = "fetchDEFAULT") @ApiOperation(value = "获取DEFAULT", tags = {"单位机构" } ,notes = "获取DEFAULT")
@RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchdefault") @RequestMapping(method= RequestMethod.GET , value="/ibzorganizations/fetchdefault")
public ResponseEntity<List<IBZOrganizationDTO>> fetchDefault(IBZOrganizationSearchContext context) { public ResponseEntity<List<IBZOrganizationDTO>> fetchDefault(IBZOrganizationSearchContext context) {
Page<IBZOrganization> domains = ibzorganizationService.searchDefault(context) ; Page<IBZOrganization> domains = ibzorganizationService.searchDefault(context) ;
...@@ -193,7 +193,7 @@ public class IBZOrganizationResource { ...@@ -193,7 +193,7 @@ public class IBZOrganizationResource {
} }
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-Default-all')") @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZOrganization-Default-all')")
@ApiOperation(value = "searchDEFAULT", tags = {"IBZOrganization" } ,notes = "searchDEFAULT") @ApiOperation(value = "查询DEFAULT", tags = {"单位机构" } ,notes = "查询DEFAULT")
@RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchdefault") @RequestMapping(method= RequestMethod.POST , value="/ibzorganizations/searchdefault")
public ResponseEntity<Page<IBZOrganizationDTO>> searchDefault(@RequestBody IBZOrganizationSearchContext context) { public ResponseEntity<Page<IBZOrganizationDTO>> searchDefault(@RequestBody IBZOrganizationSearchContext context) {
Page<IBZOrganization> domains = ibzorganizationService.searchDefault(context) ; Page<IBZOrganization> domains = ibzorganizationService.searchDefault(context) ;
......
package cn.ibizlab.api.rest;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import cn.ibizlab.api.dto.*;
import cn.ibizlab.api.mapping.*;
import cn.ibizlab.core.ou.domain.IBZPost;
import cn.ibizlab.core.ou.service.IIBZPostService;
import cn.ibizlab.core.ou.filter.IBZPostSearchContext;
@Slf4j
@Api(tags = {"岗位" })
@RestController("api-ibzpost")
@RequestMapping("")
public class IBZPostResource {
@Autowired
public IIBZPostService ibzpostService;
@Autowired
@Lazy
public IBZPostMapping ibzpostMapping;
}
package cn.ibizlab.api.rest;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import cn.ibizlab.api.dto.*;
import cn.ibizlab.api.mapping.*;
import cn.ibizlab.core.ou.domain.IBZTeamMember;
import cn.ibizlab.core.ou.service.IIBZTeamMemberService;
import cn.ibizlab.core.ou.filter.IBZTeamMemberSearchContext;
@Slf4j
@Api(tags = {"组成员" })
@RestController("api-ibzteammember")
@RequestMapping("")
public class IBZTeamMemberResource {
@Autowired
public IIBZTeamMemberService ibzteammemberService;
@Autowired
@Lazy
public IBZTeamMemberMapping ibzteammemberMapping;
}
package cn.ibizlab.api.rest;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import cn.ibizlab.api.dto.*;
import cn.ibizlab.api.mapping.*;
import cn.ibizlab.core.ou.domain.IBZTeam;
import cn.ibizlab.core.ou.service.IIBZTeamService;
import cn.ibizlab.core.ou.filter.IBZTeamSearchContext;
@Slf4j
@Api(tags = {"组" })
@RestController("api-ibzteam")
@RequestMapping("")
public class IBZTeamResource {
@Autowired
public IIBZTeamService ibzteamService;
@Autowired
@Lazy
public IBZTeamMapping ibzteamMapping;
}
package cn.ibizlab.util.domain;
import cn.ibizlab.util.helper.DataObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.*;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import java.sql.Timestamp;
@TableName(value = "IBZCFG")
@JsonIgnoreProperties(ignoreUnknown = true)
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class IBZConfig {
/**
* 配置标识
* 系统+配置类型+引用对象+用户标识联合主键
*/
@TableId
private String cfgId;
/**
* 系统标识
*/
private String systemId;
/**
* 配置类型
* 门户配置/表格自定义配置/自定义查询...消费方自定义
*/
private String cfgType;
/**
* 引用对象
* 门户页标识/具体表格视图标识...消费方具体使用位置的标识
*/
private String targetType;
/**
* 用户标识
* 默认当前登录者
*/
private String userId;
/**
* 配置
* JSONObject
*/
private String cfg;
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(format="yyyy-MM-dd HH:mm:ss")
private Timestamp updateDate;
public String getCfgId()
{
if(StringUtils.isEmpty(cfgId)&&
(!(StringUtils.isEmpty(systemId)))&&
(!(StringUtils.isEmpty(cfgType)))&&
(!(StringUtils.isEmpty(targetType)))&&
(!(StringUtils.isEmpty(userId))))
{
cfgId= DigestUtils.md5DigestAsHex((systemId+"||"+cfgType+"||"+targetType+"||"+userId).getBytes());
}
return cfgId;
}
}
package cn.ibizlab.util.mapper;
import cn.ibizlab.util.domain.IBZConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface IBZConfigMapper extends BaseMapper<IBZConfig>{
}
\ No newline at end of file
package cn.ibizlab.util.rest; package cn.ibizlab.util.rest;
import cn.ibizlab.util.errors.BadRequestAlertException;
import cn.ibizlab.util.service.IBZConfigService;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import cn.ibizlab.util.security.AuthenticationUser; import cn.ibizlab.util.security.AuthenticationUser;
import cn.ibizlab.util.service.AuthenticationUserService; import cn.ibizlab.util.service.AuthenticationUserService;
...@@ -8,9 +10,8 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -8,9 +10,8 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthority;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import java.util.Collection; import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
...@@ -23,6 +24,10 @@ public class AppController { ...@@ -23,6 +24,10 @@ public class AppController {
@Value("${ibiz.enablePermissionValid:false}") @Value("${ibiz.enablePermissionValid:false}")
boolean enablePermissionValid; //是否开启权限校验 boolean enablePermissionValid; //是否开启权限校验
@Value("${ibiz.systemid:ibzou}")
private String systemId;
@Autowired @Autowired
private AuthenticationUserService userDetailsService; private AuthenticationUserService userDetailsService;
...@@ -39,10 +44,10 @@ public class AppController { ...@@ -39,10 +44,10 @@ public class AppController {
while(it.hasNext()) { while(it.hasNext()) {
GrantedAuthority authority = (GrantedAuthority)it.next(); GrantedAuthority authority = (GrantedAuthority)it.next();
String strAuthority=authority.getAuthority(); String strAuthority=authority.getAuthority();
if(strAuthority.startsWith("UNIRES")) if(strAuthority.startsWith("UNIRES_"+systemId))
uniRes.add(strAuthority); uniRes.add(strAuthority.substring(systemId.length()+8));
else if(strAuthority.startsWith("APPMENU")) else if(strAuthority.startsWith("APPMENU_"+systemId))
appMenu.add(strAuthority); appMenu.add(strAuthority.substring(systemId.length()+9));
} }
} }
appData.put("unires",uniRes); appData.put("unires",uniRes);
...@@ -57,4 +62,23 @@ public class AppController { ...@@ -57,4 +62,23 @@ public class AppController {
userDetailsService.resetByUsername(AuthenticationUser.getAuthenticationUser().getUsername()); userDetailsService.resetByUsername(AuthenticationUser.getAuthenticationUser().getUsername());
} }
} }
@Autowired
private IBZConfigService ibzConfigService;
@RequestMapping(method = RequestMethod.PUT, value = "/configs/{configType}/{targetType}")
public ResponseEntity<Boolean> saveConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType, @RequestBody JSONObject config) {
String userId=AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId))
throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",configType);
return ResponseEntity.ok(ibzConfigService.saveConfig(configType,targetType,userId,config));
}
@RequestMapping(method = RequestMethod.GET, value = "/configs/{configType}/{targetType}")
public ResponseEntity<JSONObject> getConfig(@PathVariable("configType") String configType, @PathVariable("targetType") String targetType) {
String userId=AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId))
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",configType);
return ResponseEntity.ok(ibzConfigService.getConfig(configType,targetType,userId));
}
} }
package cn.ibizlab.util.service;
import cn.ibizlab.util.domain.IBZConfig;
import cn.ibizlab.util.errors.BadRequestAlertException;
import cn.ibizlab.util.helper.DataObject;
import cn.ibizlab.util.mapper.IBZConfigMapper;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
@Slf4j
@Service
public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> implements IService<IBZConfig> {
@Value("${ibiz.systemid:ibzou}")
private String systemId;
@Cacheable( value="ibzou_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public JSONObject getConfig(String cfgType,String targetType,String userId)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
throw new BadRequestAlertException("获取配置失败,参数缺失","IBZConfig",cfgType);
IBZConfig config=this.getOne(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()),false);
if(config==null)
return new JSONObject();
else
return JSON.parseObject(config.getCfg());
}
@CacheEvict( value="ibzou_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public boolean saveConfig(String cfgType,String targetType,String userId,JSONObject config)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
throw new BadRequestAlertException("保存配置失败,参数缺失","IBZConfig",cfgType);
String cfg="{}";
if(config!=null)
cfg=JSONObject.toJSONString(config);
return this.saveOrUpdate(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).cfg(cfg).updateDate(DataObject.getNow()).build());
}
@CacheEvict( value="ibzou_configs",key = "'cfgid:'+#p0+'||'+#p1+'||'+#p2")
public void resetConfig(String cfgType,String targetType,String userId)
{
if(StringUtils.isEmpty(userId)||StringUtils.isEmpty(cfgType)||StringUtils.isEmpty(targetType))
throw new BadRequestAlertException("重置配置失败,参数缺失","IBZConfig",cfgType);
this.remove(Wrappers.query(IBZConfig.builder().systemId(systemId).cfgType(cfgType).targetType(targetType).userId(userId).build()));
}
}
\ No newline at end of file
...@@ -85,3 +85,16 @@ ibiz: ...@@ -85,3 +85,16 @@ ibiz:
enablePermissionValid: true enablePermissionValid: true
cacheLevel: L1 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存 cacheLevel: L1 #(L1)一级本地caffeine缓存;(L2)caffeine缓存+Redis缓存
#xxl-job定时服务
xxl:
job:
accessToken:
admin:
addresses: #127.0.0.1
executor:
appname: ibzou
ip:
port: 9999
logpath: /app/joblog
logretentiondays: -1
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册