新增通过身份证号查询详情接口。

如果新增时此人员信息存在,则跳转到修改页面。
This commit is contained in:
Renpc-kilig 2020-11-25 10:25:54 +08:00
parent 53ce773663
commit fe428cfd8d
32 changed files with 335 additions and 8 deletions

View File

@ -117,4 +117,14 @@ public class CensusMsgController extends AbstractController {
return securityComponent.getCurrentUserIdInfo();
}
@ApiOperation(value = "通过身份证号码查询信息是否存在", notes = "通过身份证号码查询信息是否存在接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "idCardNumber", value = "户籍信息ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("hasmsg/{idCardNumber}")
public CensusMsgDTO hasMsg(@PathVariable("idCardNumber") String idCardNumber) throws SearchException {
return censusMsgService.hasMsg(idCardNumber);
}
}

View File

@ -118,4 +118,14 @@ public class FloatingPopulationController extends AbstractController {
return securityComponent.getCurrentUserIdInfo();
}
@ApiOperation(value = "通过身份证号码查询信息是否存在", notes = "通过身份证号码查询信息是否存在接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "idCardNumber", value = "户籍信息ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("hasmsg/{idCardNumber}")
public FloatingPopulationDTO hasMsg(@PathVariable("idCardNumber") String idCardNumber) throws SearchException {
return floatingPopulationService.hasMsg(idCardNumber);
}
}

View File

@ -118,4 +118,14 @@ public class HomePersonController extends AbstractController {
return securityComponent.getCurrentUserIdInfo();
}
@ApiOperation(value = "通过身份证号码查询信息是否存在", notes = "通过身份证号码查询信息是否存在接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "idCardNumber", value = "户籍信息ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("hasmsg/{idCardNumber}")
public HomePersonDTO hasMsg(@PathVariable("idCardNumber") String idCardNumber) throws SearchException {
return homePersonService.hasMsg(idCardNumber);
}
}

View File

@ -118,4 +118,14 @@ public class KeyTeenagersController extends AbstractController {
return securityComponent.getCurrentUserIdInfo();
}
@ApiOperation(value = "通过身份证号码查询信息是否存在", notes = "通过身份证号码查询信息是否存在接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "idCardNumber", value = "户籍信息ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("hasmsg/{idCardNumber}")
public KeyTeenagersDTO hasMsg(@PathVariable("idCardNumber") String idCardNumber) throws SearchException {
return keyTeenagersService.hasMsg(idCardNumber);
}
}

View File

@ -116,4 +116,14 @@ public class CensusMsgAppController extends AbstractController {
return censusMsgService.countCensusMsg(params);
}
@ApiOperation(value = "通过身份证号码查询信息是否存在", notes = "通过身份证号码查询信息是否存在接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "idCardNumber", value = "户籍信息ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("hasmsg/{idCardNumber}")
public CensusMsgDTO hasMsg(@PathVariable("idCardNumber") String idCardNumber) throws SearchException {
return censusMsgService.hasMsg(idCardNumber);
}
}

View File

@ -117,4 +117,14 @@ public class FloatingPopulationAppController extends AbstractController {
return floatingPopulationService.countFloatingPopulation(params);
}
@ApiOperation(value = "通过身份证号码查询信息是否存在", notes = "通过身份证号码查询信息是否存在接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "idCardNumber", value = "户籍信息ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("hasmsg/{idCardNumber}")
public FloatingPopulationDTO hasMsg(@PathVariable("idCardNumber") String idCardNumber) throws SearchException {
return floatingPopulationService.hasMsg(idCardNumber);
}
}

View File

@ -117,4 +117,14 @@ public class HomePersonAppController extends AbstractController {
return homePersonService.countHomePerson(params);
}
@ApiOperation(value = "通过身份证号码查询信息是否存在", notes = "通过身份证号码查询信息是否存在接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "idCardNumber", value = "户籍信息ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("hasmsg/{idCardNumber}")
public HomePersonDTO hasMsg(@PathVariable("idCardNumber") String idCardNumber) throws SearchException {
return homePersonService.hasMsg(idCardNumber);
}
}

View File

@ -117,4 +117,14 @@ public class KeyTeenagersAppController extends AbstractController {
return keyTeenagersService.countKeyTeenagers(params);
}
@ApiOperation(value = "通过身份证号码查询信息是否存在", notes = "通过身份证号码查询信息是否存在接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "idCardNumber", value = "户籍信息ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("hasmsg/{idCardNumber}")
public KeyTeenagersDTO hasMsg(@PathVariable("idCardNumber") String idCardNumber) throws SearchException {
return keyTeenagersService.hasMsg(idCardNumber);
}
}

View File

@ -80,4 +80,10 @@ public interface ICensusMsgDao {
*/
Integer countCensusMsg(Map<String, Object> params) throws SearchException;
/**
* 通过身份证号码查询户籍信息是否存在
* @param params
* @return
*/
CensusMsgDTO hasMsg(Map<String, Object> params);
}

View File

@ -80,4 +80,10 @@ public interface IFloatingPopulationDao {
*/
Integer countFloatingPopulation(Map<String, Object> params) throws SearchException;
/**
* 通过身份证号码查询信息是否存在
* @param params
* @return
*/
FloatingPopulationDTO hasMsg(Map<String, Object> params);
}

View File

@ -80,4 +80,10 @@ public interface IHomePersonDao {
*/
Integer countHomePerson(Map<String, Object> params) throws SearchException;
/**
* 通过身份证号码查询户籍信息是否存在
* @param params
* @return
*/
HomePersonDTO hasMsg(Map<String, Object> params);
}

View File

@ -80,4 +80,10 @@ public interface IKeyTeenagersDao {
*/
Integer countKeyTeenagers(Map<String, Object> params) throws SearchException;
/**
* 通过身份证号码查询信息是否存在
* @param params
* @return
*/
KeyTeenagersDTO hasMsg(Map<String, Object> params);
}

View File

@ -153,4 +153,10 @@ public interface ICensusMsgService {
*/
SuccessResultData<Integer> countCensusMsg(Map<String, Object> params) throws SearchException;
/**
* 通过身份证号码查询户籍信息是否存在
* @param idCardNumber
* @return
*/
CensusMsgDTO hasMsg(String idCardNumber);
}

View File

@ -185,4 +185,12 @@ public class CensusMsgServiceImpl extends AbstractService implements ICensusMsgS
return new SuccessResultData<>(countNumberCensusMsg(params));
}
@Override
public CensusMsgDTO hasMsg(String idCardNumber) {
Map<String, Object> params = super.getHashMap(1);
params.put("idCardNumber", idCardNumber);
CensusMsgDTO dto = censusMsgDao.hasMsg(params);
return dto == null ? new CensusMsgDTO() : dto;
}
}

View File

@ -154,4 +154,10 @@ public interface IFloatingPopulationService {
*/
SuccessResultData<Integer> countFloatingPopulation(Map<String, Object> params) throws SearchException;
/**
* 通过身份证号码查询信息是否存在
* @param idCardNumber
* @return
*/
FloatingPopulationDTO hasMsg(String idCardNumber);
}

View File

@ -185,4 +185,12 @@ public class FloatingPopulationServiceImpl extends AbstractService implements IF
return new SuccessResultData<>(countNumberFloatingPopulation(params));
}
@Override
public FloatingPopulationDTO hasMsg(String idCardNumber) {
Map<String, Object> params = super.getHashMap(1);
params.put("idCardNumber", idCardNumber);
FloatingPopulationDTO dto = floatingPopulationDao.hasMsg(params);
return dto == null ? new FloatingPopulationDTO() : dto;
}
}

View File

@ -153,4 +153,10 @@ public interface IHomePersonService {
*/
SuccessResultData<Integer> countHomePerson(Map<String, Object> params) throws SearchException;
/**
* 通过身份证号码查询信息是否存在
* @param idCardNumber
* @return
*/
HomePersonDTO hasMsg(String idCardNumber);
}

View File

@ -185,4 +185,12 @@ public class HomePersonServiceImpl extends AbstractService implements IHomePerso
return new SuccessResultData<>(countNumberHomePerson(params));
}
@Override
public HomePersonDTO hasMsg(String idCardNumber) {
Map<String, Object> params = super.getHashMap(1);
params.put("idCardNumber", idCardNumber);
HomePersonDTO dto = homePersonDao.hasMsg(params);
return dto == null ? new HomePersonDTO() : dto;
}
}

View File

@ -153,4 +153,10 @@ public interface IKeyTeenagersService {
*/
SuccessResultData<Integer> countKeyTeenagers(Map<String, Object> params) throws SearchException;
/**
* 通过身份证号码查询信息是否存在
* @param idCardNumber
* @return
*/
KeyTeenagersDTO hasMsg(String idCardNumber);
}

View File

@ -185,4 +185,12 @@ public class KeyTeenagersServiceImpl extends AbstractService implements IKeyTeen
return new SuccessResultData<>(countNumberKeyTeenagers(params));
}
@Override
public KeyTeenagersDTO hasMsg(String idCardNumber) {
Map<String, Object> params = super.getHashMap(1);
params.put("idCardNumber", idCardNumber);
KeyTeenagersDTO dto = keyTeenagersDao.hasMsg(params);
return dto == null ? new KeyTeenagersDTO() : dto;
}
}

View File

@ -214,4 +214,25 @@
t1.is_delete = 0
</select>
<!-- 通过身份证号码查询户籍信息是否存在 -->
<select id="hasMsg" parameterType="map" resultMap="censusMsgDTO">
SELECT
t1.name_of_householder,
t1.contact,
t1.census_number,
t1.id_card_of_householder,
t1.relationship_with_householder,
t1.people_same_census,
t1.census_msg_id,
t1.base_id,
t2.id_card_number
FROM
gen_census_msg t1
LEFT JOIN gen_base_population_info t2 ON t1.base_id = t2.base_population_info_id AND t2.is_delete = 0
WHERE
t1.is_delete = 0
AND t2.id_card_number = #{idCardNumber}
LIMIT 0, 1
</select>
</mapper>

View File

@ -214,4 +214,26 @@
t1.is_delete = 0
</select>
<!-- 通过身份证号码查询信息是否存在 -->
<select id="hasMsg" parameterType="map" resultMap="floatingPopulationDTO">
SELECT
t1.card_expire_date,
t1.residence_type,
t1.register_date,
t1.registration_type,
t1.key_of_follow,
t1.card_number,
t1.inflow_reason,
t1.floating_population_id,
t1.base_id,
t2.id_card_number
FROM
gen_floating_population t1
LEFT JOIN gen_base_population_info t2 ON t1.base_id = t2.base_population_info_id AND t2.is_delete = 0
WHERE
t1.is_delete = 0
AND t2.id_card_number = #{idCardNumber}
LIMIT 0, 1
</select>
</mapper>

View File

@ -267,4 +267,32 @@
t1.is_delete = 0
</select>
<!-- 通过身份证号码查询信息是否存在 -->
<select id="hasMsg" parameterType="map" resultMap="homePersonDTO">
SELECT
t1.healthy,
t1.relationship_with_home_people,
t1.leading_healthy,
t1.annual_income_family,
t1.home_person_type,
t1.difficulty,
t1.leading_address,
t1.annual_income_self,
t1.base_id,
t1.leading_phone,
t1.leading_card,
t1.help_situation,
t1.people_same_census,
t1.leading_name,
t1.home_person_id,
t2.id_card_number
FROM
gen_home_person t1
LEFT JOIN gen_base_population_info t2 ON t1.base_id = t2.base_population_info_id AND t2.is_delete = 0
WHERE
t1.is_delete = 0
AND t2.id_card_number = #{idCardNumber}
LIMIT 0, 1
</select>
</mapper>

View File

@ -266,4 +266,32 @@
t1.is_delete = 0
</select>
<!-- 重点青少年详情 -->
<select id="hasMsg" parameterType="map" resultMap="keyTeenagersDTO">
SELECT
t1.relationship_with_guardian,
t1.family_situation,
t1.person_type,
t1.guardian_card,
t1.helping_situation,
t1.crime_situation,
t1.helper_name,
t1.helping_method,
t1.guardian_name,
t1.is_crime,
t1.helper_phone,
t1.base_id,
t1.guardian_address,
t1.guardian_phone,
t1.key_teenagers_id,
t2.id_card_number
FROM
gen_key_teenagers t1
LEFT JOIN gen_base_population_info t2 ON t1.base_id = t2.base_population_info_id AND t2.is_delete = 0
WHERE
t1.is_delete = 0
AND t2.id_card_number = #{idCardNumber}
LIMIT 0, 1
</select>
</mapper>

View File

@ -178,12 +178,13 @@
var loadIndex = layer.load(0);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(!data) {
if(!data || !data.basePopulationInfoId) {
top.dialog.msg('暂无此人,请先补充人员基本信息');
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
$('.div-base-population-info').hide();
return false;
}
hasMsg(idCardNumber);
$('#submitBtn').removeClass("layui-btn-disabled").attr("disabled",false);
var dataFormData = {};
for(var i in data) {
@ -206,6 +207,22 @@
queryBasePopulationInfo($('#idCardNumber').val());
});
// 通过身份证号码查询是否存在该人员信息
function hasMsg(idCardNumber) {
top.restAjax.get(top.restAjax.path('api/censusmsg/hasmsg/{idCardNumber}', [idCardNumber]), {}, null, function(code, data, args) {
if(data && data.censusMsgId) {
layer.msg('该人员信息已存在,即将为您跳转到信息修改页面', {
icon: 1,
time: 2000
}, function(){
window.location.href = 'route/censusmsg/update-censusmsg.html?censusMsgId=' + data.censusMsgId;
});
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}

View File

@ -178,7 +178,7 @@
var loadIndex = layer.load(0);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(!data) {
if(!data || !data.basePopulationInfoId) {
top.dialog.msg('暂无此人,请先补充人员基本信息');
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
$('.div-base-population-info').hide();

View File

@ -188,12 +188,13 @@
var loadIndex = layer.load(0);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(!data) {
if(!data || !data.basePopulationInfoId) {
top.dialog.msg('暂无此人,请先补充人员基本信息');
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
$('.div-base-population-info').hide();
return false;
}
hasMsg(idCardNumber);
$('#submitBtn').removeClass("layui-btn-disabled").attr("disabled",false);
var dataFormData = {};
for(var i in data) {
@ -216,6 +217,22 @@
queryBasePopulationInfo($('#idCardNumber').val());
});
// 通过身份证号码查询是否存在该人员信息
function hasMsg(idCardNumber) {
top.restAjax.get(top.restAjax.path('api/floatingpopulation/hasmsg/{idCardNumber}', [idCardNumber]), {}, null, function(code, data, args) {
if(data && data.floatingPopulationId) {
layer.msg('该人员信息已存在,即将为您跳转到信息修改页面', {
icon: 1,
time: 2000
}, function(){
window.location.href = 'route/floatingpopulation/update-floatingpopulation.html?floatingPopulationId=' + data.floatingPopulationId;
});
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}

View File

@ -189,7 +189,7 @@
var loadIndex = layer.load(0);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(!data) {
if(!data || !data.basePopulationInfoId) {
top.dialog.msg('暂无此人,请先补充人员基本信息');
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
$('.div-base-population-info').hide();

View File

@ -241,12 +241,13 @@
var loadIndex = layer.load(0);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(!data) {
if(!data || !data.basePopulationInfoId) {
top.dialog.msg('暂无此人,请先补充人员基本信息');
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
$('.div-base-population-info').hide();
return false;
}
hasMsg(idCardNumber);
$('#submitBtn').removeClass("layui-btn-disabled").attr("disabled",false);
var dataFormData = {};
for(var i in data) {
@ -269,6 +270,22 @@
queryBasePopulationInfo($('#idCardNumber').val());
});
// 通过身份证号码查询是否存在该人员信息
function hasMsg(idCardNumber) {
top.restAjax.get(top.restAjax.path('api/homeperson/hasmsg/{idCardNumber}', [idCardNumber]), {}, null, function(code, data, args) {
if(data && data.homePersonId) {
layer.msg('该人员信息已存在,即将为您跳转到信息修改页面', {
icon: 1,
time: 2000
}, function(){
window.location.href = 'route/homeperson/update-homeperson.html?homePersonId=' + data.homePersonId;
});
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}

View File

@ -243,7 +243,7 @@
var loadIndex = layer.load(0);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(!data) {
if(!data || !data.basePopulationInfoId) {
top.dialog.msg('暂无此人,请先补充人员基本信息');
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
$('.div-base-population-info').hide();

View File

@ -246,12 +246,13 @@
var loadIndex = layer.load(0);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(!data) {
if(!data || !data.basePopulationInfoId) {
top.dialog.msg('暂无此人,请先补充人员基本信息');
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
$('.div-base-population-info').hide();
return false;
}
hasMsg(idCardNumber);
$('#submitBtn').removeClass("layui-btn-disabled").attr("disabled",false);
var dataFormData = {};
for(var i in data) {
@ -274,6 +275,22 @@
queryBasePopulationInfo($('#idCardNumber').val());
});
// 通过身份证号码查询是否存在该人员信息
function hasMsg(idCardNumber) {
top.restAjax.get(top.restAjax.path('api/keyteenagers/hasmsg/{idCardNumber}', [idCardNumber]), {}, null, function(code, data, args) {
if(data && data.keyTeenagersId) {
layer.msg('该人员信息已存在,即将为您跳转到信息修改页面', {
icon: 1,
time: 2000
}, function(){
window.location.href = 'route/keyteenagers/update-keyteenagers.html?keyTeenagersId=' + data.keyTeenagersId;
});
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}

View File

@ -245,7 +245,7 @@
var loadIndex = layer.load(0);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(!data) {
if(!data || !data.basePopulationInfoId) {
top.dialog.msg('暂无此人,请先补充人员基本信息');
$('#submitBtn').addClass("layui-btn-disabled").attr("disabled",true);
$('.div-base-population-info').hide();