|
@ -26,7 +26,6 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
import com.epmet.dao.IcSocietyOrgDao; |
|
|
import com.epmet.dao.IcSocietyOrgDao; |
|
|
import com.epmet.dto.IcUserDemandRecDTO; |
|
|
|
|
|
import com.epmet.dto.form.AddSocietyOrgFormDTO; |
|
|
import com.epmet.dto.form.AddSocietyOrgFormDTO; |
|
|
import com.epmet.dto.form.EditSocietyOrgFormDTO; |
|
|
import com.epmet.dto.form.EditSocietyOrgFormDTO; |
|
|
import com.epmet.dto.form.GetListSocietyOrgFormDTO; |
|
|
import com.epmet.dto.form.GetListSocietyOrgFormDTO; |
|
@ -41,13 +40,13 @@ import com.epmet.service.IcSocietyOrgService; |
|
|
import com.epmet.service.IcUserDemandRecService; |
|
|
import com.epmet.service.IcUserDemandRecService; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.Logger; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.slf4j.LoggerFactory; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.util.CollectionUtils; |
|
|
import org.springframework.util.CollectionUtils; |
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.ArrayList; |
|
|
import java.util.Arrays; |
|
|
import java.util.Arrays; |
|
@ -145,17 +144,18 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, Ic |
|
|
@Override |
|
|
@Override |
|
|
public List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO) { |
|
|
public List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO) { |
|
|
List<OptionDTO> resultList=new ArrayList<>(); |
|
|
List<OptionDTO> resultList=new ArrayList<>(); |
|
|
IcUserDemandRecDTO icUserDemandRecDTO=icUserDemandRecService.get(formDTO.getDemandRecId()); |
|
|
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); |
|
|
if(null==icUserDemandRecDTO|| StringUtils.isEmpty(icUserDemandRecDTO.getGridPids())){ |
|
|
if (null == staffInfoCacheResult || StringUtils.isBlank(staffInfoCacheResult.getAgencyId())) { |
|
|
return resultList; |
|
|
throw new RenException("工作人员所属组织信息查询异常"); |
|
|
} |
|
|
} |
|
|
List<String> agencyIds=new ArrayList<>(); |
|
|
List<String> agencyIds=new ArrayList<>(); |
|
|
if(icUserDemandRecDTO.getGridPids().contains(StrConstant.COLON)){ |
|
|
if (StringUtils.isNotBlank(staffInfoCacheResult.getAgencyPIds()) && !NumConstant.ZERO_STR.equals(staffInfoCacheResult.getAgencyPIds())) { |
|
|
agencyIds.addAll(Arrays.asList(icUserDemandRecDTO.getGridPids().split(StrConstant.COLON))); |
|
|
if(staffInfoCacheResult.getAgencyPIds().contains(StrConstant.COLON)){ |
|
|
}else{ |
|
|
agencyIds.addAll(Arrays.asList(staffInfoCacheResult.getAgencyPIds().split(StrConstant.COLON))); |
|
|
agencyIds.add(icUserDemandRecDTO.getGridPids()); |
|
|
} |
|
|
} |
|
|
} |
|
|
resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId()); |
|
|
agencyIds.add(staffInfoCacheResult.getAgencyId()); |
|
|
|
|
|
resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId(),formDTO.getQueryPurpose()); |
|
|
return resultList; |
|
|
return resultList; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|