智慧保安后台管理-外网-验收版本
tangzy
2021-08-03 fcdb97a4fff9ddc274a347eb3c06f00840a8e1a1
1.保安员检查
1 files modified
8 files added
442 ■■■■■ changed files
src/main/java/org/springblade/common/config/BladeConfiguration.java 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/seinspect/controller/SeinspectController.java 130 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/seinspect/dto/SeinspectDTO.java 34 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/seinspect/entity/Seinspect.java 93 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/seinspect/mapper/SeinspectMapper.java 43 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/seinspect/mapper/SeinspectMapper.xml 23 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/seinspect/service/ISeinspectService.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/seinspect/service/impl/SeinspectServiceImpl.java 41 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/seinspect/vo/SeinspectVO.java 36 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/config/BladeConfiguration.java
@@ -71,6 +71,7 @@
        secureRegistry.excludePathPatterns("/equipage/**");
        secureRegistry.excludePathPatterns("/blade-user/**");
        secureRegistry.excludePathPatterns("/trainingRegistration/**");
        secureRegistry.excludePathPatterns("/seinspect/**");
        return secureRegistry;
    }
src/main/java/org/springblade/modules/seinspect/controller/SeinspectController.java
New file
@@ -0,0 +1,130 @@
/*
 *      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.seinspect.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.common.utils.arg;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.seinspect.entity.Seinspect;
import org.springblade.modules.seinspect.service.ISeinspectService;
import org.springblade.modules.seinspect.vo.SeinspectVO;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
 *  控制器
 *
 * @author BladeX
 * @since 2021-08-03 保安员检查
 */
@RestController
@AllArgsConstructor
@RequestMapping("/seinspect")
@Api(value = "", tags = "接口")
public class SeinspectController extends BladeController {
    private final ISeinspectService seinspectService;
    /**
     * 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入seinspect")
    public R<Seinspect> detail(Seinspect seinspect) {
        Seinspect detail = seinspectService.getOne(Condition.getQueryWrapper(seinspect));
        return R.data(detail);
    }
    /**
     * 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入seinspect")
    public R<IPage<Seinspect>> list(Seinspect seinspect, Query query) {
        IPage<Seinspect> pages = seinspectService.page(Condition.getPage(query), Condition.getQueryWrapper(seinspect));
        return R.data(pages);
    }
    /**
     * 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入seinspect")
    public R<IPage<SeinspectVO>> page(SeinspectVO seinspect, Query query) {
        IPage<SeinspectVO> pages = seinspectService.selectSeinspectPage(Condition.getPage(query), seinspect);
        return R.data(pages);
    }
    /**
     * 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入seinspect")
    public R save(@Valid @RequestBody Seinspect seinspect) throws Exception {
        arg.test01(arg.url+"/seinspect/save",seinspect);
        return R.status(seinspectService.save(seinspect));
    }
    /**
     * 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入seinspect")
    public R update(@Valid @RequestBody Seinspect seinspect) throws Exception {
        arg.test01(arg.url+"/seinspect/update",seinspect);
        return R.status(seinspectService.updateById(seinspect));
    }
    /**
     * 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入seinspect")
    public R submit(@Valid @RequestBody Seinspect seinspect) {
        return R.status(seinspectService.saveOrUpdate(seinspect));
    }
    /**
     * 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 8)
    @ApiOperation(value = "删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        arg.sendPostRemoveByIds(arg.url+"/seinspect/remove",ids);
        return R.status(seinspectService.removeByIds(Func.toLongList(ids)));
    }
}
src/main/java/org/springblade/modules/seinspect/dto/SeinspectDTO.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.seinspect.dto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.modules.seinspect.entity.Seinspect;
/**
 * 数据传输对象实体类
 *
 * @author BladeX
 * @since 2021-08-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SeinspectDTO extends Seinspect {
    private static final long serialVersionUID = 1L;
}
src/main/java/org/springblade/modules/seinspect/entity/Seinspect.java
New file
@@ -0,0 +1,93 @@
/*
 *      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.seinspect.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
 * 实体类
 *
 * @author BladeX
 * @since 2021-08-03
 */
@Data
@TableName("sys_seinspect")
@ApiModel(value = "Seinspect对象", description = "Seinspect对象")
public class Seinspect implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 保安员姓名
     */
    @ApiModelProperty(value = "保安员姓名")
    @TableField("realName")
    private String realname;
    /**
     * 保安员身份证号
     */
    @ApiModelProperty(value = "保安员身份证号")
    private String carid;
    /**
     * 保安员单位
     */
    @ApiModelProperty(value = "保安员单位")
    @TableField("sName")
    private String sname;
    /**
     * 检查人姓名
     */
    @ApiModelProperty(value = "检查人姓名")
    private String inspectman;
    /**
     * 检查人单位
     */
    @ApiModelProperty(value = "检查人单位")
    @TableField("deptName")
    private String deptname;
    /**
     * 检查日期
     */
    @ApiModelProperty(value = "检查日期")
    @TableField("reviewTime")
    private String reviewtime;
    /**
     * 检查内容
     */
    @ApiModelProperty(value = "检查内容")
    private String insid;
    /**
     * 检查结果
     */
    @ApiModelProperty(value = "检查结果")
    private String examinationType;
}
src/main/java/org/springblade/modules/seinspect/mapper/SeinspectMapper.java
New file
@@ -0,0 +1,43 @@
/*
 *      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.seinspect.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.seinspect.entity.Seinspect;
import org.springblade.modules.seinspect.vo.SeinspectVO;
import java.util.List;
/**
 *  Mapper 接口
 *
 * @author BladeX
 * @since 2021-08-03
 */
public interface SeinspectMapper extends BaseMapper<Seinspect> {
    /**
     * 自定义分页
     *
     * @param page
     * @param seinspect
     * @return
     */
    List<SeinspectVO> selectSeinspectPage(IPage page, SeinspectVO seinspect);
}
src/main/java/org/springblade/modules/seinspect/mapper/SeinspectMapper.xml
New file
@@ -0,0 +1,23 @@
<?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.seinspect.mapper.SeinspectMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="seinspectResultMap" type="org.springblade.modules.seinspect.entity.Seinspect">
        <id column="id" property="id"/>
        <result column="realName" property="realname"/>
        <result column="carid" property="carid"/>
        <result column="sName" property="sname"/>
        <result column="inspectman" property="inspectman"/>
        <result column="deptName" property="deptname"/>
        <result column="reviewTime" property="reviewtime"/>
        <result column="insid" property="insid"/>
        <result column="examination_type" property="examinationType"/>
    </resultMap>
    <select id="selectSeinspectPage" resultMap="seinspectResultMap">
        select * from sys_seinspect where is_deleted = 0
    </select>
</mapper>
src/main/java/org/springblade/modules/seinspect/service/ISeinspectService.java
New file
@@ -0,0 +1,41 @@
/*
 *      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.seinspect.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springblade.modules.seinspect.entity.Seinspect;
import org.springblade.modules.seinspect.vo.SeinspectVO;
/**
 *  服务类
 *
 * @author BladeX
 * @since 2021-08-03
 */
public interface ISeinspectService extends IService<Seinspect> {
    /**
     * 自定义分页
     *
     * @param page
     * @param seinspect
     * @return
     */
    IPage<SeinspectVO> selectSeinspectPage(IPage<SeinspectVO> page, SeinspectVO seinspect);
}
src/main/java/org/springblade/modules/seinspect/service/impl/SeinspectServiceImpl.java
New file
@@ -0,0 +1,41 @@
/*
 *      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.seinspect.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.seinspect.entity.Seinspect;
import org.springblade.modules.seinspect.mapper.SeinspectMapper;
import org.springblade.modules.seinspect.service.ISeinspectService;
import org.springblade.modules.seinspect.vo.SeinspectVO;
import org.springframework.stereotype.Service;
/**
 *  服务实现类
 *
 * @author BladeX
 * @since 2021-08-03
 */
@Service
public class SeinspectServiceImpl extends ServiceImpl<SeinspectMapper, Seinspect> implements ISeinspectService {
    @Override
    public IPage<SeinspectVO> selectSeinspectPage(IPage<SeinspectVO> page, SeinspectVO seinspect) {
        return page.setRecords(baseMapper.selectSeinspectPage(page, seinspect));
    }
}
src/main/java/org/springblade/modules/seinspect/vo/SeinspectVO.java
New file
@@ -0,0 +1,36 @@
/*
 *      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.seinspect.vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.modules.seinspect.entity.Seinspect;
/**
 * 视图实体类
 *
 * @author BladeX
 * @since 2021-08-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SeinspectVO对象", description = "SeinspectVO对象")
public class SeinspectVO extends Seinspect {
    private static final long serialVersionUID = 1L;
}