|  | @ -1,37 +1,35 @@ | 
			
		
	
		
		
			
				
					|  |  | package com.epmet.service.impl; |  |  | package com.epmet.service.impl; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 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.FieldConstant; |  |  |  | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.constant.NumConstant; |  |  | import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |  |  | import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; |  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.EpmetException; |  |  | import com.epmet.commons.tools.exception.EpmetException; | 
			
		
	
		
		
			
				
					|  |  | 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.redis.common.CustomerOrgRedis; |  |  | import com.epmet.commons.tools.redis.common.CustomerOrgRedis; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |  |  | import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; |  |  | import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.utils.ConvertUtils; |  |  | import com.epmet.commons.tools.utils.ConvertUtils; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dao.IcNatDao; |  |  | import com.epmet.dao.IcNatDao; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.IcNatDTO; |  |  | import com.epmet.dto.IcNatDTO; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.dto.IcNoticeDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.form.AddIcNatFormDTO; |  |  | import com.epmet.dto.form.AddIcNatFormDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.form.MyNatListFormDTO; |  |  | import com.epmet.dto.form.MyNatListFormDTO; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.dto.form.SendNoticeFormDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.result.MyNatListResultDTO; |  |  | import com.epmet.dto.result.MyNatListResultDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.dto.result.NatListResultDTO; |  |  | import com.epmet.dto.result.NatListResultDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.entity.IcNatEntity; |  |  | import com.epmet.entity.IcNatEntity; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.service.IcNatService; |  |  | import com.epmet.service.IcNatService; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.service.IcNoticeService; | 
			
		
	
		
		
			
				
					|  |  | import com.github.pagehelper.PageHelper; |  |  | import com.github.pagehelper.PageHelper; | 
			
		
	
		
		
			
				
					|  |  | import com.github.pagehelper.PageInfo; |  |  | import com.github.pagehelper.PageInfo; | 
			
		
	
		
		
			
				
					|  |  | import lombok.extern.slf4j.Slf4j; |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
		
		
			
				
					
					|  |  | import org.apache.commons.lang3.StringUtils; |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | import org.springframework.stereotype.Service; |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.transaction.annotation.Transactional; |  |  | import org.springframework.transaction.annotation.Transactional; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  | import java.util.Arrays; |  |  | import java.util.ArrayList; | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  | import java.util.List; |  |  | import java.util.List; | 
			
		
	
		
		
			
				
					|  |  | import java.util.Map; |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | /** |  |  | /** | 
			
		
	
		
		
			
				
					|  |  |  * 核酸上报记录 |  |  |  * 核酸上报记录 | 
			
		
	
	
		
		
			
				
					|  | @ -42,7 +40,8 @@ import java.util.Map; | 
			
		
	
		
		
			
				
					|  |  | @Service |  |  | @Service | 
			
		
	
		
		
			
				
					|  |  | @Slf4j |  |  | @Slf4j | 
			
		
	
		
		
			
				
					|  |  | public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> implements IcNatService { |  |  | public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> implements IcNatService { | 
			
		
	
		
		
			
				
					
					|  |  | 
 |  |  |     @Autowired | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |     private IcNoticeService icNoticeService; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     /** |  |  |     /** | 
			
		
	
		
		
			
				
					|  |  |      * @Author sun |  |  |      * @Author sun | 
			
		
	
	
		
		
			
				
					|  | @ -63,9 +62,15 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         //3.新增通知表信息
 |  |  |         //3.新增通知表信息
 | 
			
		
	
		
		
			
				
					|  |  |         if (formDTO.getChannel().size() > NumConstant.ZERO) { |  |  |         if (formDTO.getChannel().size() > NumConstant.ZERO) { | 
			
		
	
		
		
			
				
					
					|  |  |             //TODO
 |  |  |             SendNoticeFormDTO dto = new SendNoticeFormDTO(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 
 |  |  |             List<SendNoticeFormDTO.UserListBean> userList = new ArrayList<>(); | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 
 |  |  |             userList.add(ConvertUtils.sourceToTarget(formDTO, SendNoticeFormDTO.UserListBean.class)); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setUserList(userList); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setChannel(formDTO.getChannel()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setOrigin("2"); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setContent(formDTO.getContent()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setOrgName(agencyInfo.getOrganizationName()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             icNoticeService.sendNotice(dto); | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
	
		
		
			
				
					|  | @ -122,7 +127,11 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp | 
			
		
	
		
		
			
				
					|  |  |         resultDTO = ConvertUtils.sourceToTarget(entity, IcNatDTO.class); |  |  |         resultDTO = ConvertUtils.sourceToTarget(entity, IcNatDTO.class); | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         //2.查询对应的通知记录信息
 |  |  |         //2.查询对应的通知记录信息
 | 
			
		
	
		
		
			
				
					
					|  |  |         //TODO
 |  |  |         IcNoticeDTO dto = icNoticeService.getNotice(entity.getCustomerId(), entity.getIdCard()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |         if (null != dto) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             resultDTO.setChannel(dto.getChannelList()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             resultDTO.setContent(dto.getContent()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         return resultDTO; |  |  |         return resultDTO; | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
	
		
		
			
				
					|  | @ -143,7 +152,21 @@ public class IcNatServiceImpl extends BaseServiceImpl<IcNatDao, IcNatEntity> imp | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  |         //3.新增通知表信息
 |  |  |         //3.新增通知表信息
 | 
			
		
	
		
		
			
				
					|  |  |         if (formDTO.getChannel().size() > NumConstant.ZERO) { |  |  |         if (formDTO.getChannel().size() > NumConstant.ZERO) { | 
			
		
	
		
		
			
				
					
					|  |  |             //TODO
 |  |  |             IcNatEntity icNatEntity = baseDao.selectById(formDTO.getIcNatId()); | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |             //1.获取所填居民所属组织缓存信息
 | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(icNatEntity.getAgencyId()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             if (null == agencyInfo) { | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 throw new RenException(String.format("获取组织缓存信息失败%s", icNatEntity.getAgencyId())); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             SendNoticeFormDTO dto = new SendNoticeFormDTO(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             List<SendNoticeFormDTO.UserListBean> userList = new ArrayList<>(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             userList.add(ConvertUtils.sourceToTarget(formDTO, SendNoticeFormDTO.UserListBean.class)); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setUserList(userList); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setChannel(formDTO.getChannel()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setOrigin("2"); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setContent(formDTO.getContent()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             dto.setOrgName(agencyInfo.getOrganizationName()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             icNoticeService.sendNotice(dto); | 
			
		
	
		
		
			
				
					|  |  |         } |  |  |         } | 
			
		
	
		
		
			
				
					|  |  |     } |  |  |     } | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | 
 |