|  |  | @ -138,6 +138,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ | 
			
		
	
		
			
				
					|  |  |  |      * @date 2021/11/22 9:13 上午 | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  |     public void addPartyServiceCenter(AddPartyServiceCenterFormDTO formDTO, TokenDto tokenDto) { | 
			
		
	
		
			
				
					|  |  |  |         String customerId = tokenDto.getCustomerId(); | 
			
		
	
		
			
				
					|  |  |  |         LambdaQueryWrapper<IcPartyServiceCenterEntity> l = new LambdaQueryWrapper<>(); | 
			
		
	
	
		
			
				
					|  |  | @ -165,12 +166,12 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ | 
			
		
	
		
			
				
					|  |  |  |         baseDao.insert(centerEntity); | 
			
		
	
		
			
				
					|  |  |  |         if (CollectionUtils.isNotEmpty(formDTO.getMatterList())){ | 
			
		
	
		
			
				
					|  |  |  |             List<IcPartyServiceCenterMatterEntity> matters = ConvertUtils.sourceToTarget(formDTO.getMatterList(), IcPartyServiceCenterMatterEntity.class); | 
			
		
	
		
			
				
					|  |  |  |             Map<String, List<IcPartyServiceCenterMatterEntity>> groupByMatterName = matters.stream().collect(Collectors.groupingBy(IcPartyServiceCenterMatterEntity::getMatterName)); | 
			
		
	
		
			
				
					|  |  |  |             groupByMatterName.forEach((k,v) -> { | 
			
		
	
		
			
				
					|  |  |  |                 if (v.size() > NumConstant.ONE){ | 
			
		
	
		
			
				
					|  |  |  |                     throw new EpmetException(EpmetErrorCode.MATTER_NAME_EXISTS_APPOINTMENT_ERROR.getCode()); | 
			
		
	
		
			
				
					|  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |             }); | 
			
		
	
		
			
				
					|  |  |  |             List<String> paramMatterNames = matters.stream().map(m -> m.getMatterName()).collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  |             Integer allSize = paramMatterNames.size(); | 
			
		
	
		
			
				
					|  |  |  |             Integer distinctSize = paramMatterNames.stream().distinct().collect(Collectors.toList()).size(); | 
			
		
	
		
			
				
					|  |  |  |             if (distinctSize < allSize){ | 
			
		
	
		
			
				
					|  |  |  |                 throw new EpmetException(EpmetErrorCode.MATTER_NAME_EXISTS_APPOINTMENT_ERROR.getCode()); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             matters.forEach(m -> { | 
			
		
	
		
			
				
					|  |  |  |                 m.setCustomerId(customerId); | 
			
		
	
		
			
				
					|  |  |  |                 m.setPartyServiceCenterId(centerEntity.getId()); | 
			
		
	
	
		
			
				
					|  |  | @ -188,6 +189,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ | 
			
		
	
		
			
				
					|  |  |  |      * @date 2021/11/22 10:21 上午 | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  |     public void editPartyServiceCenter(EditPartyServiceCenterFormDTO formDTO, TokenDto tokenDto) { | 
			
		
	
		
			
				
					|  |  |  |         LambdaQueryWrapper<IcPartyServiceCenterEntity> l = new LambdaQueryWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  |         l.eq(IcPartyServiceCenterEntity::getCenterName,formDTO.getCenterName()) | 
			
		
	
	
		
			
				
					|  |  | @ -246,6 +248,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ | 
			
		
	
		
			
				
					|  |  |  |      * @date 2021/11/22 1:25 下午 | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  |     public void delMatter(DelMatterFormDTO formDTO) { | 
			
		
	
		
			
				
					|  |  |  |         LambdaQueryWrapper<IcMatterAppointmentRecordEntity> re = new LambdaQueryWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  |         re.eq(BaseEpmetEntity::getDelFlag,NumConstant.ZERO). | 
			
		
	
	
		
			
				
					|  |  | @ -266,6 +269,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ | 
			
		
	
		
			
				
					|  |  |  |      * @date 2021/11/22 2:06 下午 | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  |     public void appointment(AppointmentFormDTO formDTO, TokenDto tokenDto) { | 
			
		
	
		
			
				
					|  |  |  |         String customerId = tokenDto.getCustomerId(); | 
			
		
	
		
			
				
					|  |  |  |         LambdaQueryWrapper<IcMatterAppointmentRecordEntity> l = new LambdaQueryWrapper<>(); | 
			
		
	
	
		
			
				
					|  |  | @ -426,6 +430,7 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ | 
			
		
	
		
			
				
					|  |  |  |      * @date 2021/11/26 5:21 下午 | 
			
		
	
		
			
				
					|  |  |  |      */ | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     @Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  |     public void cancelAppointment(CancelAppointmentFormDTO formDTO) { | 
			
		
	
		
			
				
					|  |  |  |         matterAppointmentRecordDao.cancelAppointment(formDTO.getRecordId(), formDTO.getUserId()); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  | 
 |