|
|
@@ -0,0 +1,563 @@
|
|
|
+package com.usky.controller;
|
|
|
+
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
+import com.baomidou.mybatisplus.extension.api.R;
|
|
|
+import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
+import com.fasterxml.jackson.databind.JsonNode;
|
|
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
+import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
|
|
+import com.usky.common.bo.CommonBo;
|
|
|
+import com.usky.common.exception.DefenceException;
|
|
|
+import com.usky.common.listener.ConfigCacheListener;
|
|
|
+import com.usky.global.Common;
|
|
|
+import com.usky.modules.entity.persons.bo.BatchFunctionPersonDelBo;
|
|
|
+import com.usky.modules.entity.persons.bo.BindingHouseBo;
|
|
|
+import com.usky.modules.entity.persons.bo.BindingPlotAreaLocationBo;
|
|
|
+import com.usky.modules.entity.persons.bo.BuildingHouseInfoAddBo;
|
|
|
+import com.usky.modules.entity.persons.bo.CardInfoAddBo;
|
|
|
+import com.usky.modules.entity.persons.bo.ConcernPersonUpdateOrAddBo;
|
|
|
+import com.usky.modules.entity.persons.bo.FollowPersonAddBo;
|
|
|
+import com.usky.modules.entity.persons.bo.FunctionPersonUpdateBo;
|
|
|
+import com.usky.modules.entity.persons.bo.PersonInfoBo;
|
|
|
+import com.usky.modules.entity.persons.bo.PlateInfoAddBo;
|
|
|
+import com.usky.modules.entity.persons.bo.RegisteredPersonAddBo;
|
|
|
+import com.usky.modules.entity.persons.bo.SetPersonPowerCodeBo;
|
|
|
+import com.usky.modules.entity.persons.bo.UpdateFollowPersonInfoBo;
|
|
|
+import com.usky.modules.entity.persons.bo.UpdateRegisteredPersonsInfoBo;
|
|
|
+import com.usky.modules.entity.persons.vo.BindingHouseVo;
|
|
|
+import com.usky.modules.entity.persons.vo.CredentialTypeCodeVo;
|
|
|
+import com.usky.modules.entity.persons.vo.EducationCodeVo;
|
|
|
+import com.usky.modules.entity.persons.vo.HouseInfoListVO;
|
|
|
+import com.usky.modules.entity.persons.vo.HouserelCodeVo;
|
|
|
+import com.usky.modules.entity.persons.vo.LabelCodeVo;
|
|
|
+import com.usky.modules.entity.persons.vo.MaritalStatusCodeVo;
|
|
|
+import com.usky.modules.entity.persons.vo.NationCodeVo;
|
|
|
+import com.usky.modules.entity.persons.vo.PeopleTypeCodeVo;
|
|
|
+import com.usky.modules.entity.persons.vo.PersonBlackListVO;
|
|
|
+import com.usky.modules.entity.persons.vo.PersonCarInfoVO;
|
|
|
+import com.usky.modules.entity.persons.vo.PersonInfoUpdateVO;
|
|
|
+import com.usky.modules.entity.persons.vo.PersonInfoVO;
|
|
|
+import com.usky.modules.entity.persons.vo.PersonLabelInfoVO;
|
|
|
+import com.usky.modules.entity.persons.vo.PublicOrderCodeVo;
|
|
|
+import com.usky.modules.entity.persons.vo.SecurityDutiesCodeVo;
|
|
|
+import com.usky.modules.entity.persons.vo.ValidateCredentialVO;
|
|
|
+import com.usky.modules.service.PersonService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import java.io.IOException;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
+import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@Api(
|
|
|
+ tags = {"人员信息控制器"}
|
|
|
+)
|
|
|
+public class PersonController {
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(PersonController.class);
|
|
|
+ private final PersonService personService;
|
|
|
+ private final ConfigCacheListener config;
|
|
|
+
|
|
|
+ @ApiOperation("身份人像采集对外接口")
|
|
|
+ @PostMapping({"/agbox/person", "/agbox/person/**"})
|
|
|
+ public Object person(@ModelAttribute CommonBo bo, HttpServletRequest servletRequest) throws IOException {
|
|
|
+ log.info("人员信息控制器请求报文:{}", bo.toString());
|
|
|
+ String key = bo.getKey();
|
|
|
+ String json = bo.getJson();
|
|
|
+ if (StrUtil.isNotBlank(this.config.getConfig("key")) && !Common.key.equals(this.config.getConfig("key")) && !key.equals(this.config.getConfig("key"))) {
|
|
|
+ return R.failed("key错误或缺失!");
|
|
|
+ } else if (StringUtils.isBlank(json)) {
|
|
|
+ return R.failed("json不能为空!");
|
|
|
+ } else {
|
|
|
+ JsonNode jsonNode = (new ObjectMapper()).readTree(json);
|
|
|
+ String jsonrpc = null;
|
|
|
+ String standjsonrpc = jsonNode.path("jsonrpc").asText();
|
|
|
+ if (StrUtil.isNotBlank(standjsonrpc)) {
|
|
|
+ if (!standjsonrpc.equals("2.0")) {
|
|
|
+ return R.failed("JSON-RPC 协议版本的字符串,必须准确写为'2.0'!");
|
|
|
+ }
|
|
|
+
|
|
|
+ jsonrpc = standjsonrpc;
|
|
|
+ }
|
|
|
+
|
|
|
+ String json_rpc = jsonNode.path("json-rpc").asText();
|
|
|
+ if (StrUtil.isNotBlank(json_rpc)) {
|
|
|
+ if (!json_rpc.equals("2.0")) {
|
|
|
+ return R.failed("JSON-RPC 协议版本的字符串,必须准确写为'2.0'!");
|
|
|
+ }
|
|
|
+
|
|
|
+ jsonrpc = json_rpc;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StrUtil.isBlank(json_rpc) && StrUtil.isBlank(jsonrpc)) {
|
|
|
+ return R.failed("JSON-RPC 协议版本的字符串,必须准确写为'2.0'!");
|
|
|
+ } else {
|
|
|
+ MultipartHttpServletRequest request = null;
|
|
|
+ if (servletRequest instanceof MultipartHttpServletRequest) {
|
|
|
+ request = (MultipartHttpServletRequest)servletRequest;
|
|
|
+ }
|
|
|
+
|
|
|
+ String method = jsonNode.path("method").asText();
|
|
|
+ JsonNode params = jsonNode.path("params");
|
|
|
+ String IDPic = params.path("domicile").path("IDPic").asText();
|
|
|
+ MultipartFile file = null;
|
|
|
+ if (IDPic != null && !IDPic.isEmpty()) {
|
|
|
+ file = request.getFile(IDPic);
|
|
|
+ }
|
|
|
+
|
|
|
+ switch (method) {
|
|
|
+ case "getCredentialTypeCode":
|
|
|
+ CredentialTypeCodeVo credentialTypeCodeVo = (CredentialTypeCodeVo)this.getCredentialTypeCode();
|
|
|
+ credentialTypeCodeVo.setJsonrpc(jsonrpc);
|
|
|
+ credentialTypeCodeVo.setId(jsonNode.path("id").asText());
|
|
|
+ return credentialTypeCodeVo;
|
|
|
+ case "getEducationCode":
|
|
|
+ EducationCodeVo educationCodeVo = (EducationCodeVo)this.getEducationCode();
|
|
|
+ educationCodeVo.setJsonrpc(jsonrpc);
|
|
|
+ educationCodeVo.setId(jsonNode.path("id").asText());
|
|
|
+ return educationCodeVo;
|
|
|
+ case "getMaritalStatusCode":
|
|
|
+ MaritalStatusCodeVo maritalStatusCodeVo = (MaritalStatusCodeVo)this.getMaritalStatusCode();
|
|
|
+ maritalStatusCodeVo.setJsonrpc(jsonrpc);
|
|
|
+ maritalStatusCodeVo.setId(jsonNode.path("id").asText());
|
|
|
+ return maritalStatusCodeVo;
|
|
|
+ case "getNationCode":
|
|
|
+ NationCodeVo nationCodeVo = (NationCodeVo)this.getNationCode();
|
|
|
+ nationCodeVo.setJsonrpc(jsonrpc);
|
|
|
+ nationCodeVo.setId(jsonNode.path("id").asText());
|
|
|
+ return nationCodeVo;
|
|
|
+ case "getLabelCode":
|
|
|
+ LabelCodeVo labelCodeVo = (LabelCodeVo)this.getLabelCode();
|
|
|
+ labelCodeVo.setJsonrpc(jsonrpc);
|
|
|
+ labelCodeVo.setId(jsonNode.path("id").asText());
|
|
|
+ return labelCodeVo;
|
|
|
+ case "getHouseRelCode":
|
|
|
+ HouserelCodeVo houserelCodeVo = (HouserelCodeVo)this.getHouseRelCode();
|
|
|
+ houserelCodeVo.setJsonrpc(jsonrpc);
|
|
|
+ houserelCodeVo.setId(jsonNode.path("id").asText());
|
|
|
+ return houserelCodeVo;
|
|
|
+ case "getPeopleTypeCode":
|
|
|
+ PeopleTypeCodeVo peopleTypeCodeVo = (PeopleTypeCodeVo)this.getPeopleTypeCode();
|
|
|
+ peopleTypeCodeVo.setJsonrpc(jsonrpc);
|
|
|
+ peopleTypeCodeVo.setId(jsonNode.path("id").asText());
|
|
|
+ return peopleTypeCodeVo;
|
|
|
+ case "getSecurityDutiesCode":
|
|
|
+ SecurityDutiesCodeVo securityDutiesCodeVo = (SecurityDutiesCodeVo)this.getSecurityDutiesCode();
|
|
|
+ securityDutiesCodeVo.setJsonrpc(jsonrpc);
|
|
|
+ securityDutiesCodeVo.setId(jsonNode.path("id").asText());
|
|
|
+ return securityDutiesCodeVo;
|
|
|
+ case "getPublicOrderCode":
|
|
|
+ PublicOrderCodeVo publicOrderCodeVo = (PublicOrderCodeVo)this.getPublicOrderCode();
|
|
|
+ publicOrderCodeVo.setJsonrpc(jsonrpc);
|
|
|
+ publicOrderCodeVo.setId(jsonNode.path("id").asText());
|
|
|
+ return publicOrderCodeVo;
|
|
|
+ case "getInfo":
|
|
|
+ PersonInfoVO personInfoVO = (PersonInfoVO)this.getInfo(params, servletRequest);
|
|
|
+ personInfoVO.setJsonrpc(jsonrpc);
|
|
|
+ personInfoVO.setId(jsonNode.path("id").asText());
|
|
|
+ return personInfoVO;
|
|
|
+ case "getHouse":
|
|
|
+ HouseInfoListVO houseInfoListVO = (HouseInfoListVO)this.getHouse(params);
|
|
|
+ houseInfoListVO.setJsonrpc(jsonrpc);
|
|
|
+ houseInfoListVO.setId(jsonNode.path("id").asText());
|
|
|
+ return houseInfoListVO;
|
|
|
+ case "getLabel":
|
|
|
+ PersonLabelInfoVO personLabelInfoVO = (PersonLabelInfoVO)this.getLabel(params);
|
|
|
+ personLabelInfoVO.setJsonrpc(jsonrpc);
|
|
|
+ personLabelInfoVO.setId(jsonNode.path("id").asText());
|
|
|
+ return personLabelInfoVO;
|
|
|
+ case "getCar":
|
|
|
+ PersonCarInfoVO personCarInfoVO = (PersonCarInfoVO)this.getCar(params);
|
|
|
+ personCarInfoVO.setJsonrpc(jsonrpc);
|
|
|
+ personCarInfoVO.setId(jsonNode.path("id").asText());
|
|
|
+ return personCarInfoVO;
|
|
|
+ case "getBlackList":
|
|
|
+ Integer page = params.path("page").asInt();
|
|
|
+ Integer pageSize = params.path("pageSize").asInt();
|
|
|
+ Integer eventCode = params.path("eventCode").asInt();
|
|
|
+ if (page == 0) {
|
|
|
+ page = 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (pageSize == 0) {
|
|
|
+ pageSize = 10000;
|
|
|
+ }
|
|
|
+
|
|
|
+ PersonBlackListVO vo = (PersonBlackListVO)this.getBlackList(eventCode, page, pageSize, servletRequest);
|
|
|
+ vo.setJsonrpc(jsonrpc);
|
|
|
+ vo.setId(jsonNode.path("id").asText());
|
|
|
+ return vo;
|
|
|
+ case "update":
|
|
|
+ PersonInfoBo personInfoBo = (PersonInfoBo)(new ObjectMapper()).registerModule(new JavaTimeModule()).treeToValue(params, PersonInfoBo.class);
|
|
|
+ PersonInfoUpdateVO personInfoUpdateVO = (PersonInfoUpdateVO)this.updatePerson(personInfoBo, file);
|
|
|
+ personInfoUpdateVO.setId(jsonNode.path("id").asText());
|
|
|
+ return personInfoUpdateVO;
|
|
|
+ case "bindingHouse":
|
|
|
+ BindingHouseBo bindingHouseBo = (BindingHouseBo)(new ObjectMapper()).registerModule(new JavaTimeModule()).treeToValue(params, BindingHouseBo.class);
|
|
|
+ String result = (String)this.bindingHouse(bindingHouseBo);
|
|
|
+ return (new BindingHouseVo()).setId(jsonNode.path("id").asText()).setResult(result).setJsonrpc(jsonrpc);
|
|
|
+ case "validateCredential":
|
|
|
+ String credentialNo = params.path("credentialNo").asText();
|
|
|
+ if (credentialNo != null && !credentialNo.isEmpty()) {
|
|
|
+ ValidateCredentialVO validateCredentialVO = (ValidateCredentialVO)this.validateCredential(credentialNo);
|
|
|
+ validateCredentialVO.setId(jsonNode.path("id").asText());
|
|
|
+ return validateCredentialVO;
|
|
|
+ }
|
|
|
+
|
|
|
+ throw new DefenceException("credentialNo不能为空");
|
|
|
+ case "deletePerson":
|
|
|
+ String id = jsonNode.path("id").asText();
|
|
|
+ return this.deletePerson(id, jsonrpc, params);
|
|
|
+ default:
|
|
|
+ return R.failed("方法名不存在!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private Object deletePerson(String id, String jsonrpc, JsonNode params) {
|
|
|
+ return this.personService.deletePerson(id, jsonrpc, params);
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getCredentialTypeCode() {
|
|
|
+ return this.personService.getCredentialTypeCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getEducationCode() {
|
|
|
+ return this.personService.getEducationCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getMaritalStatusCode() {
|
|
|
+ return this.personService.getMaritalStatusCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getNationCode() {
|
|
|
+ return this.personService.getNationCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getLabelCode() {
|
|
|
+ return this.personService.getLabelCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getHouseRelCode() {
|
|
|
+ return this.personService.getHouseRelCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getPeopleTypeCode() {
|
|
|
+ System.out.println("户籍人员");
|
|
|
+ return this.personService.getPeopleTypeCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getSecurityDutiesCode() {
|
|
|
+ return this.personService.getSecurityDutiesCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getPublicOrderCode() {
|
|
|
+ return this.personService.getPublicOrderCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getInfo(JsonNode params, HttpServletRequest servletRequest) {
|
|
|
+ return this.personService.getInfo(params, servletRequest);
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getHouse(JsonNode params) {
|
|
|
+ return this.personService.getHouse(params);
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getLabel(JsonNode params) {
|
|
|
+ return this.personService.getLabel(params);
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getCar(JsonNode params) {
|
|
|
+ return this.personService.getCar(params);
|
|
|
+ }
|
|
|
+
|
|
|
+ public Object getBlackList(@RequestParam("eventCode") Integer eventCode, @RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize, HttpServletRequest request) {
|
|
|
+ return this.personService.getBlackList(eventCode, page, pageSize, request);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取person类型分类编码")
|
|
|
+ @PostMapping({"/person/getPersonTypeCode"})
|
|
|
+ public Object getPersonTypeCode() {
|
|
|
+ System.out.println("人员类型");
|
|
|
+ return this.personService.getPersonTypeCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取people类型分类编码")
|
|
|
+ @PostMapping({"/person/getPeopleTypeCodeList"})
|
|
|
+ public Object getPeopleTypeCodeList() {
|
|
|
+ return this.personService.getPeopleTypeCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("添加/更新人员基本信息")
|
|
|
+ @PostMapping({"/person/update"})
|
|
|
+ public Object updatePerson(@RequestBody PersonInfoBo personInfoBo, MultipartFile file) {
|
|
|
+ return this.personService.updatePerson(personInfoBo, file);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("绑定人屋关系")
|
|
|
+ @PostMapping({"/person/bindingHouse"})
|
|
|
+ public Object bindingHouse(@RequestBody BindingHouseBo bindingHouseBo) {
|
|
|
+ return this.personService.bindingHouse(bindingHouseBo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("本地身份证校验")
|
|
|
+ @PostMapping({"/person/validateCredential"})
|
|
|
+ public Object validateCredential(@RequestParam("credentialNo") String credentialNo) {
|
|
|
+ return this.personService.validateCredential(credentialNo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("新增或修改关注人员")
|
|
|
+ @PostMapping({"/person/concernPersonUpdateOrAdd"})
|
|
|
+ public Object concernPersonUpdateOrAdd(@ModelAttribute ConcernPersonUpdateOrAddBo bo) {
|
|
|
+ return this.personService.concernPersonUpdateOrAdd(bo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取在册人员列表")
|
|
|
+ @PostMapping({"/person/getRegisteredPersonsList"})
|
|
|
+ public Object getRegisteredPersonsList(@RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize, @RequestParam(value = "name",required = false) String name, @RequestParam(value = "credentialNo",required = false) String credentialNo, @RequestParam(value = "personTypeCode",required = false) Integer personTypeCode) {
|
|
|
+ return this.personService.getRegisteredPersonsList(page, pageSize, name, credentialNo, personTypeCode);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("在册人员添加部位信息")
|
|
|
+ @PostMapping({"/person/addBuildingHouseInfo"})
|
|
|
+ public Object addBuildingHouseInfo(@RequestBody BuildingHouseInfoAddBo bo) {
|
|
|
+ return this.personService.addBuildingHouseInfo(bo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("在册人员删除部位信息")
|
|
|
+ @PostMapping({"/person/delBuildingHouseInfo"})
|
|
|
+ public Object delBuildingHouseInfo(@RequestParam("id") String id) {
|
|
|
+ return this.personService.delBuildingHouseInfo(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("在册人员添加门禁卡号信息")
|
|
|
+ @PostMapping({"/person/addCardInfo"})
|
|
|
+ public Object addCardInfo(@RequestBody CardInfoAddBo bo) {
|
|
|
+ return this.personService.addCardInfo(bo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("在册人员删除门禁卡号信息")
|
|
|
+ @PostMapping({"/person/delCardInfo"})
|
|
|
+ public Object delCardInfo(@RequestParam("id") String id) {
|
|
|
+ return this.personService.delCardInfo(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("在册人员添加车辆信息")
|
|
|
+ @PostMapping({"/person/addPlateInfo"})
|
|
|
+ public Object addPlateInfo(@RequestBody PlateInfoAddBo bo) {
|
|
|
+ return this.personService.addPlateInfo(bo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("在册人员删除车辆信息")
|
|
|
+ @PostMapping({"/person/delPlateInfo"})
|
|
|
+ public Object delPlateInfo(@RequestParam("id") String id) {
|
|
|
+ return this.personService.delPlateInfo(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("车牌类型编码列表")
|
|
|
+ @GetMapping({"/person/getPlateTypeCodeList"})
|
|
|
+ public Object getPlateTypeCodeList() {
|
|
|
+ return this.personService.getPlateTypeCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("车辆类型编码列表")
|
|
|
+ @GetMapping({"/person/getCarTypeCodeList"})
|
|
|
+ public Object getCarTypeCodeList() {
|
|
|
+ return this.personService.getCarTypeCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("人屋关系编码列表")
|
|
|
+ @GetMapping({"/person/getHouserelCodeList"})
|
|
|
+ public Object getHouserelCodeList() {
|
|
|
+ return this.personService.getHouserelCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("卡类型编码列表")
|
|
|
+ @GetMapping({"/person/getCardTypeCodeList"})
|
|
|
+ public Object getCardTypeCodeList() {
|
|
|
+ return this.personService.getCardTypeCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("地块编码列表")
|
|
|
+ @GetMapping({"/person/getVillageCodeList"})
|
|
|
+ public Object getVillageCodeList() {
|
|
|
+ return this.personService.getVillageCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取在册人员详细信息")
|
|
|
+ @PostMapping({"/person/getRegisteredPersonsInfo"})
|
|
|
+ public Object getRegisteredPersonsInfo(@RequestParam("personCode") String personCode, HttpServletRequest request) {
|
|
|
+ return this.personService.getRegisteredPersonsInfo(personCode, request);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("新增在册人员")
|
|
|
+ @PostMapping({"/person/addRegisteredPerson"})
|
|
|
+ public Object addRegisteredPerson(@ModelAttribute RegisteredPersonAddBo bo) throws JsonProcessingException {
|
|
|
+ return this.personService.addRegisteredPerson(bo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取安全职责编码列表")
|
|
|
+ @GetMapping({"/person/getSecurityDutiesCodeList"})
|
|
|
+ public Object getSecurityDutiesCodeList() {
|
|
|
+ return this.personService.getSecurityDutiesCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取婚姻状况编码列表")
|
|
|
+ @GetMapping({"/person/getMaritalCodeList"})
|
|
|
+ public Object getMaritalCodeList() {
|
|
|
+ return this.personService.getMaritalCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取教育程度编码列表")
|
|
|
+ @GetMapping({"/person/getEducationCodeList"})
|
|
|
+ public Object getEducationCodeList() {
|
|
|
+ return this.personService.getEducationCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取国家编码列表")
|
|
|
+ @GetMapping({"/person/getNationalityCodeList"})
|
|
|
+ public Object getNationalityCodeList() {
|
|
|
+ return this.personService.getNationalityCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取民族编码列表")
|
|
|
+ @GetMapping({"/person/getNationCodeList"})
|
|
|
+ public Object getNationCodeList() {
|
|
|
+ return this.personService.getNationCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取证件类型编码列表")
|
|
|
+ @GetMapping({"/person/getCredentialTypeCodeList"})
|
|
|
+ public Object getCredentialTypeCodeList() {
|
|
|
+ return this.personService.getCredentialTypeCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取实有力量编码列表")
|
|
|
+ @GetMapping({"/person/getPowerCodeList"})
|
|
|
+ public Object getPowerCodeList() {
|
|
|
+ return this.personService.getPowerCodeList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("修改在册人员信息")
|
|
|
+ @PostMapping({"/person/updateRegisteredPersonsInfo"})
|
|
|
+ public Object updateRegisteredPersonsInfo(@ModelAttribute UpdateRegisteredPersonsInfoBo bo) throws JsonProcessingException {
|
|
|
+ return this.personService.updateRegisteredPersonsInfo(bo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("删除在册人员信息")
|
|
|
+ @PostMapping({"/person/delRegisteredPersonsInfo"})
|
|
|
+ public Object delRegisteredPersonsInfo(@RequestParam("personCode") String personCode) {
|
|
|
+ return this.personService.delRegisteredPersonsInfo(personCode);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("治安人员类型设置")
|
|
|
+ @PostMapping({"/person/setPersonPowerCode"})
|
|
|
+ public Object setPersonPowerCode(@RequestBody SetPersonPowerCodeBo bo) {
|
|
|
+ return this.personService.setPersonPowerCode(bo.getPersonCode(), bo.getPowerCode());
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("在册人员地块区域部位绑定")
|
|
|
+ @PostMapping({"/person/binding"})
|
|
|
+ public Object bindingPlotAreaLocation(@RequestBody BindingPlotAreaLocationBo bo) {
|
|
|
+ return this.personService.bindingPlotAreaLocation(bo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取组合认证人员类型列表")
|
|
|
+ @PostMapping({"/person/getGroupFunctionList"})
|
|
|
+ public Object getGroupFunctionList() {
|
|
|
+ return this.personService.getGroupFunctionList();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("添加组合认证人员")
|
|
|
+ @PostMapping({"/person/setGroupFunction"})
|
|
|
+ public Object setGroupFunction(@RequestParam("personCode") String personCode, @RequestParam("functions") Integer functions, @RequestParam("cardNo") String cardNo) {
|
|
|
+ return this.personService.setGroupFunction(personCode, functions, cardNo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取治安人员列表")
|
|
|
+ @PostMapping({"/person/getSecurityPersonList"})
|
|
|
+ public Object getSecurityPersonList(@RequestParam(value = "powerCode",required = false) String powerCode, @RequestParam(value = "name",required = false) String name, @RequestParam(value = "credentialNo",required = false) String credentialNo, @RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize) {
|
|
|
+ return this.personService.getSecurityPersonList(powerCode, name, credentialNo, page, pageSize);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取治安人员详细信息")
|
|
|
+ @GetMapping({"/person/getSecurityPersonInfo"})
|
|
|
+ public Object getSecurityPersonInfo(@RequestParam("personCode") String personCode, HttpServletRequest request) {
|
|
|
+ return this.personService.getSecurityPersonInfo(personCode, request);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取组合认证人员列表")
|
|
|
+ @PostMapping({"/person/getFunctionPersonList"})
|
|
|
+ public Object getFunctionPersonList(@RequestParam(value = "functions",required = false) Integer functions, @RequestParam(value = "name",required = false) String name, @RequestParam(value = "credentialNo",required = false) String credentialNo, @RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize) {
|
|
|
+ return this.personService.getFunctionPersonList(functions, name, credentialNo, page, pageSize);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取组合认证人员详细信息")
|
|
|
+ @GetMapping({"/person/getFunctionPersonInfo"})
|
|
|
+ public Object getFunctionPersonInfo(@RequestParam("personCode") String personCode, HttpServletRequest request) {
|
|
|
+ return this.personService.getFunctionPersonInfo(personCode, request);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("批量删除组合认证人员")
|
|
|
+ @PostMapping({"/person/batchFunctionPersonDel"})
|
|
|
+ public Object batchFunctionPersonDel(@RequestBody BatchFunctionPersonDelBo bo) {
|
|
|
+ return this.personService.batchFunctionPersonDel(bo.getPersonCodeList());
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("组合认证人员信息修改")
|
|
|
+ @PostMapping({"/person/functionPersonUpdate"})
|
|
|
+ public Object functionPersonUpdate(@RequestBody FunctionPersonUpdateBo bo) {
|
|
|
+ return this.personService.functionPersonUpdate(bo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("新增关注人员")
|
|
|
+ @PostMapping({"/person/followPersonAdd"})
|
|
|
+ public Object followPersonAdd(@ModelAttribute FollowPersonAddBo bo) {
|
|
|
+ return this.personService.followPersonAdd(bo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取关注人员类型编码")
|
|
|
+ @PostMapping({"/person/getFollowPersonType"})
|
|
|
+ public Object getFollowPersonType() {
|
|
|
+ return this.personService.getFollowPersonType();
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取关注人员列表")
|
|
|
+ @PostMapping({"/person/getFollowPersonList"})
|
|
|
+ public Object getFollowPersonList(@RequestParam(value = "followPeopleType",required = false) Integer followPeopleType, @RequestParam(value = "name",required = false) String name, @RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize, HttpServletRequest request) {
|
|
|
+ return this.personService.getFollowPersonList(followPeopleType, name, page, pageSize, request);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("修改关注人员信息")
|
|
|
+ @PostMapping({"/person/updateFollowPersonInfo"})
|
|
|
+ public Object updateFollowPersonInfo(@RequestBody UpdateFollowPersonInfoBo bo) {
|
|
|
+ return this.personService.updateFollowPersonInfo(bo);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("移除关注人员信息")
|
|
|
+ @PostMapping({"/person/followPersonDel"})
|
|
|
+ public Object followPersonDel(@RequestParam("personCode") String personCode) {
|
|
|
+ return this.personService.followPersonDel(personCode);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("在册人员通行码人员注册二维码")
|
|
|
+ @PostMapping({"/person/getQrCode"})
|
|
|
+ public Object getQrCode() {
|
|
|
+ return this.personService.getQrCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ public PersonController(final PersonService personService, final ConfigCacheListener config) {
|
|
|
+ this.personService = personService;
|
|
|
+ this.config = config;
|
|
|
+ }
|
|
|
+}
|