rjuq whnt
This commit is contained in:
parent
302d4c744c
commit
9177eab432
@ -63,6 +63,12 @@ public class StaffRoleController {
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/listByGroupId")
|
||||
public R listByGroupId(Long id ) {
|
||||
List<StaffRole> staffRoles = staffRoleService.selectByGroupId(id);
|
||||
return R.ok().put("staffRoles", staffRoles);
|
||||
}
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
|
||||
@ -40,4 +40,6 @@ public interface StaffRoleMapper extends BaseMapper<StaffRole> {
|
||||
List<StaffRole> selectByRole(@Param("departmentLevel") String departmentLevel);
|
||||
|
||||
List<StaffRole> selectByCondition(@Param("page") IPage page, @Param("params") Map<String, Object> params);
|
||||
|
||||
List<StaffRole> selectByGroupId(@Param("id") Long id);
|
||||
}
|
||||
@ -1,35 +1,49 @@
|
||||
package com.lz.modules.flow.entity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
/**
|
||||
* <p>
|
||||
* 菜单权限表
|
||||
* </p>*流转关系表
|
||||
* @author quyixiao
|
||||
* @since 2020-08-23
|
||||
* @since 2020-10-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("lz_staff_role")
|
||||
@ApiModel(value = "流转关系表")
|
||||
public class StaffRole implements java.io.Serializable {
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
//是否删除状态,1:删除,0:有效
|
||||
@ApiModelProperty(value = "是否删除状态,1:删除,0:有效", name = "isDelete")
|
||||
private Integer isDelete;
|
||||
//创建时间
|
||||
@ApiModelProperty(value = "创建时间", name = "gmtCreate")
|
||||
private Date gmtCreate;
|
||||
//最后修改时间
|
||||
@ApiModelProperty(value = "最后修改时间", name = "gmtModified")
|
||||
private Date gmtModified;
|
||||
//员工 id
|
||||
@ApiModelProperty(value = "员工 id", name = "staffId")
|
||||
private Long staffId;
|
||||
//角色
|
||||
@ApiModelProperty(value = "角色", name = "departmentLevel")
|
||||
private String departmentLevel;
|
||||
//角色 id
|
||||
@ApiModelProperty(value = "角色 id", name = "typeRoleIds")
|
||||
private String typeRoleIds;
|
||||
//员工名称
|
||||
@ApiModelProperty(value = "员工名称", name = "staffName")
|
||||
private String staffName;
|
||||
//组id
|
||||
@ApiModelProperty(value = "组id", name = "evaluationGroupId")
|
||||
private Long evaluationGroupId;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -135,6 +149,36 @@ public class StaffRole implements java.io.Serializable {
|
||||
this.typeRoleIds = typeRoleIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工名称
|
||||
* @return
|
||||
*/
|
||||
public String getStaffName() {
|
||||
return staffName;
|
||||
}
|
||||
/**
|
||||
* 员工名称
|
||||
* @param staffName
|
||||
*/
|
||||
public void setStaffName(String staffName) {
|
||||
this.staffName = staffName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 组id
|
||||
* @return
|
||||
*/
|
||||
public Long getEvaluationGroupId() {
|
||||
return evaluationGroupId;
|
||||
}
|
||||
/**
|
||||
* 组id
|
||||
* @param evaluationGroupId
|
||||
*/
|
||||
public void setEvaluationGroupId(Long evaluationGroupId) {
|
||||
this.evaluationGroupId = evaluationGroupId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "StaffRole{" +
|
||||
@ -145,6 +189,8 @@ public class StaffRole implements java.io.Serializable {
|
||||
",staffId=" + staffId +
|
||||
",departmentLevel=" + departmentLevel +
|
||||
",typeRoleIds=" + typeRoleIds +
|
||||
",staffName=" + staffName +
|
||||
",evaluationGroupId=" + evaluationGroupId +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -47,4 +47,6 @@ public interface StaffRoleService extends IService<StaffRole> {
|
||||
SysRoleEntity getRole(Long id);
|
||||
|
||||
List<SysMenuEntity> selectMenuList();
|
||||
|
||||
List<StaffRole> selectByGroupId(Long id);
|
||||
}
|
||||
@ -229,6 +229,12 @@ public class StaffRoleServiceImpl extends ServiceImpl<StaffRoleMapper, StaffRole
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StaffRole> selectByGroupId(Long id) {
|
||||
|
||||
return staffRoleMapper.selectByGroupId(id);
|
||||
}
|
||||
|
||||
public String getSuffix(Map<String, DepartmentsStaffRelateEntity> departmentsStaffRelateEntityMap, Map<Long, StaffEntity> staffMap, String departmentId,
|
||||
Map<String, DepartmentsStaffRelateEntity> singleDepartmentsStaffRelate) {
|
||||
DepartmentsStaffRelateEntity departmentsStaffRelateEntity = departmentsStaffRelateEntityMap.get(departmentId);
|
||||
|
||||
@ -11,12 +11,14 @@
|
||||
<result column="staff_id" property="staffId"/>
|
||||
<result column="department_level" property="departmentLevel"/>
|
||||
<result column="type_role_ids" property="typeRoleIds"/>
|
||||
<result column="staff_name" property="staffName"/>
|
||||
<result column="evaluation_group_id" property="evaluationGroupId"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, staff_id AS staffId, department_level AS departmentLevel, type_role_ids AS typeRoleIds
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, staff_id AS staffId, department_level AS departmentLevel, type_role_ids AS typeRoleIds, staff_name AS staffName, evaluation_group_id AS evaluationGroupId
|
||||
</sql>
|
||||
|
||||
|
||||
@ -32,6 +34,8 @@
|
||||
<if test="staffId != null">staff_id, </if>
|
||||
<if test="departmentLevel != null">department_level, </if>
|
||||
<if test="typeRoleIds != null">type_role_ids, </if>
|
||||
<if test="staffName != null">staff_name, </if>
|
||||
<if test="evaluationGroupId != null">evaluation_group_id, </if>
|
||||
is_delete,
|
||||
gmt_create,
|
||||
gmt_modified
|
||||
@ -39,6 +43,8 @@
|
||||
<if test="staffId != null">#{ staffId}, </if>
|
||||
<if test="departmentLevel != null">#{ departmentLevel}, </if>
|
||||
<if test="typeRoleIds != null">#{ typeRoleIds}, </if>
|
||||
<if test="staffName != null">#{ staffName}, </if>
|
||||
<if test="evaluationGroupId != null">#{ evaluationGroupId}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
@ -54,7 +60,9 @@
|
||||
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
|
||||
<if test="staffId != null">staff_id = #{staffId},</if>
|
||||
<if test="departmentLevel != null">department_level = #{departmentLevel},</if>
|
||||
<if test="typeRoleIds != null">type_role_ids = #{typeRoleIds}</if>
|
||||
<if test="typeRoleIds != null">type_role_ids = #{typeRoleIds},</if>
|
||||
<if test="staffName != null">staff_name = #{staffName},</if>
|
||||
<if test="evaluationGroupId != null">evaluation_group_id = #{evaluationGroupId}</if>
|
||||
</trim>
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
@ -69,7 +77,9 @@
|
||||
gmt_create = #{gmtCreate},
|
||||
staff_id = #{staffId},
|
||||
department_level = #{departmentLevel},
|
||||
type_role_ids = #{typeRoleIds}
|
||||
type_role_ids = #{typeRoleIds},
|
||||
staff_name = #{staffName},
|
||||
evaluation_group_id = #{evaluationGroupId}
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -79,6 +89,8 @@
|
||||
update lz_staff_role set is_delete = 1 where id=#{id} limit 1
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
<select id="selectByStaffId" resultType="com.lz.modules.flow.entity.StaffRole">
|
||||
select * from lz_staff_role where is_delete = 0 and staff_id = #{staffId} limit 1
|
||||
</select>
|
||||
@ -94,6 +106,9 @@
|
||||
</if>
|
||||
order by id desc
|
||||
</select>
|
||||
<select id="selectByGroupId" resultType="com.lz.modules.flow.entity.StaffRole">
|
||||
select * from lz_staff_role where is_delete = 0 and evaluation_group_id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -78,7 +78,7 @@ public class MysqlMain {
|
||||
//list.add(new TablesBean("lz_result_model"));
|
||||
//list.add(new TablesBean("lz_result_score"));
|
||||
//list.add(new TablesBean("lz_result_taget_lib"));
|
||||
list.add(new TablesBean("lz_flow_chart_detail_record"));
|
||||
list.add(new TablesBean("lz_staff_role"));
|
||||
|
||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user