|
|
@ -77,7 +77,6 @@ import org.apache.http.entity.ContentType; |
|
|
|
import org.apache.poi.ss.usermodel.Workbook; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
import org.springframework.web.multipart.commons.CommonsMultipartFile; |
|
|
|
|
|
|
@ -119,7 +118,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
|
@Override |
|
|
|
public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) { |
|
|
|
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
|
|
|
LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
/*LambdaQueryWrapper<IcPartyUnitEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
wrapper.eq(IcPartyUnitEntity::getAgencyId, formDTO.getAgencyId()); |
|
|
|
wrapper.like(StringUtils.isNotBlank(formDTO.getUnitName()), IcPartyUnitEntity::getUnitName, formDTO.getUnitName()); |
|
|
|
wrapper.like(StringUtils.isNotBlank(formDTO.getServiceMatter()), IcPartyUnitEntity::getServiceMatter, formDTO.getServiceMatter()); |
|
|
@ -127,7 +126,13 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
|
wrapper.like(StringUtils.isNotBlank(formDTO.getContact()), IcPartyUnitEntity::getContact, formDTO.getContact()); |
|
|
|
wrapper.like(StringUtils.isNotBlank(formDTO.getContactMobile()), IcPartyUnitEntity::getContactMobile, formDTO.getContactMobile()); |
|
|
|
wrapper.orderByDesc(IcPartyUnitEntity::getCreatedTime); |
|
|
|
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper); |
|
|
|
List<IcPartyUnitEntity> list = baseDao.selectList(wrapper);*/ |
|
|
|
//本组织及下级
|
|
|
|
if(StringUtils.isNotBlank(formDTO.getCurrentStaffId())&&StringUtils.isBlank(formDTO.getAgencyId())){ |
|
|
|
CustomerStaffInfoCacheResult staffInfo=CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(),formDTO.getCurrentStaffId()); |
|
|
|
formDTO.setAgencyId(staffInfo.getAgencyId()); |
|
|
|
} |
|
|
|
List<IcPartyUnitEntity> list = baseDao.pageList(formDTO); |
|
|
|
PageInfo<IcPartyUnitEntity> pageInfo = new PageInfo<>(list); |
|
|
|
List<IcPartyUnitDTO> dtoList = ConvertUtils.sourceToTarget(list, IcPartyUnitDTO.class); |
|
|
|
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.PARTY_UNIT_TYPE.getCode()); |
|
|
@ -150,6 +155,8 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
|
item.setSatisfaction(new BigDecimal(item.getSatisfaction()).setScale(2, BigDecimal.ROUND_HALF_UP).toString()); |
|
|
|
} |
|
|
|
item.setScore(null == pointMap.get(item.getId()) ? NumConstant.ZERO : pointMap.get(item.getId())); |
|
|
|
AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(item.getAgencyId()); |
|
|
|
item.setAgencyName(null != agencyInfoCache ? agencyInfoCache.getOrganizationName() : StrConstant.EPMETY_STR); |
|
|
|
}); |
|
|
|
return new PageData<>(dtoList, pageInfo.getTotal()); |
|
|
|
} |
|
|
|