|
|
@ -21,23 +21,30 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.enums.DictTypeEnum; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.dao.IcPartyUnitDao; |
|
|
|
import com.epmet.dto.IcPartyUnitDTO; |
|
|
|
import com.epmet.dto.IcUserDemandRecDTO; |
|
|
|
import com.epmet.dto.form.PartyUnitFormDTO; |
|
|
|
import com.epmet.dto.form.demand.ServiceQueryFormDTO; |
|
|
|
import com.epmet.dto.result.demand.OptionDTO; |
|
|
|
import com.epmet.entity.IcPartyUnitEntity; |
|
|
|
import com.epmet.feign.EpmetAdminOpenFeignClient; |
|
|
|
import com.epmet.service.IcPartyUnitService; |
|
|
|
import com.epmet.service.IcUserDemandRecService; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
@ -53,6 +60,9 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
|
|
|
|
|
@Resource |
|
|
|
private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; |
|
|
|
@Autowired |
|
|
|
private IcUserDemandRecService icUserDemandRecService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<IcPartyUnitDTO> search(PartyUnitFormDTO formDTO) { |
|
|
@ -117,4 +127,28 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl<IcPartyUnitDao, IcPa |
|
|
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 需求指派,选择区域化党建单位,调用此接口 |
|
|
|
* 返回需求所属组织线上的数据 |
|
|
|
* |
|
|
|
* @param formDTO |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO) { |
|
|
|
List<OptionDTO> resultList=new ArrayList<>(); |
|
|
|
IcUserDemandRecDTO icUserDemandRecDTO=icUserDemandRecService.get(formDTO.getDemandRecId()); |
|
|
|
if(null==icUserDemandRecDTO|| org.springframework.util.StringUtils.isEmpty(icUserDemandRecDTO.getGridPids())){ |
|
|
|
return resultList; |
|
|
|
} |
|
|
|
List<String> agencyIds=new ArrayList<>(); |
|
|
|
if(icUserDemandRecDTO.getGridPids().contains(StrConstant.COLON)){ |
|
|
|
agencyIds.addAll(Arrays.asList(icUserDemandRecDTO.getGridPids().split(StrConstant.COLON))); |
|
|
|
}else{ |
|
|
|
agencyIds.add(icUserDemandRecDTO.getGridPids()); |
|
|
|
} |
|
|
|
resultList=baseDao.selectListByAgencyId(agencyIds,formDTO.getServiceName(),formDTO.getCustomerId()); |
|
|
|
return resultList; |
|
|
|
} |
|
|
|
|
|
|
|
} |