13 files modified
2 files added
| | |
| | | param.put(TokenConstant.NICK_NAME, user.getRealName()); |
| | | param.put(TokenConstant.ROLE_NAME, Func.join(userInfo.getRoles())); |
| | | param.put(TokenConstant.DETAIL, userInfo.getDetail()); |
| | | param.put("jurisdiction", user.getJurisdiction()); |
| | | |
| | | //拼装accessToken |
| | | try { |
| | |
| | | .set(TokenConstant.TOKEN_TYPE, TokenConstant.BEARER) |
| | | .set(TokenConstant.EXPIRES_IN, accessToken.getExpire()) |
| | | .set(TokenConstant.DETAIL, userInfo.getDetail()) |
| | | .set("jurisdiction", user.getJurisdiction()) |
| | | .set(TokenConstant.LICENSE, TokenConstant.LICENSE_NAME); |
| | | } catch (Exception ex) { |
| | | return authInfo.set("error_code", HttpServletResponse.SC_UNAUTHORIZED).set("error_description", ex.getMessage()); |
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | 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.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.coinspect.excel.CoinspectExcel; |
| | | import org.springblade.modules.seinspect.excel.SeinspectExcel; |
| | | import org.springblade.modules.seinspect.vo.SeinspectVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.coinspect.entity.Coinspect; |
| | | import org.springblade.modules.coinspect.vo.CoinspectVO; |
| | | import org.springblade.modules.coinspect.service.ICoinspectService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出单位检查信息 |
| | | */ |
| | | @GetMapping("export-coinspect") |
| | | @ApiOperation(value = "单位检查", notes = "传入coinspect") |
| | | public void exportSeinspect(CoinspectVO coinspect, HttpServletResponse response) { |
| | | List<CoinspectExcel> list = coinspectService.exportCoinspect(coinspect); |
| | | ExcelUtil.export(response, "单位检查数据" + DateUtil.time(), "单位检查数据表", list, CoinspectExcel.class); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.coinspect.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * SeinspectExcel |
| | | * @author zhongrj |
| | | * @since 2021-10-25 |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class CoinspectExcel implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("检查人姓名") |
| | | private String realName; |
| | | |
| | | @ColumnWidth(35) |
| | | @ExcelProperty("被检查人单位名称") |
| | | private String reviewedDeptName; |
| | | |
| | | @ColumnWidth(35) |
| | | @ExcelProperty("检查人单位名称") |
| | | private String examinerDeptName; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("检查日期") |
| | | private Date reviewtime; |
| | | |
| | | @ColumnWidth(35) |
| | | @ExcelProperty("检查内容") |
| | | private String content; |
| | | |
| | | @ColumnWidth(30) |
| | | @ExcelProperty("检查结果") |
| | | private String result; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.coinspect.entity.Coinspect; |
| | | import org.springblade.modules.coinspect.excel.CoinspectExcel; |
| | | import org.springblade.modules.coinspect.vo.CoinspectVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | */ |
| | | List<CoinspectVO> selectCoinspectPage(IPage page, @Param("coinspect") CoinspectVO coinspect); |
| | | |
| | | /** |
| | | * 导出单位检查信息 |
| | | */ |
| | | List<CoinspectExcel> exportCoinspect(@Param("coinspect") CoinspectVO coinspect); |
| | | } |
| | |
| | | <result column="url" property="url"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <!--自定义分页数据--> |
| | | <select id="selectCoinspectPage" resultType="org.springblade.modules.coinspect.vo.CoinspectVO"> |
| | | select |
| | | sc.*, |
| | |
| | | blade_dept bd1 |
| | | on |
| | | bd1.id = sc.reviewed_dept_id |
| | | left join |
| | | sys_information si |
| | | on |
| | | si.departmentid = bu.dept_id |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = si.jurisdiction |
| | | where 1 = 1 |
| | | <if test="coinspect.jurisdiction!=null and coinspect.jurisdiction!='' and coinspect.jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{coinspect.jurisdiction} or sj.parent_id = #{coinspect.jurisdiction}) |
| | | </if> |
| | | <if test="coinspect.realName!=null and coinspect.realName!=''"> |
| | | bu.real_name like concat('%',#{coinspect.realName},'%') |
| | | </if> |
| | | <if test="coinspect.examinerDeptName!=null and coinspect.examinerDeptName!=''"> |
| | | bd.dept_name like concat('%',#{coinspect.examinerDeptName},'%') |
| | | </if> |
| | | <if test="coinspect.reviewedDeptName!=null and coinspect.reviewedDeptName!=''"> |
| | | bd1.dept_name like concat('%',#{coinspect.reviewedDeptName},'%') |
| | | </if> |
| | | <if test="coinspect.results!=null and coinspect.results!=''"> |
| | | sc.results like concat('%',#{coinspect.results},'%') |
| | | </if> |
| | | <if test="coinspect.startTime!=null and coinspect.startTime!=''"> |
| | | and sc.reviewTime >= #{coinspect.startTime} |
| | | </if> |
| | | <if test="coinspect.endTime!=null and coinspect.endTime!=''"> |
| | | and sc.reviewTime <= #{coinspect.endTime} |
| | | </if> |
| | | <if test="coinspect.endTime!=null and coinspect.endTime!=''"> |
| | | and sc.reviewTime <= #{coinspect.endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--导出单位检查信息--> |
| | | <select id="exportCoinspect" resultType="org.springblade.modules.coinspect.excel.CoinspectExcel"> |
| | | select |
| | | bu.real_name realName, |
| | | bd1.dept_name reviewedDeptName, |
| | | bd.dept_name examinerDeptName, |
| | | sc.reviewTime reviewtime, |
| | | sc.content, |
| | | sc.result |
| | | from |
| | | sys_coinspect sc |
| | | left join |
| | | blade_user bu |
| | | on |
| | | bu.id = sc.examiner_id |
| | | left join |
| | | blade_dept bd |
| | | on |
| | | bd.id = sc.examiner_dept_id |
| | | left join |
| | | blade_dept bd1 |
| | | on |
| | | bd1.id = sc.reviewed_dept_id |
| | | where 1 = 1 |
| | | <if test="coinspect.realName!=null and coinspect.realName!=''"> |
| | | bu.real_name like concat('%',#{coinspect.realName},'%') |
| | |
| | | package org.springblade.modules.coinspect.service; |
| | | |
| | | import org.springblade.modules.coinspect.entity.Coinspect; |
| | | import org.springblade.modules.coinspect.excel.CoinspectExcel; |
| | | import org.springblade.modules.coinspect.vo.CoinspectVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 服务类 |
| | |
| | | */ |
| | | IPage<CoinspectVO> selectCoinspectPage(IPage<CoinspectVO> page, CoinspectVO coinspect); |
| | | |
| | | /** |
| | | * 导出单位检查信息 |
| | | */ |
| | | List<CoinspectExcel> exportCoinspect(CoinspectVO coinspect); |
| | | } |
| | |
| | | package org.springblade.modules.coinspect.service.impl; |
| | | |
| | | import org.springblade.modules.coinspect.entity.Coinspect; |
| | | import org.springblade.modules.coinspect.excel.CoinspectExcel; |
| | | import org.springblade.modules.coinspect.vo.CoinspectVO; |
| | | import org.springblade.modules.coinspect.mapper.CoinspectMapper; |
| | | import org.springblade.modules.coinspect.service.ICoinspectService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | |
| | | return page.setRecords(baseMapper.selectCoinspectPage(page, coinspect)); |
| | | } |
| | | |
| | | /** |
| | | * 导出单位检查信息 |
| | | */ |
| | | @Override |
| | | public List<CoinspectExcel> exportCoinspect(CoinspectVO coinspect) { |
| | | return baseMapper.exportCoinspect(coinspect); |
| | | } |
| | | } |
| | |
| | | */ |
| | | private String endTime; |
| | | |
| | | /** |
| | | * 辖区 |
| | | */ |
| | | private String jurisdiction; |
| | | |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private Date ftime; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @TableField("create_user_id") |
| | | private String createUserId; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | 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.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.seinspect.excel.SeinspectExcel; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.seinspect.entity.Seinspect; |
| | | import org.springblade.modules.seinspect.vo.SeinspectVO; |
| | | import org.springblade.modules.seinspect.service.ISeinspectService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | return R.status(seinspectService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 导出保安员检查信息 |
| | | */ |
| | | @GetMapping("export-seinspect") |
| | | @ApiOperation(value = "导出保安员检查", notes = "传入seinspect") |
| | | public void exportSeinspect(SeinspectVO seinspect, HttpServletResponse response) { |
| | | List<SeinspectExcel> list = seinspectService.exportSeinspect(seinspect); |
| | | ExcelUtil.export(response, "保安员检查数据" + DateUtil.time(), "保安员检查数据表", list, SeinspectExcel.class); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * 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.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * SeinspectExcel |
| | | * @author zhongrj |
| | | * @since 2021-10-25 |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class SeinspectExcel implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("保安员姓名") |
| | | private String securityName; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("检查人姓名") |
| | | private String realName; |
| | | |
| | | @ColumnWidth(35) |
| | | @ExcelProperty("检查人单位名称") |
| | | private String examinerDeptName; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("检查日期") |
| | | private Date reviewtime; |
| | | |
| | | @ColumnWidth(35) |
| | | @ExcelProperty("检查内容") |
| | | private String content; |
| | | |
| | | @ColumnWidth(30) |
| | | @ExcelProperty("检查结果") |
| | | private String result; |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.seinspect.entity.Seinspect; |
| | | import org.springblade.modules.seinspect.excel.SeinspectExcel; |
| | | import org.springblade.modules.seinspect.vo.SeinspectVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | */ |
| | | List<SeinspectVO> selectSeinspectPage(IPage page,@Param("seinspect") SeinspectVO seinspect); |
| | | |
| | | /** |
| | | * 导出保安员检查信息 |
| | | */ |
| | | List<SeinspectExcel> exportSeinspect(@Param("seinspect")SeinspectVO seinspect); |
| | | } |
| | |
| | | bu1.id = ss.security_id |
| | | where 1 = 1 |
| | | <if test="seinspect.realName!=null and seinspect.realName!=''"> |
| | | bu.real_name like concat('%',#{seinspect.realName},'%') |
| | | and bu.real_name like concat('%',#{seinspect.realName},'%') |
| | | </if> |
| | | <if test="seinspect.examinerDeptName!=null and seinspect.examinerDeptName!=''"> |
| | | bd.dept_name like concat('%',#{seinspect.examinerDeptName},'%') |
| | | and bd.dept_name like concat('%',#{seinspect.examinerDeptName},'%') |
| | | </if> |
| | | <if test="seinspect.securityName!=null and seinspect.securityName!=''"> |
| | | bu1.real_name like concat('%',#{seinspect.securityName},'%') |
| | | and bu1.real_name like concat('%',#{seinspect.securityName},'%') |
| | | </if> |
| | | <if test="seinspect.result!=null and seinspect.result!=''"> |
| | | ss.result like concat('%',#{seinspect.result},'%') |
| | | and ss.result like concat('%',#{seinspect.result},'%') |
| | | </if> |
| | | <if test="seinspect.startTime!=null and seinspect.startTime!=''"> |
| | | and ss.reviewTime >= #{seinspect.startTime} |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="exportSeinspect" resultType="org.springblade.modules.seinspect.excel.SeinspectExcel"> |
| | | select |
| | | bu1.real_name securityName, |
| | | bu.real_name realName, |
| | | bd.dept_name examinerDeptName, |
| | | ss.reviewTime reviewtime, |
| | | ss.content, |
| | | ss.result |
| | | from |
| | | sys_seinspect ss |
| | | left join |
| | | blade_user bu |
| | | on |
| | | bu.id = ss.examiner_id |
| | | left join |
| | | blade_dept bd |
| | | on |
| | | bd.id = ss.examiner_dept_id |
| | | left join |
| | | blade_user bu1 |
| | | on |
| | | bu1.id = ss.security_id |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = ss.jurisdiction |
| | | where 1 = 1 |
| | | <if test="seinspect.jurisdiction!=null and seinspect.jurisdiction!='' and seinspect.jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{seinspect.jurisdiction} or sj.parent_id = #{seinspect.jurisdiction}) |
| | | </if> |
| | | <if test="seinspect.realName!=null and seinspect.realName!=''"> |
| | | and bu.real_name like concat('%',#{seinspect.realName},'%') |
| | | </if> |
| | | <if test="seinspect.examinerDeptName!=null and seinspect.examinerDeptName!=''"> |
| | | and bd.dept_name like concat('%',#{seinspect.examinerDeptName},'%') |
| | | </if> |
| | | <if test="seinspect.securityName!=null and seinspect.securityName!=''"> |
| | | and bu1.real_name like concat('%',#{seinspect.securityName},'%') |
| | | </if> |
| | | <if test="seinspect.result!=null and seinspect.result!=''"> |
| | | and ss.result like concat('%',#{seinspect.result},'%') |
| | | </if> |
| | | <if test="seinspect.startTime!=null and seinspect.startTime!=''"> |
| | | and ss.reviewTime >= #{seinspect.startTime} |
| | | </if> |
| | | <if test="seinspect.endTime!=null and seinspect.endTime!=''"> |
| | | and ss.reviewTime <= #{seinspect.endTime} |
| | | </if> |
| | | <if test="seinspect.reviewtime!=null and seinspect.reviewtime!=''"> |
| | | and ss.reviewTime <= #{seinspect.reviewtime} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | package org.springblade.modules.seinspect.service; |
| | | |
| | | import org.springblade.modules.seinspect.entity.Seinspect; |
| | | import org.springblade.modules.seinspect.excel.SeinspectExcel; |
| | | import org.springblade.modules.seinspect.vo.SeinspectVO; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 服务类 |
| | |
| | | */ |
| | | IPage<SeinspectVO> selectSeinspectPage(IPage<SeinspectVO> page, SeinspectVO seinspect); |
| | | |
| | | /** |
| | | * 导出保安员检查信息 |
| | | */ |
| | | List<SeinspectExcel> exportSeinspect(SeinspectVO seinspect); |
| | | } |
| | |
| | | package org.springblade.modules.seinspect.service.impl; |
| | | |
| | | import org.springblade.modules.seinspect.entity.Seinspect; |
| | | import org.springblade.modules.seinspect.excel.SeinspectExcel; |
| | | import org.springblade.modules.seinspect.vo.SeinspectVO; |
| | | import org.springblade.modules.seinspect.mapper.SeinspectMapper; |
| | | import org.springblade.modules.seinspect.service.ISeinspectService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | |
| | | return page.setRecords(baseMapper.selectSeinspectPage(page, seinspect)); |
| | | } |
| | | |
| | | /** |
| | | * 导出保安员检查信息 |
| | | */ |
| | | @Override |
| | | public List<SeinspectExcel> exportSeinspect(SeinspectVO seinspect) { |
| | | return baseMapper.exportSeinspect(seinspect); |
| | | } |
| | | } |