|  |  | @ -193,7 +193,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             insert(entity); | 
			
		
	
		
			
				
					|  |  |  |         } else { | 
			
		
	
		
			
				
					|  |  |  |             if (CollectionUtils.isNotEmpty(list) && list.get(0).getId().equals(entity.getId())) { | 
			
		
	
		
			
				
					|  |  |  |             if (CollectionUtils.isNotEmpty(list) && !list.get(0).getId().equals(entity.getId())) { | 
			
		
	
		
			
				
					|  |  |  |                 throw new EpmetException(EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getCode(), EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getMsg(), EpmetErrorCode.PARTY_UNIT_NAME_EXITED.getMsg()); | 
			
		
	
		
			
				
					|  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |             updateById(entity); | 
			
		
	
	
		
			
				
					|  |  | @ -261,6 +261,25 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa | 
			
		
	
		
			
				
					|  |  |  |         }).collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
		
			
				
					|  |  |  |     public List<OptionDTO> options(IcPartyUnitDTO dto) { | 
			
		
	
		
			
				
					|  |  |  |         LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  |         wrapper.and(wp -> wp.eq(IcPartyUnitEntity::getAgencyId, dto.getAgencyId()).or(). | 
			
		
	
		
			
				
					|  |  |  |                 like(IcPartyUnitEntity::getPids, dto.getAgencyId())); | 
			
		
	
		
			
				
					|  |  |  |         wrapper.orderByDesc(IcPartyUnitEntity::getUpdatedTime); | 
			
		
	
		
			
				
					|  |  |  |         wrapper.eq(StringUtils.isNotBlank(dto.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, dto.getServiceMatter()); | 
			
		
	
		
			
				
					|  |  |  |         List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); | 
			
		
	
		
			
				
					|  |  |  |         if (CollectionUtils.isEmpty(list)) { | 
			
		
	
		
			
				
					|  |  |  |             return Collections.emptyList(); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         return list.stream().map(item -> { | 
			
		
	
		
			
				
					|  |  |  |             OptionDTO option = new OptionDTO(); | 
			
		
	
		
			
				
					|  |  |  |             option.setValue(item.getId()); | 
			
		
	
		
			
				
					|  |  |  |             option.setLabel(item.getUnitName()); | 
			
		
	
		
			
				
					|  |  |  |             return option; | 
			
		
	
		
			
				
					|  |  |  |         }).collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     /** | 
			
		
	
		
			
				
					|  |  |  |      * 导入数据 | 
			
		
	
		
			
				
					|  |  |  |      * | 
			
		
	
	
		
			
				
					|  |  | 
 |