人口基本信息增加退休的就业状态
人口基本信息增加标签选择 人口基本信息增加列表脱敏
This commit is contained in:
parent
d57a723b65
commit
1a17b0205b
@ -20,6 +20,7 @@ import com.cm.common.result.SuccessResultList;
|
|||||||
import com.cm.common.utils.UUIDUtil;
|
import com.cm.common.utils.UUIDUtil;
|
||||||
import com.cm.population.pojo.dtos.population.PopulationDTO;
|
import com.cm.population.pojo.dtos.population.PopulationDTO;
|
||||||
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO;
|
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO;
|
||||||
|
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoLabelDTO;
|
||||||
import com.cm.population.pojo.vos.populationinfo.PopulationInfoVO;
|
import com.cm.population.pojo.vos.populationinfo.PopulationInfoVO;
|
||||||
import com.cm.population.service.populationinfo.IPopulationInfoService;
|
import com.cm.population.service.populationinfo.IPopulationInfoService;
|
||||||
import com.cm.population.utils.IdCardVerifyUtil;
|
import com.cm.population.utils.IdCardVerifyUtil;
|
||||||
@ -54,6 +55,20 @@ public class PopulationInfoController extends AbstractController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IDataDictionaryService iDataDictionaryService;
|
private IDataDictionaryService iDataDictionaryService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "人口标签", notes = "人口标签")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("label")
|
||||||
|
public List<PopulationInfoLabelDTO> getLabel() {
|
||||||
|
List<DataDictionaryDTO> list = iDataDictionaryService.listDictionaryByParentId("5ea50f00-3d76-492c-8680-9c30d50cce21");
|
||||||
|
List<PopulationInfoLabelDTO> dataList = new ArrayList<>();
|
||||||
|
for(DataDictionaryDTO dto : list) {
|
||||||
|
PopulationInfoLabelDTO D = new PopulationInfoLabelDTO(dto.getDictionaryId(), dto.getDictionaryName(), dto.getDictionarySummary(), dto.getDictionarySort());
|
||||||
|
dataList.add(D);
|
||||||
|
}
|
||||||
|
return dataList;
|
||||||
|
}
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private FileProperties fileProperties;
|
private FileProperties fileProperties;
|
||||||
@ApiOperation(value = "Excel导入", notes = "Excel导入接口")
|
@ApiOperation(value = "Excel导入", notes = "Excel导入接口")
|
||||||
@ -261,6 +276,11 @@ public class PopulationInfoController extends AbstractController {
|
|||||||
}else{
|
}else{
|
||||||
identityMap.put(idcard, currentLineNumber);
|
identityMap.put(idcard, currentLineNumber);
|
||||||
}
|
}
|
||||||
|
// 验证号码长度
|
||||||
|
if (!StringUtil.isEmpty(phone) && phone.length() != 11) {
|
||||||
|
resultMap.put(currentLineNumber + "", "手机号码错误");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// 验证户籍地址
|
// 验证户籍地址
|
||||||
DataAreaDTO dataAreaDTO = populationInfoService.getAreaByCode(domicileAreaCode);
|
DataAreaDTO dataAreaDTO = populationInfoService.getAreaByCode(domicileAreaCode);
|
||||||
if (dataAreaDTO == null) {
|
if (dataAreaDTO == null) {
|
||||||
@ -476,7 +496,11 @@ public class PopulationInfoController extends AbstractController {
|
|||||||
public SuccessResultList<List<PopulationInfoDTO>> listPage(ListPage page) {
|
public SuccessResultList<List<PopulationInfoDTO>> listPage(ListPage page) {
|
||||||
Map<String, Object> params = requestParams();
|
Map<String, Object> params = requestParams();
|
||||||
page.setParams(params);
|
page.setParams(params);
|
||||||
return populationInfoService.listPage(page);
|
SuccessResultList<List<PopulationInfoDTO>> pageList = populationInfoService.listPage(page);
|
||||||
|
for(PopulationInfoDTO dto : pageList.getRows()) {
|
||||||
|
populationInfoService.getTuoMin(dto);
|
||||||
|
}
|
||||||
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "基础人口信息统计", notes = "基础人口信息统计接口")
|
@ApiOperation(value = "基础人口信息统计", notes = "基础人口信息统计接口")
|
||||||
@ -494,7 +518,11 @@ public class PopulationInfoController extends AbstractController {
|
|||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@GetMapping("list/house-id/{houseId}")
|
@GetMapping("list/house-id/{houseId}")
|
||||||
public List<PopulationInfoDTO> listByHouseId(@PathVariable("houseId") String houseId) {
|
public List<PopulationInfoDTO> listByHouseId(@PathVariable("houseId") String houseId) {
|
||||||
return populationInfoService.listByHouseId(houseId);
|
List<PopulationInfoDTO> list = populationInfoService.listByHouseId(houseId);
|
||||||
|
for(PopulationInfoDTO dto : list) {
|
||||||
|
populationInfoService.getTuoMin(dto);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -3,17 +3,24 @@ package com.cm.population.controller.app.api.populationinfo;
|
|||||||
import com.cm.common.annotation.CheckRequestBodyAnnotation;
|
import com.cm.common.annotation.CheckRequestBodyAnnotation;
|
||||||
import com.cm.common.base.AbstractController;
|
import com.cm.common.base.AbstractController;
|
||||||
import com.cm.common.constants.ISystemConstant;
|
import com.cm.common.constants.ISystemConstant;
|
||||||
|
import com.cm.common.plugin.pojo.dtos.datadictionary.DataDictionaryDTO;
|
||||||
|
import com.cm.common.plugin.service.datadictionary.IDataDictionaryService;
|
||||||
import com.cm.common.pojo.ListPage;
|
import com.cm.common.pojo.ListPage;
|
||||||
import com.cm.common.result.ErrorResult;
|
import com.cm.common.result.ErrorResult;
|
||||||
import com.cm.common.result.SuccessResult;
|
import com.cm.common.result.SuccessResult;
|
||||||
import com.cm.common.result.SuccessResultData;
|
import com.cm.common.result.SuccessResultData;
|
||||||
import com.cm.common.result.SuccessResultList;
|
import com.cm.common.result.SuccessResultList;
|
||||||
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO;
|
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO;
|
||||||
|
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoLabelDTO;
|
||||||
import com.cm.population.pojo.vos.populationinfo.PopulationInfoVO;
|
import com.cm.population.pojo.vos.populationinfo.PopulationInfoVO;
|
||||||
import com.cm.population.service.populationinfo.IPopulationInfoService;
|
import com.cm.population.service.populationinfo.IPopulationInfoService;
|
||||||
|
import com.cm.population.utils.IdCardVerifyUtil;
|
||||||
|
import com.github.pagehelper.util.StringUtil;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -33,6 +40,22 @@ public class PopulationInfoAppController extends AbstractController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IPopulationInfoService populationInfoService;
|
private IPopulationInfoService populationInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IDataDictionaryService iDataDictionaryService;
|
||||||
|
|
||||||
|
@ApiOperation(value = "人口标签", notes = "人口标签")
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("label" + ISystemConstant.RELEASE_SUFFIX)
|
||||||
|
public List<PopulationInfoLabelDTO> getLabel() {
|
||||||
|
List<DataDictionaryDTO> list = iDataDictionaryService.listDictionaryByParentId("5ea50f00-3d76-492c-8680-9c30d50cce21");
|
||||||
|
List<PopulationInfoLabelDTO> dataList = new ArrayList<>();
|
||||||
|
for(DataDictionaryDTO dto : list) {
|
||||||
|
PopulationInfoLabelDTO D = new PopulationInfoLabelDTO(dto.getDictionaryId(), dto.getDictionaryName(), dto.getDictionarySummary(), dto.getDictionarySort());
|
||||||
|
dataList.add(D);
|
||||||
|
}
|
||||||
|
return dataList;
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "新增基础人口信息", notes = "新增基础人口信息接口")
|
@ApiOperation(value = "新增基础人口信息", notes = "新增基础人口信息接口")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||||
@ -116,7 +139,11 @@ public class PopulationInfoAppController extends AbstractController {
|
|||||||
public SuccessResultList<List<PopulationInfoDTO>> listPage(@RequestHeader("token") String token, ListPage page) {
|
public SuccessResultList<List<PopulationInfoDTO>> listPage(@RequestHeader("token") String token, ListPage page) {
|
||||||
Map<String, Object> params = requestParams();
|
Map<String, Object> params = requestParams();
|
||||||
page.setParams(params);
|
page.setParams(params);
|
||||||
return populationInfoService.listPage(page);
|
SuccessResultList<List<PopulationInfoDTO>> pageList = populationInfoService.listPage(page);
|
||||||
|
for(PopulationInfoDTO dto : pageList.getRows()) {
|
||||||
|
populationInfoService.getTuoMin(dto);
|
||||||
|
}
|
||||||
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "基础人口信息分页列表", notes = "基础人口信息分页列表接口")
|
@ApiOperation(value = "基础人口信息分页列表", notes = "基础人口信息分页列表接口")
|
||||||
|
@ -7,6 +7,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.Period;
|
import java.time.Period;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@ApiModel
|
@ApiModel
|
||||||
public class PopulationInfoBaseDTO {
|
public class PopulationInfoBaseDTO {
|
||||||
@ -45,6 +46,10 @@ public class PopulationInfoBaseDTO {
|
|||||||
private String name;
|
private String name;
|
||||||
@ApiModelProperty(name = "idcard", value = "证件")
|
@ApiModelProperty(name = "idcard", value = "证件")
|
||||||
private String idcard;
|
private String idcard;
|
||||||
|
@ApiModelProperty(name = "label", value = "标签")
|
||||||
|
private String label;
|
||||||
|
@ApiModelProperty(name = "labelList", value = "标签集合")
|
||||||
|
private List<PopulationInfoLabelDTO> labelList;
|
||||||
@ApiModelProperty(name = "healthStatus", value = "健康状况")
|
@ApiModelProperty(name = "healthStatus", value = "健康状况")
|
||||||
private String healthStatus;
|
private String healthStatus;
|
||||||
@ApiModelProperty(name = "idcardType", value = "证件类型")
|
@ApiModelProperty(name = "idcardType", value = "证件类型")
|
||||||
@ -64,6 +69,22 @@ public class PopulationInfoBaseDTO {
|
|||||||
@ApiModelProperty(name = "创建人", value = "创建人")
|
@ApiModelProperty(name = "创建人", value = "创建人")
|
||||||
private String creator;
|
private String creator;
|
||||||
|
|
||||||
|
public List<PopulationInfoLabelDTO> getLabelList() {
|
||||||
|
return labelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabelList(List<PopulationInfoLabelDTO> labelList) {
|
||||||
|
this.labelList = labelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCreator() {
|
public String getCreator() {
|
||||||
return creator;
|
return creator;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,9 @@ import com.cm.common.annotation.CheckEmptyAnnotation;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @ClassName: PopulationInfoDTO
|
* @ClassName: PopulationInfoDTO
|
||||||
@ -19,6 +22,10 @@ public class PopulationInfoDTO {
|
|||||||
private String populationInfoId;
|
private String populationInfoId;
|
||||||
@ApiModelProperty(name = "name", value = "姓名")
|
@ApiModelProperty(name = "name", value = "姓名")
|
||||||
private String name;
|
private String name;
|
||||||
|
@ApiModelProperty(name = "label", value = "标签")
|
||||||
|
private String label;
|
||||||
|
@ApiModelProperty(name = "labelList", value = "标签集合")
|
||||||
|
private List labelList;
|
||||||
@ApiModelProperty(name = "idcard", value = "证件")
|
@ApiModelProperty(name = "idcard", value = "证件")
|
||||||
private String idcard;
|
private String idcard;
|
||||||
@ApiModelProperty(name = "idcardType", value = "证件类型")
|
@ApiModelProperty(name = "idcardType", value = "证件类型")
|
||||||
@ -171,6 +178,22 @@ public class PopulationInfoDTO {
|
|||||||
@ApiModelProperty(name = "创建人", value = "创建人")
|
@ApiModelProperty(name = "创建人", value = "创建人")
|
||||||
private String creator;
|
private String creator;
|
||||||
|
|
||||||
|
public List getLabelList() {
|
||||||
|
return labelList == null ? new ArrayList() : labelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabelList(List labelList) {
|
||||||
|
this.labelList = labelList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCreator() {
|
public String getCreator() {
|
||||||
return creator;
|
return creator;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,65 @@
|
|||||||
|
package com.cm.population.pojo.dtos.populationinfo;
|
||||||
|
|
||||||
|
import com.cm.common.annotation.CheckEmptyAnnotation;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @ClassName: PopulationInfoLabelDTO
|
||||||
|
* @Description: 基础人口信息标签(数据字典)
|
||||||
|
* @Author: CodeFactory
|
||||||
|
* @Date: 2023-10-24 11:55:46
|
||||||
|
* @Version: 3.0
|
||||||
|
**/
|
||||||
|
@ApiModel
|
||||||
|
public class PopulationInfoLabelDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "id", value = "标签Id")
|
||||||
|
private String id;
|
||||||
|
@ApiModelProperty(name = "name", value = "标签名称")
|
||||||
|
private String name;
|
||||||
|
@ApiModelProperty(name = "color", value = "标签颜色")
|
||||||
|
private String color;
|
||||||
|
@ApiModelProperty(name = "order", value = "排序")
|
||||||
|
private String order;
|
||||||
|
|
||||||
|
public PopulationInfoLabelDTO(String id, String name, String color, String order) {
|
||||||
|
this.id = id;
|
||||||
|
this.name = name;
|
||||||
|
this.color = color;
|
||||||
|
this.order = order;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColor() {
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColor(String color) {
|
||||||
|
this.color = color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrder() {
|
||||||
|
return order;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrder(String order) {
|
||||||
|
this.order = order;
|
||||||
|
}
|
||||||
|
}
|
@ -20,6 +20,8 @@ public class PopulationInfoVO {
|
|||||||
@ApiModelProperty(name = "name", value = "姓名")
|
@ApiModelProperty(name = "name", value = "姓名")
|
||||||
@CheckEmptyAnnotation(name = "姓名")
|
@CheckEmptyAnnotation(name = "姓名")
|
||||||
private String name;
|
private String name;
|
||||||
|
@ApiModelProperty(name = "label", value = "标签")
|
||||||
|
private String label;
|
||||||
@ApiModelProperty(name = "idcard", value = "证件")
|
@ApiModelProperty(name = "idcard", value = "证件")
|
||||||
@CheckEmptyAnnotation(name = "证件")
|
@CheckEmptyAnnotation(name = "证件")
|
||||||
private String idcard;
|
private String idcard;
|
||||||
@ -180,6 +182,14 @@ public class PopulationInfoVO {
|
|||||||
@ApiModelProperty(name = "othertext", value = "其他说明")
|
@ApiModelProperty(name = "othertext", value = "其他说明")
|
||||||
private String othertext;
|
private String othertext;
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDepartmentType() {
|
public String getDepartmentType() {
|
||||||
return departmentType == null ? "" : departmentType;
|
return departmentType == null ? "" : departmentType;
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,9 @@ import java.util.Map;
|
|||||||
public interface IPopulationInfoService {
|
public interface IPopulationInfoService {
|
||||||
|
|
||||||
public List<DataAreaDTO> getAreaList();
|
public List<DataAreaDTO> getAreaList();
|
||||||
|
void getTuoMin(PopulationInfoDTO dto);
|
||||||
|
void getTuoMin(PopulationInfoBaseDTO dto);
|
||||||
|
|
||||||
DataAreaDTO getAreaByCode(String code);
|
DataAreaDTO getAreaByCode(String code);
|
||||||
DataAreaDTO getAreaById(String id);
|
DataAreaDTO getAreaById(String id);
|
||||||
List<AreaZtreeDTO> listAreaTree(String parentId);
|
List<AreaZtreeDTO> listAreaTree(String parentId);
|
||||||
|
@ -3,7 +3,9 @@ package com.cm.population.service.populationinfo.impl;
|
|||||||
import com.cm.common.base.AbstractService;
|
import com.cm.common.base.AbstractService;
|
||||||
import com.cm.common.exception.SaveException;
|
import com.cm.common.exception.SaveException;
|
||||||
import com.cm.common.plugin.pojo.dtos.dataarea.DataAreaDTO;
|
import com.cm.common.plugin.pojo.dtos.dataarea.DataAreaDTO;
|
||||||
|
import com.cm.common.plugin.pojo.dtos.datadictionary.DataDictionaryDTO;
|
||||||
import com.cm.common.plugin.service.dataarea.IDataAreaService;
|
import com.cm.common.plugin.service.dataarea.IDataAreaService;
|
||||||
|
import com.cm.common.plugin.service.datadictionary.IDataDictionaryService;
|
||||||
import com.cm.common.pojo.ListPage;
|
import com.cm.common.pojo.ListPage;
|
||||||
import com.cm.common.result.SuccessResultList;
|
import com.cm.common.result.SuccessResultList;
|
||||||
import com.cm.common.token.app.AppTokenManager;
|
import com.cm.common.token.app.AppTokenManager;
|
||||||
@ -20,6 +22,7 @@ import com.cm.population.pojo.dtos.drug.DrugDTO;
|
|||||||
import com.cm.population.pojo.dtos.petition.PetitionDTO;
|
import com.cm.population.pojo.dtos.petition.PetitionDTO;
|
||||||
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO;
|
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO;
|
||||||
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO;
|
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO;
|
||||||
|
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoLabelDTO;
|
||||||
import com.cm.population.pojo.dtos.release.ReleaseDTO;
|
import com.cm.population.pojo.dtos.release.ReleaseDTO;
|
||||||
import com.cm.population.pojo.dtos.security.SecurityDTO;
|
import com.cm.population.pojo.dtos.security.SecurityDTO;
|
||||||
import com.cm.population.pojo.vos.populationinfo.PopulationInfoVO;
|
import com.cm.population.pojo.vos.populationinfo.PopulationInfoVO;
|
||||||
@ -36,6 +39,7 @@ import com.cm.population.service.security.ISecurityService;
|
|||||||
import com.cm.population.utils.IdCardVerifyUtil;
|
import com.cm.population.utils.IdCardVerifyUtil;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.github.pagehelper.util.StringUtil;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -78,6 +82,78 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getTuoMin(PopulationInfoDTO dto) {
|
||||||
|
String idcard = dto.getIdcard();
|
||||||
|
String name = dto.getName();
|
||||||
|
String phone = dto.getPhone();
|
||||||
|
String birthday = dto.getBirthday();
|
||||||
|
if (dto.getIdcardType().contains("身份证")) {
|
||||||
|
String idCardNumber = IdCardVerifyUtil.desensitizeIdCardNumber(idcard);
|
||||||
|
dto.setIdcard(idCardNumber);
|
||||||
|
}
|
||||||
|
if (!StringUtil.isEmpty(phone) && phone.length() == 11) {
|
||||||
|
if(phone.startsWith("0")) {
|
||||||
|
String newPhone = phone.substring(0, 4) + "****" + phone.substring(8, 11);
|
||||||
|
dto.setPhone(newPhone);
|
||||||
|
}else{
|
||||||
|
String newPhone = phone.substring(0, 3) + "****" + phone.substring(7, 11);
|
||||||
|
dto.setPhone(newPhone);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!StringUtil.isEmpty(birthday)) {
|
||||||
|
String newBirthday = IdCardVerifyUtil.desensitizeBirthday(birthday);
|
||||||
|
dto.setBirthday(newBirthday);
|
||||||
|
}
|
||||||
|
if (name.length() > 2) {
|
||||||
|
String xin = "";
|
||||||
|
for(int i = 0; i < name.length() - 2; i++) {
|
||||||
|
xin = xin + "*";
|
||||||
|
}
|
||||||
|
String newName = name.substring(0, 1) + xin + name.substring(name.length()-1, name.length());
|
||||||
|
dto.setName(newName);
|
||||||
|
}else{
|
||||||
|
String newName = name.substring(0, 1);
|
||||||
|
dto.setName(newName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getTuoMin(PopulationInfoBaseDTO dto) {
|
||||||
|
String idcard = dto.getIdcard();
|
||||||
|
String name = dto.getName();
|
||||||
|
String phone = dto.getPhone();
|
||||||
|
String birthday = dto.getBirthday();
|
||||||
|
if (dto.getIdcardType().contains("身份证")) {
|
||||||
|
String idCardNumber = IdCardVerifyUtil.desensitizeIdCardNumber(idcard);
|
||||||
|
dto.setIdcard(idCardNumber);
|
||||||
|
}
|
||||||
|
if (!StringUtil.isEmpty(phone) && phone.length() == 11) {
|
||||||
|
if(phone.startsWith("0")) {
|
||||||
|
String newPhone = phone.substring(0, 4) + "****" + phone.substring(8, 11);
|
||||||
|
dto.setPhone(newPhone);
|
||||||
|
}else{
|
||||||
|
String newPhone = phone.substring(0, 3) + "****" + phone.substring(7, 11);
|
||||||
|
dto.setPhone(newPhone);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!StringUtil.isEmpty(birthday)) {
|
||||||
|
String newBirthday = IdCardVerifyUtil.desensitizeBirthday(birthday);
|
||||||
|
dto.setBirthday(newBirthday);
|
||||||
|
}
|
||||||
|
if (name.length() > 2) {
|
||||||
|
String xin = "";
|
||||||
|
for(int i = 0; i < name.length() - 2; i++) {
|
||||||
|
xin = xin + "*";
|
||||||
|
}
|
||||||
|
String newName = name.substring(0, 1) + xin + name.substring(name.length()-1, name.length());
|
||||||
|
dto.setName(newName);
|
||||||
|
}else{
|
||||||
|
String newName = name.substring(0, 1);
|
||||||
|
dto.setName(newName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AreaZtreeDTO> listAreaTree(String parentId) {
|
public List<AreaZtreeDTO> listAreaTree(String parentId) {
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
@ -127,6 +203,17 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
|||||||
dto.setIsPetition(petition.size() > 0 ? "是" : "否");
|
dto.setIsPetition(petition.size() > 0 ? "是" : "否");
|
||||||
dto.setIsRelease(release.size() > 0 ? "是" : "否");
|
dto.setIsRelease(release.size() > 0 ? "是" : "否");
|
||||||
dto.setIsSecurity(security.size() > 0 ? "是" : "否");
|
dto.setIsSecurity(security.size() > 0 ? "是" : "否");
|
||||||
|
if (dto != null && !StringUtil.isEmpty(dto.getLabel()) && dto.getLabel().length() > 0) {
|
||||||
|
List<DataDictionaryDTO> list = iDataDictionaryService.listDictionaryByParentId("5ea50f00-3d76-492c-8680-9c30d50cce21");
|
||||||
|
List<PopulationInfoLabelDTO> dataList = new ArrayList<>();
|
||||||
|
for(DataDictionaryDTO dto1 : list) {
|
||||||
|
if (dto.getLabel().contains(dto1.getDictionaryId())) {
|
||||||
|
PopulationInfoLabelDTO D = new PopulationInfoLabelDTO(dto1.getDictionaryId(), dto1.getDictionaryName(), dto1.getDictionarySummary(), dto1.getDictionarySort());
|
||||||
|
dataList.add(D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dto.setLabelList(dataList);
|
||||||
|
}
|
||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,6 +244,9 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
|||||||
throw new SaveException("该证件号码错误");
|
throw new SaveException("该证件号码错误");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (populationInfoVO.getName().length() < 2) {
|
||||||
|
throw new SaveException("姓名错误");
|
||||||
|
}
|
||||||
String areaCode = populationInfoVO.getDomicileAreaCode();
|
String areaCode = populationInfoVO.getDomicileAreaCode();
|
||||||
if(areaCode.startsWith("150271")) { //包头稀土高新技术产业开发区
|
if(areaCode.startsWith("150271")) { //包头稀土高新技术产业开发区
|
||||||
populationInfoVO.setDomicileAddressType("3");
|
populationInfoVO.setDomicileAddressType("3");
|
||||||
@ -165,6 +255,10 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
|||||||
}else { //非包头市
|
}else { //非包头市
|
||||||
populationInfoVO.setDomicileAddressType("1");
|
populationInfoVO.setDomicileAddressType("1");
|
||||||
}
|
}
|
||||||
|
// 验证号码长度
|
||||||
|
if (!StringUtil.isEmpty(populationInfoVO.getPhone()) && populationInfoVO.getPhone().length() != 11) {
|
||||||
|
throw new SaveException("手机号码错误");
|
||||||
|
}
|
||||||
Map<String, Object> params = HashMapUtil.objectToMap(populationInfoVO);
|
Map<String, Object> params = HashMapUtil.objectToMap(populationInfoVO);
|
||||||
params.put("populationInfoId", populationInfoId);
|
params.put("populationInfoId", populationInfoId);
|
||||||
if(StringUtils.isEmpty(token)) {
|
if(StringUtils.isEmpty(token)) {
|
||||||
@ -222,6 +316,9 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
|||||||
throw new SaveException("该证件号码错误");
|
throw new SaveException("该证件号码错误");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (populationInfoVO.getName().length() < 2) {
|
||||||
|
throw new SaveException("姓名错误");
|
||||||
|
}
|
||||||
String areaCode = populationInfoVO.getDomicileAreaCode();
|
String areaCode = populationInfoVO.getDomicileAreaCode();
|
||||||
if(areaCode.startsWith("150271")) { //包头稀土高新技术产业开发区
|
if(areaCode.startsWith("150271")) { //包头稀土高新技术产业开发区
|
||||||
populationInfoVO.setDomicileAddressType("3");
|
populationInfoVO.setDomicileAddressType("3");
|
||||||
@ -230,6 +327,10 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
|||||||
}else { //非包头市
|
}else { //非包头市
|
||||||
populationInfoVO.setDomicileAddressType("1");
|
populationInfoVO.setDomicileAddressType("1");
|
||||||
}
|
}
|
||||||
|
// 验证号码长度
|
||||||
|
if (!StringUtil.isEmpty(populationInfoVO.getPhone()) && populationInfoVO.getPhone().length() != 11) {
|
||||||
|
throw new SaveException("手机号码错误");
|
||||||
|
}
|
||||||
params.put("populationInfoId", populationInfoId);
|
params.put("populationInfoId", populationInfoId);
|
||||||
if(StringUtils.isEmpty(token)) {
|
if(StringUtils.isEmpty(token)) {
|
||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
@ -239,9 +340,24 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
|||||||
populationInfoDao.update(params);
|
populationInfoDao.update(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IDataDictionaryService iDataDictionaryService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PopulationInfoDTO get(Map<String, Object> params) {
|
public PopulationInfoDTO get(Map<String, Object> params) {
|
||||||
return populationInfoDao.get(params);
|
PopulationInfoDTO populationInfoDTO = populationInfoDao.get(params);
|
||||||
|
if (populationInfoDTO != null && !StringUtil.isEmpty(populationInfoDTO.getLabel()) && populationInfoDTO.getLabel().length() > 0) {
|
||||||
|
List<DataDictionaryDTO> list = iDataDictionaryService.listDictionaryByParentId("5ea50f00-3d76-492c-8680-9c30d50cce21");
|
||||||
|
List<PopulationInfoLabelDTO> dataList = new ArrayList<>();
|
||||||
|
for(DataDictionaryDTO dto : list) {
|
||||||
|
if (populationInfoDTO.getLabel().contains(dto.getDictionaryId())) {
|
||||||
|
PopulationInfoLabelDTO D = new PopulationInfoLabelDTO(dto.getDictionaryId(), dto.getDictionaryName(), dto.getDictionarySummary(), dto.getDictionarySort());
|
||||||
|
dataList.add(D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
populationInfoDTO.setLabelList(dataList);
|
||||||
|
}
|
||||||
|
return populationInfoDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -284,7 +400,21 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PopulationInfoDTO> list(Map<String, Object> params) {
|
public List<PopulationInfoDTO> list(Map<String, Object> params) {
|
||||||
return populationInfoDao.list(params);
|
List<PopulationInfoDTO> listList = populationInfoDao.list(params);
|
||||||
|
List<DataDictionaryDTO> list = iDataDictionaryService.listDictionaryByParentId("5ea50f00-3d76-492c-8680-9c30d50cce21");
|
||||||
|
for(PopulationInfoDTO populationInfoDTO : listList) {
|
||||||
|
if (populationInfoDTO != null && !StringUtil.isEmpty(populationInfoDTO.getLabel()) && populationInfoDTO.getLabel().length() > 0) {
|
||||||
|
List<PopulationInfoLabelDTO> dataList = new ArrayList<>();
|
||||||
|
for(DataDictionaryDTO dto : list) {
|
||||||
|
if (populationInfoDTO.getLabel().contains(dto.getDictionaryId())) {
|
||||||
|
PopulationInfoLabelDTO D = new PopulationInfoLabelDTO(dto.getDictionaryId(), dto.getDictionaryName(), dto.getDictionarySummary(), dto.getDictionarySort());
|
||||||
|
dataList.add(D);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
populationInfoDTO.setLabelList(dataList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return listList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -60,6 +60,41 @@ public class IdCardVerifyUtil {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String desensitizeBirthday(String birthday) {
|
||||||
|
if (birthday.length() < 8) {
|
||||||
|
return birthday;
|
||||||
|
}
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(birthday.substring(0, 3));
|
||||||
|
sb.append("*");
|
||||||
|
sb.append("-");
|
||||||
|
sb.append("*");
|
||||||
|
sb.append("*");
|
||||||
|
sb.append("-");
|
||||||
|
sb.append(birthday.substring(birthday.length() - 2));
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String desensitizeIdCardNumber(String idCardNumber) {
|
||||||
|
if (idCardNumber.length() < 15 || idCardNumber.length() > 18) {
|
||||||
|
return idCardNumber;
|
||||||
|
}
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(idCardNumber.substring(0, 6));
|
||||||
|
if (idCardNumber.length() == 15) {
|
||||||
|
for (int i = 0; i < idCardNumber.length() - 8; i++) {
|
||||||
|
sb.append("*");
|
||||||
|
}
|
||||||
|
sb.append(idCardNumber.substring(idCardNumber.length() - 3));
|
||||||
|
}else {
|
||||||
|
for (int i = 0; i < idCardNumber.length() - 10; i++) {
|
||||||
|
sb.append("*");
|
||||||
|
}
|
||||||
|
sb.append(idCardNumber.substring(idCardNumber.length() - 4));
|
||||||
|
}
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 身份证验证
|
* 身份证验证
|
||||||
*@param certNo 号码内容
|
*@param certNo 号码内容
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<result column="population_info_id" property="populationInfoId"/>
|
<result column="population_info_id" property="populationInfoId"/>
|
||||||
<result column="name" property="name"/>
|
<result column="name" property="name"/>
|
||||||
<result column="idcard" property="idcard"/>
|
<result column="idcard" property="idcard"/>
|
||||||
|
<result column="label" property="label"/>
|
||||||
<result column="idcard_type" property="idcardType"/>
|
<result column="idcard_type" property="idcardType"/>
|
||||||
<result column="birthday" property="birthday"/>
|
<result column="birthday" property="birthday"/>
|
||||||
<result column="sex" property="sex"/>
|
<result column="sex" property="sex"/>
|
||||||
@ -24,6 +25,7 @@
|
|||||||
<resultMap id="populationInfoDTO" type="com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO">
|
<resultMap id="populationInfoDTO" type="com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO">
|
||||||
<result column="population_info_id" property="populationInfoId"/>
|
<result column="population_info_id" property="populationInfoId"/>
|
||||||
<result column="name" property="name"/>
|
<result column="name" property="name"/>
|
||||||
|
<result column="label" property="label"/>
|
||||||
<result column="idcard" property="idcard"/>
|
<result column="idcard" property="idcard"/>
|
||||||
<result column="idcard_type" property="idcardType"/>
|
<result column="idcard_type" property="idcardType"/>
|
||||||
<result column="birthday" property="birthday"/>
|
<result column="birthday" property="birthday"/>
|
||||||
@ -243,6 +245,7 @@
|
|||||||
population_info_id,
|
population_info_id,
|
||||||
name,
|
name,
|
||||||
idcard,
|
idcard,
|
||||||
|
label,
|
||||||
idcard_type,
|
idcard_type,
|
||||||
birthday,
|
birthday,
|
||||||
sex,
|
sex,
|
||||||
@ -322,6 +325,7 @@
|
|||||||
#{populationInfoId},
|
#{populationInfoId},
|
||||||
#{name},
|
#{name},
|
||||||
#{idcard},
|
#{idcard},
|
||||||
|
#{label},
|
||||||
#{idcardType},
|
#{idcardType},
|
||||||
#{birthday},
|
#{birthday},
|
||||||
#{sex},
|
#{sex},
|
||||||
@ -426,6 +430,7 @@
|
|||||||
<if test="name != null and name != ''">
|
<if test="name != null and name != ''">
|
||||||
name = #{name},
|
name = #{name},
|
||||||
</if>
|
</if>
|
||||||
|
label = #{label},
|
||||||
<if test="idcard != null and idcard != ''">
|
<if test="idcard != null and idcard != ''">
|
||||||
idcard = #{idcard},
|
idcard = #{idcard},
|
||||||
</if>
|
</if>
|
||||||
@ -653,6 +658,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
t1.population_info_id,
|
t1.population_info_id,
|
||||||
t1.name,
|
t1.name,
|
||||||
|
t1.label,
|
||||||
t1.idcard,
|
t1.idcard,
|
||||||
t1.idcard_type,
|
t1.idcard_type,
|
||||||
t1.health_status,
|
t1.health_status,
|
||||||
@ -686,6 +692,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
t1.population_info_id,
|
t1.population_info_id,
|
||||||
t1.name,
|
t1.name,
|
||||||
|
t1.label,
|
||||||
t1.idcard,
|
t1.idcard,
|
||||||
t1.idcard_type,
|
t1.idcard_type,
|
||||||
t1.birthday,
|
t1.birthday,
|
||||||
@ -938,6 +945,7 @@
|
|||||||
t1.population_info_id,
|
t1.population_info_id,
|
||||||
t1.name,
|
t1.name,
|
||||||
t1.idcard,
|
t1.idcard,
|
||||||
|
t1.label,
|
||||||
t1.idcard_type,
|
t1.idcard_type,
|
||||||
t1.birthday,
|
t1.birthday,
|
||||||
t1.sex,
|
t1.sex,
|
||||||
|
@ -26,11 +26,11 @@
|
|||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.layui-form-pane .layui-input-block {
|
.layui-form-pane .layui-input-block {
|
||||||
margin-left: 140px;
|
margin-left: 160px;
|
||||||
left: -1px;
|
left: -1px;
|
||||||
}
|
}
|
||||||
.layui-form-pane .layui-form-label {
|
.layui-form-pane .layui-form-label {
|
||||||
width: 140px;
|
width: 160px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<input name="type" type="hidden" id="type" value="1" />
|
<input name="type" type="hidden" id="type" value="1" />
|
||||||
<div class="layui-row layui-form-item">
|
<div class="layui-row layui-form-item">
|
||||||
<div class="layui-col-lg12">
|
<div class="layui-col-lg12">
|
||||||
<p style="color:red">注意 : 导入的Excel文件后缀只支持.xlsx , 带红色*号的是必填项 , 参考选项仅供导入者作为编辑Excel内容的参考 , 导入时不需要选择。</p>
|
<p style="color:red">注意 : 导入的Excel文件后缀只支持.xlsx , 带红色*号的是必填项 , 参考选项仅供导入者作为编辑Excel内容的参考 , 导入时不需要选择。 * 单次Excel最多支持10000条数据导入</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item" style="background-color:#2aabd2;color:#FFF;text-align: center;width:100% !important;font-size: 17px">
|
<div class="layui-form-item" style="background-color:#2aabd2;color:#FFF;text-align: center;width:100% !important;font-size: 17px">
|
||||||
@ -51,7 +51,7 @@
|
|||||||
<div class="layui-row">
|
<div class="layui-row">
|
||||||
<div class="layui-col-md6 layui-col-xs6" >
|
<div class="layui-col-md6 layui-col-xs6" >
|
||||||
<div class="layui-form-item ">
|
<div class="layui-form-item ">
|
||||||
<label class="layui-form-label">户籍地址名称</label>
|
<label class="layui-form-label">户籍地址系统名称</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="domicileAreaName" readonly style="cursor: pointer" name="domicileAreaName" class="layui-input" value="" placeholder="请选择户籍地址" maxlength="500">
|
<input type="text" id="domicileAreaName" readonly style="cursor: pointer" name="domicileAreaName" class="layui-input" value="" placeholder="请选择户籍地址" maxlength="500">
|
||||||
</div>
|
</div>
|
||||||
@ -59,9 +59,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md6 layui-col-xs6" >
|
<div class="layui-col-md6 layui-col-xs6" >
|
||||||
<div class="layui-form-item ">
|
<div class="layui-form-item ">
|
||||||
<label class="layui-form-label">户籍地址编码</label>
|
<label class="layui-form-label">户籍地址系统编码</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="domicileAreaCode" readonly style="cursor: pointer" name="domicileAreaCode" class="layui-input" value="" maxlength="500">
|
<input type="text" id="domicileAreaCode" readonly style="cursor: pointer" name="domicileAreaCode" placeholder="请先选择户籍地址系统名称" class="layui-input" value="" maxlength="500">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -271,7 +271,7 @@
|
|||||||
|
|
||||||
// 初始化证件类型下拉选择
|
// 初始化证件类型下拉选择
|
||||||
function initIdcardTypeSelect(selectValue) {
|
function initIdcardTypeSelect(selectValue) {
|
||||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/360d6062-754d-4d43-95ba-cb9938102050', []), {}, null, function(code, data, args) {
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/76c5044f-805a-4313-b1e8-79e966b97c0d', []), {}, null, function(code, data, args) {
|
||||||
laytpl(document.getElementById('idcardTypeSelectTemplate').innerHTML).render(data, function(html) {
|
laytpl(document.getElementById('idcardTypeSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
document.getElementById('idcardTypeSelectTemplateBox').innerHTML = html;
|
document.getElementById('idcardTypeSelectTemplateBox').innerHTML = html;
|
||||||
});
|
});
|
||||||
|
@ -52,6 +52,9 @@
|
|||||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||||
<i class="fa fa-lg fa-trash"></i> 删除
|
<i class="fa fa-lg fa-trash"></i> 删除
|
||||||
</button>
|
</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>-->
|
||||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="correctEvent">
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="correctEvent">
|
||||||
社区矫正
|
社区矫正
|
||||||
</button>
|
</button>
|
||||||
@ -192,6 +195,19 @@
|
|||||||
}
|
}
|
||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{field: 'label', width: 380, title: '标签', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row['labelList'];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
var b = "";
|
||||||
|
for(var i = 0 ; i < rowData.length; i++) {
|
||||||
|
b = b + '<button type="button" class="layui-btn layui-btn-xs" style="background-color: ' + rowData[i].color + ';">' + rowData[i].name + '</button>';
|
||||||
|
}
|
||||||
|
return b;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
@ -306,6 +322,19 @@
|
|||||||
}
|
}
|
||||||
removeData(ids);
|
removeData(ids);
|
||||||
}
|
}
|
||||||
|
} else if(layEvent === 'excelEvent') {
|
||||||
|
top.layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: false,
|
||||||
|
closeBtn: 1,
|
||||||
|
area: ['70%', '90%'],
|
||||||
|
shadeClose: true,
|
||||||
|
anim: 2,
|
||||||
|
content: top.restAjax.path('route/populationinfo/importexcel', []),
|
||||||
|
end: function() {
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
});
|
||||||
} else if(layEvent === 'correctEvent') {
|
} else if(layEvent === 'correctEvent') {
|
||||||
if(checkDatas.length === 0) {
|
if(checkDatas.length === 0) {
|
||||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||||
<i class="fa fa-lg fa-trash"></i> 删除
|
<i class="fa fa-lg fa-trash"></i> 删除
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="excelEvent">
|
<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导入
|
<i class="fa fa-lg fa-file-excel-o"></i>Excel导入
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="correctEvent">
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="correctEvent">
|
||||||
@ -195,6 +195,19 @@
|
|||||||
}
|
}
|
||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{field: 'label', width: 380, title: '标签', align:'center',
|
||||||
|
templet: function(row) {
|
||||||
|
var rowData = row['labelList'];
|
||||||
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
|
return '-';
|
||||||
|
}
|
||||||
|
var b = "";
|
||||||
|
for(var i = 0 ; i < rowData.length; i++) {
|
||||||
|
b = b + '<button type="button" class="layui-btn layui-btn-xs" style="background-color: ' + rowData[i].color + ';">' + rowData[i].name + '</button>';
|
||||||
|
}
|
||||||
|
return b;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
@ -222,6 +222,7 @@
|
|||||||
<input type="radio" name="departmentType" value="已就业" title="已就业">
|
<input type="radio" name="departmentType" value="已就业" title="已就业">
|
||||||
<input type="radio" name="departmentType" value="未就业" title="未就业">
|
<input type="radio" name="departmentType" value="未就业" title="未就业">
|
||||||
<input type="radio" name="departmentType" value="灵活就业" title="灵活就业">
|
<input type="radio" name="departmentType" value="灵活就业" title="灵活就业">
|
||||||
|
<input type="radio" name="departmentType" value="退休" title="退休">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -278,6 +279,19 @@
|
|||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md12 layui-col-xs12" >
|
||||||
|
<div class="layui-form-item" pane="">
|
||||||
|
<label class="layui-form-label">标签</label>
|
||||||
|
<div class="layui-input-block layui-form" id="labelSelectTemplateBox" lay-filter="labelSelectTemplateBox" pane=""></div>
|
||||||
|
<script id="labelSelectTemplate" type="text/html">
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<input type="checkbox" name="label[{{item.id}}]" value="{{item.id}}" title="{{item.name}}">
|
||||||
|
{{# } }}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="layui-row">
|
<div class="layui-row">
|
||||||
<div class="layui-col-md3 layui-col-xs3" >
|
<div class="layui-col-md3 layui-col-xs3" >
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -1083,7 +1097,7 @@
|
|||||||
|
|
||||||
// 初始化证件类型下拉选择
|
// 初始化证件类型下拉选择
|
||||||
function initIdcardTypeSelect(selectValue) {
|
function initIdcardTypeSelect(selectValue) {
|
||||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/360d6062-754d-4d43-95ba-cb9938102050', []), {}, null, function(code, data, args) {
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/76c5044f-805a-4313-b1e8-79e966b97c0d', []), {}, null, function(code, data, args) {
|
||||||
laytpl(document.getElementById('idcardTypeSelectTemplate').innerHTML).render(data, function(html) {
|
laytpl(document.getElementById('idcardTypeSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
document.getElementById('idcardTypeSelectTemplateBox').innerHTML = html;
|
document.getElementById('idcardTypeSelectTemplateBox').innerHTML = html;
|
||||||
});
|
});
|
||||||
@ -1129,6 +1143,25 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 初始化标签
|
||||||
|
function initLabelSelect(selectValues) {
|
||||||
|
top.restAjax.get(top.restAjax.path('api/populationinfo/label', []), {}, null, function(code, data, args) {
|
||||||
|
laytpl(document.getElementById('labelSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
|
document.getElementById('labelSelectTemplateBox').innerHTML = html;
|
||||||
|
});
|
||||||
|
form.render('checkbox', 'labelSelectTemplateBox')
|
||||||
|
|
||||||
|
var checkboxValue = selectValues.split(',');
|
||||||
|
var checkboxObj = {};
|
||||||
|
for(var j = 0, checkbox = checkboxValue[j]; checkbox = checkboxValue[j++];) {
|
||||||
|
checkboxObj['label['+ checkbox +']'] = true;
|
||||||
|
}
|
||||||
|
form.val('dataForm', checkboxObj);
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 初始化文化程度下拉选择
|
// 初始化文化程度下拉选择
|
||||||
function initEducationSelect(selectValue) {
|
function initEducationSelect(selectValue) {
|
||||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/d6b9f026-6ea9-456a-b48b-0c18d502523b', []), {}, null, function(code, data, args) {
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/d6b9f026-6ea9-456a-b48b-0c18d502523b', []), {}, null, function(code, data, args) {
|
||||||
@ -1436,7 +1469,7 @@
|
|||||||
// 身份证号改变时发生
|
// 身份证号改变时发生
|
||||||
$('#idcard').on("input propertychange", function () {
|
$('#idcard').on("input propertychange", function () {
|
||||||
var idCardNo = $(this).val();
|
var idCardNo = $(this).val();
|
||||||
if (idCardNo.length > 15) {
|
if (idCardNo.length > 15 && idCardNo.length < 18) {
|
||||||
if (idCardNoUtil.checkIdCardNo(idCardNo)) {
|
if (idCardNoUtil.checkIdCardNo(idCardNo)) {
|
||||||
//获取身份证信息
|
//获取身份证信息
|
||||||
var idCardInfo = idCardNoUtil.getIdCardInfo(idCardNo);
|
var idCardInfo = idCardNoUtil.getIdCardInfo(idCardNo);
|
||||||
@ -1504,6 +1537,7 @@
|
|||||||
initIdcardTypeSelect(data['idcardType']);
|
initIdcardTypeSelect(data['idcardType']);
|
||||||
initSexSelect(data['sex']);
|
initSexSelect(data['sex']);
|
||||||
initNationSelect(data['nation']);
|
initNationSelect(data['nation']);
|
||||||
|
initLabelSelect(data['label']);
|
||||||
initEducationSelect(data['education']);
|
initEducationSelect(data['education']);
|
||||||
initOrganizationSelect(data['organization']);
|
initOrganizationSelect(data['organization']);
|
||||||
initReligionSelect(data['religion']);
|
initReligionSelect(data['religion']);
|
||||||
@ -1554,6 +1588,7 @@
|
|||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
formData.field['label'] = top.restAjax.checkBoxToString(formData.field, 'label');
|
||||||
top.restAjax.post(top.restAjax.path('api/populationinfo/save', []), formData.field, null, function(code, data) {
|
top.restAjax.post(top.restAjax.path('api/populationinfo/save', []), formData.field, null, function(code, data) {
|
||||||
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
|
||||||
time: 0,
|
time: 0,
|
||||||
|
@ -221,6 +221,7 @@
|
|||||||
<input type="radio" name="departmentType" value="已就业" title="已就业">
|
<input type="radio" name="departmentType" value="已就业" title="已就业">
|
||||||
<input type="radio" name="departmentType" value="未就业" title="未就业">
|
<input type="radio" name="departmentType" value="未就业" title="未就业">
|
||||||
<input type="radio" name="departmentType" value="灵活就业" title="灵活就业">
|
<input type="radio" name="departmentType" value="灵活就业" title="灵活就业">
|
||||||
|
<input type="radio" name="departmentType" value="退休" title="退休">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -277,6 +278,19 @@
|
|||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-row">
|
||||||
|
<div class="layui-col-md12 layui-col-xs12" >
|
||||||
|
<div class="layui-form-item" pane="">
|
||||||
|
<label class="layui-form-label">标签</label>
|
||||||
|
<div class="layui-input-block layui-form" id="labelSelectTemplateBox" lay-filter="labelSelectTemplateBox" pane=""></div>
|
||||||
|
<script id="labelSelectTemplate" type="text/html">
|
||||||
|
{{# for(var i = 0, item; item = d[i++];) { }}
|
||||||
|
<input type="checkbox" name="label[{{item.id}}]" value="{{item.id}}" title="{{item.name}}">
|
||||||
|
{{# } }}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="layui-row">
|
<div class="layui-row">
|
||||||
<div class="layui-col-md3 layui-col-xs3" >
|
<div class="layui-col-md3 layui-col-xs3" >
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -995,7 +1009,7 @@
|
|||||||
|
|
||||||
// 初始化证件类型下拉选择
|
// 初始化证件类型下拉选择
|
||||||
function initIdcardTypeSelect(selectValue) {
|
function initIdcardTypeSelect(selectValue) {
|
||||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/360d6062-754d-4d43-95ba-cb9938102050', []), {}, null, function(code, data, args) {
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/76c5044f-805a-4313-b1e8-79e966b97c0d', []), {}, null, function(code, data, args) {
|
||||||
laytpl(document.getElementById('idcardTypeSelectTemplate').innerHTML).render(data, function(html) {
|
laytpl(document.getElementById('idcardTypeSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
document.getElementById('idcardTypeSelectTemplateBox').innerHTML = html;
|
document.getElementById('idcardTypeSelectTemplateBox').innerHTML = html;
|
||||||
});
|
});
|
||||||
@ -1041,6 +1055,25 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 初始化标签
|
||||||
|
function initLabelSelect(selectValues) {
|
||||||
|
top.restAjax.get(top.restAjax.path('api/populationinfo/label', []), {}, null, function(code, data, args) {
|
||||||
|
laytpl(document.getElementById('labelSelectTemplate').innerHTML).render(data, function(html) {
|
||||||
|
document.getElementById('labelSelectTemplateBox').innerHTML = html;
|
||||||
|
});
|
||||||
|
form.render('checkbox', 'labelSelectTemplateBox')
|
||||||
|
|
||||||
|
var checkboxValue = selectValues.split(',');
|
||||||
|
var checkboxObj = {};
|
||||||
|
for(var j = 0, checkbox = checkboxValue[j]; checkbox = checkboxValue[j++];) {
|
||||||
|
checkboxObj['label['+ checkbox +']'] = true;
|
||||||
|
}
|
||||||
|
form.val('dataForm', checkboxObj);
|
||||||
|
}, function(code, data) {
|
||||||
|
top.dialog.msg(data.msg);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 初始化文化程度下拉选择
|
// 初始化文化程度下拉选择
|
||||||
function initEducationSelect(selectValue) {
|
function initEducationSelect(selectValue) {
|
||||||
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/d6b9f026-6ea9-456a-b48b-0c18d502523b', []), {}, null, function(code, data, args) {
|
top.restAjax.get(top.restAjax.path('api/datadictionary/listdictionarybyparentid/d6b9f026-6ea9-456a-b48b-0c18d502523b', []), {}, null, function(code, data, args) {
|
||||||
@ -1348,7 +1381,7 @@
|
|||||||
// 身份证号改变时发生
|
// 身份证号改变时发生
|
||||||
$('#idcard').on("input propertychange", function () {
|
$('#idcard').on("input propertychange", function () {
|
||||||
var idCardNo = $(this).val();
|
var idCardNo = $(this).val();
|
||||||
if (idCardNo.length > 15) {
|
if (idCardNo.length > 15 && idCardNo.length < 18) {
|
||||||
if (idCardNoUtil.checkIdCardNo(idCardNo)) {
|
if (idCardNoUtil.checkIdCardNo(idCardNo)) {
|
||||||
//获取身份证信息
|
//获取身份证信息
|
||||||
var idCardInfo = idCardNoUtil.getIdCardInfo(idCardNo);
|
var idCardInfo = idCardNoUtil.getIdCardInfo(idCardNo);
|
||||||
@ -1417,6 +1450,7 @@
|
|||||||
initIdcardTypeSelect(data['idcardType']);
|
initIdcardTypeSelect(data['idcardType']);
|
||||||
initSexSelect(data['sex']);
|
initSexSelect(data['sex']);
|
||||||
initNationSelect(data['nation']);
|
initNationSelect(data['nation']);
|
||||||
|
initLabelSelect(data['label']);
|
||||||
initEducationSelect(data['education']);
|
initEducationSelect(data['education']);
|
||||||
initOrganizationSelect(data['organization']);
|
initOrganizationSelect(data['organization']);
|
||||||
initReligionSelect(data['religion']);
|
initReligionSelect(data['religion']);
|
||||||
@ -1472,6 +1506,7 @@
|
|||||||
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
top.dialog.confirm(top.dataMessage.commit, function(index) {
|
||||||
top.dialog.close(index);
|
top.dialog.close(index);
|
||||||
var loadLayerIndex;
|
var loadLayerIndex;
|
||||||
|
formData.field['label'] = top.restAjax.checkBoxToString(formData.field, 'label');
|
||||||
top.restAjax.put(top.restAjax.path('api/populationinfo/update/{populationInfoId}', [populationInfoId]), formData.field, null, function(code, data) {
|
top.restAjax.put(top.restAjax.path('api/populationinfo/update/{populationInfoId}', [populationInfoId]), formData.field, null, function(code, data) {
|
||||||
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
|
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
|
||||||
time: 0,
|
time: 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user