| | |
| | | private Long gridId; |
| | | |
| | | @Max(127) |
| | | @ApiModelProperty(value = "事件分类:1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件", hidden = false, example = "1", required = true) |
| | | @ApiModelProperty(value = "事件分类:1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群上报", hidden = false, example = "1", required = true) |
| | | @NotNull(message = "事件分类不能为空") |
| | | private Integer eventType; |
| | | |
| | |
| | | @ApiModelProperty(value = "网格员名字", hidden = false, example = "") |
| | | private String gridMemberName; |
| | | |
| | | @Length(max=100) |
| | | @ApiModelProperty(value = "事件类型", hidden = false, example = "") |
| | | private String eventClazz; |
| | | |
| | | |
| | | @Length(max=20) |
| | | @ApiModelProperty(value = "网格员联系方式", hidden = false, example = "") |
| | |
| | | @ApiModelProperty(value = "事件处理数据") |
| | | private List<EventTransferRecordVO> trans; |
| | | |
| | | @ApiModelProperty(value = "特殊人群列表") |
| | | private List<EventSpecialPopulationDetailsVO> populationList; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.grid; |
| | | |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass; |
| | | import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @author cedoo email:cedoo(a)qq.com |
| | | * @version 1.0 |
| | | * @since 1.0 |
| | | * @date 2021-05-26 |
| | | * */ |
| | | @Data |
| | | @EncryptDecryptClass |
| | | @ApiModel("特殊人群信息返回参数") |
| | | public class EventSpecialPopulationDetailsVO { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "身份证号码") |
| | | @EncryptDecryptField |
| | | private String idCard; |
| | | |
| | | @ApiModelProperty(value = "标签") |
| | | private String label; |
| | | |
| | | @ApiModelProperty(value = "居住地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "民族") |
| | | private String nation; |
| | | |
| | | @ApiModelProperty(value = "年龄") |
| | | private Integer age; |
| | | |
| | | @ApiModelProperty(value = "政治面貌(1.中共党员2.中共预备党员3.共青团员4.民革党员5.民盟盟员6.民建会员7.8.农工党党员9.致公党党员10.九三学社社员11.台盟盟员12.无党派人士13.群众)") |
| | | private Integer politicalOutlook; |
| | | |
| | | } |
| | |
| | | */ |
| | | IPage<EventSpecialPopulationVO> specialPopulationList(Page page, @Param("specialPopulationDTO") PageEventSpecialPopulationDTO specialPopulationDTO); |
| | | |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_grid.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.panzhihua.common.model.vos.grid.EventSpecialPopulationDetailsVO; |
| | | import com.panzhihua.service_grid.model.dos.EventSpecialCrowdRecordDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther lyq |
| | |
| | | @Mapper |
| | | public interface EventSpecialCrowdRecordMapper extends BaseMapper<EventSpecialCrowdRecordDO> { |
| | | |
| | | /** |
| | | * 根据事件id查询特殊人群人口数据 |
| | | * @param eventId 事件id |
| | | * @return 上报人群信息列表 |
| | | */ |
| | | List<EventSpecialPopulationDetailsVO> getSpecialPopulationIds(@Param("eventId")Long eventId); |
| | | |
| | | } |
| | |
| | | private EventGridMemberRelationMapper eventGridMemberRelationMapper; |
| | | @Resource |
| | | private EventSpecialCrowdRecordService eventSpecialCrowdRecordService; |
| | | @Resource |
| | | private EventSpecialCrowdRecordMapper eventSpecialCrowdRecordMapper; |
| | | |
| | | /** |
| | | * 分页查找事件 |
| | |
| | | eventDetailsVO.setCreator(createUser.get("name") == null ? "" : createUser.get("name").toString()); |
| | | } |
| | | |
| | | //当事件为特殊人群上报时,需要查询事件与人口关联关系 |
| | | if(eventDetailsVO.getEventType().equals(6)){ |
| | | List<EventSpecialPopulationDetailsVO> specialPopulationList = eventSpecialCrowdRecordMapper.getSpecialPopulationIds(eventDetailsVO.getId()); |
| | | eventDetailsVO.setPopulationList(specialPopulationList); |
| | | } |
| | | return R.ok(eventDetailsVO); |
| | | } |
| | | return R.fail("事件不存在"); |
| | |
| | | <if test="pageEventDTO.eventDes!=null"> |
| | | AND event_des = #{pageEventDTO.eventDes} |
| | | </if> |
| | | <if test="pageEventDTO.eventClazz!=null"> |
| | | AND event_clazz like concat(#{pageEventDTO.eventClazz},'%') |
| | | </if> |
| | | <if test="pageEventDTO.propagandaObject!=null"> |
| | | AND propaganda_object = #{pageEventDTO.propagandaObject} |
| | | </if> |
| | |
| | | id, event_id, population_id, create_at |
| | | </sql> |
| | | |
| | | <select id="getSpecialPopulationIds" resultType="com.panzhihua.common.model.vos.grid.EventSpecialPopulationDetailsVO" parameterType="Long"> |
| | | SELECT |
| | | escr.id, |
| | | cmp.`name`, |
| | | cmp.phone, |
| | | cmp.card_no AS idCard, |
| | | cmp.label, |
| | | cmp.address, |
| | | cmp.nation, |
| | | cmp.political_outlook |
| | | FROM |
| | | event_special_crowd_record AS escr |
| | | LEFT JOIN com_mng_population AS cmp ON cmp.id = escr.population_id |
| | | WHERE |
| | | escr.event_id = #{eventId} |
| | | </select> |
| | | |
| | | </mapper> |