隐患考评初始化
parent
2b186aa5e1
commit
0d0d50438d
|
|
@ -29,7 +29,7 @@ public class CorpEvalPageQry extends PageQuery {
|
|||
@ApiModelProperty(value = "企业名称")
|
||||
private String corpinfoName;
|
||||
|
||||
|
||||
private String menuPath;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,5 +22,6 @@ public class CorpEvalStatisticsPageQry extends PageQuery {
|
|||
private String evaluationUserName;
|
||||
|
||||
|
||||
private String menuPath;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,5 +31,7 @@ public class CorpHiddenEvaluationPageQry extends PageQuery {
|
|||
|
||||
@ApiModelProperty(value = "考评组成员名称")
|
||||
private String userName;
|
||||
|
||||
private String menuPath;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,5 +51,6 @@ public class HiddenEvaluationPageQry extends PageQuery {
|
|||
@ApiModelProperty(value = "考评完成结束时间")
|
||||
private String completeEndTime;
|
||||
|
||||
private String menuPath;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,6 @@ public class UserEvalStatisticsPageQry extends PageQuery {
|
|||
|
||||
private List<Long> userIdList;
|
||||
|
||||
|
||||
private String menuPath;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,64 @@
|
|||
package com.zcloud.hidden.evaluation.domain.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 菜单枚举
|
||||
*/
|
||||
@Getter
|
||||
public enum MenuEnum {
|
||||
//分公司考评组配置
|
||||
GFDKPZPZ("/hiddenEvaluation/container/supervision/evaluationTeamConfig/list", "gfd-kpzpz"),
|
||||
//分公司隐患考评
|
||||
GFDFGSYHKP("/hiddenEvaluation/container/supervision/hiddenEvaluation/list", "gfd-fgsyhkp"),
|
||||
//人员考评管理
|
||||
GFDRYKPGL("/hiddenEvaluation/container/supervision/personnelEvaluation/list", "gfd-rykpgl"),
|
||||
//分公司绩效考评
|
||||
GFDFGSJXKP("/hiddenEvaluation/container/supervision/performanceEvaluation/list", "gfd-fgsjxkp"),
|
||||
|
||||
|
||||
//企业端
|
||||
//分公司隐患考评
|
||||
QYDYHKP("/hiddenEvaluation/container/enterprise/hiddenEvaluation/list", "qyd-yhkp"),
|
||||
//人员考评管理
|
||||
QYDRYKPGL("/hiddenEvaluation/container/enterprise/personnelEvaluation/userExchangeList", "qyd-rykpgl"),
|
||||
|
||||
;
|
||||
|
||||
private final String path;
|
||||
private final String menuKey;
|
||||
|
||||
private static final Map<String, MenuEnum> PATH_MAP =
|
||||
Arrays.stream(values())
|
||||
.collect(Collectors.toMap(MenuEnum::getPath, Function.identity()));
|
||||
|
||||
MenuEnum(String path, String menuKey) {
|
||||
this.path = path;
|
||||
this.menuKey = menuKey;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public String getMenuKey() {
|
||||
return menuKey;
|
||||
}
|
||||
|
||||
// 通过name获取枚举
|
||||
public static MenuEnum getByPath(String path) {
|
||||
return PATH_MAP.get(path);
|
||||
}
|
||||
|
||||
// 通过path获取age
|
||||
public static String getMenuKeyByPath(String path) {
|
||||
MenuEnum entry = PATH_MAP.get(path);
|
||||
return entry != null ? entry.getMenuKey() : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -2,6 +2,8 @@ package com.zcloud.hidden.evaluation.persistence.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jjb.saas.framework.datascope.annotation.DataScope;
|
||||
import com.jjb.saas.framework.datascope.annotation.DataScopes;
|
||||
import com.zcloud.hidden.evaluation.persistence.dataobject.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
|
@ -14,18 +16,24 @@ import java.util.Map;
|
|||
* @Date 2026-03-25 10:36:44
|
||||
*/
|
||||
@Mapper
|
||||
@DataScopes({
|
||||
@DataScope(method = "corpHidddenPage", menuPerms = ""),
|
||||
@DataScope(method = "corpEvalStatisticsPage", menuPerms = ""),
|
||||
@DataScope(method = "userEvalStatisticsPage", menuPerms = ""),
|
||||
@DataScope(method = "corpEvalPage", menuPerms = ""),
|
||||
})
|
||||
public interface HiddenEvaluationRecordMapper extends BaseMapper<HiddenEvaluationRecordDO> {
|
||||
|
||||
IPage<CorpHiddenStatisticsDO> corpHidddenPage(IPage<CorpHiddenStatisticsDO> iPage, Map<String, Object> params);
|
||||
IPage<CorpHiddenStatisticsDO> corpHidddenPage(IPage<CorpHiddenStatisticsDO> iPage, Map<String, Object> params, String menuPerms);
|
||||
|
||||
IPage<HiddenStatisticsDO> hidddenPage(IPage<HiddenStatisticsDO> iPage, Map<String, Object> params);
|
||||
|
||||
IPage<CorpEvalStatisticsDO> corpEvalStatisticsPage(IPage<CorpEvalStatisticsDO> iPage, Map<String, Object> params);
|
||||
IPage<CorpEvalStatisticsDO> corpEvalStatisticsPage(IPage<CorpEvalStatisticsDO> iPage, Map<String, Object> params, String menuPerms);
|
||||
|
||||
IPage<UserEvalStatisticsDO> userEvalStatisticsPage(IPage<UserEvalStatisticsDO> iPage, Map<String, Object> params);
|
||||
IPage<UserEvalStatisticsDO> userEvalStatisticsPage(IPage<UserEvalStatisticsDO> iPage, Map<String, Object> params, String menuPerms);
|
||||
|
||||
IPage<HiddenEvalDO> hidddenEvalPage(IPage<HiddenEvalDO> iPage, Map<String, Object> params);
|
||||
|
||||
IPage<CorpEvalDO> corpEvalPage(IPage<CorpEvalDO> iPage, Map<String, Object> params);
|
||||
IPage<CorpEvalDO> corpEvalPage(IPage<CorpEvalDO> iPage, Map<String, Object> params, String menuPerms);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.jjb.saas.framework.repository.common.PageHelper;
|
|||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import com.zcloud.gbscommon.utils.PageQueryHelper;
|
||||
import com.zcloud.gbscommon.utils.Query;
|
||||
import com.zcloud.hidden.evaluation.domain.enums.MenuEnum;
|
||||
import com.zcloud.hidden.evaluation.domain.model.HiddenEvaluationRecordE;
|
||||
import com.zcloud.hidden.evaluation.persistence.dataobject.*;
|
||||
import com.zcloud.hidden.evaluation.persistence.mapper.HiddenEvaluationRecordMapper;
|
||||
|
|
@ -41,13 +42,18 @@ public class HiddenEvaluationRecordRepositoryImpl extends BaseRepositoryImpl<Hid
|
|||
@Override
|
||||
public PageResponse<CorpHiddenStatisticsDO> corpHidddenPage(Map<String, Object> params) {
|
||||
IPage<CorpHiddenStatisticsDO> iPage = new Query<CorpHiddenStatisticsDO>().getPage(params);
|
||||
IPage<CorpHiddenStatisticsDO> result = hiddenEvaluationRecordMapper.corpHidddenPage(iPage, params);
|
||||
String menuPerms = "";
|
||||
if (!org.springframework.util.ObjectUtils.isEmpty(params.get("menuPath"))){
|
||||
menuPerms = MenuEnum.getMenuKeyByPath(params.get("menuPath").toString());
|
||||
}
|
||||
IPage<CorpHiddenStatisticsDO> result = hiddenEvaluationRecordMapper.corpHidddenPage(iPage, params,menuPerms);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResponse<HiddenStatisticsDO> hidddenPage(Map<String, Object> params) {
|
||||
IPage<HiddenStatisticsDO> iPage = new Query<HiddenStatisticsDO>().getPage(params);
|
||||
|
||||
IPage<HiddenStatisticsDO> result = hiddenEvaluationRecordMapper.hidddenPage(iPage, params);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
|
@ -62,14 +68,22 @@ public class HiddenEvaluationRecordRepositoryImpl extends BaseRepositoryImpl<Hid
|
|||
@Override
|
||||
public PageResponse<CorpEvalStatisticsDO> corpEvalStatisticsPage(Map<String, Object> params) {
|
||||
IPage<CorpEvalStatisticsDO> iPage = new Query<CorpEvalStatisticsDO>().getPage(params);
|
||||
IPage<CorpEvalStatisticsDO> result = hiddenEvaluationRecordMapper.corpEvalStatisticsPage(iPage, params);
|
||||
String menuPerms = "";
|
||||
if (!org.springframework.util.ObjectUtils.isEmpty(params.get("menuPath"))){
|
||||
menuPerms = MenuEnum.getMenuKeyByPath(params.get("menuPath").toString());
|
||||
}
|
||||
IPage<CorpEvalStatisticsDO> result = hiddenEvaluationRecordMapper.corpEvalStatisticsPage(iPage, params,menuPerms);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResponse<UserEvalStatisticsDO> userEvalStatisticsPage(Map<String, Object> params) {
|
||||
IPage<UserEvalStatisticsDO> iPage = new Query<UserEvalStatisticsDO>().getPage(params);
|
||||
IPage<UserEvalStatisticsDO> result = hiddenEvaluationRecordMapper.userEvalStatisticsPage(iPage, params);
|
||||
String menuPerms = "";
|
||||
if (!org.springframework.util.ObjectUtils.isEmpty(params.get("menuPath"))){
|
||||
menuPerms = MenuEnum.getMenuKeyByPath(params.get("menuPath").toString());
|
||||
}
|
||||
IPage<UserEvalStatisticsDO> result = hiddenEvaluationRecordMapper.userEvalStatisticsPage(iPage, params,menuPerms);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
|
||||
|
|
@ -92,7 +106,11 @@ public class HiddenEvaluationRecordRepositoryImpl extends BaseRepositoryImpl<Hid
|
|||
@Override
|
||||
public PageResponse<CorpEvalDO> corpEvalPage(Map<String, Object> params) {
|
||||
IPage<CorpEvalDO> iPage = new Query<CorpEvalDO>().getPage(params);
|
||||
IPage<CorpEvalDO> result = hiddenEvaluationRecordMapper.corpEvalPage(iPage, params);
|
||||
String menuPerms = "";
|
||||
if (!org.springframework.util.ObjectUtils.isEmpty(params.get("menuPath"))){
|
||||
menuPerms = MenuEnum.getMenuKeyByPath(params.get("menuPath").toString());
|
||||
}
|
||||
IPage<CorpEvalDO> result = hiddenEvaluationRecordMapper.corpEvalPage(iPage, params,menuPerms);
|
||||
return PageHelper.pageToResponse(result, result.getRecords());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue