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.setLanguage(positionLanguageResult);
|
||||||
|
result.setTicketManage(ent.getTicketManage());
|
||||||
return ApiResult.success(result);
|
return ApiResult.success(result);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -121,6 +122,7 @@ public class PositionController extends ControllerBase {
|
||||||
// ent.setDataModifyUserNo(AdminUserUtil.getUserNo());
|
// ent.setDataModifyUserNo(AdminUserUtil.getUserNo());
|
||||||
// ent.setDataModifyUserName(AdminUserUtil.getUserName());
|
// ent.setDataModifyUserName(AdminUserUtil.getUserName());
|
||||||
// ent.setDataModifyTime(LocalDateTime.now());
|
// ent.setDataModifyTime(LocalDateTime.now());
|
||||||
|
ent.setTicketManage(positionDetailDto.getTicketManage());
|
||||||
positionService.save(ent);
|
positionService.save(ent);
|
||||||
return ApiResult.success(true);
|
return ApiResult.success(true);
|
||||||
}
|
}
|
||||||
|
|
@ -136,6 +138,7 @@ public class PositionController extends ControllerBase {
|
||||||
ent.setDataModifyUserNo(AdminUserUtil.getUserNo());
|
ent.setDataModifyUserNo(AdminUserUtil.getUserNo());
|
||||||
ent.setDataModifyUserName(AdminUserUtil.getUserName());
|
ent.setDataModifyUserName(AdminUserUtil.getUserName());
|
||||||
ent.setDataModifyTime(LocalDateTime.now());
|
ent.setDataModifyTime(LocalDateTime.now());
|
||||||
|
ent.setTicketManage(positionDetailDto.getTicketManage());
|
||||||
positionService.updateById(ent);
|
positionService.updateById(ent);
|
||||||
return ApiResult.success(true);
|
return ApiResult.success(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -31,6 +30,11 @@ public class PositionDetailDTO {
|
||||||
@NotNull(message = "属性不能为空")
|
@NotNull(message = "属性不能为空")
|
||||||
private Integer positionAttribute;
|
private Integer positionAttribute;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否授予工单权限
|
||||||
|
*/
|
||||||
|
private Boolean ticketManage;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,11 @@ public class PositionDetailVO {
|
||||||
*/
|
*/
|
||||||
private Integer positionAttribute;
|
private Integer positionAttribute;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否授予工单权限
|
||||||
|
*/
|
||||||
|
private Boolean ticketManage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人-账号
|
* 创建人-账号
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
package com.nflg.mobilebroken.common.constant;
|
package com.nflg.mobilebroken.common.constant;
|
||||||
|
|
||||||
import cn.hutool.core.collection.ListUtil;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class Constant {
|
public class Constant {
|
||||||
|
|
||||||
public static final String FROM_APP = "app";
|
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 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_MEASURES = "SolutionMeasures";
|
||||||
|
|
||||||
public static final String DICTIONARY_SOLUTION_REVIEW_DEPARTMENT = "SolutionReviewDepartment";
|
public static final String DICTIONARY_SOLUTION_REVIEW_DEPARTMENT = "SolutionReviewDepartment";
|
||||||
|
|
||||||
public static final String DICTIONARY_DEVICE_STATE ="deviceState";
|
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.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 职位管理
|
* 职位管理
|
||||||
|
|
@ -85,4 +86,9 @@ public class TBasePosition implements Serializable {
|
||||||
* 语言-json
|
* 语言-json
|
||||||
*/
|
*/
|
||||||
private String positionLanguage;
|
private String positionLanguage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否授予工单权限
|
||||||
|
*/
|
||||||
|
private Boolean ticketManage;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,7 @@ public interface AdminUserMapper extends BaseMapper<AdminUser> {
|
||||||
|
|
||||||
List<AdminUserSimpleVO> getSimples(List<Integer> userIds);
|
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;
|
package com.nflg.mobilebroken.repository.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.collection.ListUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
@ -340,12 +339,12 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> getTickerMangagers() {
|
public List<Integer> getTickerMangagers() {
|
||||||
return baseMapper.getTickerMangagers(Constant.ROLE_CODE_TICKET_MANAGERS);
|
return baseMapper.getTickerMangagers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> getCQMIds() {
|
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) {
|
private String getDepartmentName(Long departmentId) {
|
||||||
|
|
|
||||||
|
|
@ -28,9 +28,13 @@
|
||||||
SELECT au.id
|
SELECT au.id
|
||||||
FROM t_base_position p
|
FROM t_base_position p
|
||||||
INNER JOIN admin_user au ON au.title_id=p.id
|
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
|
WHERE au.state=1 AND au.is_del=0 AND p.ticket_manage
|
||||||
<foreach collection="titleCodes" item="titleCode" separator="," open="(" close=")">
|
</select>
|
||||||
#{titleCode}
|
|
||||||
</foreach>
|
<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>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,7 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="getList" resultType="com.nflg.mobilebroken.repository.entity.TBasePosition">
|
<select id="getList" resultType="com.nflg.mobilebroken.repository.entity.TBasePosition">
|
||||||
select id, position_code, position_name, position_attribute, data_create_user_no,
|
select *
|
||||||
data_create_user_name, data_create_time, data_modify_user_no, data_modify_user_name,
|
|
||||||
data_modify_time
|
|
||||||
from t_base_position
|
from t_base_position
|
||||||
where data_valid_state=1 <include refid="whr" />
|
where data_valid_state=1 <include refid="whr" />
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue