|
|
@ -92,7 +92,7 @@ public class StatsAchievementServiceImpl extends AbstractStatsAchievementService |
|
|
|
.eq(ResiTopicEntity::getGroupId,groupId) |
|
|
|
.eq(ResiTopicEntity::getShiftIssue, NumConstant.ONE) |
|
|
|
.eq(ResiTopicEntity::getDelFlag,NumConstant.ZERO); |
|
|
|
currentValue = 210;//resiTopicDao.selectCount(queryWrapper);
|
|
|
|
currentValue = resiTopicDao.selectCount(queryWrapper); |
|
|
|
break; |
|
|
|
case RESOVLE_TOPIC: |
|
|
|
//查询已经关闭且为已解决的话题数
|
|
|
@ -108,7 +108,7 @@ public class StatsAchievementServiceImpl extends AbstractStatsAchievementService |
|
|
|
default: |
|
|
|
log.info("calculateAcm error"); |
|
|
|
} |
|
|
|
calculateMember(customerId, groupId, currentValue, achievementType); |
|
|
|
calculateGroupAchievement(customerId, groupId, currentValue, achievementType); |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
@ -118,7 +118,7 @@ public class StatsAchievementServiceImpl extends AbstractStatsAchievementService |
|
|
|
* @param customerId |
|
|
|
* @param groupId |
|
|
|
*/ |
|
|
|
private void calculateMember(String customerId, String groupId,int currentValue, String achievementType) { |
|
|
|
private void calculateGroupAchievement(String customerId, String groupId, int currentValue, String achievementType) { |
|
|
|
|
|
|
|
ResiGroupAchievementStatsEntity one = super.achievementStatsService.selectLastUnAchieved(customerId, groupId, achievementType); |
|
|
|
|
|
|
@ -141,7 +141,7 @@ public class StatsAchievementServiceImpl extends AbstractStatsAchievementService |
|
|
|
int pageSize = NumConstant.TEN; |
|
|
|
do { |
|
|
|
List<ResiGroupAchievementConfigEntity> list = getConfigByType(achievementType,pageNum++,pageSize); |
|
|
|
isContinue = buildArrivList(customerId, groupId, achievementType, currentValue, one.getTargetValue(), haveArrive, list); |
|
|
|
isContinue = buildArriveList(customerId, groupId, achievementType, currentValue, one.getTargetValue(), haveArrive, list); |
|
|
|
}while (isContinue); |
|
|
|
} |
|
|
|
|
|
|
@ -168,14 +168,14 @@ public class StatsAchievementServiceImpl extends AbstractStatsAchievementService |
|
|
|
log.error("calculateMember get config fail"); |
|
|
|
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode()); |
|
|
|
} |
|
|
|
isContinue = buildArrivList(customerId, groupId, achievementType, currentValue, null, haveArrive, list); |
|
|
|
isContinue = buildArriveList(customerId, groupId, achievementType, currentValue, null, haveArrive, list); |
|
|
|
}while (isContinue); |
|
|
|
if (CollectionUtils.isEmpty(haveArrive)) { |
|
|
|
throw new RenException("小组达成成就失败"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private boolean buildArrivList(String customerId, String groupId, String achievementType, int currentValue, Integer targetValue, List<ResiGroupAchievementStatsEntity> haveArrive, List<ResiGroupAchievementConfigEntity> list) { |
|
|
|
private boolean buildArriveList(String customerId, String groupId, String achievementType, int currentValue, Integer targetValue, List<ResiGroupAchievementStatsEntity> haveArrive, List<ResiGroupAchievementConfigEntity> list) { |
|
|
|
boolean isContinue = true; |
|
|
|
for (ResiGroupAchievementConfigEntity configEntity : list) { |
|
|
|
if (targetValue != null) { |
|
|
|