Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
CMM 1 year ago
parent
commit
87b0a6f703
2 changed files with 43 additions and 1 deletions
  1. +42
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/DashboardUserDataScopeProviderImpl.java
  2. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.xml

+ 42
- 0
pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/DashboardUserDataScopeProviderImpl.java View File

@@ -0,0 +1,42 @@
package com.ningdatech.pmapi.datascope.provider.impl;

import com.google.common.collect.Lists;
import com.ningdatech.pmapi.common.helper.UserInfoHelper;
import com.ningdatech.pmapi.datascope.model.DataScopeDTO;
import com.ningdatech.pmapi.datascope.provider.DataScopeProvider;
import com.ningdatech.pmapi.user.entity.enumeration.RoleEnum;
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.Optional;

/**
* <p>
* 数据权限 数据看板角色
* </p>
*
* @author ZPF
* @since 2023/3/27 23:29
*/
@Slf4j
@RequiredArgsConstructor
@Component("DASHBOARD")
public class DashboardUserDataScopeProviderImpl implements DataScopeProvider {

private final UserInfoHelper userInfoHelper;

@Override
public Optional<DataScopeDTO> findDataFieldProperty() {
UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId());
DataScopeDTO ds = new DataScopeDTO();
ds.setEmployeeCode(userFullInfo.getOrganizationCode());
ds.setRegionCodes(Lists.newArrayList(userFullInfo.getRegionCode()));
ds.setUserId(userFullInfo.getUserId());
ds.setRole(RoleEnum.DASHBOARD);
return Optional.ofNullable(ds);
}

}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.xml View File

@@ -96,7 +96,7 @@

<select id="pageReviewProjectList" resultType="com.ningdatech.pmapi.meeting.entity.dto.ReviewProjectDTO">
select mip.project_id, np.project_name, np.project_type, np.project_year, np.build_org_name,
np.biz_domain, np.declare_amount declare_amount, mip.meeting_id, m.type meetingType, m.start_time reviewTime,
np.biz_domain, np.declare_amount declared_amount, mip.meeting_id, m.type meetingType, m.start_time reviewTime,
m.connecter, m.contact, me.is_headman, (select count(1) from nd_expert_review ner where ner.project_id = np.id
and ner.create_by = me.expert_id) reviewed
from nd_project np inner join meeting_inner_project mip on mip.project_id = np.id


Loading…
Cancel
Save