人口基本信息- 增加了人口查询跳转页面

人口基本信息- 增加了creator_area1字段(创建人所在街道)
人口基本信息- 增加了查看人员卡片按钮页面跳转
This commit is contained in:
java_cuibaocheng@163.com 2023-11-25 13:47:05 +08:00
parent d80c99ba14
commit 44694f71e9
15 changed files with 341 additions and 19 deletions

View File

@ -3,7 +3,6 @@ package com.cm.population.controller.route.populationinfo;
import com.cm.common.base.AbstractController;
import com.cm.common.component.SecurityComponent;
import com.cm.common.constants.ISystemConstant;
import com.cm.common.pojo.bos.UserInfoBO;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -11,10 +10,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import java.util.HashMap;
import java.util.Map;
/**
* @ClassName: PopulationInfoController
* @Description: 基础人口信息
* @Description: 基础人口信息按条件查看
* @Author: CodeFactory
* @Date: 2023-10-24 11:55:46
* @Version: 3.0
@ -27,6 +28,17 @@ public class PopulationInfoBigdataRouteController extends AbstractController {
@Autowired
protected SecurityComponent securityComponent;
static final Map<String, String> organizationMap = new HashMap<String, String>();
static {
organizationMap.put("党员", "中国共产党党员");
organizationMap.put("共青团员", "中国共产主义青年团团员");
organizationMap.put("预备党员", "中国共产党预备党员");
}
/**
* 民族
* @return
*/
@GetMapping("nation")
public ModelAndView nation(@RequestParam String nation) {
ModelAndView mv = new ModelAndView("populationinfo/list-bigdata");
@ -34,6 +46,32 @@ public class PopulationInfoBigdataRouteController extends AbstractController {
return mv;
}
/**
* 总人口
* @return
*/
@GetMapping("total")
public ModelAndView total() {
ModelAndView mv = new ModelAndView("populationinfo/list-bigdata");
mv.addObject("params", "");
return mv;
}
/**
* 高新区街道人口
* @return
*/
@GetMapping("jiedao")
public ModelAndView jiedao(@RequestParam String name) {
ModelAndView mv = new ModelAndView("populationinfo/list-bigdata");
mv.addObject("params", "jiedao=" + name);
return mv;
}
/**
* 性别
* @return
*/
@GetMapping("sex")
public ModelAndView sex(@RequestParam String sex) {
ModelAndView mv = new ModelAndView("populationinfo/list-bigdata");
@ -41,4 +79,85 @@ public class PopulationInfoBigdataRouteController extends AbstractController {
return mv;
}
/**
* 政治面貌
* @return
*/
@GetMapping("organization")
public ModelAndView organization(@RequestParam String organization) {
ModelAndView mv = new ModelAndView("populationinfo/list-bigdata");
mv.addObject("params", "organization=" + organizationMap.get(organization));
return mv;
}
/**
* 常住人口
* @return
*/
@GetMapping("changzhu")
public ModelAndView changzhu() {
ModelAndView mv = new ModelAndView("populationinfo/list-bigdata");
mv.addObject("params", "type=常住人口");
return mv;
}
/**
* 流动人口
* @return
*/
@GetMapping("liudong")
public ModelAndView liudong() {
ModelAndView mv = new ModelAndView("populationinfo/list-bigdata");
mv.addObject("params", "type=流动人口");
return mv;
}
/**
* 宗教信仰
* @param religion
* @return
*/
@GetMapping("religion")
public ModelAndView religion(@RequestParam String religion) {
ModelAndView mv = new ModelAndView("populationinfo/list-bigdata");
mv.addObject("params", "religion=" + religion);
return mv;
}
/**
* 信访管理类人员
* @param name [name: 矛盾纠纷 / 涉邪人员 / 吸毒人员 / 社会治安 / 重点上访]
* @return
*/
@GetMapping("xinfang")
public ModelAndView xinfang(@RequestParam String name) {
ModelAndView mv = new ModelAndView("populationinfo/list-bigdata");
mv.addObject("params", "xinfang=" + name);
return mv;
}
/**
* 社会保障类人员
* @param name [name: 老年人 / 残疾人 / (退役/服役) / 社会救助信息]
* @return
*/
@GetMapping("baozhang")
public ModelAndView baozhang(@RequestParam String name) {
ModelAndView mv = new ModelAndView("populationinfo/list-bigdata");
mv.addObject("params", "baozhang=" + name);
return mv;
}
/**
* 特殊人员
* @param name [name: 社区矫正 / 刑满释放]
* @return
*/
@GetMapping("teshu")
public ModelAndView teshu(@RequestParam String name) {
ModelAndView mv = new ModelAndView("populationinfo/list-bigdata");
mv.addObject("params", "teshu=" + name);
return mv;
}
}

View File

@ -3,6 +3,7 @@ package com.cm.population.dao.areatree;
import com.cm.common.exception.SearchException;
import com.cm.common.plugin.pojo.dtos.dataarea.DataAreaDTO;
import com.cm.population.pojo.dtos.areatree.AreaZtreeDTO;
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoAreaDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
@ -22,4 +23,5 @@ public interface IAreatreeDao {
List<AreaZtreeDTO> listCache(Map<String, Object> params);
AreaZtreeDTO getAreaByAreaId(Map<String, Object> params);
}

View File

@ -5,6 +5,7 @@ import com.cm.common.exception.SaveException;
import com.cm.common.exception.SearchException;
import com.cm.common.exception.UpdateException;
import com.cm.population.pojo.bos.populationinfo.PopulationInfoBO;
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoAreaDTO;
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO;
import com.cm.population.pojo.pos.populationinfo.PopulationInfoPO;
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO;
@ -120,4 +121,6 @@ public interface IPopulationInfoDao {
PopulationInfoBaseDTO getBase(Map<String, Object> params);
void updateCreator(Map<String, Object> params);
PopulationInfoAreaDTO getCreatorArea(String creator);
}

View File

@ -69,6 +69,16 @@ public class PopulationInfoBaseDTO {
private Integer age;
@ApiModelProperty(name = "创建人", value = "创建人")
private String creator;
@ApiModelProperty(name = "创建人所在街道名称", value = "创建人所在街道名称")
private String creatorArea1;
public String getCreatorArea1() {
return creatorArea1;
}
public void setCreatorArea1(String creatorArea1) {
this.creatorArea1 = creatorArea1;
}
public List<PopulationInfoLabelDTO> getLabelList() {
return labelList == null ? new ArrayList<>() : labelList;

View File

@ -179,6 +179,8 @@ public class PopulationInfoDTO {
private String creator;
@ApiModelProperty(name = "创建人姓名", value = "创建人姓名")
private String creatorName;
@ApiModelProperty(name = "创建人所在街道名称", value = "创建人所在街道名称")
private String creatorArea1;
public String getCreatorName() {
return creatorName;

View File

@ -6,6 +6,7 @@ import com.cm.common.result.SuccessResultData;
import com.cm.common.result.SuccessResultList;
import com.cm.population.pojo.dtos.areatree.AreaZtreeDTO;
import com.cm.population.pojo.dtos.population.PopulationDTO;
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoAreaDTO;
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO;
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO;
import com.cm.population.pojo.vos.populationinfo.PopulationInfoVO;
@ -23,6 +24,8 @@ import java.util.Map;
**/
public interface IPopulationInfoService {
PopulationInfoAreaDTO getCreatorArea(String creator);
public List<DataAreaDTO> getAreaList();
void getTuoMin(PopulationInfoDTO dto);
void getTuoMin(PopulationInfoBaseDTO dto);

View File

@ -25,6 +25,7 @@ import com.cm.population.pojo.dtos.cult.CultDTO;
import com.cm.population.pojo.dtos.dispute.DisputeDTO;
import com.cm.population.pojo.dtos.drug.DrugDTO;
import com.cm.population.pojo.dtos.petition.PetitionDTO;
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoAreaDTO;
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO;
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO;
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoLabelDTO;
@ -92,6 +93,15 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
return iAreatreeDao.getAreaByAreaId(params);
}
@Override
public PopulationInfoAreaDTO getCreatorArea(String creator) {
PopulationInfoAreaDTO dto = populationInfoDao.getCreatorArea(creator);
if (dto == null) {
return new PopulationInfoAreaDTO();
}
return dto;
}
@Override
public List<DataAreaDTO> getAreaList() {
Map<String, Object> params = new HashMap<>();
@ -327,6 +337,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
}else{
setSaveInfo(token, params);
}
params.put("creatorArea1", getCreatorArea(params.get("creator").toString()).getAreaName());
populationInfoDao.save(params);
if (projectProperties.getPopulationInsertLog())
iPopulationLogService.saveInit(token, populationInfoId, params);// 记录日志
@ -407,6 +418,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
}else{
setUpdateInfo(token, params);
}
params.put("creatorArea1", getCreatorArea(params.get("modifier").toString()).getAreaName());
PopulationInfoDTO populationInfoDTO = get(populationInfoId);
populationInfoDao.update(params);
/**
@ -578,6 +590,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
Map<String, Object> params = getHashMap(2);
params.put("populationInfoId", populationInfoId);
params.put("creator", creator);
params.put("creatorArea1", getCreatorArea(creator).getAreaName());
populationInfoDao.updateCreator(params);
}

View File

@ -2,6 +2,11 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cm.population.dao.populationinfo.IPopulationInfoDao">
<resultMap id="populationInfoAreaDTO" type="com.cm.population.pojo.dtos.populationinfo.PopulationInfoAreaDTO">
<result column="area_id" property="areaId"/>
<result column="area_name" property="areaName"/>
</resultMap>
<resultMap id="populationInfoBaseDTO" type="com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO">
<result column="population_info_id" property="populationInfoId"/>
<result column="name" property="name"/>
@ -19,6 +24,7 @@
<result column="is_military" property="isMilitary"/>
<result column="is_succour" property="isSuccour"/>
<result column="is_party" property="isParty"/>
<result column="creator_area1" property="creatorArea1"/>
<result column="creator" property="creator"/>
</resultMap>
@ -99,6 +105,7 @@
<result column="party_time" property="partyTime"/>
<result column="othertext" property="othertext"/>
<result column="creator" property="creator"/>
<result column="creator_area1" property="creatorArea1"/>
</resultMap>
<resultMap id="populationInfoBO" type="com.cm.population.pojo.bos.populationinfo.PopulationInfoBO">
@ -239,6 +246,16 @@
<result column="othertext" property="othertext"/>
</resultMap>
<select id="getCreatorArea" parameterType="java.lang.String" resultMap="populationInfoAreaDTO">
SELECT
area_id,
area_name
FROM
v_community_boss
WHERE
community_boss_user_id = #{creator}
</select>
<!-- 新增基础人口信息 -->
<insert id="save" parameterType="map">
INSERT INTO population_population_info(
@ -317,6 +334,7 @@
party_organization,
party_time,
othertext,
creator_area1,
creator,
gmt_create,
modifier,
@ -398,6 +416,7 @@
#{partyOrganization},
#{partyTime},
#{othertext},
#{creatorArea1},
#{creator},
#{gmtCreate},
#{modifier},
@ -410,7 +429,8 @@
UPDATE
population_population_info
SET
creator = #{creator}
creator = #{creator},
creator_area1 = #{creatorArea1}
WHERE
population_info_id = #{populationInfoId}
</update>
@ -658,6 +678,9 @@
<if test="othertext != null and othertext != ''">
othertext = #{othertext},
</if>
<if test="creatorArea1 != null and creatorArea1 != ''">
creator_area1 = #{creatorArea1},
</if>
modifier = #{modifier},
gmt_modified = #{gmtModified},
population_info_id = population_info_id
@ -683,7 +706,8 @@
t1.is_military,
t1.is_succour,
t1.is_party,
t1.creator
t1.creator,
t1.creator_area1
FROM
population_population_info t1
WHERE
@ -777,7 +801,8 @@
t1.party_time,
t1.othertext,
t1.population_info_id,
t1.creator
t1.creator,
t1.creator_area1
FROM
population_population_info t1
WHERE
@ -1028,7 +1053,8 @@
t1.party_organization,
t1.party_time,
t1.othertext,
t1.creator
t1.creator,
t1.creator_area1
FROM
population_population_info t1
WHERE
@ -1051,6 +1077,57 @@
<if test="sex != null and sex != ''">
AND t1.sex = #{sex}
</if>
<if test="organization != null and organization != '' and organization != '其他'">
AND t1.organization = #{organization}
</if>
<if test="organization != null and organization != '' and organization == '其他'">
AND ( t1.organization != '中国共产党党员' AND t1.organization != '中国共产主义青年团团员' AND t1.organization != '中国共产党预备党员')
</if>
<if test="type != null and type != '' and type == '常住人口'">
AND (t1.flow_time = '' OR t1.flow_time IS NULL)
</if>
<if test="type != null and type != '' and type == '流动人口'">
AND t1.flow_time != '' AND t1.flow_time IS NOT NULL
</if>
<if test="religion != null and religion != ''">
AND t1.religion = #{religion}
</if>
<if test="xinfang != null and xinfang != '' and xinfang == '矛盾纠纷'">
AND EXISTS (SELECT 1 FROM population_dispute temp WHERE temp.is_delete = 0 AND temp.party_population_info_id = t1.population_info_id)
</if>
<if test="xinfang != null and xinfang != '' and xinfang == '涉邪人员'">
AND EXISTS (SELECT 1 FROM population_cult temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id)
</if>
<if test="xinfang != null and xinfang != '' and xinfang == '吸毒人员'">
AND EXISTS (SELECT 1 FROM population_drug temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id)
</if>
<if test="xinfang != null and xinfang != '' and xinfang == '社会治安'">
AND EXISTS (SELECT 1 FROM population_security temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id)
</if>
<if test="xinfang != null and xinfang != '' and xinfang == '重点上访'">
AND EXISTS (SELECT 1 FROM population_petition temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id)
</if>
<if test="baozhang != null and baozhang != '' and baozhang == '老年人'">
AND is_oldage = '是'
</if>
<if test="baozhang != null and baozhang != '' and baozhang == '残疾人'">
AND is_disability = '是'
</if>
<if test="baozhang != null and baozhang != '' and baozhang == '退役/服役'">
AND is_military = '是'
</if>
<if test="baozhang != null and baozhang != '' and baozhang == '社会救助信息'">
AND is_succour = '是'
</if>
<if test="teshu != null and teshu != '' and teshu == '社区矫正'">
AND EXISTS (SELECT 1 FROM population_correct temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id)
</if>
<if test="teshu != null and teshu != '' and teshu == '刑满释放'">
AND EXISTS (SELECT 1 FROM population_release temp WHERE temp.is_delete = 0 AND temp.population_info_id = t1.population_info_id)
</if>
<if test="jiedao != null and jiedao != ''">
AND t1.creator_area1 = #{jiedao}
</if>
<if test="keywords != null and keywords != ''">
AND (
<!-- 这里添加其他条件 -->

View File

@ -1983,7 +1983,7 @@
type: 2,
title: false,
closeBtn: 0,
area: ['70%', '100%'],
area: ['90%', '100%'],
offset: 'r',
shadeClose: true,
anim: 2,
@ -2002,7 +2002,7 @@
type: 2,
title: false,
closeBtn: 0,
area: ['70%', '100%'],
area: ['90%', '100%'],
offset: 'r',
shadeClose: true,
anim: 2,

View File

@ -419,6 +419,7 @@
<div class="layui-form-item" style="height: 33px;padding-top: 3px;" pane="">
<!--<button type="button" class="layui-btn layui-btn-sm out-population" data-population="{{item.populationInfoId}}">搬离房屋</button>-->
<button type="button" class="layui-btn layui-btn-sm layui-btn-danger delete-population" data-population="{{item.populationInfoId}}">录错删除</button>
<button type="button" class="layui-btn layui-btn-sm layui-btn-danger view-populationview-population" data-population="{{item.populationInfoId}}">查看卡片</button>
</div>
</div>
</div>
@ -613,6 +614,19 @@
reloadCohabit();
});
// 房屋人员人口查看
$(document).on("click", ".view-population" , function () {
var populationInfoId = $(this).data("population");
top.dialog.open({
url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId=' + populationInfoId, []),
title: '个人信息卡片',
width: '80%',
height: '80%',
onClose: function() {
}
});
});
// 托管人搜索
function custodianSearch() {
top.dialog.open({

View File

@ -423,6 +423,7 @@
<button type="button" class="layui-btn layui-btn-sm out-population" data-population="{{item.populationInfoId}}">搬离房屋</button>
{{# } }}
<button type="button" class="layui-btn layui-btn-sm layui-btn-danger delete-population" data-population="{{item.populationInfoId}}">录错删除</button>
<button type="button" class="layui-btn layui-btn-sm layui-btn-danger view-population" data-population="{{item.populationInfoId}}">查看卡片</button>
</div>
</div>
</div>
@ -863,6 +864,19 @@
reloadCohabit();
});
// 房屋人员人口查看
$(document).on("click", ".view-population" , function () {
var populationInfoId = $(this).data("population");
top.dialog.open({
url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId=' + populationInfoId, []),
title: '个人信息卡片',
width: '80%',
height: '80%',
onClose: function() {
}
});
});
// 初始化内容
function initData() {
var loadLayerIndex;

View File

@ -37,6 +37,9 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="outHouseEvent">
<i class="fa fa-lg fa-outdent"></i> 搬离房屋
</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="viewEvent">
<i class="fa fa-lg fa-outdent"></i> 查看卡片
</button>
</div>
</script>
</div>
@ -268,6 +271,21 @@
}
});
}
} else if(layEvent === 'viewEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
top.dialog.open({
url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId={populationInfoId}', [checkDatas[0].populationId]),
title: '个人信息卡片',
width: '80%',
height: '80%',
onClose: function() {
}
});
}
} else if(layEvent === 'removeEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectDelete);

View File

@ -44,7 +44,7 @@
<script type="text/html" id="headerToolBar">
<div class="layui-btn-group">
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 查看详情
<i class="fa fa-lg fa-edit"></i> 查看
</button>
</div>
</script>
@ -301,16 +301,12 @@
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/populationinfo/update?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]),
end: function() {
reloadTable();
top.dialog.open({
url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]),
title: '个人信息卡片',
width: '80%',
height: '80%',
onClose: function() {
}
});
}

View File

@ -52,6 +52,9 @@
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<i class="fa fa-lg fa-trash"></i> 删除
</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="showEvent">
<i class="fa fa-lg fa-edit"></i> 查看
</button>
<!-- <button type="button" class="layui-btn layui-btn-sm" style="display: none" lay-event="excelEvent">-->
<!-- <i class="fa fa-lg fa-file-excel-o"></i>Excel导入-->
<!-- </button>-->
@ -528,6 +531,21 @@
}
});
}
} else if(layEvent === 'showEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
top.dialog.open({
url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]),
title: '个人信息卡片',
width: '80%',
height: '80%',
onClose: function() {
}
});
}
}
});
});

View File

@ -52,6 +52,9 @@
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<i class="fa fa-lg fa-trash"></i> 删除
</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="showEvent">
<i class="fa fa-lg fa-edit"></i> 查看
</button>
<!-- <button type="button" class="layui-btn layui-btn-sm" style="display: none" lay-event="excelEvent">-->
<!-- <i class="fa fa-lg fa-file-excel-o"></i>Excel导入-->
<!-- </button>-->
@ -76,6 +79,9 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="petitionEvent">
重点上访户
</button>
<!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="tiaoshiEvent">-->
<!-- 调试-->
<!-- </button>-->
</div>
</script>
</div>
@ -503,6 +509,33 @@
}
});
}
} else if(layEvent === 'showEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
top.dialog.open({
url: top.restAjax.path('pages/housepopulation/index.html#/population-info?populationInfoId={populationInfoId}', [checkDatas[0].populationInfoId]),
title: '个人信息卡片',
width: '80%',
height: '80%',
onClose: function() {
}
});
}
// top.layer.open({
// type: 2,
// title: "调试",
// closeBtn: 1,
// area: ['95%', '95%'],
// shadeClose: true,
// anim: 2,
// content: top.restAjax.path('route/populationinfo-data/jiedao?name=万水泉镇', []),
// end: function() {
// reloadTable();
// }
// });
}
});
});