人口新增基础查询接口 - cbc
This commit is contained in:
parent
0c4b5334e6
commit
2174d56cd9
@ -14,6 +14,7 @@ import com.cm.common.result.SuccessResultData;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.population.pojo.dtos.areatree.AreaZtreeDTO;
|
||||
import com.cm.population.pojo.dtos.correct.CorrectDTO;
|
||||
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO;
|
||||
import com.cm.population.pojo.vos.correct.CorrectVO;
|
||||
import com.cm.population.service.correct.ICorrectService;
|
||||
import com.cm.population.service.populationinfo.IPopulationInfoService;
|
||||
@ -38,6 +39,32 @@ public class AreaTreeController extends AbstractController {
|
||||
|
||||
@Autowired
|
||||
private IPopulationInfoService iPopulationInfoService;
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{areaCode}")
|
||||
public Map<String, Object> get(@PathVariable("areaCode") String areaCode) {
|
||||
DataAreaDTO dto = iPopulationInfoService.getAreaByCode(areaCode);
|
||||
Map<String, Object> objectMap = new HashMap<>();
|
||||
objectMap.put("label", dto.getAreaName());
|
||||
objectMap.put("code", dto.getAreaCode());
|
||||
objectMap.put("value", dto.getAreaId());
|
||||
objectMap.put("leaf", true);
|
||||
return objectMap;
|
||||
}
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("newtree")
|
||||
public List<Map<String, Object>> tree1(String id) {
|
||||
String parentId = id == null ? "0" : id;
|
||||
List<AreaZtreeDTO> list = iPopulationInfoService.listAreaTree(parentId);
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
for(AreaZtreeDTO dto : list) {
|
||||
Map<String, Object> objectMap = new HashMap<>();
|
||||
objectMap.put("label", dto.getName());
|
||||
objectMap.put("code", dto.getAreaCode());
|
||||
objectMap.put("value", dto.getId());
|
||||
result.add(objectMap);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("huji")
|
||||
@ -56,7 +83,7 @@ public class AreaTreeController extends AbstractController {
|
||||
zTreeDTO1.setIsParent(true);
|
||||
list.add(zTreeDTO1);
|
||||
AreaZtreeDTO zTreeDTO2 = new AreaZtreeDTO();
|
||||
zTreeDTO2.setId("baotou.getAreaId()");
|
||||
zTreeDTO2.setId(baotou.getAreaId());
|
||||
zTreeDTO2.setName("包头市(非高新区)");
|
||||
zTreeDTO2.setTitle("包头市(非高新区)");
|
||||
zTreeDTO2.setIsParent(true);
|
||||
@ -78,7 +105,7 @@ public class AreaTreeController extends AbstractController {
|
||||
getParent(names, dto.getpId());
|
||||
dto.setTitle(StringUtils.join(names, "/"));
|
||||
}
|
||||
if (dataAreaDTO.getAreaCode().equals("150200000000")) {
|
||||
if (dataAreaDTO != null && dataAreaDTO.getAreaCode().equals("150200000000")) {
|
||||
Iterator<AreaZtreeDTO> iterator = list.iterator();
|
||||
while(iterator.hasNext()) {
|
||||
ZTreeDTO zTreeDTO = iterator.next();
|
||||
@ -100,7 +127,7 @@ public class AreaTreeController extends AbstractController {
|
||||
public List<AreaZtreeDTO> tree(String id) {
|
||||
String parentId = id;
|
||||
if (StringUtils.isEmpty(id)) {
|
||||
parentId = "752234"; // 默认查找全国
|
||||
parentId = "752234";
|
||||
}
|
||||
List<AreaZtreeDTO> list = iPopulationInfoService.listAreaTree(parentId);
|
||||
for(AreaZtreeDTO dto : list) {
|
||||
@ -120,9 +147,11 @@ public class AreaTreeController extends AbstractController {
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("list")
|
||||
public List<AreaZtreeDTO> list(String id) {
|
||||
PopulationInfoBaseDTO dto1 = iPopulationInfoService.getBase("b20004a6-0c8e-4fe3-a9af-998aeab53513");
|
||||
System.out.println(dto1);
|
||||
String parentId = id;
|
||||
if (StringUtils.isEmpty(id)) {
|
||||
parentId = "752234"; // 默认查找全国
|
||||
parentId = "0"; // 默认查找全国
|
||||
}
|
||||
List<AreaZtreeDTO> list = iPopulationInfoService.listAreaTree(parentId);
|
||||
for(AreaZtreeDTO dto : list) {
|
||||
@ -142,4 +171,12 @@ public class AreaTreeController extends AbstractController {
|
||||
}
|
||||
}
|
||||
|
||||
public void getParentBaoTou(ArrayList names, String pId) {
|
||||
DataAreaDTO areaDTO = iPopulationInfoService.getAreaById(pId);
|
||||
if(areaDTO != null && !areaDTO.getAreaLevel().equals("1") && !areaDTO.getAreaLevel().equals("0")) {
|
||||
names.add(0, areaDTO.getAreaName());
|
||||
getParentBaoTou(names, areaDTO.getAreaParentId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,140 @@
|
||||
package com.cm.population.controller.app.api.areatree;
|
||||
|
||||
import com.cm.common.base.AbstractController;
|
||||
import com.cm.common.constants.ISystemConstant;
|
||||
import com.cm.common.plugin.pojo.dtos.dataarea.DataAreaDTO;
|
||||
import com.cm.common.pojo.dtos.ZTreeDTO;
|
||||
import com.cm.common.result.ErrorResult;
|
||||
import com.cm.population.pojo.dtos.areatree.AreaZtreeDTO;
|
||||
import com.cm.population.service.populationinfo.IPopulationInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiResponse;
|
||||
import io.swagger.annotations.ApiResponses;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName: CorrectController
|
||||
* @Description: 特殊人口-社区矫正
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2023-10-25 11:40:23
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "特殊人口-社区矫正接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.APP_PREFIX + "/areatree")
|
||||
public class AreaTreeAppController extends AbstractController {
|
||||
|
||||
@Autowired
|
||||
private IPopulationInfoService iPopulationInfoService;
|
||||
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("huji")
|
||||
public List<AreaZtreeDTO> huji(String id) {
|
||||
// 查找包头市
|
||||
DataAreaDTO baotou = iPopulationInfoService.getAreaByCode("150200000000");
|
||||
// 查找包头稀土高新技术产业开发区
|
||||
DataAreaDTO gaoxin = iPopulationInfoService.getAreaByCode("150271000000");
|
||||
String parentId = id;
|
||||
if (StringUtils.isEmpty(id)) {
|
||||
List<AreaZtreeDTO> list = new ArrayList<>();
|
||||
AreaZtreeDTO zTreeDTO1 = new AreaZtreeDTO();
|
||||
zTreeDTO1.setId("0");
|
||||
zTreeDTO1.setName("非包头市");
|
||||
zTreeDTO1.setTitle("非包头市");
|
||||
zTreeDTO1.setIsParent(true);
|
||||
list.add(zTreeDTO1);
|
||||
AreaZtreeDTO zTreeDTO2 = new AreaZtreeDTO();
|
||||
zTreeDTO2.setId(baotou.getAreaId());
|
||||
zTreeDTO2.setName("包头市(非高新区)");
|
||||
zTreeDTO2.setTitle("包头市(非高新区)");
|
||||
zTreeDTO2.setIsParent(true);
|
||||
list.add(zTreeDTO2);
|
||||
AreaZtreeDTO zTreeDTO3 = new AreaZtreeDTO();
|
||||
zTreeDTO3.setId(gaoxin.getAreaId());
|
||||
zTreeDTO3.setName("包头市(高新区)");
|
||||
zTreeDTO3.setTitle("包头市(高新区)");
|
||||
zTreeDTO3.setIsParent(true);
|
||||
list.add(zTreeDTO3);
|
||||
return list;
|
||||
}
|
||||
DataAreaDTO dataAreaDTO = iPopulationInfoService.getAreaById(parentId);
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
List<AreaZtreeDTO> list = iPopulationInfoService.listAreaTree(parentId);
|
||||
for(AreaZtreeDTO dto : list) {
|
||||
ArrayList<String> names = new ArrayList<>();
|
||||
names.add(dto.getName());
|
||||
getParent(names, dto.getpId());
|
||||
dto.setTitle(StringUtils.join(names, "/"));
|
||||
}
|
||||
if (dataAreaDTO.getAreaCode().equals("150200000000")) {
|
||||
Iterator<AreaZtreeDTO> iterator = list.iterator();
|
||||
while(iterator.hasNext()) {
|
||||
ZTreeDTO zTreeDTO = iterator.next();
|
||||
if (zTreeDTO.getId().equals(gaoxin.getAreaId())) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 高新区地区
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("tree")
|
||||
public List<AreaZtreeDTO> tree(String id) {
|
||||
String parentId = id;
|
||||
if (StringUtils.isEmpty(id)) {
|
||||
parentId = "752234";
|
||||
}
|
||||
List<AreaZtreeDTO> list = iPopulationInfoService.listAreaTree(parentId);
|
||||
for(AreaZtreeDTO dto : list) {
|
||||
ArrayList<String> names = new ArrayList<>();
|
||||
names.add(dto.getName());
|
||||
getParent(names, dto.getpId());
|
||||
dto.setTitle(StringUtils.join(names, "/"));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 全国地区属
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<AreaZtreeDTO> list(String id) {
|
||||
String parentId = id;
|
||||
if (StringUtils.isEmpty(id)) {
|
||||
parentId = "0"; // 默认查找全国
|
||||
}
|
||||
List<AreaZtreeDTO> list = iPopulationInfoService.listAreaTree(parentId);
|
||||
for(AreaZtreeDTO dto : list) {
|
||||
ArrayList<String> names = new ArrayList<>();
|
||||
names.add(dto.getName());
|
||||
getParent(names, dto.getpId());
|
||||
dto.setTitle(StringUtils.join(names, "/"));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public void getParent(ArrayList names, String pId) {
|
||||
DataAreaDTO areaDTO = iPopulationInfoService.getAreaById(pId);
|
||||
if(areaDTO != null) {
|
||||
names.add(0, areaDTO.getAreaName());
|
||||
getParent(names, areaDTO.getAreaParentId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -81,12 +81,22 @@ public class PopulationInfoAppController extends AbstractController {
|
||||
return populationInfoService.get(populationInfoId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "基础人口按身份证查询", notes = "基础人口按身份证查询")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("query/{idcard}")
|
||||
public PopulationInfoDTO query(@RequestHeader("token") String token, @PathVariable("idcard") String idcard) {
|
||||
return populationInfoService.getByIdcard(idcard);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "基础人口信息列表", notes = "基础人口信息列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
@GetMapping("list")
|
||||
public List<PopulationInfoDTO> list(@RequestHeader("token") String token) {
|
||||
Map<String, Object> params = requestParams();
|
||||
return populationInfoService.list(params);
|
||||
|
@ -37,8 +37,8 @@ public class CorrectRouteController extends AbstractController {
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list(String populitionInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populitionInfoId);
|
||||
public ModelAndView list(String populationInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populationInfoId);
|
||||
ModelAndView mv = new ModelAndView("correct/list");
|
||||
mv.addObject("dto", populationInfoDTO);
|
||||
return mv;
|
||||
|
@ -40,8 +40,8 @@ public class CultRouteController extends AbstractController {
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list(String populitionInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populitionInfoId);
|
||||
public ModelAndView list(String populationInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populationInfoId);
|
||||
ModelAndView mv = new ModelAndView("cult/list");
|
||||
mv.addObject("dto", populationInfoDTO);
|
||||
return mv;
|
||||
|
@ -40,8 +40,8 @@ public class DisputeRouteController extends AbstractController {
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list(String populitionInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populitionInfoId);
|
||||
public ModelAndView list(String populationInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populationInfoId);
|
||||
ModelAndView mv = new ModelAndView("dispute/list");
|
||||
mv.addObject("dto", populationInfoDTO);
|
||||
return mv;
|
||||
|
@ -40,8 +40,8 @@ public class DrugRouteController extends AbstractController {
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list(String populitionInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populitionInfoId);
|
||||
public ModelAndView list(String populationInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populationInfoId);
|
||||
ModelAndView mv = new ModelAndView("drug/list");
|
||||
mv.addObject("dto", populationInfoDTO);
|
||||
return mv;
|
||||
|
@ -40,8 +40,8 @@ public class PetitionRouteController extends AbstractController {
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list(String populitionInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populitionInfoId);
|
||||
public ModelAndView list(String populationInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populationInfoId);
|
||||
ModelAndView mv = new ModelAndView("petition/list");
|
||||
mv.addObject("dto", populationInfoDTO);
|
||||
return mv;
|
||||
|
@ -35,8 +35,8 @@ public class ReleaseRouteController extends AbstractController {
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list(String populitionInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populitionInfoId);
|
||||
public ModelAndView list(String populationInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populationInfoId);
|
||||
ModelAndView mv = new ModelAndView("release/list");
|
||||
mv.addObject("dto", populationInfoDTO);
|
||||
return mv;
|
||||
|
@ -40,8 +40,8 @@ public class SecurityRouteController extends AbstractController {
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list(String populitionInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populitionInfoId);
|
||||
public ModelAndView list(String populationInfoId) {
|
||||
PopulationInfoDTO populationInfoDTO = iPopulationInfoService.get(populationInfoId);
|
||||
ModelAndView mv = new ModelAndView("security/list");
|
||||
mv.addObject("dto", populationInfoDTO);
|
||||
return mv;
|
||||
|
@ -5,6 +5,7 @@ import com.cm.common.exception.SaveException;
|
||||
import com.cm.common.exception.SearchException;
|
||||
import com.cm.common.exception.UpdateException;
|
||||
import com.cm.population.pojo.bos.populationinfo.PopulationInfoBO;
|
||||
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO;
|
||||
import com.cm.population.pojo.pos.populationinfo.PopulationInfoPO;
|
||||
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
@ -116,4 +117,5 @@ public interface IPopulationInfoDao {
|
||||
*/
|
||||
Integer count(Map<String, Object> params) throws SearchException;
|
||||
|
||||
PopulationInfoBaseDTO getBase(Map<String, Object> params);
|
||||
}
|
@ -0,0 +1,247 @@
|
||||
package com.cm.population.pojo.dtos.populationinfo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@ApiModel
|
||||
public class PopulationInfoBaseDTO {
|
||||
|
||||
@ApiModelProperty(name = "isCult", value = "是否为涉邪人员(是或否)")
|
||||
private String isCult = "否";
|
||||
@ApiModelProperty(name = "isDrug", value = "是否为吸毒人员(是或否)")
|
||||
private String isDrug = "否";
|
||||
@ApiModelProperty(name = "isDispute", value = "是否有矛盾纠纷(是或否)")
|
||||
private String isDispute = "否";
|
||||
@ApiModelProperty(name = "isPetition", value = "是否为重点上访户(是或否)")
|
||||
private String isPetition = "否";
|
||||
@ApiModelProperty(name = "isCorrect", value = "是否为社区矫正(是或否)")
|
||||
private String isCorrect = "否";
|
||||
@ApiModelProperty(name = "isRelease", value = "是否为刑满释放(是或否)")
|
||||
private String isRelease = "否";
|
||||
@ApiModelProperty(name = "isSecurity", value = "是否有社会治安记录(是或否)")
|
||||
private String isSecurity = "否";
|
||||
@ApiModelProperty(name = "isOldage", value = "是否为老年人(是或否)")
|
||||
private String isOldage = "否";
|
||||
@ApiModelProperty(name = "isDisability", value = "是否为残疾人(是或否)")
|
||||
private String isDisability = "否";
|
||||
@ApiModelProperty(name = "isMilitary", value = "是否为军人(是或否)")
|
||||
private String isMilitary = "否";
|
||||
@ApiModelProperty(name = "isSuccour", value = "是否为社会救助(是或否)")
|
||||
private String isSuccour = "否";
|
||||
@ApiModelProperty(name = "isParty", value = "是否为党员(是或否)")
|
||||
private String isParty = "否";
|
||||
@ApiModelProperty(name = "populationInfoId", value = "人口ID")
|
||||
private String populationInfoId;
|
||||
@ApiModelProperty(name = "name", value = "姓名")
|
||||
private String name;
|
||||
@ApiModelProperty(name = "idcard", value = "证件")
|
||||
private String idcard;
|
||||
@ApiModelProperty(name = "idcardType", value = "证件类型")
|
||||
private String idcardType;
|
||||
@ApiModelProperty(name = "birthday", value = "生日")
|
||||
private String birthday;
|
||||
@ApiModelProperty(name = "sex", value = "性别")
|
||||
private String sex;
|
||||
@ApiModelProperty(name = "nation", value = "民族")
|
||||
private String nation;
|
||||
@ApiModelProperty(name = "education", value = "文化程度")
|
||||
private String education;
|
||||
@ApiModelProperty(name = "phone", value = "联系电话")
|
||||
private String phone;
|
||||
|
||||
public String getIsCult() {
|
||||
return isCult;
|
||||
}
|
||||
|
||||
public void setIsCult(String isCult) {
|
||||
this.isCult = isCult;
|
||||
}
|
||||
|
||||
public String getIsDrug() {
|
||||
return isDrug;
|
||||
}
|
||||
|
||||
public void setIsDrug(String isDrug) {
|
||||
this.isDrug = isDrug;
|
||||
}
|
||||
|
||||
public String getIsDispute() {
|
||||
return isDispute;
|
||||
}
|
||||
|
||||
public void setIsDispute(String isDispute) {
|
||||
this.isDispute = isDispute;
|
||||
}
|
||||
|
||||
public String getIsPetition() {
|
||||
return isPetition;
|
||||
}
|
||||
|
||||
public void setIsPetition(String isPetition) {
|
||||
this.isPetition = isPetition;
|
||||
}
|
||||
|
||||
public String getIsCorrect() {
|
||||
return isCorrect;
|
||||
}
|
||||
|
||||
public void setIsCorrect(String isCorrect) {
|
||||
this.isCorrect = isCorrect;
|
||||
}
|
||||
|
||||
public String getIsRelease() {
|
||||
return isRelease;
|
||||
}
|
||||
|
||||
public void setIsRelease(String isRelease) {
|
||||
this.isRelease = isRelease;
|
||||
}
|
||||
|
||||
public String getIsSecurity() {
|
||||
return isSecurity;
|
||||
}
|
||||
|
||||
public void setIsSecurity(String isSecurity) {
|
||||
this.isSecurity = isSecurity;
|
||||
}
|
||||
|
||||
public String getIsOldage() {
|
||||
return StringUtils.isEmpty(isOldage) ? "否" : isOldage;
|
||||
}
|
||||
|
||||
public void setIsOldage(String isOldage) {
|
||||
this.isOldage = isOldage;
|
||||
}
|
||||
|
||||
public String getIsDisability() {
|
||||
return StringUtils.isEmpty(isDisability) ? "否" : isDisability;
|
||||
}
|
||||
|
||||
public void setIsDisability(String isDisability) {
|
||||
this.isDisability = isDisability;
|
||||
}
|
||||
|
||||
public String getIsMilitary() {
|
||||
return StringUtils.isEmpty(isMilitary) ? "否" : isMilitary;
|
||||
}
|
||||
|
||||
public void setIsMilitary(String isMilitary) {
|
||||
this.isMilitary = isMilitary;
|
||||
}
|
||||
|
||||
public String getIsSuccour() {
|
||||
return StringUtils.isEmpty(isSuccour) ? "否" : isSuccour;
|
||||
}
|
||||
|
||||
public void setIsSuccour(String isSuccour) {
|
||||
this.isSuccour = isSuccour;
|
||||
}
|
||||
|
||||
public String getIsParty() {
|
||||
return StringUtils.isEmpty(isParty) ? "否" : isParty;
|
||||
}
|
||||
|
||||
public void setIsParty(String isParty) {
|
||||
this.isParty = isParty;
|
||||
}
|
||||
|
||||
public String getPopulationInfoId() {
|
||||
return populationInfoId;
|
||||
}
|
||||
|
||||
public void setPopulationInfoId(String populationInfoId) {
|
||||
this.populationInfoId = populationInfoId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getIdcard() {
|
||||
return idcard;
|
||||
}
|
||||
|
||||
public void setIdcard(String idcard) {
|
||||
this.idcard = idcard;
|
||||
}
|
||||
|
||||
public String getIdcardType() {
|
||||
return idcardType;
|
||||
}
|
||||
|
||||
public void setIdcardType(String idcardType) {
|
||||
this.idcardType = idcardType;
|
||||
}
|
||||
|
||||
public String getBirthday() {
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setBirthday(String birthday) {
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getNation() {
|
||||
return nation;
|
||||
}
|
||||
|
||||
public void setNation(String nation) {
|
||||
this.nation = nation;
|
||||
}
|
||||
|
||||
public String getEducation() {
|
||||
return education;
|
||||
}
|
||||
|
||||
public void setEducation(String education) {
|
||||
this.education = education;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PopulationInfoBaseDTO{" +
|
||||
"isCult='" + isCult + '\'' +
|
||||
", isDrug='" + isDrug + '\'' +
|
||||
", isDispute='" + isDispute + '\'' +
|
||||
", isPetition='" + isPetition + '\'' +
|
||||
", isCorrect='" + isCorrect + '\'' +
|
||||
", isRelease='" + isRelease + '\'' +
|
||||
", isSecurity='" + isSecurity + '\'' +
|
||||
", isOldage='" + isOldage + '\'' +
|
||||
", isDisability='" + isDisability + '\'' +
|
||||
", isMilitary='" + getIsMilitary() + '\'' +
|
||||
", isSuccour='" + isSuccour + '\'' +
|
||||
", isParty='" + isParty + '\'' +
|
||||
", populationInfoId='" + populationInfoId + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", idcard='" + idcard + '\'' +
|
||||
", idcardType='" + idcardType + '\'' +
|
||||
", birthday='" + birthday + '\'' +
|
||||
", sex='" + sex + '\'' +
|
||||
", nation='" + nation + '\'' +
|
||||
", education='" + education + '\'' +
|
||||
", phone='" + phone + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@ import com.cm.common.plugin.pojo.dtos.dataarea.DataAreaDTO;
|
||||
import com.cm.common.pojo.ListPage;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import com.cm.population.pojo.dtos.areatree.AreaZtreeDTO;
|
||||
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO;
|
||||
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO;
|
||||
import com.cm.population.pojo.vos.populationinfo.PopulationInfoVO;
|
||||
import com.cm.population.pojo.bos.populationinfo.PopulationInfoBO;
|
||||
@ -24,6 +25,8 @@ public interface IPopulationInfoService {
|
||||
DataAreaDTO getAreaById(String id);
|
||||
List<AreaZtreeDTO> listAreaTree(String parentId);
|
||||
|
||||
PopulationInfoBaseDTO getBase(String populationInfoId);
|
||||
|
||||
/**
|
||||
* 新增基础人口信息
|
||||
*
|
||||
|
@ -11,11 +11,26 @@ import com.cm.common.utils.UUIDUtil;
|
||||
import com.cm.population.dao.areatree.IAreatreeDao;
|
||||
import com.cm.population.dao.populationinfo.IPopulationInfoDao;
|
||||
import com.cm.population.pojo.dtos.areatree.AreaZtreeDTO;
|
||||
import com.cm.population.pojo.dtos.correct.CorrectDTO;
|
||||
import com.cm.population.pojo.dtos.cult.CultDTO;
|
||||
import com.cm.population.pojo.dtos.dispute.DisputeDTO;
|
||||
import com.cm.population.pojo.dtos.drug.DrugDTO;
|
||||
import com.cm.population.pojo.dtos.petition.PetitionDTO;
|
||||
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO;
|
||||
import com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO;
|
||||
import com.cm.population.pojo.dtos.release.ReleaseDTO;
|
||||
import com.cm.population.pojo.dtos.security.SecurityDTO;
|
||||
import com.cm.population.pojo.vos.populationinfo.PopulationInfoVO;
|
||||
import com.cm.population.pojo.bos.populationinfo.PopulationInfoBO;
|
||||
import com.cm.population.pojo.pos.populationinfo.PopulationInfoPO;
|
||||
import com.cm.population.service.correct.ICorrectService;
|
||||
import com.cm.population.service.cult.ICultService;
|
||||
import com.cm.population.service.dispute.IDisputeService;
|
||||
import com.cm.population.service.drug.IDrugService;
|
||||
import com.cm.population.service.petition.IPetitionService;
|
||||
import com.cm.population.service.populationinfo.IPopulationInfoService;
|
||||
import com.cm.population.service.release.IReleaseService;
|
||||
import com.cm.population.service.security.ISecurityService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -66,6 +81,44 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
||||
}
|
||||
return list;
|
||||
}
|
||||
@Autowired
|
||||
private ICorrectService iCorrectService;
|
||||
@Autowired
|
||||
private ICultService iCultService;
|
||||
@Autowired
|
||||
private IDisputeService iDisputeService;
|
||||
@Autowired
|
||||
private IDrugService iDrugService;
|
||||
@Autowired
|
||||
private IPetitionService iPetitionService;
|
||||
@Autowired
|
||||
private IReleaseService iReleaseService;
|
||||
@Autowired
|
||||
private ISecurityService iSecurityService;
|
||||
@Override
|
||||
public PopulationInfoBaseDTO getBase(String populationInfoId) {
|
||||
Map<String, Object> query = new HashMap<>();
|
||||
query.put("populationInfoId", populationInfoId);
|
||||
PopulationInfoBaseDTO dto = populationInfoDao.getBase(query);
|
||||
if (dto == null) {
|
||||
return null;
|
||||
}
|
||||
List<CorrectDTO> correct = iCorrectService.list(query);
|
||||
List<CultDTO> cult = iCultService.list(query);
|
||||
List<DisputeDTO> dispute = iDisputeService.list(query);
|
||||
List<DrugDTO> drug = iDrugService.list(query);
|
||||
List<PetitionDTO> petition = iPetitionService.list(query);
|
||||
List<ReleaseDTO> release = iReleaseService.list(query);
|
||||
List<SecurityDTO> security = iSecurityService.list(query);
|
||||
dto.setIsCorrect(correct.size() > 0 ? "是" : "否");
|
||||
dto.setIsCult(cult.size() > 0 ? "是" : "否");
|
||||
dto.setIsDispute(dispute.size() > 0 ? "是" : "否");
|
||||
dto.setIsDrug(drug.size() > 0 ? "是" : "否");
|
||||
dto.setIsPetition(petition.size() > 0 ? "是" : "否");
|
||||
dto.setIsRelease(release.size() > 0 ? "是" : "否");
|
||||
dto.setIsSecurity(security.size() > 0 ? "是" : "否");
|
||||
return dto;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(PopulationInfoVO populationInfoVO) {
|
||||
@ -92,7 +145,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
||||
String areaCode = populationInfoVO.getDomicileAreaCode();
|
||||
if(areaCode.startsWith("150271")) { //包头稀土高新技术产业开发区
|
||||
populationInfoVO.setDomicileAddressType("3");
|
||||
}else if(areaCode.startsWith("150200")) { //包头市
|
||||
}else if(areaCode.startsWith("1502")) { //包头市
|
||||
populationInfoVO.setDomicileAddressType("2");
|
||||
}else { //非包头市
|
||||
populationInfoVO.setDomicileAddressType("1");
|
||||
@ -148,7 +201,7 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul
|
||||
String areaCode = populationInfoVO.getDomicileAreaCode();
|
||||
if(areaCode.startsWith("150271")) { //包头稀土高新技术产业开发区
|
||||
populationInfoVO.setDomicileAddressType("3");
|
||||
}else if(areaCode.startsWith("150200")) { //包头市
|
||||
}else if(areaCode.startsWith("1502")) { //包头市
|
||||
populationInfoVO.setDomicileAddressType("2");
|
||||
}else { //非包头市
|
||||
populationInfoVO.setDomicileAddressType("1");
|
||||
|
@ -2,6 +2,8 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cm.population.dao.areatree.IAreatreeDao">
|
||||
|
||||
<cache></cache>
|
||||
|
||||
<resultMap id="areaDTO" type="com.cm.common.plugin.pojo.dtos.dataarea.DataAreaDTO">
|
||||
<id property="areaId" column="area_id"/>
|
||||
<result property="areaParentId" column="area_parent_id"/>
|
||||
@ -26,7 +28,7 @@
|
||||
<result property="areaCode" column="area_code"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getAreaList" parameterType="map" resultMap="areaZTreeDTO">
|
||||
<select id="getAreaList" parameterType="map" resultMap="areaZTreeDTO" useCache="true">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
@ -35,7 +37,7 @@
|
||||
is_delete = 0 AND area_parent_id = #{areaParentId}
|
||||
</select>
|
||||
|
||||
<select id="getArea" parameterType="map" resultMap="areaDTO">
|
||||
<select id="getArea" parameterType="map" resultMap="areaDTO" useCache="true">
|
||||
SELECT
|
||||
t1.area_id,
|
||||
t1.area_parent_id,
|
||||
@ -71,7 +73,7 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countByParentId" parameterType="String" resultType="Integer">
|
||||
<select id="countByParentId" parameterType="String" resultType="Integer" useCache="true">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
|
@ -2,6 +2,23 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cm.population.dao.populationinfo.IPopulationInfoDao">
|
||||
|
||||
<resultMap id="populationInfoBaseDTO" type="com.cm.population.pojo.dtos.populationinfo.PopulationInfoBaseDTO">
|
||||
<result column="population_info_id" property="populationInfoId"/>
|
||||
<result column="name" property="name"/>
|
||||
<result column="idcard" property="idcard"/>
|
||||
<result column="idcard_type" property="idcardType"/>
|
||||
<result column="birthday" property="birthday"/>
|
||||
<result column="sex" property="sex"/>
|
||||
<result column="nation" property="nation"/>
|
||||
<result column="education" property="education"/>
|
||||
<result column="phone" property="phone"/>
|
||||
<result column="is_oldage" property="isOldage"/>
|
||||
<result column="is_disability" property="isDisability"/>
|
||||
<result column="is_military" property="isMilitary"/>
|
||||
<result column="is_succour" property="isSuccour"/>
|
||||
<result column="is_party" property="isParty"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="populationInfoDTO" type="com.cm.population.pojo.dtos.populationinfo.PopulationInfoDTO">
|
||||
<result column="population_info_id" property="populationInfoId"/>
|
||||
<result column="name" property="name"/>
|
||||
@ -252,7 +269,11 @@
|
||||
mother_phone,
|
||||
relationship,
|
||||
domicile_address,
|
||||
domicile_area_code,
|
||||
domicile_area_name,
|
||||
origin_address,
|
||||
origin_area_code,
|
||||
origin_area_name,
|
||||
flow_time,
|
||||
flow_reason,
|
||||
flow_reasontext,
|
||||
@ -269,6 +290,8 @@
|
||||
disability_number,
|
||||
disability_carnumber,
|
||||
disability_address,
|
||||
disability_area_code,
|
||||
disability_area_name,
|
||||
disability_income,
|
||||
disability_house,
|
||||
disability_time,
|
||||
@ -325,7 +348,11 @@
|
||||
#{motherPhone},
|
||||
#{relationship},
|
||||
#{domicileAddress},
|
||||
#{domicileAreaCode},
|
||||
#{domicileAreaName},
|
||||
#{originAddress},
|
||||
#{originAreaCode},
|
||||
#{originAreaName},
|
||||
#{flowTime},
|
||||
#{flowReason},
|
||||
#{flowReasontext},
|
||||
@ -342,6 +369,8 @@
|
||||
#{disabilityNumber},
|
||||
#{disabilityCarnumber},
|
||||
#{disabilityAddress},
|
||||
#{disabilityAreaCode},
|
||||
#{disabilityAreaName},
|
||||
#{disabilityIncome},
|
||||
#{disabilityHouse},
|
||||
#{disabilityTime},
|
||||
@ -617,6 +646,36 @@
|
||||
population_info_id = #{populationInfoId}
|
||||
</update>
|
||||
|
||||
<select id="getBase" parameterType="map" resultMap="populationInfoBaseDTO">
|
||||
SELECT
|
||||
t1.population_info_id,
|
||||
t1.name,
|
||||
t1.idcard,
|
||||
t1.idcard_type,
|
||||
t1.birthday,
|
||||
t1.sex,
|
||||
t1.nation,
|
||||
t1.education,
|
||||
t1.phone,
|
||||
t1.is_oldage,
|
||||
t1.is_disability,
|
||||
t1.is_military,
|
||||
t1.is_succour,
|
||||
t1.is_party
|
||||
FROM
|
||||
population_population_info t1
|
||||
WHERE
|
||||
t1.is_delete = 0
|
||||
<if test="populationInfoId != null and populationInfoId != ''">
|
||||
AND
|
||||
t1.population_info_id = #{populationInfoId}
|
||||
</if>
|
||||
<if test="idcard != null and idcard != ''">
|
||||
AND
|
||||
t1.idcard = #{idcard}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 基础人口信息详情 -->
|
||||
<select id="get" parameterType="map" resultMap="populationInfoDTO">
|
||||
SELECT
|
||||
|
@ -11,6 +11,7 @@
|
||||
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
|
||||
<link rel="stylesheet" href="assets/js/vendor/zTree3/css/metroStyle/metroStyle.css"/>
|
||||
<link rel="stylesheet" href="assets/layuiadmin/modules/cascader.css" media="all">
|
||||
<style>
|
||||
.layui-form-pane .layui-input-block {
|
||||
margin-left: 160px;
|
||||
@ -744,6 +745,13 @@
|
||||
<input type="text" id="othertext" name="othertext" class="layui-input" value="" placeholder="请输入其他说明" maxlength="1,000">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-form-item">-->
|
||||
<!-- <label class="layui-form-label"><span style="color: red">*</span>所属区域</label>-->
|
||||
<!-- <div class="layui-input-block">-->
|
||||
<!-- <input type="text" id="areaCodeCascader" name="areaCodeCascader" class="layui-input" lay-verify="required"-->
|
||||
<!-- autocomplete="off" value="" placeholder="点击选择所属区域" readonly>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
@ -771,19 +779,70 @@
|
||||
base: 'assets/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form', 'laydate', 'ztree', 'laytpl'], function(){
|
||||
}).use(['index', 'form', 'laydate', 'ztree', 'laytpl', 'cascader'], function(){
|
||||
var $ = layui.$;
|
||||
var form = layui.form;
|
||||
var laytpl = layui.laytpl;
|
||||
var laydate = layui.laydate;
|
||||
var wangEditor = window.wangEditor;
|
||||
var wangEditorObj = {};
|
||||
var cascader = layui.cascader;
|
||||
var viewerObj = {};
|
||||
|
||||
function closeBox() {
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
/* var areaFielaMap = new Map();
|
||||
function initArea(rootId, id) {
|
||||
var areaCodeCascader = cascader({
|
||||
elem: "#" + id,
|
||||
props: {
|
||||
lazy: true,
|
||||
checkStrictly: true,
|
||||
expandTrigger: 'hover',
|
||||
lazyLoad: function(node, resolve) {
|
||||
var nodes =[];
|
||||
console.log(node);
|
||||
if(typeof (node.value) === 'undefined'){
|
||||
top.restAjax.get(top.restAjax.path('api/areatree/newtree?id={id}', [rootId]), {}, null, function(code, data) {
|
||||
if(typeof (data) === 'undefined' || data.length == 0){
|
||||
resolve(nodes);
|
||||
}
|
||||
$.each(data, function(i,e){
|
||||
nodes.push(e);
|
||||
resolve(nodes);
|
||||
})
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}else{
|
||||
var value = node.value;
|
||||
top.restAjax.get(top.restAjax.path('api/areatree/newtree?id={id}', [value]), {}, null, function(code, data) {
|
||||
if(typeof (data) === 'undefined' || data.length == 0){
|
||||
resolve(nodes);
|
||||
}
|
||||
$.each(data, function(i,e){
|
||||
nodes.push(e);
|
||||
resolve(nodes);
|
||||
})
|
||||
}, function(code, data) {
|
||||
top.dialog.msg(data.msg);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
setTimeout(function(){
|
||||
areaCodeCascader.change(function(value, node){
|
||||
alert(1);
|
||||
areaCodeCascader.blur();
|
||||
});
|
||||
},100);
|
||||
}
|
||||
|
||||
initArea("0" , "areaCodeCascader");*/
|
||||
|
||||
$('#domicileAreaName').on("click", function () {
|
||||
initHuJiAreaTree("domicile");
|
||||
var cityObj = $(this);
|
||||
@ -856,7 +915,7 @@
|
||||
},
|
||||
async: {
|
||||
enable: true,
|
||||
url:"api/areatree/huji",
|
||||
url:"api/areatree/list",
|
||||
autoParam:["id", "name", "pId", "level"]
|
||||
},
|
||||
callback : {
|
||||
|
@ -780,7 +780,6 @@
|
||||
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||
}
|
||||
|
||||
|
||||
$('#domicileAreaName').on("click", function () {
|
||||
initHuJiAreaTree("domicile");
|
||||
var cityObj = $(this);
|
||||
@ -853,7 +852,7 @@
|
||||
},
|
||||
async: {
|
||||
enable: true,
|
||||
url:"api/areatree/huji",
|
||||
url:"api/areatree/list",
|
||||
autoParam:["id", "name", "pId", "level"]
|
||||
},
|
||||
callback : {
|
||||
|
Loading…
Reference in New Issue
Block a user