| | |
| | | package cn.gistack.sm.sjztmd.service.impl; |
| | | |
| | | import cn.gistack.sm.sjztmd.entity.AttResBase; |
| | | import cn.gistack.sm.sjztmd.entity.AttResManagePerson; |
| | | import cn.gistack.sm.sjztmd.entity.PatrolResponsiblePerson; |
| | | import cn.gistack.sm.sjztmd.mapper.AttResManagePersonMapper; |
| | | import cn.gistack.sm.sjztmd.service.IAttResBaseService; |
| | | import cn.gistack.sm.sjztmd.service.IAttResManagePersonService; |
| | | import cn.gistack.sm.sjztmd.vo.AttResBaseVO; |
| | | import cn.gistack.sm.sjztmd.vo.PersonVO; |
| | | import cn.gistack.sm.sjztmd.vo.UserPersonVO; |
| | | import cn.gistack.system.user.entity.User; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IUserClient userClient; |
| | | |
| | | @Autowired |
| | | private IAttResBaseService attResBaseService; |
| | | |
| | | @Override |
| | | public Boolean saveOrUpdateResManagePerson(AttResManagePerson attResManagePerson) { |
| | |
| | | public Set<String> getPersonListByWaterCodeList(List<String> list) { |
| | | return baseMapper.getPersonListByWaterCodeList(list); |
| | | } |
| | | |
| | | /** |
| | | * 根据水库编号查询市县水利部人员姓名及联系方式 |
| | | * @param res_cd 水库编号 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<PersonVO> getCityCountyPersonListByResGuid(String res_cd) { |
| | | List<PersonVO> personVOList = new ArrayList<>(); |
| | | // 查询当前水库对应的市级编号和县区编号 |
| | | AttResBaseVO attResBaseVO = attResBaseService.getCityCountyCodeByResGuid(res_cd); |
| | | if (null!= attResBaseVO) { |
| | | // 通过编号查询对应的人员 |
| | | List<PersonVO> cityPerson = baseMapper.getCityCountyPersonListByResGuid(attResBaseVO.getCityCode(), "sdglywuser", "市州水库管理业务人员"); |
| | | List<PersonVO> countyPerson = baseMapper.getCityCountyPersonListByResGuid(attResBaseVO.getCountyCode(), "qxglywuser", "区县水库管理业务人员"); |
| | | // 和 |
| | | personVOList.addAll(cityPerson); |
| | | personVOList.addAll(countyPerson); |
| | | } |
| | | // 返回 |
| | | return personVOList; |
| | | } |
| | | } |