Browse Source

Merge branch 'dev_bugfix_ljj' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev

dev_shibei_match
jianjun 4 years ago
parent
commit
883eda023a
  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. 35
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java
  6. 1
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/BlockChainUploadServiceImpl.java
  7. 1
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java
  8. 1
      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)){ if(originalData.containsKey(key)){
Integer answer = (Integer) originalData.get(key); Integer answer = (Integer) originalData.get(key);
if (null != answer && optionDTO.getValue() == answer) { if (null != answer && optionDTO.getValue().equals(answer)) {
currentCount += 1; currentCount += 1;
} }
} }
@ -442,7 +442,7 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl<PrUserProjectDao,
//单选 //单选
if(originalData.containsKey(key)){ if(originalData.containsKey(key)){
Integer answer = (Integer) originalData.get(key); Integer answer = (Integer) originalData.get(key);
if (null != answer && optionDTO.getValue() == answer) { if (null != answer && optionDTO.getValue().equals(answer)) {
currentCount += 1; 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 * @author wxz
* @date 2021.09.23 17:45:25 * @date 2021.09.23 17:45:25
*/ */
@Override
public PermissionValidateResultDTO resiPermissionValidate(String projectKey, String userId, String gridId) { public PermissionValidateResultDTO resiPermissionValidate(String projectKey, String userId, String gridId) {
PrUserProjectEntity project = prUserProjectService.getProjectEntityBykey(projectKey); 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 @Autowired
private ExtAppJwtTokenUtils jwtTokenUtils; private ExtAppJwtTokenUtils jwtTokenUtils;
@Override
public ExternalAppAuthResultDTO auth(String appId, String token, Long ts) { public ExternalAppAuthResultDTO auth(String appId, String token, Long ts) {
String secret; String secret;
if (StringUtils.isBlank(secret = getTokenByAppId(appId))) { 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 * @author wxz
* @date 2021.08.30 17:12:15 * @date 2021.08.30 17:12:15
*/ */
@Override
public void pushComponentAccessToken2PrivateEpmetPlatforms(ComponentAccessTokenFormDTO input) { public void pushComponentAccessToken2PrivateEpmetPlatforms(ComponentAccessTokenFormDTO input) {
List<ThirdPlatformActionsResultDTO> platforms = thirdPlatformService.listPlatformsByActionKey(ThirdPlatformActions.PUSH_COMPONENT_ACCESS_TOKEN); List<ThirdPlatformActionsResultDTO> platforms = thirdPlatformService.listPlatformsByActionKey(ThirdPlatformActions.PUSH_COMPONENT_ACCESS_TOKEN);
platforms.stream().forEach(p -> { platforms.stream().forEach(p -> {

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

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

@ -34,6 +34,7 @@ public class BlockChainUploadServiceImpl implements BlockChainUploadService {
* @param processEntity 处理进展entity * @param processEntity 处理进展entity
* @param assignedStaffEntities 指派给的工作人员entity * @param assignedStaffEntities 指派给的工作人员entity
*/ */
@Override
public void send2BlockChain(ProjectEntity projectEntity, ProjectProcessEntity processEntity, List<ProjectStaffEntity> assignedStaffEntities, String projectStaffId) { public void send2BlockChain(ProjectEntity projectEntity, ProjectProcessEntity processEntity, List<ProjectStaffEntity> assignedStaffEntities, String projectStaffId) {
if (true) { if (true) {

1
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 * @param formDTO
* @return * @return
*/ */
@Override
public EventDetailResultDTO eventDetailForIcData(ResiEventDetailFormDTO formDTO){ public EventDetailResultDTO eventDetailForIcData(ResiEventDetailFormDTO formDTO){
return getEventDetailResultDTO(formDTO.getResiEventId()); return getEventDetailResultDTO(formDTO.getResiEventId());
} }

1
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 * @Author sun
* @Description 文字图片安全校验 * @Description 文字图片安全校验
**/ **/
@Override
public void safetyCheck(List<String> wordList, List<String> imageList) { public void safetyCheck(List<String> wordList, List<String> imageList) {
if (imageList.size() != NumConstant.ZERO) { if (imageList.size() != NumConstant.ZERO) {
wordList.forEach(word -> { wordList.forEach(word -> {

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 * @param dict 字典Key
* @return * @return
*/ */
@Override
public List<Map> getList(String dict) { public List<Map> getList(String dict) {
List<Map> list = new ArrayList<>(); List<Map> list = new ArrayList<>();
Map<String, String> dictMap = new HashMap<>(); 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.GovOrgOpenFeignClient;
import com.epmet.feign.OperCustomizeOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient;
import com.epmet.service.VolunteerService; import com.epmet.service.VolunteerService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -54,6 +53,7 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve
* @param customerId * @param customerId
* @return * @return
*/ */
@Override
public VolunteerDistributionResultDTO getVolunteerDistributionAndLegends(String customerId) { public VolunteerDistributionResultDTO getVolunteerDistributionAndLegends(String customerId) {
// 1.查询分布 // 1.查询分布

Loading…
Cancel
Save