|  |  | @ -3,6 +3,7 @@ package com.epmet.service.impl; | 
			
		
	
		
			
				
					|  |  |  | import com.alibaba.fastjson.JSON; | 
			
		
	
		
			
				
					|  |  |  | import com.baomidou.mybatisplus.core.toolkit.IdWorker; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.StrConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.EpmetException; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.RenException; | 
			
		
	
	
		
			
				
					|  |  | @ -26,6 +27,7 @@ import com.epmet.dto.UserBadgeCertificateRecordDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.form.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.BadgeEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.UserBadgeCertificateRecordEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.EpmetMessageOpenFeignClient; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.EpmetUserOpenFeignClient; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.GovOrgFeignClient; | 
			
		
	
	
		
			
				
					|  |  | @ -140,17 +142,39 @@ public class UserBadgeServiceImpl implements UserBadgeService { | 
			
		
	
		
			
				
					|  |  |  |                 u.setIsLighted(u.getIsOpened().equals(NumConstant.ZERO_STR) ? BadgeConstant.NO : BadgeConstant.YES); | 
			
		
	
		
			
				
					|  |  |  |                 u.setIsCertificated(BadgeConstant.NO); | 
			
		
	
		
			
				
					|  |  |  |                 u.setIsReject(false); | 
			
		
	
		
			
				
					|  |  |  |                 u.setAuditStatus(StrConstant.EPMETY_STR); | 
			
		
	
		
			
				
					|  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |             return userOperListResultDTOS; | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         userOperListResultDTOS.forEach(ub -> { | 
			
		
	
		
			
				
					|  |  |  |             userAuthBadgeList.forEach(u -> { | 
			
		
	
		
			
				
					|  |  |  |                 if (ub.getBadgeId().equals(u.getBadgeId())){ | 
			
		
	
		
			
				
					|  |  |  |             Boolean authFlag=false; | 
			
		
	
		
			
				
					|  |  |  |             for (UserOperListResultDTO u : userAuthBadgeList) { | 
			
		
	
		
			
				
					|  |  |  |                 ub.setAuditStatus(StrConstant.EPMETY_STR); | 
			
		
	
		
			
				
					|  |  |  |                 if (ub.getBadgeId().equals(u.getBadgeId())) { | 
			
		
	
		
			
				
					|  |  |  |                     ub.setIsReject(u.getAuditStatus().equals(BadgeConstant.REJECTED)); | 
			
		
	
		
			
				
					|  |  |  |                     ub.setIsCertificated(u.getAuditStatus().equals(BadgeConstant.APPROVED) ? BadgeConstant.YES : BadgeConstant.NO); | 
			
		
	
		
			
				
					|  |  |  |                     ub.setIsLighted(u.getIsOpened().equals(NumConstant.ZERO_STR) ? BadgeConstant.NO : BadgeConstant.YES); | 
			
		
	
		
			
				
					|  |  |  |                     ub.setAuditStatus(u.getAuditStatus()); | 
			
		
	
		
			
				
					|  |  |  |                     authFlag = true; | 
			
		
	
		
			
				
					|  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             if (!authFlag) { | 
			
		
	
		
			
				
					|  |  |  |                 UserBadgeCertificateRecordEntity entity = userBadgeCertificateRecordDao.selectCertificateRecord(ub.getBadgeId(), userOperListFormDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  |                 if (null == entity) { | 
			
		
	
		
			
				
					|  |  |  |                     //未申请
 | 
			
		
	
		
			
				
					|  |  |  |                     ub.setIsReject(null); | 
			
		
	
		
			
				
					|  |  |  |                     ub.setIsLighted(BadgeConstant.NO); | 
			
		
	
		
			
				
					|  |  |  |                     ub.setAuditStatus(StrConstant.EPMETY_STR); | 
			
		
	
		
			
				
					|  |  |  |                     ub.setIsCertificated(BadgeConstant.NO); | 
			
		
	
		
			
				
					|  |  |  |                 } else { | 
			
		
	
		
			
				
					|  |  |  |                     //申请了
 | 
			
		
	
		
			
				
					|  |  |  |                     ub.setIsReject(entity.getAuditStatus().equals(BadgeConstant.REJECTED)); | 
			
		
	
		
			
				
					|  |  |  |                     ub.setIsLighted(BadgeConstant.NO); | 
			
		
	
		
			
				
					|  |  |  |                     ub.setAuditStatus(entity.getAuditStatus()); | 
			
		
	
		
			
				
					|  |  |  |                     ub.setIsCertificated(BadgeConstant.YES); | 
			
		
	
		
			
				
					|  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |         Map<String, List<UserOperListResultDTO>> collect = userOperListResultDTOS.stream().collect(Collectors.groupingBy(UserOperListResultDTO::getIsLighted)); | 
			
		
	
		
			
				
					|  |  |  |         List<UserOperListResultDTO> result = collect.get(BadgeConstant.YES); | 
			
		
	
	
		
			
				
					|  |  | 
 |