@ -23,15 +23,12 @@ import com.epmet.dao.*; 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.dto.IcVolunteerPolyDTO ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.dto.VolunteerInfoDTO ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.dto.form.* ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.dto.form.resi.ResiVolunteerAuthenticateFormDTO ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.dto.result.ResiUserBaseInfoResultDTO ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.dto.result.VolunteerPolyListResultDTO ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.dto.result.VolunteerPolyMapDataResultDTO ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.dto.result.VolunteerPolyPieResultDTO ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.entity.* ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.entity.IcResiUserEntity ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.entity.IcVolunteerPolyCategoryEntity ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.entity.IcVolunteerPolyEntity ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.entity.UserBaseInfoEntity ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.enums.CustomizeEnum ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.feign.EpmetHeartOpenFeignClient ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  com.epmet.feign.OperCustomizeOpenFeignClient ;  
				
			 
			
		
	
	
		
			
				
					
						
						
						
							
								 
							 
						
					 
				
				 
				
					@ -49,7 +46,10 @@ import org.springframework.stereotype.Service; 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  org.springframework.transaction.annotation.Transactional ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  javax.annotation.Resource ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  java.util.* ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  java.util.ArrayList ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  java.util.Arrays ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  java.util.List ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  java.util.Map ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					import  java.util.stream.Collectors ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					/ * *  
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -356,6 +356,19 @@ public class IcVolunteerPolyServiceImpl extends BaseServiceImpl<IcVolunteerPolyD 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    icVolunteerPolyCategoryDao . delete ( categoryWrapper ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    icVolunteerPolyCategoryService . insertBatch ( entityList ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                //小程序端设为志愿者
  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                //根据身份证获取小程序端居民信息
  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                LambdaQueryWrapper < UserBaseInfoEntity >  baseInfoWrapper  =  new  LambdaQueryWrapper < > ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                baseInfoWrapper . eq ( UserBaseInfoEntity : : getCustomerId ,  customerId ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                baseInfoWrapper . eq ( UserBaseInfoEntity : : getIdNum ,  icUser . getIdCard ( ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                UserBaseInfoEntity  baseInfo  =  userBaseInfoDao . selectOne ( baseInfoWrapper ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                if  ( null  ! =  baseInfo )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    ResiVolunteerAuthenticateFormDTO  formDTO  =  new  ResiVolunteerAuthenticateFormDTO ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    formDTO . setCustomerId ( customerId ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    formDTO . setUserId ( baseInfo . getUserId ( ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    formDTO . setGridId ( icUser . getGridId ( ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    epmetHeartOpenFeignClient . addVolunteer ( formDTO ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					            }  else  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                if  ( ! isDyzxh )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    //删除志愿者信息
  
				
			 
			
		
	
	
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
				
				 
				
					@ -438,12 +451,24 @@ public class IcVolunteerPolyServiceImpl extends BaseServiceImpl<IcVolunteerPolyD 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    entity . setId ( volunteer . getId ( ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    if  ( null  ! =  icResiUser )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                        entity . setIcResiUser ( icResiUser . getId ( ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                        if  ( ! NumConstant . ONE_STR . equals ( icResiUser . getIsVolunteer ( ) ) )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                            IcResiUserEntity  icUserEntity  =  new  IcResiUserEntity ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                            icUserEntity . setId ( icResiUser . getId ( ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                            icUserEntity . setIsVolunteer ( NumConstant . ONE_STR ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                            icResiUserDao . updateById ( icUserEntity ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                        }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    baseDao . updateById ( entity ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					
 
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                }  else  if  ( null  = =  volunteer )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    if  ( null  ! =  icResiUser )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                        entity . setIcResiUser ( icResiUser . getId ( ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                        if  ( ! NumConstant . ONE_STR . equals ( icResiUser . getIsVolunteer ( ) ) )  {  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                            IcResiUserEntity  icUserEntity  =  new  IcResiUserEntity ( ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                            icUserEntity . setId ( icResiUser . getId ( ) ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                            icUserEntity . setIsVolunteer ( NumConstant . ONE_STR ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                            icResiUserDao . updateById ( icUserEntity ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                        }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    }  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    baseDao . insert ( entity ) ;  
				
			 
			
		
	
		
			
				
					 
					 
				
				 
				
					                    IcVolunteerPolyCategoryEntity  category  =  new  IcVolunteerPolyCategoryEntity ( ) ;