| | |
| | | import org.springblade.modules.grid.service.IGridmanService; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.service.IHouseholdService; |
| | | import org.springblade.modules.house.vo.HouseholdVO; |
| | | import org.springblade.modules.police.entity.PoliceAffairsGridEntity; |
| | | import org.springblade.modules.police.service.IPoliceAffairsGridService; |
| | | import org.springblade.modules.policeAlarmRecords.entity.PoliceAlarmRecordsEntity; |
| | | import org.springblade.modules.policeAlarmRecords.service.IPoliceAlarmRecordsService; |
| | | import org.springblade.modules.property.entity.PropertyCompanyEntity; |
| | | import org.springblade.modules.property.service.IPropertyCompanyService; |
| | | import org.springblade.modules.system.entity.*; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 通过小区id查询物业人员 |
| | | * |
| | | * @param districtId |
| | | * @param building |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<UserEntity> getUserInfoByDistrictId(String districtId, String building) { |
| | | return baseMapper.getUserInfoByDistrictId(districtId, building); |
| | | } |
| | | |
| | | /** |
| | | * 通过小区id查询用户 |
| | | * |
| | | * @param districtIds |
| | | * @param building |
| | | * @param unit |
| | | * @param name |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<User> getUserInfoByDistrictIds(String districtIds) { |
| | | public IPage<HouseholdVO> getUserInfoByDistrictIds(String districtIds, String building, String unit, String name, IPage<HouseholdVO> page) { |
| | | List<String> list = JSON.parseArray(districtIds).toJavaList(String.class); |
| | | return baseMapper.getUserInfoByDistrictIds(list); |
| | | List<HouseholdVO> userInfoByDistrictIds = baseMapper.getUserInfoByDistrictIds(list, building, unit, name, page); |
| | | return page.setRecords(userInfoByDistrictIds); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public List<User> getPoliceUser(String longitude, String latitude, String houseCode) { |
| | | List<User> policeUser = baseMapper.getPoliceUser(longitude, latitude); |
| | | // todo 自动生成警单 |
| | | IPoliceAlarmRecordsService policeAlarmRecordsService = SpringUtil.getBean(IPoliceAlarmRecordsService.class); |
| | | PoliceAlarmRecordsEntity policeAlarmRecordsEntity = new PoliceAlarmRecordsEntity(); |
| | | policeAlarmRecordsEntity.setHouseCode(houseCode); |
| | | if (policeUser != null && policeUser.size() == 1) { |
| | | policeAlarmRecordsEntity.setPoliceId(policeUser.get(0).getId()); |
| | | } |
| | | policeAlarmRecordsService.save(policeAlarmRecordsEntity); |
| | | // 自动生成警单 |
| | | // if (StringUtils.isNotBlank(houseCode)) { |
| | | // IPoliceAlarmRecordsService policeAlarmRecordsService = SpringUtil.getBean(IPoliceAlarmRecordsService.class); |
| | | // PoliceAlarmRecordsEntity policeAlarmRecordsEntity = new PoliceAlarmRecordsEntity(); |
| | | // policeAlarmRecordsEntity.setHouseCode(houseCode); |
| | | // if (policeUser != null && policeUser.size() == 1) { |
| | | // policeAlarmRecordsEntity.setPoliceId(policeUser.get(0).getId()); |
| | | // } |
| | | // policeAlarmRecordsService.save(policeAlarmRecordsEntity); |
| | | // } |
| | | return policeUser; |
| | | } |
| | | } |