新增人员信息如果人员信息存在,跳转到修改页面

This commit is contained in:
wans 2020-11-24 17:55:09 +08:00
parent b20a70e804
commit 53ce773663
21 changed files with 382 additions and 176 deletions

View File

@ -79,6 +79,14 @@ public class AddictsController extends AbstractController {
return addictsService.getAddictsById(addictsId);
}
@ApiOperation(value = "特殊人群-吸毒人员详情", notes = "特殊人群-吸毒人员详情接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("getaddictsinfo")
public AddictsDTO getAddictsInfo() throws SearchException {
Map<String, Object> params = requestParams();
return addictsService.getAddictsInfo(params);
}
@ApiOperation(value = "特殊人群-吸毒人员列表", notes = "特殊人群-吸毒人员列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listaddicts")

View File

@ -79,6 +79,14 @@ public class AidsController extends AbstractController {
return aidsService.getAidsById(aidsId);
}
@ApiOperation(value = "特殊人群-艾滋病危险人员详情", notes = "特殊人群-艾滋病危险人员详情接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("getaidsinfo")
public AidsDTO getAidsInfo() throws SearchException {
Map<String, Object> params = requestParams();
return aidsService.getAidsInfo(params);
}
@ApiOperation(value = "特殊人群-艾滋病危险人员列表", notes = "特殊人群-艾滋病危险人员列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listaids")

View File

@ -79,6 +79,14 @@ public class CommunityCorrectionController extends AbstractController {
return communityCorrectionService.getCommunityCorrectionById(communityCorrectionId);
}
@ApiOperation(value = "特殊人群-社区矫正人员详情", notes = "特殊人群-社区矫正人员详情接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("getcommunitycorrectioninfo")
public CommunityCorrectionDTO getCommunityCorrectionInfo() throws SearchException {
Map<String, Object> params = requestParams();
return communityCorrectionService.getCommunityCorrectionInfo(params);
}
@ApiOperation(value = "特殊人群-社区矫正人员列表", notes = "特殊人群-社区矫正人员列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listcommunitycorrection")

View File

@ -78,6 +78,14 @@ public class MentalDisordersController extends AbstractController {
return mentalDisordersService.getMentalDisordersById(mentalDisordersId);
}
@ApiOperation(value = "肇事肇祸等严重精神障碍患者详情", notes = "肇事肇祸等严重精神障碍患者详情接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("getmentaldisordersinfo")
public MentalDisordersDTO getMentalDisordersInfo() throws SearchException {
Map<String, Object> params = requestParams();
return mentalDisordersService.getMentalDisordersInfo(params);
}
@ApiOperation(value = "肇事肇祸等严重精神障碍患者列表", notes = "肇事肇祸等严重精神障碍患者列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listmentaldisorders")

View File

@ -69,6 +69,14 @@ public class ReleaseAfterSentenceController extends AbstractController {
return releaseAfterSentenceService.updateReleaseAfterSentence(releaseAfterSentenceId, releaseAfterSentenceVO);
}
@ApiOperation(value = "特殊人群-刑满释放人员详情", notes = "特殊人群-刑满释放人员详情接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("getreleaseaftersentenceinfo")
public ReleaseAfterSentenceDTO getReleaseAfterSentenceInfo() throws SearchException {
Map<String, Object> params = requestParams();
return releaseAfterSentenceService.getReleaseAfterSentenceInfo(params);
}
@ApiOperation(value = "特殊人群-刑满释放人员详情(通过ID)", notes = "特殊人群-刑满释放人员详情(通过ID)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "releaseAfterSentenceId", value = "特殊人群-刑满释放人员ID", paramType = "path")

View File

@ -153,4 +153,11 @@ public interface IAddictsService {
*/
SuccessResultData<Integer> countAddicts(Map<String, Object> params) throws SearchException;
/**
* 特殊人群-吸毒人员详情
* @param params
* @return
* @throws SearchException
*/
AddictsDTO getAddictsInfo(Map<String, Object> params) throws SearchException;
}

View File

@ -161,6 +161,12 @@ public class AddictsServiceImpl extends AbstractService implements IAddictsServi
return addictsDao.getAddicts(params);
}
@Override
public AddictsDTO getAddictsInfo(Map<String, Object> params) throws SearchException {
AddictsDTO dto = addictsDao.getAddicts(params);
return dto == null ? new AddictsDTO() : dto;
}
@Override
public List<AddictsDTO> listAddicts(Map<String, Object> params) throws SearchException {
return addictsDao.listAddicts(params);

View File

@ -153,4 +153,11 @@ public interface IAidsService {
*/
SuccessResultData<Integer> countAids(Map<String, Object> params) throws SearchException;
/**
* 特殊人群-艾滋病危险人员详情
* @param params
* @return
* @throws SearchException
*/
AidsDTO getAidsInfo(Map<String, Object> params) throws SearchException;
}

View File

@ -161,6 +161,12 @@ public class AidsServiceImpl extends AbstractService implements IAidsService {
return aidsDao.getAids(params);
}
@Override
public AidsDTO getAidsInfo(Map<String, Object> params) throws SearchException {
AidsDTO dto = aidsDao.getAids(params);
return dto == null ? new AidsDTO() : dto;
}
@Override
public List<AidsDTO> listAids(Map<String, Object> params) throws SearchException {
return aidsDao.listAids(params);

View File

@ -153,4 +153,11 @@ public interface ICommunityCorrectionService {
*/
SuccessResultData<Integer> countCommunityCorrection(Map<String, Object> params) throws SearchException;
/**
* 特殊人群-社区矫正人员详情
* @param params
* @return
* @throws SearchException
*/
CommunityCorrectionDTO getCommunityCorrectionInfo(Map<String, Object> params) throws SearchException;
}

View File

@ -18,6 +18,7 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.util.*;
@ -161,6 +162,12 @@ public class CommunityCorrectionServiceImpl extends AbstractService implements I
return communityCorrectionDao.getCommunityCorrection(params);
}
@Override
public CommunityCorrectionDTO getCommunityCorrectionInfo(Map<String, Object> params) throws SearchException {
CommunityCorrectionDTO dto = communityCorrectionDao.getCommunityCorrection(params);
return dto == null ? new CommunityCorrectionDTO(): dto;
}
@Override
public List<CommunityCorrectionDTO> listCommunityCorrection(Map<String, Object> params) throws SearchException {
return communityCorrectionDao.listCommunityCorrection(params);

View File

@ -152,4 +152,11 @@ public interface IMentalDisordersService {
*/
SuccessResultData<Integer> countMentalDisorders(Map<String, Object> params) throws SearchException;
/**
* 肇事肇祸等严重精神障碍患者详情
* @param params
* @return
* @throws SearchException
*/
MentalDisordersDTO getMentalDisordersInfo(Map<String, Object> params) throws SearchException;
}

View File

@ -162,6 +162,12 @@ public class MentalDisordersServiceImpl extends AbstractService implements IMent
return mentalDisordersDao.getMentalDisorders(params);
}
@Override
public MentalDisordersDTO getMentalDisordersInfo(Map<String, Object> params) throws SearchException {
MentalDisordersDTO dto = mentalDisordersDao.getMentalDisorders(params);
return dto == null? new MentalDisordersDTO() : dto;
}
@Override
public List<MentalDisordersDTO> listMentalDisorders(Map<String, Object> params) throws SearchException {
return mentalDisordersDao.listMentalDisorders(params);

View File

@ -153,4 +153,11 @@ public interface IReleaseAfterSentenceService {
*/
SuccessResultData<Integer> countReleaseAfterSentence(Map<String, Object> params) throws SearchException;
/**
* 根据条件查询数据(单条)
* @param params
* @return
* @throws SearchException
*/
ReleaseAfterSentenceDTO getReleaseAfterSentenceInfo(Map<String, Object> params) throws SearchException;
}

View File

@ -18,6 +18,7 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.util.*;
@ -161,6 +162,12 @@ public class ReleaseAfterSentenceServiceImpl extends AbstractService implements
return releaseAfterSentenceDao.getReleaseAfterSentence(params);
}
@Override
public ReleaseAfterSentenceDTO getReleaseAfterSentenceInfo(Map<String, Object> params) throws SearchException {
ReleaseAfterSentenceDTO dto = releaseAfterSentenceDao.getReleaseAfterSentence(params);
return dto == null ? new ReleaseAfterSentenceDTO() : dto;
}
@Override
public List<ReleaseAfterSentenceDTO> listReleaseAfterSentence(Map<String, Object> params) throws SearchException {
return releaseAfterSentenceDao.listReleaseAfterSentence(params);

View File

@ -274,7 +274,7 @@
var loadIndex = layer.load(1);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(typeof (data) == 'undefined' || data == ''){
if(typeof (data) == 'undefined' || data.basePopulationInfoId == ''){
layer.msg('未查询到人员基础信息');
$('.submit-btn').hide();
$('.div-form-content').hide();
@ -282,6 +282,7 @@
form.render();
return false;
}
queryExistsData(idCardNumber);
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
@ -305,6 +306,18 @@
queryBasePopulationInfo($('#idCardNumber').val());
});
function queryExistsData(idCardNumber){
top.restAjax.get(top.restAjax.path('api/addicts/getaddictsinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(data.addictsId){
window.location.href = 'route/addicts/update-addicts.html?addictsId=' + data.addictsId;
}
}, function(code, data) {
console.log(data);
}
);
}
// 初始化发现日期日期
function initDiscoveryDateDate() {
laydate.render({

View File

@ -245,7 +245,7 @@
var loadIndex = layer.load(1);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(typeof (data) == 'undefined' || data == ''){
if(typeof (data) == 'undefined' || data.basePopulationInfoId == ''){
layer.msg('未查询到人员基础信息');
$('.submit-btn').hide();
$('.div-form-content').hide();
@ -253,6 +253,7 @@
form.render();
return false;
}
queryExistsData(idCardNumber);
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
@ -276,6 +277,18 @@
queryBasePopulationInfo($('#idCardNumber').val());
});
function queryExistsData(idCardNumber){
top.restAjax.get(top.restAjax.path('api/aids/getaidsinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(data.aidsId){
window.location.href = 'route/aids/update-aids.html?aidsId=' + data.aidsId;
}
}, function(code, data) {
console.log(data);
}
);
}
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}

View File

@ -22,6 +22,42 @@
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<blockquote class="layui-elem-quote">人员基础信息</blockquote>
<div class="layui-row">
<div class="layui-col-md3">
<div class="layui-form-item">
<label class="layui-form-label">姓名</label>
<div class="layui-input-block">
<input type="text" id="fullName" name="fullName" class="layui-input" value="" readonly="readonly">
</div>
</div>
</div>
<div class="layui-col-md3">
<div class="layui-form-item">
<label class="layui-form-label">性别</label>
<div class="layui-input-block">
<input type="text" id="gender" name="gender" class="layui-input" value="" readonly="readonly">
</div>
</div>
</div>
<div class="layui-col-md3">
<div class="layui-form-item">
<label class="layui-form-label">身份证号</label>
<div class="layui-input-block">
<input type="text" id="idCardNumber" name="idCardNumber" class="layui-input" value="" readonly="readonly">
</div>
</div>
</div>
<div class="layui-col-md3">
<div class="layui-form-item">
<label class="layui-form-label">联系方式</label>
<div class="layui-input-block">
<input type="text" id="telephone" name="telephone" class="layui-input" value="" readonly="readonly">
</div>
</div>
</div>
</div>
<blockquote class="layui-elem-quote">艾滋危险病人信息</blockquote>
<div class="layui-row">
<div class="layui-col-md4">

View File

@ -436,7 +436,7 @@
var loadIndex = layer.load(1);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(typeof (data) == 'undefined' || data == ''){
if(typeof (data) == 'undefined' || data.basePopulationInfoId == ''){
layer.msg('未查询到人员基础信息');
$('.submit-btn').hide();
$('.div-form-content').hide();
@ -444,6 +444,7 @@
form.render();
return false;
}
queryExistsData(idCardNumber);
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
@ -467,6 +468,18 @@
queryBasePopulationInfo($('#idCardNumber').val());
});
function queryExistsData(idCardNumber){
top.restAjax.get(top.restAjax.path('api/communitycorrection/getcommunitycorrectioninfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(data.communityCorrectionId){
window.location.href = 'route/communitycorrection/update-communitycorrection.html?communityCorrectionId=' + data.communityCorrectionId;
}
}, function(code, data) {
console.log(data);
}
);
}
// 初始化内容
function initData() {
initCaseCategorySelect();

View File

@ -321,7 +321,7 @@
var loadIndex = layer.load(1);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(typeof (data) == 'undefined' || data == ''){
if(typeof (data) == 'undefined' || data.basePopulationInfoId == ''){
layer.msg('未查询到人员基础信息');
$('.submit-btn').hide();
$('.div-form-content').hide();
@ -329,6 +329,7 @@
form.render();
return false;
}
queryExistsData(idCardNumber);
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
@ -352,6 +353,18 @@
queryBasePopulationInfo($('#idCardNumber').val());
});
function queryExistsData(idCardNumber){
top.restAjax.get(top.restAjax.path('api/mentaldisorders/getmentaldisordersinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(data.mentalDisordersId){
window.location.href = 'route/mentaldisorders/update-mentaldisorders.html?mentalDisordersId=' + data.mentalDisordersId;
}
}, function(code, data) {
console.log(data);
}
);
}
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}

View File

@ -21,7 +21,7 @@
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<form id="dataForm" class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-row">
<div class="layui-col-md3">
<div class="layui-form-item">
@ -39,7 +39,7 @@
</div>
</div>
</div>
<div class="div-base-population-info" style="display: none">
<div class="div-base-population-info">
<blockquote class="layui-elem-quote">人员基础信息</blockquote>
<div class="layui-row">
<div class="layui-col-md3">
@ -75,18 +75,9 @@
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label">现住地</label>
<div class="layui-input-block">
<input type="text" id="currentResidence" name="currentResidence" class="layui-input" value="" readonly="readonly">
</div>
</div>
</div>
</div>
</div>
<div class="div-form-content" style="display: none;">
<blockquote class="layui-elem-quote">刑满释放人员信息补充</blockquote>
<div class="layui-row">
<div class="layui-col-md4">
@ -253,6 +244,8 @@
</div>
</div>
</div>
</div>
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
@ -295,10 +288,16 @@
var loadIndex = layer.load(1);
top.restAjax.get(top.restAjax.path('api/basepopulationinfo/getbasepopulationinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(typeof (data) == 'undefined' || data == ''){
if(typeof (data) == 'undefined' || data.basePopulationInfoId == ''){
layer.msg('未查询到人员基础信息');
$('.submit-btn').hide();
$('.div-form-content').hide();
$('#dataForm')[0].reset();
form.render();
return false;
return false;
}
queryExistsData(idCardNumber);
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
@ -321,6 +320,18 @@
queryBasePopulationInfo($('#idCardNumber').val());
});
function queryExistsData(idCardNumber){
top.restAjax.get(top.restAjax.path('api/releaseaftersentence/getreleaseaftersentenceinfo', []),
{idCardNumber:idCardNumber}, null, function(code, data) {
if(data.releaseAfterSentenceId){
window.location.href = 'route/releaseaftersentence/update-releaseaftersentence.html?releaseAfterSentenceId=' + data.releaseAfterSentenceId;
}
}, function(code, data) {
console.log(data);
}
);
}
// 初始化释放日期日期
function initReleaseDateDate() {
laydate.render({