|
|
@ -695,4 +695,24 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
|
baseDao.insert(e); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* @param unitName |
|
|
|
* @param agencyId |
|
|
|
* @param id |
|
|
|
* @return true 已存在 |
|
|
|
* false 不存在 |
|
|
|
*/ |
|
|
|
public Boolean checkUnitName(String unitName,String agencyId,String id){ |
|
|
|
LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
wrapper.eq(IcPartyUnitEntity::getAgencyId, agencyId) |
|
|
|
.eq(IcPartyUnitEntity::getUnitName, unitName) |
|
|
|
.ne(StringUtils.isNotBlank(id),IcPartyUnitEntity::getId,id); |
|
|
|
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); |
|
|
|
if (CollectionUtils.isNotEmpty(list)) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|