feat: bug-500 管理端,新的职位添加进来,给新用户配置了职位和角色,没法配置其数据权限,无法看到全部工单数据
This commit is contained in:
parent
f2957eb44f
commit
e22e20ae10
|
|
@ -90,6 +90,7 @@ public class PositionController extends ControllerBase {
|
|||
}
|
||||
}
|
||||
result.setLanguage(positionLanguageResult);
|
||||
result.setTicketManage(ent.getTicketManage());
|
||||
return ApiResult.success(result);
|
||||
|
||||
|
||||
|
|
@ -121,6 +122,7 @@ public class PositionController extends ControllerBase {
|
|||
// ent.setDataModifyUserNo(AdminUserUtil.getUserNo());
|
||||
// ent.setDataModifyUserName(AdminUserUtil.getUserName());
|
||||
// ent.setDataModifyTime(LocalDateTime.now());
|
||||
ent.setTicketManage(positionDetailDto.getTicketManage());
|
||||
positionService.save(ent);
|
||||
return ApiResult.success(true);
|
||||
}
|
||||
|
|
@ -136,6 +138,7 @@ public class PositionController extends ControllerBase {
|
|||
ent.setDataModifyUserNo(AdminUserUtil.getUserNo());
|
||||
ent.setDataModifyUserName(AdminUserUtil.getUserName());
|
||||
ent.setDataModifyTime(LocalDateTime.now());
|
||||
ent.setTicketManage(positionDetailDto.getTicketManage());
|
||||
positionService.updateById(ent);
|
||||
return ApiResult.success(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import lombok.Data;
|
|||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -31,6 +30,11 @@ public class PositionDetailDTO {
|
|||
@NotNull(message = "属性不能为空")
|
||||
private Integer positionAttribute;
|
||||
|
||||
/**
|
||||
* 是否授予工单权限
|
||||
*/
|
||||
private Boolean ticketManage;
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,11 @@ public class PositionDetailVO {
|
|||
*/
|
||||
private Integer positionAttribute;
|
||||
|
||||
/**
|
||||
* 是否授予工单权限
|
||||
*/
|
||||
private Boolean ticketManage;
|
||||
|
||||
/**
|
||||
* 创建人-账号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
package com.nflg.mobilebroken.common.constant;
|
||||
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Constant {
|
||||
|
||||
public static final String FROM_APP = "app";
|
||||
|
|
@ -112,9 +108,8 @@ public class Constant {
|
|||
|
||||
public static final String DICTIONARY_ITEM_ACCOUNT_HAS_EXPIRED="AccountHasExpired";
|
||||
|
||||
public static final List<String> ROLE_CODE_TICKET_MANAGERS = ListUtil.of(TITLE_DIRECTOROF_BUSINESS_UNIT,TITLE_TECHNICAL_MANAGER,TITLE_SALES_MANAGER,TITLE_TEST_MANAGER,TITLE_QUALITY_MANAGER,DICTIONARY_TYPE_TITLE_CQM);
|
||||
|
||||
public static final String DICTIONARY_SOLUTION_MEASURES = "SolutionMeasures";
|
||||
|
||||
public static final String DICTIONARY_SOLUTION_REVIEW_DEPARTMENT = "SolutionReviewDepartment";
|
||||
|
||||
public static final String DICTIONARY_DEVICE_STATE ="deviceState";
|
||||
|
|
|
|||
|
|
@ -3,12 +3,13 @@ package com.nflg.mobilebroken.repository.entity;
|
|||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 职位管理
|
||||
|
|
@ -85,4 +86,9 @@ public class TBasePosition implements Serializable {
|
|||
* 语言-json
|
||||
*/
|
||||
private String positionLanguage;
|
||||
|
||||
/**
|
||||
* 是否授予工单权限
|
||||
*/
|
||||
private Boolean ticketManage;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,5 +20,7 @@ public interface AdminUserMapper extends BaseMapper<AdminUser> {
|
|||
|
||||
List<AdminUserSimpleVO> getSimples(List<Integer> userIds);
|
||||
|
||||
List<Integer> getTickerMangagers(List<String> titleCodes);
|
||||
List<Integer> getTickerMangagers();
|
||||
|
||||
List<Integer> getCQMIds(String titleCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.nflg.mobilebroken.repository.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
|
@ -340,12 +339,12 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
|||
|
||||
@Override
|
||||
public List<Integer> getTickerMangagers() {
|
||||
return baseMapper.getTickerMangagers(Constant.ROLE_CODE_TICKET_MANAGERS);
|
||||
return baseMapper.getTickerMangagers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> getCQMIds() {
|
||||
return baseMapper.getTickerMangagers(ListUtil.of(Constant.DICTIONARY_TYPE_TITLE_CQM));
|
||||
return baseMapper.getCQMIds(Constant.DICTIONARY_TYPE_TITLE_CQM);
|
||||
}
|
||||
|
||||
private String getDepartmentName(Long departmentId) {
|
||||
|
|
|
|||
|
|
@ -28,9 +28,13 @@
|
|||
SELECT au.id
|
||||
FROM t_base_position p
|
||||
INNER JOIN admin_user au ON au.title_id=p.id
|
||||
WHERE au.state=1 AND au.is_del=0 AND p.position_code IN
|
||||
<foreach collection="titleCodes" item="titleCode" separator="," open="(" close=")">
|
||||
#{titleCode}
|
||||
</foreach>
|
||||
WHERE au.state=1 AND au.is_del=0 AND p.ticket_manage
|
||||
</select>
|
||||
|
||||
<select id="getCQMIds" resultType="java.lang.Integer">
|
||||
SELECT au.id
|
||||
FROM t_base_position p
|
||||
INNER JOIN admin_user au ON au.title_id=p.id
|
||||
WHERE au.state=1 AND au.is_del=0 AND p.position_code=#{titleCode}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -12,9 +12,7 @@
|
|||
</sql>
|
||||
|
||||
<select id="getList" resultType="com.nflg.mobilebroken.repository.entity.TBasePosition">
|
||||
select id, position_code, position_name, position_attribute, data_create_user_no,
|
||||
data_create_user_name, data_create_time, data_modify_user_no, data_modify_user_name,
|
||||
data_modify_time
|
||||
select *
|
||||
from t_base_position
|
||||
where data_valid_state=1 <include refid="whr" />
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue