| | |
| | | import cn.hutool.crypto.digest.MD5; |
| | | import cn.hutool.extra.pinyin.PinyinUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoExpertDTO; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO; |
| | | import com.panzhihua.common.model.vos.sanshuo.ExpertRangeVO; |
| | | import com.panzhihua.common.model.vos.sanshuo.ExpertShowVO; |
| | | import com.panzhihua.common.model.vos.user.AdministratorsUserVO; |
| | |
| | | id=null; |
| | | range=null; |
| | | } |
| | | return R.ok(comSanshuoExpertDao.expertPage(new Page(page,size),keyWord,range,id,level)); |
| | | IPage<ComSanshuoExpertVO> comSanshuoExpertVOIPage = comSanshuoExpertDao.expertPage(new Page(page, size), keyWord, range, id, level); |
| | | for (ComSanshuoExpertVO record : comSanshuoExpertVOIPage.getRecords()) { |
| | | //获取调解次数和成功率 |
| | | record.setCount(comEventMapper.selectCount(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, record.getId()))); |
| | | record.setSuccessCount(comEventMapper.selectCount(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, record.getId()).eq(ComEvent::getEventResult,2 ))); |
| | | if (nonNull(record.getCount()) && nonNull(record.getSuccessCount())){ |
| | | record.setRate(NumberUtil.div(record.getSuccessCount(), record.getCount(),2)); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |