| | |
| | | public R pagePatrolRecord(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO){ |
| | | Long communityId = this.getCommunityId(); |
| | | if (!comSwPatrolRecordPageDTO.getSelectPerson().equals(1)) { |
| | | comSwPatrolRecordPageDTO.setPatrolPerson(String.valueOf(this.getLoginUserInfo().getIdCard())); |
| | | comSwPatrolRecordPageDTO.setPatrolPerson(String.valueOf(this.getLoginUserInfo().getPhone())); |
| | | } |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | return communityService.pagePatrolRecord(comSwPatrolRecordPageDTO); |
| | |
| | | @Override |
| | | public R pagePatrolRecord(ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO) { |
| | | //是否是查询自己的巡查记录 |
| | | if(StringUtils.isNotEmpty(comSwPatrolRecordPageDTO.getPatrolPerson())){ |
| | | Map<String,Object> map = comSwPatrolRecordDAO.getPbServiceTeamCardNo(comSwPatrolRecordPageDTO.getPatrolPerson()); |
| | | if(map != null){ |
| | | comSwPatrolRecordPageDTO.setPatrolPerson(map.get("id").toString()); |
| | | } |
| | | |
| | | } |
| | | IPage<ComSwPatrolRecordVO> iPage = comSwPatrolRecordDAO.pagePatrolRecord(new Page(comSwPatrolRecordPageDTO.getPageNum(),comSwPatrolRecordPageDTO.getPageSize()), comSwPatrolRecordPageDTO); |
| | | if(!iPage.getRecords().isEmpty()){ |
| | | iPage.getRecords().forEach(patrol -> { |
| | |
| | | |
| | | <select id="getPbServiceTeamCardNo" resultType="Map"> |
| | | select cpst.id,cpst.`name`,cpst.phone from com_pb_service_team as cpst |
| | | left join sys_user as su on su.id_card = cpst.card_no and su.type = 1 |
| | | left join sys_user as su on su.phone = cpst.card_no and su.type = 1 |
| | | where su.user_id = #{userId} |
| | | </select> |
| | | |