校验战区
This commit is contained in:
@@ -52,6 +52,13 @@ public class HyIntendDevMappingDAO {
|
|||||||
return hyIntendDevelopementMappingMapper.selectByMappingIdList(idList);
|
return hyIntendDevelopementMappingMapper.selectByMappingIdList(idList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<ZoneCheckDTO> selectByOpenAreaMappingIdList(List<Long> idList){
|
||||||
|
if (CollectionUtils.isEmpty(idList)){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return hyIntendDevelopementMappingMapper.selectByOpenAreaMappingIdList(idList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public int batchInsert(List<HyIntendDevelopementMappingDO> recordList){
|
public int batchInsert(List<HyIntendDevelopementMappingDO> recordList){
|
||||||
if (CollectionUtils.isEmpty(recordList)){
|
if (CollectionUtils.isEmpty(recordList)){
|
||||||
|
|||||||
@@ -54,4 +54,6 @@ public interface HyIntendDevelopementMappingMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ZoneCheckDTO> selectByMappingIdList(@Param("mappingIdList") List<Long> mappingIdList);
|
List<ZoneCheckDTO> selectByMappingIdList(@Param("mappingIdList") List<Long> mappingIdList);
|
||||||
|
|
||||||
|
List<ZoneCheckDTO> selectByOpenAreaMappingIdList(@Param("openAreaMappingIdList") List<Long> openAreaMappingIdList);
|
||||||
}
|
}
|
||||||
@@ -130,4 +130,19 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectByOpenAreaMappingIdList" resultType="com.cool.store.dto.partner.ZoneCheckDTO">
|
||||||
|
select
|
||||||
|
a.open_area_mapping_id as openAreaMappingId,
|
||||||
|
b.zone_name as zoneName
|
||||||
|
from hy_intend_developement_mapping a inner join hy_intend_dev_zone_info b on a.mapping_id = b.id
|
||||||
|
<where>
|
||||||
|
<if test="openAreaMappingIdList!=null and openAreaMappingIdList.size>0">
|
||||||
|
<foreach collection="openAreaMappingIdList" open="and a.open_area_mapping_id in (" close=")" separator="," item="mappingId">
|
||||||
|
#{mappingId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -247,20 +247,20 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
@Override
|
@Override
|
||||||
public PageInfo<PublicSeaLineListVo> publicSeaLineList(String userId, LineRequest lineRequest) {
|
public PageInfo<PublicSeaLineListVo> publicSeaLineList(String userId, LineRequest lineRequest) {
|
||||||
//确认是招商经理还是部门负责人
|
//确认是招商经理还是部门负责人
|
||||||
EnterpriseUserDO userInfo = enterpriseUserDAO.getUserInfoById(userId);
|
// EnterpriseUserDO userInfo = enterpriseUserDAO.getUserInfoById(userId);
|
||||||
List<String> userIds = new ArrayList<>();
|
// List<String> userIds = new ArrayList<>();
|
||||||
if (userInfo.getIsLeader()){
|
// if (userInfo.getIsLeader()){
|
||||||
if (StringUtil.isNotEmpty(userInfo.getLeaderDeptIds())){
|
// if (StringUtil.isNotEmpty(userInfo.getLeaderDeptIds())){
|
||||||
List<String> regionIds = JSONObject.parseArray(userInfo.getLeaderDeptIds(), String.class);
|
// List<String> regionIds = JSONObject.parseArray(userInfo.getLeaderDeptIds(), String.class);
|
||||||
List<EnterpriseUserDO> enterpriseUserDOS = enterpriseUserDAO.searchUserByRegionIdsAndKeyword(regionIds, null, true);
|
// List<EnterpriseUserDO> enterpriseUserDOS = enterpriseUserDAO.searchUserByRegionIdsAndKeyword(regionIds, null, true);
|
||||||
userIds =enterpriseUserDOS.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
// userIds =enterpriseUserDOS.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
}
|
// }
|
||||||
}else {
|
// }else {
|
||||||
userIds = Arrays.asList(userId);
|
// userIds = Arrays.asList(userId);
|
||||||
}
|
// }
|
||||||
PageHelper.startPage(lineRequest.getPageNum(),lineRequest.getPageSize());
|
PageHelper.startPage(lineRequest.getPageNum(),lineRequest.getPageSize());
|
||||||
PageInfo publicSeaLineList = new PageInfo(hyPartnerLineInfoDAO.getPublicSeaLineList(lineRequest.getUserNameKeyword(), lineRequest.getPhoneKeyword(),
|
PageInfo publicSeaLineList = new PageInfo(hyPartnerLineInfoDAO.getPublicSeaLineList(lineRequest.getUserNameKeyword(), lineRequest.getPhoneKeyword(),
|
||||||
lineRequest.getIntentArea(), lineRequest.getAcceptAdjustType(), lineRequest.getUpdateStartTime(), lineRequest.getUpdateEndTime(), userIds));
|
lineRequest.getIntentArea(), lineRequest.getAcceptAdjustType(), lineRequest.getUpdateStartTime(), lineRequest.getUpdateEndTime(), null));
|
||||||
|
|
||||||
List<PublicSeaLineDTO> list = publicSeaLineList.getList();
|
List<PublicSeaLineDTO> list = publicSeaLineList.getList();
|
||||||
if (CollectionUtils.isEmpty(list)){
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ public class ZoneServiceImpl implements ZoneService {
|
|||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
}
|
}
|
||||||
//查询已经绑定战区的 意向区域
|
//查询已经绑定战区的 意向区域
|
||||||
List<ZoneCheckDTO> list = hyIntendDevMappingDAO.selectByMappingIdList(intentAreaSettingRequest.getOpenAreaIdList());
|
List<ZoneCheckDTO> list = hyIntendDevMappingDAO.selectByOpenAreaMappingIdList(intentAreaSettingRequest.getOpenAreaIdList());
|
||||||
List<Long> openAreaIdList = list.stream().map(ZoneCheckDTO::getOpenAreaMappingId).collect(Collectors.toList());
|
List<Long> openAreaIdList = list.stream().map(ZoneCheckDTO::getOpenAreaMappingId).collect(Collectors.toList());
|
||||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList = openAreaInfoDAO.selectByIds(openAreaIdList);
|
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList = openAreaInfoDAO.selectByIds(openAreaIdList);
|
||||||
Map<Long, String> areaNameMap = hyOpenAreaInfoDOList.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, HyOpenAreaInfoDO::getAreaName));
|
Map<Long, String> areaNameMap = hyOpenAreaInfoDOList.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, HyOpenAreaInfoDO::getAreaName));
|
||||||
|
|||||||
Reference in New Issue
Block a user