|
|
@ -1,19 +1,16 @@ |
|
|
|
package com.epmet.service.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.epmet.commons.tools.constant.ServiceConstant; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.constant.WorkGrassRootsFunctionConstant; |
|
|
|
import com.epmet.controller.TestFormDTO1; |
|
|
|
import com.epmet.controller.TestResultDTO1; |
|
|
|
import com.epmet.dto.form.RedDotFormDTO; |
|
|
|
import com.epmet.dto.result.CustomerGridByUserIdResultDTO; |
|
|
|
import com.epmet.dto.result.GridAuditingBadgeCountResultDTO; |
|
|
|
import com.epmet.dto.result.GridProcessingCountResultDTO; |
|
|
|
import com.epmet.dto.result.RedDotResultDTO; |
|
|
|
import com.epmet.feign.GovIssueFeignClient; |
|
|
|
import com.epmet.feign.GovOrgFeignClient; |
|
|
|
import com.epmet.feign.ResiGroupFeignClient; |
|
|
|
import com.epmet.feign.ResiPartymemberFeignClient; |
|
|
|
import com.epmet.feign.*; |
|
|
|
import com.epmet.service.RemindService; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
@ -44,6 +41,9 @@ public class RemindServiceImpl implements RemindService { |
|
|
|
@Autowired |
|
|
|
private GovIssueFeignClient govIssueFeignClient; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|
|
|
|
|
|
|
@Override |
|
|
|
public RedDotResultDTO queryGridRedDot(RedDotFormDTO formDTO) { |
|
|
|
RedDotResultDTO redDotResultDTO = new RedDotResultDTO(); |
|
|
@ -88,10 +88,14 @@ public class RemindServiceImpl implements RemindService { |
|
|
|
if (this.getWorkGrassRootsIssue(gridIdList)) { |
|
|
|
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_ISSUE); |
|
|
|
} |
|
|
|
if(this.getWorkGrassRootsBadge(gridIdList)){ |
|
|
|
functionList.add(WorkGrassRootsFunctionConstant.WORK_GRASSROOTS_BADGE); |
|
|
|
} |
|
|
|
return functionList; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//群组管理: work_grassroots_group
|
|
|
|
public Boolean getWorkGrassRootsGroup(List<String> gridIdList) { |
|
|
|
Result<List<GridProcessingCountResultDTO>> groupProcessingCountResult = resiGroupFeignClient.queryGroupProcessingCount(gridIdList); |
|
|
@ -104,8 +108,7 @@ public class RemindServiceImpl implements RemindService { |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
logger.error(String.format("调用%s服务,查询网格%s待审核小组数失败code%s,msg:", ServiceConstant.RESI_GROUP_SERVER, gridIdList.get(0), groupProcessingCountResult.getCode(), |
|
|
|
groupProcessingCountResult.getMsg())); |
|
|
|
logger.error(String.format("查询网格内待审核小组数失败,%s",groupProcessingCountResult.getMsg())); |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
@ -123,8 +126,7 @@ public class RemindServiceImpl implements RemindService { |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
logger.error(String.format("调用%s服务,查询网格%s待审核热心居民数失败code%s,msg:", ServiceConstant.RESI_PARTYMEMBER_SERVER, gridIdList.get(0), resiGroupProcessingCountResult.getCode(), |
|
|
|
resiGroupProcessingCountResult.getMsg())); |
|
|
|
logger.error(String.format("查询网昂个内待审核热心居民数失败,%s",resiGroupProcessingCountResult.getMsg())); |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
@ -142,8 +144,7 @@ public class RemindServiceImpl implements RemindService { |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
logger.error(String.format("调用%s服务,查询网格%s待审核党员数失败code%s,msg:", ServiceConstant.RESI_PARTYMEMBER_SERVER, gridIdList.get(0), partyMemberProcessingCountResult.getCode(), |
|
|
|
partyMemberProcessingCountResult.getMsg())); |
|
|
|
logger.error(String.format("查询网格内待审核党员总数失败,%s",partyMemberProcessingCountResult.getMsg())); |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
@ -161,12 +162,27 @@ public class RemindServiceImpl implements RemindService { |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
logger.error(String.format("调用%s服务,查询网格%s表决中议题总数失败code%s,msg:", ServiceConstant.GOV_ISSUE_SERVER, gridIdList.get(0), issueResult.getCode(), |
|
|
|
issueResult.getMsg())); |
|
|
|
logger.error("查询网格表决中议题总数失败,%s",issueResult.getMsg()); |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
//徽章审核
|
|
|
|
private boolean getWorkGrassRootsBadge(List<String> gridIdList) { |
|
|
|
Result<List<GridAuditingBadgeCountResultDTO>> badgeResult = epmetUserOpenFeignClient.queryGridAuditingBadgeCount(gridIdList); |
|
|
|
if (badgeResult.success()) { |
|
|
|
for (String gridId : gridIdList) { |
|
|
|
for (GridAuditingBadgeCountResultDTO gridAuditingBadgeCountResultDTO : badgeResult.getData()) { |
|
|
|
if (gridId.equals(gridAuditingBadgeCountResultDTO.getGridId()) && gridAuditingBadgeCountResultDTO.getCount() > 0) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
logger.error(String.format("查询网格待审核徽章申请失败,%s",badgeResult.getMsg())); |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
@Override |
|
|
|
public TestResultDTO1 test(TestFormDTO1 testFormDTO1) { |
|
|
|
Result<TestResultDTO1> resultDTO1Result = resiGroupFeignClient.test(testFormDTO1); |
|
|
|