|  |  | @ -7,15 +7,14 @@ import com.epmet.commons.tools.constant.NumConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.exception.EpmetException; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.page.PageData; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.redis.common.CustomerOrgRedis; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.ConvertUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.FieldConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.IcEpidemicSpecialAttentionDao; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.IcEpidemicSpecialAttentionDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.form.CancelAttentionFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.form.NatListFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.form.VaccinationAddFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.form.VaccinationListFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.form.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.VaccinationListResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.IcEpidemicSpecialAttentionEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.IcEpidemicSpecialAttentionService; | 
			
		
	
	
		
			
				
					|  |  | @ -100,10 +99,10 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     public PageData vaccinationList(VaccinationListFormDTO formDTO) { | 
			
		
	
		
			
				
					|  |  |  |         PageData result = new PageData(new ArrayList(), NumConstant.ZERO_L); | 
			
		
	
		
			
				
					|  |  |  |         PageData<VaccinationListResultDTO> result = new PageData(new ArrayList(), NumConstant.ZERO_L); | 
			
		
	
		
			
				
					|  |  |  |         CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  |         if (null == staffInfo){ | 
			
		
	
		
			
				
					|  |  |  |             throw new EpmetException("为查询到工作人员信息"+formDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  |             throw new EpmetException("未查询到工作人员信息"+formDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         formDTO.setOrgId(staffInfo.getAgencyId()); | 
			
		
	
		
			
				
					|  |  |  |         // 关注类型,核酸检测:2,疫苗接种:1
 | 
			
		
	
	
		
			
				
					|  |  | @ -128,6 +127,11 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi | 
			
		
	
		
			
				
					|  |  |  |                 result.setTotal(list.size()); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         int i = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); | 
			
		
	
		
			
				
					|  |  |  |         for (VaccinationListResultDTO v : result.getList()) { | 
			
		
	
		
			
				
					|  |  |  |             i += 1; | 
			
		
	
		
			
				
					|  |  |  |             v.setSort(i); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         return result; | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | @ -138,8 +142,26 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi | 
			
		
	
		
			
				
					|  |  |  |      * @date 2022/3/28 13:35 | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  |     public void vaccinationAdd(VaccinationAddFormDTO formDTO) { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  |         if (null == staffInfo){ | 
			
		
	
		
			
				
					|  |  |  |             throw new EpmetException("未查询到工作人员信息"+formDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(staffInfo.getAgencyId()); | 
			
		
	
		
			
				
					|  |  |  |         if (null == agencyInfo){ | 
			
		
	
		
			
				
					|  |  |  |             throw new EpmetException("未查询到组织信息"+staffInfo.getAgencyId()); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         List<IcEpidemicSpecialAttentionEntity> entities = ConvertUtils.sourceToTarget(formDTO.getList(), IcEpidemicSpecialAttentionEntity.class); | 
			
		
	
		
			
				
					|  |  |  |         entities.forEach(e -> { | 
			
		
	
		
			
				
					|  |  |  |             e.setIsAttention(NumConstant.ONE); | 
			
		
	
		
			
				
					|  |  |  |             e.setOrgId(agencyInfo.getId()); | 
			
		
	
		
			
				
					|  |  |  |             e.setPid(agencyInfo.getPid()); | 
			
		
	
		
			
				
					|  |  |  |             e.setPids(agencyInfo.getPids()); | 
			
		
	
		
			
				
					|  |  |  |             e.setCustomerId(formDTO.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  |         }); | 
			
		
	
		
			
				
					|  |  |  |         insertBatch(entities); | 
			
		
	
		
			
				
					|  |  |  |         //TODO 发送通知
 | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
	
		
			
				
					|  |  | @ -162,7 +184,7 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl<IcEpi | 
			
		
	
		
			
				
					|  |  |  |      * @date 2022/3/28 13:51 | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     public void cancelAttention(List<CancelAttentionFormDTO> list) { | 
			
		
	
		
			
				
					|  |  |  |     public void cancelAttention(CancelAttentionPackageFormDTO formDTO) { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 |