| | |
| | | private String cardNoStr; |
| | | |
| | | @ApiModelProperty(value = "人员标签") |
| | | private String visiterTypeName; |
| | | |
| | | private Integer visiterType; |
| | | private String label; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | |
| | | private String eventStatusName; |
| | | |
| | | public String getEventStatusName() { |
| | | |
| | | return EventTasksStatusEnum.getName(eventStatus); |
| | | } |
| | | |
| | | public String getVisiterTypeName(){ |
| | | return EventTasksVisitorTypeEnum.getName(visiterType); |
| | | if(eventStatus != null){ |
| | | return EventTasksStatusEnum.getName(eventStatus); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | @GetMapping("/count") |
| | | @ApiOperation(value = "走访任务统计", response= EventVisitCountVO.class) |
| | | public R count(){ |
| | | return gridService.countVisit(null); |
| | | return gridService.countVisit(this.getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public R visitorList(EventVisitListQuery query) { |
| | | IPage<EventVisitListVO> page = eventVisitingTasksMapper.visitorList(new Page(query.getPageNum(),query.getPageSize()),query); |
| | | page.getRecords().stream().forEach(e->{ |
| | | List<EventVisitingTasksDO> list = eventVisitingTasksMapper.selectList(new QueryWrapper<EventVisitingTasksDO>().eq("visiter_id",e.getId()).orderByDesc("id")); |
| | | if(!CollectionUtils.isEmpty(list)){ |
| | | e.setCreateAt(list.get(0).getCreateAt()); |
| | | e.setEventStatus(list.get(0).getEventStatus()); |
| | | } |
| | | }); |
| | | return R.ok(page); |
| | | } |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="visitorList" parameterType="com.panzhihua.common.model.query.visit.EventVisitListQuery" resultType="com.panzhihua.common.model.vos.visit.EventVisitListVO"> |
| | | SELECT p.id,p.name,p.card_no_str,p.label, TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.sex,p.political_outlook,p.phone,p.census_register,phu.relation, |
| | | MAX(vt.id),vt.create_at |
| | | SELECT p.id,p.name,p.card_no_str,p.label, TIMESTAMPDIFF(YEAR, p.birthday, CURDATE()) AS age,p.sex,p.political_outlook,p.phone,p.census_register,phu.relation |
| | | FROM com_mng_population p LEFT JOIN com_mng_population_house_user phu ON p.id = phu.popul_id |
| | | left join event_visiting_tasks vt ON p.id = vt.visiter_id |
| | | where 1=1 |
| | | <if test="query.sex != null"> |
| | | and p.sex = #{query.sex} |