Commit 73045d5d by 陶光胜

Merge branch 'developer' into 'master'

Developer

See merge request !19
parents 3b33e42e 2dcd2993
......@@ -109,6 +109,17 @@ public interface AuditorApiService {
ServiceResponse<List<AuditorDTO>> listAuditorByProject(String projectItemCode, Integer userId, Integer enterpriseId);
/**
* @Title: listAuditorByProject
* @Description:
* @author zhiwj
* @param projectItemCode
* @param enterpriseId
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.AuditorDTO>>
* @throws
*/
ServiceResponse<List<AuditorDTO>> listAuditorByProject(String projectItemCode, Integer enterpriseId);
/**
* 通过openid查询审核员
* @Title: getAuditorByOpenid
* @Description:
......
......@@ -276,6 +276,29 @@ public class AuditorApiServiceImpl implements AuditorApiService {
}
@Override
public ServiceResponse<List<AuditorDTO>> listAuditorByProject(String projectItemCode, Integer enterpriseId) {
ServiceResponse<ProjectItemDTO> projectItemResponse = this.projectItemApiService.getByProjectItemCode(projectItemCode);
if (!projectItemResponse.isSuccess()) {
return EnterpriseServiceResponse.failure(ErrorCode.NOTEXISTS);
}
Integer projectItemId = projectItemResponse.getResult().getProjectItemId();
// 找到审批项对应的审核员
List<Integer> projectAuditorIds = auditorProjectItemRelService.listAuditorIdByProjectItemId(enterpriseId, projectItemId);
if (CollectionUtils.isNotEmpty(projectAuditorIds)) {
AuditorListQO listQO = new AuditorListQO();
listQO.setEnterpriseId(enterpriseId);
listQO.setIsUse(GlobalInfo.DATA_STATUS_NORMAL);
listQO.setAuditorIdList(projectAuditorIds);
List<TabAuditor> auditorList = this.auditorService.listAuditor(listQO);
if (CollectionUtils.isNotEmpty(auditorList)) {
return ServiceResponse.success(EntityUtil.changeEntityListByJSON(AuditorDTO.class, auditorList));
}
}
AuditorDTO adminAuditor = this.getAdminAuditor(enterpriseId);
return ServiceResponse.success(Collections.singletonList(adminAuditor));
}
@Override
public ServiceResponse<AuditorDTO> getAuditorByOpenid(String openid) {
TabAuditor auditor = this.auditorService.getAuditorByOpenid(openid);
if (auditor != null) {
......
......@@ -237,9 +237,9 @@ public class ResourceApiServiceImpl implements ResourceApiService {
}
if (user.getSuperAdmin() == 1) {
List<OwnerMemberCardDTO> memberCardList = memberCardApiService.getAll(user.getEnterpriseId()).getResult();
List<AppletsConfigSimpleOutputDTO> appletList = appletsConfigApiService.listValidAppletConfigAppId(user.getEnterpriseId()).getResult();
List<ServiceConfigSimpleOutputDTO> serviceList = serviceConfigApiService.listValidServiceConfigAppId(user.getEnterpriseId()).getResult();
List<OwnerMemberCardDTO> memberCardList = memberCardApiService.getAllContainDel(user.getEnterpriseId()).getResult();
List<AppletsConfigSimpleOutputDTO> appletList = appletsConfigApiService.listAppletConfigAppIdContainDel(user.getEnterpriseId()).getResult();
List<ServiceConfigSimpleOutputDTO> serviceList = serviceConfigApiService.listServiceConfigAppIdContainDel(user.getEnterpriseId()).getResult();
ChannelResourceDTO channelResourceDTO = new ChannelResourceDTO();
channelResourceDTO.setAppletConfigIdList(Optional.ofNullable(appletList).orElse(Collections.emptyList()).stream().map(AppletsConfigSimpleOutputDTO::getAppletConfigId).collect(Collectors.toList()));
......@@ -359,6 +359,11 @@ public class ResourceApiServiceImpl implements ResourceApiService {
UserResourceDTO userResourceDTO = resourceDTOList.get(0);
TabSysResource resource = this.resourceService.getResource(userResourceDTO.getResourceId());
CrowdWidgetDTO widgetDTO = crowdWidgetApiService.getScreenWidgetInfo(resource.getUserResource(), resource.getEnterpriseId()).getResult();
return EnterpriseServiceResponse.success(StringUtils.isNotBlank(widgetDTO.getSearchParams()) ? resource.getUserResource() : null);
if (StringUtils.isBlank(widgetDTO.getSearchParams())) {
return EnterpriseServiceResponse.success();
} else {
return EnterpriseServiceResponse.success(StringUtils.equals(widgetDTO.getSearchParams(), "[{\"type\":\"\",\"list\":[]}]") ? -1 : resource.getUserResource());
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment