jianjun 4 years ago
parent
commit
d57a47f317
  1. 4
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectServiceImpl.java
  2. 1
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/QuestionnaireServiceImpl.java
  3. 1
      epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java
  4. 1
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java
  5. 53
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java
  6. 5
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/BlockChainUploadServiceImpl.java
  7. 3
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java
  8. 3
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java
  9. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/handler/ExcelDiceAddressListHandlerImpl.java
  10. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java

4
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectServiceImpl.java

@ -410,7 +410,7 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao,
//单选
if(originalData.containsKey(key)){
Integer answer = (Integer) originalData.get(key);
if (null != answer && optionDTO.getValue() == answer) {
if (null != answer && optionDTO.getValue().equals(answer)) {
currentCount += 1;
}
}
@ -442,7 +442,7 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao,
//单选
if(originalData.containsKey(key)){
Integer answer = (Integer) originalData.get(key);
if (null != answer && optionDTO.getValue() == answer) {
if (null != answer && optionDTO.getValue().equals(answer)) {
currentCount += 1;
}
}

1
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/QuestionnaireServiceImpl.java

@ -61,6 +61,7 @@ public class QuestionnaireServiceImpl implements QuestionnaireService, ResultDat
* @author wxz
* @date 2021.09.23 17:45:25
*/
@Override
public PermissionValidateResultDTO resiPermissionValidate(String projectKey, String userId, String gridId) {
PrUserProjectEntity project = prUserProjectService.getProjectEntityBykey(projectKey);

1
epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java

@ -20,6 +20,7 @@ public class ExtAppJwtAuthProcessor extends ExtAppAuthProcessor {
@Autowired
private ExtAppJwtTokenUtils jwtTokenUtils;
@Override
public ExternalAppAuthResultDTO auth(String appId, String token, Long ts) {
String secret;
if (StringUtils.isBlank(secret = getTokenByAppId(appId))) {

1
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java

@ -266,6 +266,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe
* @author wxz
* @date 2021.08.30 17:12:15
*/
@Override
public void pushComponentAccessToken2PrivateEpmetPlatforms(ComponentAccessTokenFormDTO input) {
List<ThirdPlatformActionsResultDTO> platforms = thirdPlatformService.listPlatformsByActionKey(ThirdPlatformActions.PUSH_COMPONENT_ACCESS_TOKEN);
platforms.stream().forEach(p -> {

53
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java

@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
@ -52,6 +53,7 @@ import com.epmet.service.IssueVoteDetailService;
import com.epmet.service.IssueVoteStatisticalService;
import com.epmet.utils.ModuleConstants;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -226,7 +228,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize();
formDTO.setPageNo(pageIndex);
List<EvaluationListResultDTO> data = issueSatisfactionDetailDao.evaluationList(formDTO);
if (data.size() == NumConstant.ZERO || data == null) {
if (data == null || data.size() == NumConstant.ZERO ) {
return new ArrayList<>();
}
//获取头像和昵称 eg:山东路168号-周先生
@ -237,14 +239,13 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
if (null == userResiInfoList || userResiInfoList.size() < NumConstant.ONE) {
throw new RenException(IssueConstant.SELECT_USERINFO_EXCEPTION);
}
List<EvaluationListResultDTO> resultList = data.stream().flatMap(evaluation -> userResiInfoList.stream().filter(user ->
return data.stream().flatMap(evaluation -> userResiInfoList.stream().filter(user ->
evaluation.getUserId().equals(user.getUserId())).map(userInfo -> {
EvaluationListResultDTO resultDTO = ConvertUtils.sourceToTarget(evaluation, EvaluationListResultDTO.class);
resultDTO.setUserNickName(null == userInfo.getShowName() ? "" : userInfo.getShowName());
resultDTO.setUserHeadPhoto(null == userInfo.getHeadPhoto() ? "" : userInfo.getHeadPhoto());
resultDTO.setUserNickName(null == userInfo.getShowName() ? StrConstant.EPMETY_STR : userInfo.getShowName());
resultDTO.setUserHeadPhoto(null == userInfo.getHeadPhoto() ? StrConstant.EPMETY_STR : userInfo.getHeadPhoto());
return resultDTO;
})).collect(Collectors.toList());
return resultList;
}
/**
@ -283,7 +284,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
List<IssueVoteStatisticalDTO> statisticalList =
baseDao.selectListByIds(ids);
if (null != statisticalList && statisticalList.size() > NumConstant.ZERO) {
List<String> statisiticalIds = statisticalList.stream().map(vote -> vote.getIssueId()).collect(Collectors.toList());
List<String> statisiticalIds = statisticalList.stream().map(IssueVoteStatisticalDTO::getIssueId).collect(Collectors.toList());
if (ids.size() > statisiticalIds.size()) {
//差集
@ -325,16 +326,19 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
notExistedIds.removeAll(votedIssueIds);
if(!notExistedIds.isEmpty()){
List<IssueVoteStatisticalDTO> collect = notExistedIds.stream().map(issueId -> {
IssueVoteStatisticalDTO dto = new IssueVoteStatisticalDTO();
dto.setIssueId(issueId);
dto.setSupportCount(NumConstant.ZERO);
dto.setOppositionCount(NumConstant.ZERO);
dto.setVotableCount(Optional.ofNullable(votableCountMap.get(issueGridMap.get(issueId))).orElse(NumConstant.ZERO));
dto.setCreatedBy(ModuleConstants.CREATED_BY_SYSTEM);dto.setUpdatedBy(ModuleConstants.CREATED_BY_SYSTEM);
return dto;
}).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(collect)) toInsert.addAll(collect);}
List<IssueVoteStatisticalDTO> collect = notExistedIds.stream().map(issueId -> {
IssueVoteStatisticalDTO dto = new IssueVoteStatisticalDTO();
dto.setIssueId(issueId);
dto.setSupportCount(NumConstant.ZERO);
dto.setOppositionCount(NumConstant.ZERO);
dto.setVotableCount(Optional.ofNullable(votableCountMap.get(issueGridMap.get(issueId))).orElse(NumConstant.ZERO));
dto.setCreatedBy(ModuleConstants.CREATED_BY_SYSTEM);dto.setUpdatedBy(ModuleConstants.CREATED_BY_SYSTEM);
return dto;
}).collect(Collectors.toList());
if(!CollectionUtils.isEmpty(collect)) {
toInsert.addAll(collect);
}
}
/*
List<IssueAttitudeCountResultDTO> summaryList = issueVoteDetailDao.getVotingSummaryList(notExistedIds);
@ -427,8 +431,11 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
List<IssueVoteStatisticalDTO> listToUpdate = new ArrayList<>();
setVotableCountsAndUpdateCache(listToUpdate,issues,votableCountMap);
// listToUpdate批量更新
baseDao.updateBatchByIssueId(listToUpdate);
// listToUpdate批量更新 todo 暂时解决下 分批插入
if (CollectionUtils.isNotEmpty(listToUpdate)) {
ListUtils.partition(listToUpdate, NumConstant.ONE_HUNDRED)
.forEach(part -> baseDao.updateBatchByIssueId(part));
}
}
}else{
@ -550,8 +557,12 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
IssueVoteStatisticalDTO vote = new IssueVoteStatisticalDTO();
vote.setIssueId(issue.getId());
VoteRedisFormDTO cache = issueVoteDetailRedis.getVoteStatistical(issue.getId());
if(null == cache) continue;
if(StringUtils.isBlank(cache.getIssueId())) cache.setIssueId(issue.getId());
if(null == cache) {
continue;
}
if(StringUtils.isBlank(cache.getIssueId())) {
cache.setIssueId(issue.getId());
}
vote.setCreatedBy(ModuleConstants.CREATED_BY_SYSTEM);
vote.setUpdatedBy(ModuleConstants.CREATED_BY_SYSTEM);
vote.setSupportCount(cache.getSupportAmount());
@ -563,7 +574,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
list.add(vote);
if(cache.getShouldVoteCount() != vote.getVotableCount()){
if(!cache.getShouldVoteCount().equals(vote.getVotableCount())){
cache.setShouldVoteCount(vote.getVotableCount());
cache.setIssueId(issue.getId());
issueVoteDetailRedis.set(cache);

5
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/BlockChainUploadServiceImpl.java

@ -34,12 +34,13 @@ public class BlockChainUploadServiceImpl implements BlockChainUploadService {
* @param processEntity 处理进展entity
* @param assignedStaffEntities 指派给的工作人员entity
*/
@Override
public void send2BlockChain(ProjectEntity projectEntity, ProjectProcessEntity processEntity, List<ProjectStaffEntity> assignedStaffEntities, String projectStaffId) {
if (true) {
return;
}
// 1.项目主信息
BlockChainProjectFormDTO project = null;
@ -131,7 +132,7 @@ public class BlockChainUploadServiceImpl implements BlockChainUploadService {
handledStaff.setOrgIdPath(handledStaffEntity.getOrgIdPath());
handledStaff.setProjectId(handledStaffEntity.getProjectId());
}
if (project == null) {
// 处理
BlockChainProcessProjectFormDTO processForm = new BlockChainProcessProjectFormDTO();

3
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java

@ -233,6 +233,7 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
* @param formDTO
* @return
*/
@Override
public EventDetailResultDTO eventDetailForIcData(ResiEventDetailFormDTO formDTO){
return getEventDetailResultDTO(formDTO.getResiEventId());
}
@ -767,4 +768,4 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
}
}
}

3
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java

@ -243,6 +243,7 @@ public class NoticeCommentServiceImpl extends BaseServiceImpl<NoticeCommentDao,
* @Author sun
* @Description 文字图片安全校验
**/
@Override
public void safetyCheck(List<String> wordList, List<String> imageList) {
if (imageList.size() != NumConstant.ZERO) {
wordList.forEach(word -> {
@ -286,4 +287,4 @@ public class NoticeCommentServiceImpl extends BaseServiceImpl<NoticeCommentDao,
}
}
}
}

1
epmet-user/epmet-user-server/src/main/java/com/epmet/handler/ExcelDiceAddressListHandlerImpl.java

@ -21,6 +21,7 @@ public class ExcelDiceAddressListHandlerImpl implements IExcelDictHandler {
* @param dict 字典Key
* @return
*/
@Override
public List<Map> getList(String dict) {
List<Map> list = new ArrayList<>();
Map<String, String> dictMap = new HashMap<>();

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java

@ -17,7 +17,6 @@ import com.epmet.feign.EpmetHeartOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.feign.OperCustomizeOpenFeignClient;
import com.epmet.service.VolunteerService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -54,6 +53,7 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve
* @param customerId
* @return
*/
@Override
public VolunteerDistributionResultDTO getVolunteerDistributionAndLegends(String customerId) {
// 1.查询分布

Loading…
Cancel
Save