From fe428cfd8d901ccdaa017c88f23726135bdad65d Mon Sep 17 00:00:00 2001 From: Renpc-kilig <308442850@qq.com> Date: Wed, 25 Nov 2020 10:25:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=9A=E8=BF=87=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E8=AF=81=E5=8F=B7=E6=9F=A5=E8=AF=A2=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E3=80=82=20=E5=A6=82=E6=9E=9C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=97=B6=E6=AD=A4=E4=BA=BA=E5=91=98=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=EF=BC=8C=E5=88=99=E8=B7=B3=E8=BD=AC=E5=88=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apis/censusmsg/CensusMsgController.java | 10 +++++++ .../FloatingPopulationController.java | 10 +++++++ .../apis/homeperson/HomePersonController.java | 10 +++++++ .../keyteenagers/KeyTeenagersController.java | 10 +++++++ .../censusmsg/CensusMsgAppController.java | 10 +++++++ .../FloatingPopulationAppController.java | 10 +++++++ .../homeperson/HomePersonAppController.java | 10 +++++++ .../KeyTeenagersAppController.java | 10 +++++++ .../dao/censusmsg/ICensusMsgDao.java | 6 ++++ .../IFloatingPopulationDao.java | 6 ++++ .../dao/homeperson/IHomePersonDao.java | 6 ++++ .../dao/keyteenagers/IKeyTeenagersDao.java | 6 ++++ .../service/censusmsg/ICensusMsgService.java | 6 ++++ .../censusmsg/impl/CensusMsgServiceImpl.java | 8 ++++++ .../IFloatingPopulationService.java | 6 ++++ .../impl/FloatingPopulationServiceImpl.java | 8 ++++++ .../homeperson/IHomePersonService.java | 6 ++++ .../impl/HomePersonServiceImpl.java | 8 ++++++ .../keyteenagers/IKeyTeenagersService.java | 6 ++++ .../impl/KeyTeenagersServiceImpl.java | 8 ++++++ .../mapper/censusmsg/censusmsg-mapper.xml | 21 ++++++++++++++ .../floatingpopulation-mapper.xml | 22 +++++++++++++++ .../mapper/homeperson/homeperson-mapper.xml | 28 +++++++++++++++++++ .../keyteenagers/keyteenagers-mapper.xml | 28 +++++++++++++++++++ .../route/censusmsg/save-censusmsg.html | 19 ++++++++++++- .../route/censusmsg/update-censusmsg.html | 2 +- .../save-floatingpopulation.html | 19 ++++++++++++- .../update-floatingpopulation.html | 2 +- .../route/homeperson/save-homeperson.html | 19 ++++++++++++- .../route/homeperson/update-homeperson.html | 2 +- .../route/keyteenagers/save-keyteenagers.html | 19 ++++++++++++- .../keyteenagers/update-keyteenagers.html | 2 +- 32 files changed, 335 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/cm/population/controller/apis/censusmsg/CensusMsgController.java b/src/main/java/com/cm/population/controller/apis/censusmsg/CensusMsgController.java index 592bc46..93f8596 100644 --- a/src/main/java/com/cm/population/controller/apis/censusmsg/CensusMsgController.java +++ b/src/main/java/com/cm/population/controller/apis/censusmsg/CensusMsgController.java @@ -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); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/controller/apis/floatingpopulation/FloatingPopulationController.java b/src/main/java/com/cm/population/controller/apis/floatingpopulation/FloatingPopulationController.java index 1c18bc5..8d63246 100644 --- a/src/main/java/com/cm/population/controller/apis/floatingpopulation/FloatingPopulationController.java +++ b/src/main/java/com/cm/population/controller/apis/floatingpopulation/FloatingPopulationController.java @@ -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); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/controller/apis/homeperson/HomePersonController.java b/src/main/java/com/cm/population/controller/apis/homeperson/HomePersonController.java index a56e28e..a4cb0ca 100644 --- a/src/main/java/com/cm/population/controller/apis/homeperson/HomePersonController.java +++ b/src/main/java/com/cm/population/controller/apis/homeperson/HomePersonController.java @@ -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); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/controller/apis/keyteenagers/KeyTeenagersController.java b/src/main/java/com/cm/population/controller/apis/keyteenagers/KeyTeenagersController.java index bd3af8f..86568c9 100644 --- a/src/main/java/com/cm/population/controller/apis/keyteenagers/KeyTeenagersController.java +++ b/src/main/java/com/cm/population/controller/apis/keyteenagers/KeyTeenagersController.java @@ -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); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/controller/app/apis/censusmsg/CensusMsgAppController.java b/src/main/java/com/cm/population/controller/app/apis/censusmsg/CensusMsgAppController.java index 76e6940..73c1f51 100644 --- a/src/main/java/com/cm/population/controller/app/apis/censusmsg/CensusMsgAppController.java +++ b/src/main/java/com/cm/population/controller/app/apis/censusmsg/CensusMsgAppController.java @@ -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); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/controller/app/apis/floatingpopulation/FloatingPopulationAppController.java b/src/main/java/com/cm/population/controller/app/apis/floatingpopulation/FloatingPopulationAppController.java index 479e20d..1ca2659 100644 --- a/src/main/java/com/cm/population/controller/app/apis/floatingpopulation/FloatingPopulationAppController.java +++ b/src/main/java/com/cm/population/controller/app/apis/floatingpopulation/FloatingPopulationAppController.java @@ -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); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/controller/app/apis/homeperson/HomePersonAppController.java b/src/main/java/com/cm/population/controller/app/apis/homeperson/HomePersonAppController.java index cb55152..41cc532 100644 --- a/src/main/java/com/cm/population/controller/app/apis/homeperson/HomePersonAppController.java +++ b/src/main/java/com/cm/population/controller/app/apis/homeperson/HomePersonAppController.java @@ -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); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/controller/app/apis/keyteenagers/KeyTeenagersAppController.java b/src/main/java/com/cm/population/controller/app/apis/keyteenagers/KeyTeenagersAppController.java index 35e4ce4..8081d44 100644 --- a/src/main/java/com/cm/population/controller/app/apis/keyteenagers/KeyTeenagersAppController.java +++ b/src/main/java/com/cm/population/controller/app/apis/keyteenagers/KeyTeenagersAppController.java @@ -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); + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/dao/censusmsg/ICensusMsgDao.java b/src/main/java/com/cm/population/dao/censusmsg/ICensusMsgDao.java index 34d45a6..714eaed 100644 --- a/src/main/java/com/cm/population/dao/censusmsg/ICensusMsgDao.java +++ b/src/main/java/com/cm/population/dao/censusmsg/ICensusMsgDao.java @@ -80,4 +80,10 @@ public interface ICensusMsgDao { */ Integer countCensusMsg(Map params) throws SearchException; + /** + * 通过身份证号码查询户籍信息是否存在 + * @param params + * @return + */ + CensusMsgDTO hasMsg(Map params); } \ No newline at end of file diff --git a/src/main/java/com/cm/population/dao/floatingpopulation/IFloatingPopulationDao.java b/src/main/java/com/cm/population/dao/floatingpopulation/IFloatingPopulationDao.java index 8306c88..1290438 100644 --- a/src/main/java/com/cm/population/dao/floatingpopulation/IFloatingPopulationDao.java +++ b/src/main/java/com/cm/population/dao/floatingpopulation/IFloatingPopulationDao.java @@ -80,4 +80,10 @@ public interface IFloatingPopulationDao { */ Integer countFloatingPopulation(Map params) throws SearchException; + /** + * 通过身份证号码查询信息是否存在 + * @param params + * @return + */ + FloatingPopulationDTO hasMsg(Map params); } \ No newline at end of file diff --git a/src/main/java/com/cm/population/dao/homeperson/IHomePersonDao.java b/src/main/java/com/cm/population/dao/homeperson/IHomePersonDao.java index aac75e3..a47708a 100644 --- a/src/main/java/com/cm/population/dao/homeperson/IHomePersonDao.java +++ b/src/main/java/com/cm/population/dao/homeperson/IHomePersonDao.java @@ -80,4 +80,10 @@ public interface IHomePersonDao { */ Integer countHomePerson(Map params) throws SearchException; + /** + * 通过身份证号码查询户籍信息是否存在 + * @param params + * @return + */ + HomePersonDTO hasMsg(Map params); } \ No newline at end of file diff --git a/src/main/java/com/cm/population/dao/keyteenagers/IKeyTeenagersDao.java b/src/main/java/com/cm/population/dao/keyteenagers/IKeyTeenagersDao.java index 8e8d3eb..a717694 100644 --- a/src/main/java/com/cm/population/dao/keyteenagers/IKeyTeenagersDao.java +++ b/src/main/java/com/cm/population/dao/keyteenagers/IKeyTeenagersDao.java @@ -80,4 +80,10 @@ public interface IKeyTeenagersDao { */ Integer countKeyTeenagers(Map params) throws SearchException; + /** + * 通过身份证号码查询信息是否存在 + * @param params + * @return + */ + KeyTeenagersDTO hasMsg(Map params); } \ No newline at end of file diff --git a/src/main/java/com/cm/population/service/censusmsg/ICensusMsgService.java b/src/main/java/com/cm/population/service/censusmsg/ICensusMsgService.java index fd008b2..0682230 100644 --- a/src/main/java/com/cm/population/service/censusmsg/ICensusMsgService.java +++ b/src/main/java/com/cm/population/service/censusmsg/ICensusMsgService.java @@ -153,4 +153,10 @@ public interface ICensusMsgService { */ SuccessResultData countCensusMsg(Map params) throws SearchException; + /** + * 通过身份证号码查询户籍信息是否存在 + * @param idCardNumber + * @return + */ + CensusMsgDTO hasMsg(String idCardNumber); } \ No newline at end of file diff --git a/src/main/java/com/cm/population/service/censusmsg/impl/CensusMsgServiceImpl.java b/src/main/java/com/cm/population/service/censusmsg/impl/CensusMsgServiceImpl.java index bb0da77..8ced67d 100644 --- a/src/main/java/com/cm/population/service/censusmsg/impl/CensusMsgServiceImpl.java +++ b/src/main/java/com/cm/population/service/censusmsg/impl/CensusMsgServiceImpl.java @@ -185,4 +185,12 @@ public class CensusMsgServiceImpl extends AbstractService implements ICensusMsgS return new SuccessResultData<>(countNumberCensusMsg(params)); } + @Override + public CensusMsgDTO hasMsg(String idCardNumber) { + Map params = super.getHashMap(1); + params.put("idCardNumber", idCardNumber); + CensusMsgDTO dto = censusMsgDao.hasMsg(params); + return dto == null ? new CensusMsgDTO() : dto; + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/service/floatingpopulation/IFloatingPopulationService.java b/src/main/java/com/cm/population/service/floatingpopulation/IFloatingPopulationService.java index 835de8d..7fd48a7 100644 --- a/src/main/java/com/cm/population/service/floatingpopulation/IFloatingPopulationService.java +++ b/src/main/java/com/cm/population/service/floatingpopulation/IFloatingPopulationService.java @@ -154,4 +154,10 @@ public interface IFloatingPopulationService { */ SuccessResultData countFloatingPopulation(Map params) throws SearchException; + /** + * 通过身份证号码查询信息是否存在 + * @param idCardNumber + * @return + */ + FloatingPopulationDTO hasMsg(String idCardNumber); } \ No newline at end of file diff --git a/src/main/java/com/cm/population/service/floatingpopulation/impl/FloatingPopulationServiceImpl.java b/src/main/java/com/cm/population/service/floatingpopulation/impl/FloatingPopulationServiceImpl.java index 017ab49..f41aaf5 100644 --- a/src/main/java/com/cm/population/service/floatingpopulation/impl/FloatingPopulationServiceImpl.java +++ b/src/main/java/com/cm/population/service/floatingpopulation/impl/FloatingPopulationServiceImpl.java @@ -185,4 +185,12 @@ public class FloatingPopulationServiceImpl extends AbstractService implements IF return new SuccessResultData<>(countNumberFloatingPopulation(params)); } + @Override + public FloatingPopulationDTO hasMsg(String idCardNumber) { + Map params = super.getHashMap(1); + params.put("idCardNumber", idCardNumber); + FloatingPopulationDTO dto = floatingPopulationDao.hasMsg(params); + return dto == null ? new FloatingPopulationDTO() : dto; + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/service/homeperson/IHomePersonService.java b/src/main/java/com/cm/population/service/homeperson/IHomePersonService.java index 50cf861..45c4acc 100644 --- a/src/main/java/com/cm/population/service/homeperson/IHomePersonService.java +++ b/src/main/java/com/cm/population/service/homeperson/IHomePersonService.java @@ -153,4 +153,10 @@ public interface IHomePersonService { */ SuccessResultData countHomePerson(Map params) throws SearchException; + /** + * 通过身份证号码查询信息是否存在 + * @param idCardNumber + * @return + */ + HomePersonDTO hasMsg(String idCardNumber); } \ No newline at end of file diff --git a/src/main/java/com/cm/population/service/homeperson/impl/HomePersonServiceImpl.java b/src/main/java/com/cm/population/service/homeperson/impl/HomePersonServiceImpl.java index 944d6c6..2b9bcba 100644 --- a/src/main/java/com/cm/population/service/homeperson/impl/HomePersonServiceImpl.java +++ b/src/main/java/com/cm/population/service/homeperson/impl/HomePersonServiceImpl.java @@ -185,4 +185,12 @@ public class HomePersonServiceImpl extends AbstractService implements IHomePerso return new SuccessResultData<>(countNumberHomePerson(params)); } + @Override + public HomePersonDTO hasMsg(String idCardNumber) { + Map params = super.getHashMap(1); + params.put("idCardNumber", idCardNumber); + HomePersonDTO dto = homePersonDao.hasMsg(params); + return dto == null ? new HomePersonDTO() : dto; + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/population/service/keyteenagers/IKeyTeenagersService.java b/src/main/java/com/cm/population/service/keyteenagers/IKeyTeenagersService.java index c8c80c8..170666b 100644 --- a/src/main/java/com/cm/population/service/keyteenagers/IKeyTeenagersService.java +++ b/src/main/java/com/cm/population/service/keyteenagers/IKeyTeenagersService.java @@ -153,4 +153,10 @@ public interface IKeyTeenagersService { */ SuccessResultData countKeyTeenagers(Map params) throws SearchException; + /** + * 通过身份证号码查询信息是否存在 + * @param idCardNumber + * @return + */ + KeyTeenagersDTO hasMsg(String idCardNumber); } \ No newline at end of file diff --git a/src/main/java/com/cm/population/service/keyteenagers/impl/KeyTeenagersServiceImpl.java b/src/main/java/com/cm/population/service/keyteenagers/impl/KeyTeenagersServiceImpl.java index ed93ea6..7235e3c 100644 --- a/src/main/java/com/cm/population/service/keyteenagers/impl/KeyTeenagersServiceImpl.java +++ b/src/main/java/com/cm/population/service/keyteenagers/impl/KeyTeenagersServiceImpl.java @@ -185,4 +185,12 @@ public class KeyTeenagersServiceImpl extends AbstractService implements IKeyTeen return new SuccessResultData<>(countNumberKeyTeenagers(params)); } + @Override + public KeyTeenagersDTO hasMsg(String idCardNumber) { + Map params = super.getHashMap(1); + params.put("idCardNumber", idCardNumber); + KeyTeenagersDTO dto = keyTeenagersDao.hasMsg(params); + return dto == null ? new KeyTeenagersDTO() : dto; + } + } \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/censusmsg/censusmsg-mapper.xml b/src/main/resources/mybatis/mapper/censusmsg/censusmsg-mapper.xml index cd82950..1cce3bb 100644 --- a/src/main/resources/mybatis/mapper/censusmsg/censusmsg-mapper.xml +++ b/src/main/resources/mybatis/mapper/censusmsg/censusmsg-mapper.xml @@ -214,4 +214,25 @@ t1.is_delete = 0 + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/floatingpopulation/floatingpopulation-mapper.xml b/src/main/resources/mybatis/mapper/floatingpopulation/floatingpopulation-mapper.xml index 125f5cb..6005f0a 100644 --- a/src/main/resources/mybatis/mapper/floatingpopulation/floatingpopulation-mapper.xml +++ b/src/main/resources/mybatis/mapper/floatingpopulation/floatingpopulation-mapper.xml @@ -214,4 +214,26 @@ t1.is_delete = 0 + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/homeperson/homeperson-mapper.xml b/src/main/resources/mybatis/mapper/homeperson/homeperson-mapper.xml index 038e130..e6d9867 100644 --- a/src/main/resources/mybatis/mapper/homeperson/homeperson-mapper.xml +++ b/src/main/resources/mybatis/mapper/homeperson/homeperson-mapper.xml @@ -267,4 +267,32 @@ t1.is_delete = 0 + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/keyteenagers/keyteenagers-mapper.xml b/src/main/resources/mybatis/mapper/keyteenagers/keyteenagers-mapper.xml index 7af1ee6..81d4a02 100644 --- a/src/main/resources/mybatis/mapper/keyteenagers/keyteenagers-mapper.xml +++ b/src/main/resources/mybatis/mapper/keyteenagers/keyteenagers-mapper.xml @@ -266,4 +266,32 @@ t1.is_delete = 0 + + + \ No newline at end of file diff --git a/src/main/resources/static/route/censusmsg/save-censusmsg.html b/src/main/resources/static/route/censusmsg/save-censusmsg.html index 2ffd01f..a1ab2a6 100644 --- a/src/main/resources/static/route/censusmsg/save-censusmsg.html +++ b/src/main/resources/static/route/censusmsg/save-censusmsg.html @@ -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)); } diff --git a/src/main/resources/static/route/censusmsg/update-censusmsg.html b/src/main/resources/static/route/censusmsg/update-censusmsg.html index 79e18ba..0a8e6d0 100644 --- a/src/main/resources/static/route/censusmsg/update-censusmsg.html +++ b/src/main/resources/static/route/censusmsg/update-censusmsg.html @@ -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(); diff --git a/src/main/resources/static/route/floatingpopulation/save-floatingpopulation.html b/src/main/resources/static/route/floatingpopulation/save-floatingpopulation.html index 8339822..2d10b6a 100644 --- a/src/main/resources/static/route/floatingpopulation/save-floatingpopulation.html +++ b/src/main/resources/static/route/floatingpopulation/save-floatingpopulation.html @@ -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)); } diff --git a/src/main/resources/static/route/floatingpopulation/update-floatingpopulation.html b/src/main/resources/static/route/floatingpopulation/update-floatingpopulation.html index 927e987..999b04d 100644 --- a/src/main/resources/static/route/floatingpopulation/update-floatingpopulation.html +++ b/src/main/resources/static/route/floatingpopulation/update-floatingpopulation.html @@ -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(); diff --git a/src/main/resources/static/route/homeperson/save-homeperson.html b/src/main/resources/static/route/homeperson/save-homeperson.html index c5c8284..17284eb 100644 --- a/src/main/resources/static/route/homeperson/save-homeperson.html +++ b/src/main/resources/static/route/homeperson/save-homeperson.html @@ -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)); } diff --git a/src/main/resources/static/route/homeperson/update-homeperson.html b/src/main/resources/static/route/homeperson/update-homeperson.html index e8f41b4..7d8dc1f 100644 --- a/src/main/resources/static/route/homeperson/update-homeperson.html +++ b/src/main/resources/static/route/homeperson/update-homeperson.html @@ -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(); diff --git a/src/main/resources/static/route/keyteenagers/save-keyteenagers.html b/src/main/resources/static/route/keyteenagers/save-keyteenagers.html index 36feb45..dd6b343 100644 --- a/src/main/resources/static/route/keyteenagers/save-keyteenagers.html +++ b/src/main/resources/static/route/keyteenagers/save-keyteenagers.html @@ -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)); } diff --git a/src/main/resources/static/route/keyteenagers/update-keyteenagers.html b/src/main/resources/static/route/keyteenagers/update-keyteenagers.html index e763f15..f30b21d 100644 --- a/src/main/resources/static/route/keyteenagers/update-keyteenagers.html +++ b/src/main/resources/static/route/keyteenagers/update-keyteenagers.html @@ -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();