智慧保安后台管理项目备份
1.
tangzy
2021-07-12 cb00b296ba7374692f9ebd291018e1fe528f7524
1.
9 files modified
9 files added
1527 ■■■■ changed files
src/main/java/org/springblade/modules/jurisdiction/controller/JurisdictionController.java 168 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/dto/JurisdictionDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/entity/Jurisdiction.java 96 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.java 77 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml 113 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/service/JurisdictionService.java 82 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/service/impl/JurisdictionServiceImpl.java 121 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/vo/JurisdictionVO.java 80 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/wrapper/JurisdictionWrapper.java 72 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/permit/controller/PermitController.java 18 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/permit/entity/Permit.java 147 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml 7 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/record/entity/Record.java 169 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml 6 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/recordk/entity/Recordk.java 169 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.xml 6 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/revoke/entity/Revoke.java 155 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.xml 7 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/jurisdiction/controller/JurisdictionController.java
New file
@@ -0,0 +1,168 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.jurisdiction.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
import org.springblade.common.cache.DictCache;
import org.springblade.common.enums.DictEnum;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.cache.utils.CacheUtil;
import org.springblade.core.launch.constant.AppConstant;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.support.Kv;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.jurisdiction.entity.Jurisdiction;
import org.springblade.modules.jurisdiction.service.JurisdictionService;
import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
import org.springblade.modules.jurisdiction.wrapper.JurisdictionWrapper;
import org.springblade.modules.system.entity.Dept;
import org.springblade.modules.system.service.IDeptService;
import org.springblade.modules.system.vo.DeptVO;
import org.springblade.modules.system.wrapper.DeptWrapper;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
import java.util.List;
import java.util.Map;
import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE;
/**
 * 控制器
 *
 * @author Chill
 */
@NonDS
@RestController
@AllArgsConstructor
@RequestMapping("/jurisdiction")
@Api(value = "部门", tags = "部门")
public class JurisdictionController extends BladeController {
    private final JurisdictionService jurisdictionService;
    /**
     * 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入dept")
    public R<JurisdictionVO> detail(Jurisdiction jurisdiction) {
        Jurisdiction detail = jurisdictionService.getOne(Condition.getQueryWrapper(jurisdiction));
        return R.data(JurisdictionWrapper.build().entityVO(detail));
    }
    /**
     * 列表
     */
    @GetMapping("/list")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "deptName", value = "部门名称", paramType = "query", dataType = "string"),
        @ApiImplicitParam(name = "fullName", value = "部门全称", paramType = "query", dataType = "string")
    })
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "列表", notes = "传入dept")
    public R<List<JurisdictionVO>> list(@ApiIgnore @RequestParam Map<String, Object> dept, BladeUser bladeUser) {
        QueryWrapper<Jurisdiction> queryWrapper = Condition.getQueryWrapper(dept, Jurisdiction.class);
        List<Jurisdiction> list = jurisdictionService.list((!bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID)) ? queryWrapper.lambda().eq(Jurisdiction::getTenantId, bladeUser.getTenantId()) : queryWrapper);
        return R.data(JurisdictionWrapper.build().listNodeVO(list));
    }
    /**
     * 懒加载列表
     */
    @GetMapping("/lazy-list")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "deptName", value = "部门名称", paramType = "query", dataType = "string"),
        @ApiImplicitParam(name = "fullName", value = "部门全称", paramType = "query", dataType = "string")
    })
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "懒加载列表", notes = "传入dept")
    public R<List<JurisdictionVO>> lazyList(@ApiIgnore @RequestParam Map<String, Object> dept, Long parentId, BladeUser bladeUser) {
        List<JurisdictionVO> list = jurisdictionService.lazyList(bladeUser.getTenantId(), parentId, dept);
        return R.data(JurisdictionWrapper.build().listNodeLazyVO(list));
    }
    /**
     * 获取部门树形结构
     */
    @GetMapping("/tree")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "树形结构", notes = "树形结构")
    public R<List<JurisdictionVO>> tree(String tenantId, BladeUser bladeUser) {
        List<JurisdictionVO> tree = jurisdictionService.tree(Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()));
        return R.data(tree);
    }
    /**
     * 懒加载获取部门树形结构
     */
    @GetMapping("/lazy-tree")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "懒加载树形结构", notes = "树形结构")
    public R<List<JurisdictionVO>> lazyTree(String tenantId, Long parentId, BladeUser bladeUser) {
        List<JurisdictionVO> tree = jurisdictionService.lazyTree(Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()), parentId);
        return R.data(tree);
    }
    /**
     * 懒加载获取部门树形结构
     */
    @GetMapping("/lazy-trees")
    @ApiOperation(value = "懒加载树形结构", notes = "树形结构")
    public R<List<JurisdictionVO>> lazyTrees() {
        List<JurisdictionVO> tree = jurisdictionService.lazyTrees();
        return R.data(tree);
    }
    /**
     * 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入dept")
    public R submit(@Valid @RequestBody Jurisdiction jurisdiction) {
        if (jurisdictionService.submit(jurisdiction)) {
            CacheUtil.clear(SYS_CACHE);
            // 返回懒加载树更新节点所需字段
            Kv kv = Kv.create().set("id", String.valueOf(jurisdiction.getId())).set("tenantId", jurisdiction.getTenantId());
            return R.data(kv);
        }
        return R.fail("操作失败");
    }
    /**
     * 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        CacheUtil.clear(SYS_CACHE);
        return R.status(jurisdictionService.removeDept(ids));
    }
}
src/main/java/org/springblade/modules/jurisdiction/dto/JurisdictionDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.jurisdiction.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.modules.jurisdiction.entity.Jurisdiction;
import org.springblade.modules.system.entity.Dept;
/**
 * 数据传输对象实体类
 *
 * @author Chill
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class JurisdictionDTO extends Jurisdiction {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/jurisdiction/entity/Jurisdiction.java
New file
@@ -0,0 +1,96 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.jurisdiction.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
 * 实体类
 *
 * @author Chill
 */
@Data
@TableName("sys_jurisdiction")
@ApiModel(value = "jurisdiction对象", description = "jurisdiction对象")
public class Jurisdiction implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    private String tenantId;
    /**
     * 父主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "父主键")
    private Long parentId;
    /**
     * 机构全称
     */
    @ApiModelProperty(value = "机构全称")
    private String fullName;
    /**
     * 机构名
     */
    @ApiModelProperty(value = "机构名")
    private String deptName;
    /**
     * 祖级机构主键
     */
    @ApiModelProperty(value = "祖级机构主键")
    private String ancestors;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;
    /**
     * 是否已删除
     */
    @TableLogic
    @ApiModelProperty(value = "是否已删除")
    private Integer isDeleted;
}
src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.java
New file
@@ -0,0 +1,77 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.jurisdiction.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springblade.modules.jurisdiction.entity.Jurisdiction;
import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
import org.springblade.modules.system.entity.Dept;
import org.springblade.modules.system.vo.DeptVO;
import java.util.List;
import java.util.Map;
/**
 * Mapper 接口
 *
 * @author Chill
 */
public interface JurisdictionMapper extends BaseMapper<Jurisdiction> {
    /**
     * 懒加载部门列表
     *
     * @param tenantId
     * @param parentId
     * @param param
     * @return
     */
    List<JurisdictionVO> lazyList(String tenantId, Long parentId, Map<String, Object> param);
    /**
     * 获取树形节点
     *
     * @param tenantId
     * @return
     */
    List<JurisdictionVO> tree(String tenantId);
    /**
     * 懒加载获取树形节点
     *
     * @param tenantId
     * @param parentId
     * @return
     */
    List<JurisdictionVO> lazyTree(String tenantId, Long parentId);
    /**
     * 懒加载获取树形节点
     *
     * @return
     */
    List<JurisdictionVO> lazyTrees();
    /**
     * 获取部门名
     *
     * @param ids
     * @return
     */
    List<String> getDeptNames(Long[] ids);
}
src/main/java/org/springblade/modules/jurisdiction/mapper/JurisdictionMapper.xml
New file
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.jurisdiction.mapper.JurisdictionMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="deptResultMap" type="org.springblade.modules.jurisdiction.entity.Jurisdiction">
        <id column="id" property="id"/>
        <result column="parent_id" property="parentId"/>
        <result column="dept_name" property="deptName"/>
        <result column="full_name" property="fullName"/>
        <result column="ancestors" property="ancestors"/>
        <result column="remark" property="remark"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <resultMap id="deptVOResultMap" type="org.springblade.modules.jurisdiction.vo.JurisdictionVO">
        <id column="id" property="id"/>
        <result column="parent_id" property="parentId"/>
        <result column="dept_name" property="deptName"/>
        <result column="full_name" property="fullName"/>
        <result column="ancestors" property="ancestors"/>
        <result column="remark" property="remark"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="has_children" property="hasChildren"/>
    </resultMap>
    <resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode">
        <id column="id" property="id"/>
        <result column="parent_id" property="parentId"/>
        <result column="title" property="title"/>
        <result column="value" property="value"/>
        <result column="key" property="key"/>
        <result column="has_children" property="hasChildren"/>
    </resultMap>
    <select id="lazyList" resultMap="deptVOResultMap">
        SELECT
            dept.* ,
            (
                SELECT
                    CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
                FROM
        sys_jurisdiction
                WHERE
                    parent_id = dept.id and is_deleted = 0
            ) AS "has_children"
        FROM
        sys_jurisdiction dept
        WHERE dept.is_deleted = 0
        <if test="param1!=null and param1!=''">
            and dept.tenant_id = #{param1}
        </if>
        <if test="param2!=null">
            and dept.parent_id = #{param2}
        </if>
        <if test="param3.deptName!=null and param3.deptName!=''">
            and dept.dept_name like concat(concat('%', #{param3.deptName}),'%')
        </if>
        <if test="param3.fullName!=null and param3.fullName!=''">
            and dept.full_name like concat(concat('%', #{param3.fullName}),'%')
        </if>
    </select>
    <select id="tree" resultMap="treeNodeResultMap">
        select id, parent_id, dept_name as title, id as "value", id as "key" from sys_jurisdiction where is_deleted = 0
        <if test="_parameter!=null and _parameter!=''">
            and tenant_id = #{_parameter}
        </if>
    </select>
    <select id="lazyTree" resultMap="treeNodeResultMap" >
        SELECT
            dept.id,
            dept.parent_id,
            dept.dept_name AS title,
            dept.id AS "value",
            dept.id AS "key",
            (
                SELECT
                    CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
                FROM
        sys_jurisdiction
                WHERE
                    parent_id = dept.id and is_deleted = 0
            ) AS "has_children"
        FROM
        sys_jurisdiction dept
        WHERE dept.is_deleted = 0
        <if test="param1!=null and param1!=''">
            and dept.tenant_id = #{param1}
        </if>
    </select>
    <select id="lazyTrees" resultMap="treeNodeResultMap" >
        SELECT
        dept.id,
        dept.parent_id,
        dept.dept_name AS title,
        dept.id AS "value",
        dept.id AS "key",
        (
        SELECT
        CASE WHEN count(1) > 0 THEN 1 ELSE 0 END
        FROM
            sys_jurisdiction
        WHERE
        parent_id = dept.id and is_deleted = 0
        ) AS "has_children"
        FROM
            sys_jurisdiction dept
        WHERE dept.is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/jurisdiction/service/JurisdictionService.java
New file
@@ -0,0 +1,82 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.jurisdiction.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.jurisdiction.entity.Jurisdiction;
import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
import java.util.List;
import java.util.Map;
/**
 * 服务类
 *
 * @author Chill
 */
public interface JurisdictionService extends IService<Jurisdiction> {
    /**
     * 懒加载部门列表
     *
     * @param tenantId
     * @param parentId
     * @param param
     * @return
     */
    List<JurisdictionVO> lazyList(String tenantId, Long parentId, Map<String, Object> param);
    /**
     * 树形结构
     *
     * @param tenantId
     * @return
     */
    List<JurisdictionVO> tree(String tenantId);
    /**
     * 懒加载树形结构
     *
     * @param tenantId
     * @param parentId
     * @return
     */
    List<JurisdictionVO> lazyTree(String tenantId, Long parentId);
    /**
     * 懒加载获取树形节点
     *
     * @return
     */
    List<JurisdictionVO> lazyTrees();
    /**
     * 删除部门
     *
     * @param ids
     * @return
     */
    boolean removeDept(String ids);
    /**
     * 提交
     *
     * @param
     * @return
     */
    boolean submit(Jurisdiction jurisdiction);
}
src/main/java/org/springblade/modules/jurisdiction/service/impl/JurisdictionServiceImpl.java
New file
@@ -0,0 +1,121 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.jurisdiction.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.common.cache.SysCache;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.node.ForestNodeMerger;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.StringPool;
import org.springblade.modules.jurisdiction.entity.Jurisdiction;
import org.springblade.modules.jurisdiction.mapper.JurisdictionMapper;
import org.springblade.modules.jurisdiction.service.JurisdictionService;
import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
import org.springblade.modules.system.entity.Dept;
import org.springblade.modules.system.mapper.DeptMapper;
import org.springblade.modules.system.service.IDeptService;
import org.springblade.modules.system.vo.DeptVO;
import org.springblade.modules.system.wrapper.DeptWrapper;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
 * 服务实现类
 *
 * @author Chill
 */
@Service
public class JurisdictionServiceImpl extends ServiceImpl<JurisdictionMapper, Jurisdiction> implements JurisdictionService {
    private static final String TENANT_ID = "tenantId";
    private static final String PARENT_ID = "parentId";
    @Override
    public List<JurisdictionVO> lazyList(String tenantId, Long parentId, Map<String, Object> param) {
        // 设置租户ID
        if (AuthUtil.isAdministrator()) {
            tenantId = StringPool.EMPTY;
        }
        String paramTenantId = Func.toStr(param.get(TENANT_ID));
        if (Func.isNotEmpty(paramTenantId) && AuthUtil.isAdministrator()) {
            tenantId = paramTenantId;
        }
        // 判断点击搜索但是没有查询条件的情况
        if (Func.isEmpty(param.get(PARENT_ID)) && param.size() == 1) {
            parentId = 0L;
        }
        // 判断点击搜索带有查询条件的情况
        if (Func.isEmpty(param.get(PARENT_ID)) && param.size() > 1 && Func.toLong(parentId) == 0L) {
            parentId = null;
        }
        return baseMapper.lazyList(tenantId, parentId, param);
    }
    @Override
    public List<JurisdictionVO> tree(String tenantId) {
        return ForestNodeMerger.merge(baseMapper.tree(tenantId));
    }
    @Override
    public List<JurisdictionVO> lazyTree(String tenantId, Long parentId) {
        if (AuthUtil.isAdministrator()) {
            tenantId = StringPool.EMPTY;
        }
        return ForestNodeMerger.merge(baseMapper.lazyTree(tenantId, parentId));
    }
    @Override
    public List<JurisdictionVO> lazyTrees() {
        return  ForestNodeMerger.merge(baseMapper.lazyTrees());
    }
    @Override
    public boolean removeDept(String ids) {
        return removeByIds(Func.toLongList(ids));
    }
    @Override
    public boolean submit(Jurisdiction dept) {
        if (Func.isEmpty(dept.getParentId())) {
            dept.setTenantId(AuthUtil.getTenantId());
            dept.setParentId(BladeConstant.TOP_PARENT_ID);
            dept.setAncestors(String.valueOf(BladeConstant.TOP_PARENT_ID));
        }
        if (dept.getParentId() > 0) {
            Jurisdiction parent = getById(dept.getParentId());
            if (Func.toLong(dept.getParentId()) == Func.toLong(dept.getId())) {
                throw new ServiceException("父节点不可选择自身!");
            }
            dept.setTenantId(parent.getTenantId());
            String ancestors = parent.getAncestors() + StringPool.COMMA + dept.getParentId();
            dept.setAncestors(ancestors);
        }
        dept.setIsDeleted(BladeConstant.DB_NOT_DELETED);
        return saveOrUpdate(dept);
    }
}
src/main/java/org/springblade/modules/jurisdiction/vo/JurisdictionVO.java
New file
@@ -0,0 +1,80 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.jurisdiction.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tool.node.INode;
import org.springblade.modules.system.entity.Dept;
import java.util.ArrayList;
import java.util.List;
/**
 * 视图实体类
 *
 * @author Chill
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "DeptVO对象", description = "DeptVO对象")
public class JurisdictionVO extends Dept implements INode<JurisdictionVO> {
    private static final long serialVersionUID = 1L;
    /**
     * 主键ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 父节点ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;
    /**
     * 子孙节点
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<JurisdictionVO> children;
    /**
     * 是否有子孙节点
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Boolean hasChildren;
    @Override
    public List<JurisdictionVO> getChildren() {
        if (this.children == null) {
            this.children = new ArrayList<>();
        }
        return this.children;
    }
    /**
     * 上级机构
     */
    private String parentName;
}
src/main/java/org/springblade/modules/jurisdiction/wrapper/JurisdictionWrapper.java
New file
@@ -0,0 +1,72 @@
/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.jurisdiction.wrapper;
import org.springblade.common.cache.DictCache;
import org.springblade.common.cache.SysCache;
import org.springblade.common.enums.DictEnum;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.node.ForestNodeMerger;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.jurisdiction.entity.Jurisdiction;
import org.springblade.modules.jurisdiction.vo.JurisdictionVO;
import org.springblade.modules.system.entity.Dept;
import org.springblade.modules.system.vo.DeptVO;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
 * 包装类,返回视图层所需的字段
 *
 * @author Chill
 */
public class JurisdictionWrapper extends BaseEntityWrapper<Jurisdiction, JurisdictionVO> {
    public static JurisdictionWrapper build() {
        return new JurisdictionWrapper();
    }
    @Override
    public JurisdictionVO entityVO(Jurisdiction jurisdiction) {
        JurisdictionVO jurisdictionVO = Objects.requireNonNull(BeanUtil.copy(jurisdiction, JurisdictionVO.class));
        if (Func.equals(jurisdiction.getParentId(), BladeConstant.TOP_PARENT_ID)) {
            jurisdictionVO.setParentName(BladeConstant.TOP_PARENT_NAME);
        } else {
            Dept parent = SysCache.getDept(jurisdiction.getParentId());
            jurisdictionVO.setParentName(parent.getDeptName());
        }
        return jurisdictionVO;
    }
    public List<JurisdictionVO> listNodeVO(List<Jurisdiction> list) {
        List<JurisdictionVO> collect = list.stream().map(dept -> {
            JurisdictionVO deptVO = BeanUtil.copy(dept, JurisdictionVO.class);
            return deptVO;
        }).collect(Collectors.toList());
        return ForestNodeMerger.merge(collect);
    }
    public List<JurisdictionVO> listNodeLazyVO(List<JurisdictionVO> list) {
        List<JurisdictionVO> collect = list.stream().peek(dept -> {
            String category = DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory());
        }).collect(Collectors.toList());
        return ForestNodeMerger.merge(collect);
    }
}
src/main/java/org/springblade/modules/permit/controller/PermitController.java
@@ -42,7 +42,7 @@
 */
@RestController
@AllArgsConstructor
@RequestMapping("blade-permit/permit")
@RequestMapping("/permit")
@Api(value = "", tags = "接口")
public class PermitController extends BladeController {
@@ -60,7 +60,7 @@
    }
    /**
     * 分页
     * 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
@@ -71,7 +71,7 @@
    }
    /**
     * 自定义分页
     * 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
@@ -82,7 +82,7 @@
    }
    /**
     * 新增
     * 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
@@ -92,7 +92,7 @@
    }
    /**
     * 修改
     * 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
@@ -102,7 +102,7 @@
    }
    /**
     * 新增或修改
     * 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
@@ -111,9 +111,9 @@
        return R.status(permitService.saveOrUpdate(permit));
    }
    /**
     * 删除
     * 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 8)
@@ -122,5 +122,5 @@
        return R.status(permitService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/permit/entity/Permit.java
@@ -18,14 +18,21 @@
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 实体类
@@ -41,100 +48,96 @@
    private static final long serialVersionUID = 1L;
    /**
    * 统一社会信用代码
    */
        @ApiModelProperty(value = "统一社会信用代码")
        @TableField("creditCode")
     * 统一社会信用代码
     */
    @ApiModelProperty(value = "统一社会信用代码")
    @TableField("creditCode")
    private String creditcode;
    /**
    * 企业名称
    */
        @ApiModelProperty(value = "企业名称")
        @TableField("enterpriseName")
     * 企业名称
     */
    @ApiModelProperty(value = "企业名称")
    @TableField("enterpriseName")
    private String enterprisename;
    /**
    * 法定代表人
    */
        @ApiModelProperty(value = "法定代表人")
        private String representative;
     * 法定代表人
     */
    @ApiModelProperty(value = "法定代表人")
    private String representative;
    /**
    * 登记状态
    */
        @ApiModelProperty(value = "登记状态")
        private String
regstsat;
     * 成立日期
     */
    @ApiModelProperty(value = "成立日期")
    @TableField("establishTime")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date establishtime;
    /**
    * 成立日期
    */
        @ApiModelProperty(value = "成立日期")
        @TableField("establishTime")
    private LocalDateTime establishtime;
    /**
    * 注册资本
    */
        @ApiModelProperty(value = "注册资本")
        @TableField("registeredCapital")
     * 注册资本
     */
    @ApiModelProperty(value = "注册资本")
    @TableField("registeredCapital")
    private String registeredcapital;
    /**
    * 实缴资本
    */
        @ApiModelProperty(value = "实缴资本")
        private String capital;
    /**
    * 组织机构代码
    */
        @ApiModelProperty(value = "组织机构代码")
        @TableField("organizationCode")
     * 组织机构代码
     */
    @ApiModelProperty(value = "组织机构代码")
    @TableField("organizationCode")
    private String organizationcode;
    /**
    * 工商注册号
    */
        @ApiModelProperty(value = "工商注册号")
        @TableField("registrationNumber")
     * 工商注册号
     */
    @ApiModelProperty(value = "工商注册号")
    @TableField("registrationNumber")
    private String registrationnumber;
    /**
    * 纳税人识别号
    */
        @ApiModelProperty(value = "纳税人识别号")
        @TableField("identificationNumber")
     * 纳税人识别号
     */
    @ApiModelProperty(value = "纳税人识别号")
    @TableField("identificationNumber")
    private String identificationnumber;
    /**
    * 企业类型
    */
        @ApiModelProperty(value = "企业类型")
        private String enterprises;
     * 企业类型
     */
    @ApiModelProperty(value = "企业类型")
    private String enterprises;
    /**
    * 注册地址
    */
        @ApiModelProperty(value = "注册地址")
        private String address;
     * 注册地址
     */
    @ApiModelProperty(value = "注册地址")
    private String address;
    /**
    * 经营范围
    */
        @ApiModelProperty(value = "经营范围")
        private String business;
     * 经营范围
     */
    @ApiModelProperty(value = "经营范围")
    private String business;
    /**
    * 所属地区
    */
        @ApiModelProperty(value = "所属地区")
        private String region;
     * 所属地区
     */
    @ApiModelProperty(value = "所属地区")
    private String region;
    /**
    * 登记机关
    */
        @ApiModelProperty(value = "登记机关")
        private String registration;
     * 登记机关
     */
    @ApiModelProperty(value = "登记机关")
    private String registration;
    /**
    * 所属行业
    */
        @ApiModelProperty(value = "所属行业")
        private String industry;
     * 所属行业
     */
    @ApiModelProperty(value = "所属行业")
    private String industry;
    /**
    * 审核状态 0:审核通过 1:审核不通过 2: 审核中
    */
        @ApiModelProperty(value = "审核状态 0:审核通过 1:审核不通过 2: 审核中")
        private String type;
     * 审核状态 0:审核通过 1:审核不通过 2: 审核中
     */
    @ApiModelProperty(value = "审核状态 0:审核通过 1:审核不通过 2: 审核中")
    private String type;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "提交时间")
    @TableField("establishTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date permitime;
}
src/main/java/org/springblade/modules/permit/mapper/PermitMapper.xml
@@ -8,12 +8,8 @@
        <result column="creditCode" property="creditcode"/>
        <result column="enterpriseName" property="enterprisename"/>
        <result column="representative" property="representative"/>
        <result column="
regstsat" property="
regstsat"/>
        <result column="establishTime" property="establishtime"/>
        <result column="registeredCapital" property="registeredcapital"/>
        <result column="capital" property="capital"/>
        <result column="organizationCode" property="organizationcode"/>
        <result column="registrationNumber" property="registrationnumber"/>
        <result column="identificationNumber" property="identificationnumber"/>
@@ -24,11 +20,12 @@
        <result column="registration" property="registration"/>
        <result column="industry" property="industry"/>
        <result column="type" property="type"/>
        <result column="permitime" property="permitime"/>
    </resultMap>
    <select id="selectPermitPage" resultMap="permitResultMap">
        select * from sys_permit where is_deleted = 0
        select * from sys_permit
    </select>
</mapper>
src/main/java/org/springblade/modules/record/entity/Record.java
@@ -18,14 +18,21 @@
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 实体类
@@ -41,113 +48,107 @@
    private static final long serialVersionUID = 1L;
    /**
    * 统一社会信用代码
    */
        @ApiModelProperty(value = "统一社会信用代码")
        @TableField("creditCode")
     * 统一社会信用代码
     */
    @ApiModelProperty(value = "统一社会信用代码")
    @TableField("creditCode")
    private String creditcode;
    /**
    * 企业名称
    */
        @ApiModelProperty(value = "企业名称")
        @TableField("enterpriseName")
     * 企业名称
     */
    @ApiModelProperty(value = "企业名称")
    @TableField("enterpriseName")
    private String enterprisename;
    /**
    * 法定代表人
    */
        @ApiModelProperty(value = "法定代表人")
        private String representative;
     * 法定代表人
     */
    @ApiModelProperty(value = "法定代表人")
    private String representative;
    /**
    * 登记状态
    */
        @ApiModelProperty(value = "登记状态")
        private String
regstsat;
     * 成立日期
     */
    @ApiModelProperty(value = "成立日期")
    @TableField("establishTime")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date establishtime;
    /**
    * 成立日期
    */
        @ApiModelProperty(value = "成立日期")
        @TableField("establishTime")
    private LocalDateTime establishtime;
    /**
    * 注册资本
    */
        @ApiModelProperty(value = "注册资本")
        @TableField("registeredCapital")
     * 注册资本
     */
    @ApiModelProperty(value = "注册资本")
    @TableField("registeredCapital")
    private String registeredcapital;
    /**
    * 实缴资本
    */
        @ApiModelProperty(value = "实缴资本")
        private String capital;
    /**
    * 组织机构代码
    */
        @ApiModelProperty(value = "组织机构代码")
        @TableField("organizationCode")
     * 组织机构代码
     */
    @ApiModelProperty(value = "组织机构代码")
    @TableField("organizationCode")
    private String organizationcode;
    /**
    * 工商注册号
    */
        @ApiModelProperty(value = "工商注册号")
        @TableField("registrationNumber")
     * 工商注册号
     */
    @ApiModelProperty(value = "工商注册号")
    @TableField("registrationNumber")
    private String registrationnumber;
    /**
    * 纳税人识别号
    */
        @ApiModelProperty(value = "纳税人识别号")
        @TableField("identificationNumber")
     * 纳税人识别号
     */
    @ApiModelProperty(value = "纳税人识别号")
    @TableField("identificationNumber")
    private String identificationnumber;
    /**
    * 企业类型
    */
        @ApiModelProperty(value = "企业类型")
        private String enterprises;
     * 企业类型
     */
    @ApiModelProperty(value = "企业类型")
    private String enterprises;
    /**
    * 注册地址
    */
        @ApiModelProperty(value = "注册地址")
        private String address;
     * 注册地址
     */
    @ApiModelProperty(value = "注册地址")
    private String address;
    /**
    * 经营范围
    */
        @ApiModelProperty(value = "经营范围")
        private String business;
     * 经营范围
     */
    @ApiModelProperty(value = "经营范围")
    private String business;
    /**
    * 所属地区
    */
        @ApiModelProperty(value = "所属地区")
        private String region;
     * 所属地区
     */
    @ApiModelProperty(value = "所属地区")
    private String region;
    /**
    * 登记机关
    */
        @ApiModelProperty(value = "登记机关")
        private String registration;
     * 登记机关
     */
    @ApiModelProperty(value = "登记机关")
    private String registration;
    /**
    * 所属行业
    */
        @ApiModelProperty(value = "所属行业")
        private String industry;
     * 所属行业
     */
    @ApiModelProperty(value = "所属行业")
    private String industry;
    /**
    * 状态 0:审核通过 1:审核不通过 2: 审核中
    */
        @ApiModelProperty(value = "状态 0:审核通过 1:审核不通过 2: 审核中")
        private String type;
     * 状态 0:审核通过 1:审核不通过 2: 审核中
     */
    @ApiModelProperty(value = "状态 0:审核通过 1:审核不通过 2: 审核中")
    private String type;
    /**
    * 保安服务单位许可编号
    */
        @ApiModelProperty(value = "保安服务单位许可编号")
        private String perid;
     * 保安服务单位许可编号
     */
    @ApiModelProperty(value = "保安服务单位许可编号")
    private String perid;
    /**
    * 许可发证机关
    */
        @ApiModelProperty(value = "许可发证机关")
        private String offices;
     * 许可发证机关
     */
    @ApiModelProperty(value = "许可发证机关")
    private String offices;
    /**
    * 发证时间
    */
        @ApiModelProperty(value = "发证时间")
        private LocalDateTime officetime;
     * 发证时间
     */
    @ApiModelProperty(value = "发证时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date officetime;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
src/main/java/org/springblade/modules/record/mapper/RecordMapper.xml
@@ -8,12 +8,8 @@
        <result column="creditCode" property="creditcode"/>
        <result column="enterpriseName" property="enterprisename"/>
        <result column="representative" property="representative"/>
        <result column="
regstsat" property="
regstsat"/>
        <result column="establishTime" property="establishtime"/>
        <result column="registeredCapital" property="registeredcapital"/>
        <result column="capital" property="capital"/>
        <result column="organizationCode" property="organizationcode"/>
        <result column="registrationNumber" property="registrationnumber"/>
        <result column="identificationNumber" property="identificationnumber"/>
@@ -31,7 +27,7 @@
    <select id="selectRecordPage" resultMap="recordResultMap">
        select * from sys_record where is_deleted = 0
        select * from sys_record
    </select>
</mapper>
src/main/java/org/springblade/modules/recordk/entity/Recordk.java
@@ -18,14 +18,21 @@
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 实体类
@@ -41,113 +48,107 @@
    private static final long serialVersionUID = 1L;
    /**
    * 统一社会信用代码
    */
        @ApiModelProperty(value = "统一社会信用代码")
        @TableField("creditCode")
     * 统一社会信用代码
     */
    @ApiModelProperty(value = "统一社会信用代码")
    @TableField("creditCode")
    private String creditcode;
    /**
    * 企业名称
    */
        @ApiModelProperty(value = "企业名称")
        @TableField("enterpriseName")
     * 企业名称
     */
    @ApiModelProperty(value = "企业名称")
    @TableField("enterpriseName")
    private String enterprisename;
    /**
    * 法定代表人
    */
        @ApiModelProperty(value = "法定代表人")
        private String representative;
     * 法定代表人
     */
    @ApiModelProperty(value = "法定代表人")
    private String representative;
    /**
    * 登记状态
    */
        @ApiModelProperty(value = "登记状态")
        private String
regstsat;
     * 成立日期
     */
    @ApiModelProperty(value = "成立日期")
    @TableField("establishTime")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date establishtime;
    /**
    * 成立日期
    */
        @ApiModelProperty(value = "成立日期")
        @TableField("establishTime")
    private LocalDateTime establishtime;
    /**
    * 注册资本
    */
        @ApiModelProperty(value = "注册资本")
        @TableField("registeredCapital")
     * 注册资本
     */
    @ApiModelProperty(value = "注册资本")
    @TableField("registeredCapital")
    private String registeredcapital;
    /**
    * 实缴资本
    */
        @ApiModelProperty(value = "实缴资本")
        private String capital;
    /**
    * 组织机构代码
    */
        @ApiModelProperty(value = "组织机构代码")
        @TableField("organizationCode")
     * 组织机构代码
     */
    @ApiModelProperty(value = "组织机构代码")
    @TableField("organizationCode")
    private String organizationcode;
    /**
    * 工商注册号
    */
        @ApiModelProperty(value = "工商注册号")
        @TableField("registrationNumber")
     * 工商注册号
     */
    @ApiModelProperty(value = "工商注册号")
    @TableField("registrationNumber")
    private String registrationnumber;
    /**
    * 纳税人识别号
    */
        @ApiModelProperty(value = "纳税人识别号")
        @TableField("identificationNumber")
     * 纳税人识别号
     */
    @ApiModelProperty(value = "纳税人识别号")
    @TableField("identificationNumber")
    private String identificationnumber;
    /**
    * 企业类型
    */
        @ApiModelProperty(value = "企业类型")
        private String enterprises;
     * 企业类型
     */
    @ApiModelProperty(value = "企业类型")
    private String enterprises;
    /**
    * 注册地址
    */
        @ApiModelProperty(value = "注册地址")
        private String address;
     * 注册地址
     */
    @ApiModelProperty(value = "注册地址")
    private String address;
    /**
    * 经营范围
    */
        @ApiModelProperty(value = "经营范围")
        private String business;
     * 经营范围
     */
    @ApiModelProperty(value = "经营范围")
    private String business;
    /**
    * 所属地区
    */
        @ApiModelProperty(value = "所属地区")
        private String region;
     * 所属地区
     */
    @ApiModelProperty(value = "所属地区")
    private String region;
    /**
    * 登记机关
    */
        @ApiModelProperty(value = "登记机关")
        private String registration;
     * 登记机关
     */
    @ApiModelProperty(value = "登记机关")
    private String registration;
    /**
    * 所属行业
    */
        @ApiModelProperty(value = "所属行业")
        private String industry;
     * 所属行业
     */
    @ApiModelProperty(value = "所属行业")
    private String industry;
    /**
    * 状态 0:审核通过 1:审核不通过 2: 审核中
    */
        @ApiModelProperty(value = "状态 0:审核通过 1:审核不通过 2: 审核中")
        private String type;
     * 状态 0:审核通过 1:审核不通过 2: 审核中
     */
    @ApiModelProperty(value = "状态 0:审核通过 1:审核不通过 2: 审核中")
    private String type;
    /**
    * 保安服务单位许可编号
    */
        @ApiModelProperty(value = "保安服务单位许可编号")
        private String perid;
     * 保安服务单位许可编号
     */
    @ApiModelProperty(value = "保安服务单位许可编号")
    private String perid;
    /**
    * 许可发证机关
    */
        @ApiModelProperty(value = "许可发证机关")
        private String offices;
     * 许可发证机关
     */
    @ApiModelProperty(value = "许可发证机关")
    private String offices;
    /**
    * 发证时间
    */
        @ApiModelProperty(value = "发证时间")
        private LocalDateTime officetime;
     * 发证时间
     */
    @ApiModelProperty(value = "发证时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date officetime;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
src/main/java/org/springblade/modules/recordk/mapper/RecordkMapper.xml
@@ -8,12 +8,8 @@
        <result column="creditCode" property="creditcode"/>
        <result column="enterpriseName" property="enterprisename"/>
        <result column="representative" property="representative"/>
        <result column="
regstsat" property="
regstsat"/>
        <result column="establishTime" property="establishtime"/>
        <result column="registeredCapital" property="registeredcapital"/>
        <result column="capital" property="capital"/>
        <result column="organizationCode" property="organizationcode"/>
        <result column="registrationNumber" property="registrationnumber"/>
        <result column="identificationNumber" property="identificationnumber"/>
@@ -31,7 +27,7 @@
    <select id="selectRecordkPage" resultMap="recordkResultMap">
        select * from sys_recordk where is_deleted = 0
        select * from sys_recordk
    </select>
</mapper>
src/main/java/org/springblade/modules/revoke/entity/Revoke.java
@@ -18,14 +18,21 @@
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
/**
 * 实体类
@@ -41,105 +48,99 @@
    private static final long serialVersionUID = 1L;
    /**
    * 统一社会信用代码
    */
        @ApiModelProperty(value = "统一社会信用代码")
        @TableField("creditCode")
     * 统一社会信用代码
     */
    @ApiModelProperty(value = "统一社会信用代码")
    @TableField("creditCode")
    private String creditcode;
    /**
    * 企业名称
    */
        @ApiModelProperty(value = "企业名称")
        @TableField("enterpriseName")
     * 企业名称
     */
    @ApiModelProperty(value = "企业名称")
    @TableField("enterpriseName")
    private String enterprisename;
    /**
    * 法定代表人
    */
        @ApiModelProperty(value = "法定代表人")
        private String representative;
     * 法定代表人
     */
    @ApiModelProperty(value = "法定代表人")
    private String representative;
    /**
    * 登记状态
    */
        @ApiModelProperty(value = "登记状态")
        private String
regstsat;
     * 成立日期
     */
    @ApiModelProperty(value = "成立日期")
    @TableField("establishTime")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date establishtime;
    /**
    * 成立日期
    */
        @ApiModelProperty(value = "成立日期")
        @TableField("establishTime")
    private LocalDateTime establishtime;
    /**
    * 注册资本
    */
        @ApiModelProperty(value = "注册资本")
        @TableField("registeredCapital")
     * 注册资本
     */
    @ApiModelProperty(value = "注册资本")
    @TableField("registeredCapital")
    private String registeredcapital;
    /**
    * 实缴资本
    */
        @ApiModelProperty(value = "实缴资本")
        private String capital;
    /**
    * 组织机构代码
    */
        @ApiModelProperty(value = "组织机构代码")
        @TableField("organizationCode")
     * 组织机构代码
     */
    @ApiModelProperty(value = "组织机构代码")
    @TableField("organizationCode")
    private String organizationcode;
    /**
    * 工商注册号
    */
        @ApiModelProperty(value = "工商注册号")
        @TableField("registrationNumber")
     * 工商注册号
     */
    @ApiModelProperty(value = "工商注册号")
    @TableField("registrationNumber")
    private String registrationnumber;
    /**
    * 纳税人识别号
    */
        @ApiModelProperty(value = "纳税人识别号")
        @TableField("identificationNumber")
     * 纳税人识别号
     */
    @ApiModelProperty(value = "纳税人识别号")
    @TableField("identificationNumber")
    private String identificationnumber;
    /**
    * 企业类型
    */
        @ApiModelProperty(value = "企业类型")
        private String enterprises;
     * 企业类型
     */
    @ApiModelProperty(value = "企业类型")
    private String enterprises;
    /**
    * 注册地址
    */
        @ApiModelProperty(value = "注册地址")
        private String address;
     * 注册地址
     */
    @ApiModelProperty(value = "注册地址")
    private String address;
    /**
    * 经营范围
    */
        @ApiModelProperty(value = "经营范围")
        private String business;
     * 经营范围
     */
    @ApiModelProperty(value = "经营范围")
    private String business;
    /**
    * 所属地区
    */
        @ApiModelProperty(value = "所属地区")
        private String region;
     * 所属地区
     */
    @ApiModelProperty(value = "所属地区")
    private String region;
    /**
    * 登记机关
    */
        @ApiModelProperty(value = "登记机关")
        private String registration;
     * 登记机关
     */
    @ApiModelProperty(value = "登记机关")
    private String registration;
    /**
    * 所属行业
    */
        @ApiModelProperty(value = "所属行业")
        private String industry;
     * 所属行业
     */
    @ApiModelProperty(value = "所属行业")
    private String industry;
    /**
    * 状态 0:撤销通过 1:撤销不通过 2: 撤销中
    */
        @ApiModelProperty(value = "状态 0:撤销通过 1:撤销不通过 2: 撤销中")
        private String type;
     * 状态 0:撤销通过 1:撤销不通过 2: 撤销中
     */
    @ApiModelProperty(value = "状态 0:撤销通过 1:撤销不通过 2: 撤销中")
    private String type;
    /**
    * 撤销原因
    */
        @ApiModelProperty(value = "撤销原因")
        private String reason;
     * 撤销原因
     */
    @ApiModelProperty(value = "撤销原因")
    private String reason;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty(value = "撤销日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date ctime;
}
src/main/java/org/springblade/modules/revoke/mapper/RevokeMapper.xml
@@ -8,12 +8,8 @@
        <result column="creditCode" property="creditcode"/>
        <result column="enterpriseName" property="enterprisename"/>
        <result column="representative" property="representative"/>
        <result column="
regstsat" property="
regstsat"/>
        <result column="establishTime" property="establishtime"/>
        <result column="registeredCapital" property="registeredcapital"/>
        <result column="capital" property="capital"/>
        <result column="organizationCode" property="organizationcode"/>
        <result column="registrationNumber" property="registrationnumber"/>
        <result column="identificationNumber" property="identificationnumber"/>
@@ -25,11 +21,12 @@
        <result column="industry" property="industry"/>
        <result column="type" property="type"/>
        <result column="reason" property="reason"/>
        <result column="ctime" property="ctime"/>
    </resultMap>
    <select id="selectRevokePage" resultMap="revokeResultMap">
        select * from sys_revoke where is_deleted = 0
        select * from sys_revoke
    </select>
</mapper>