1.ftp 接收到保安员新增时调用公安接口进行保安员资格审查
2.保安员导出
14 files modified
2 files added
| | |
| | | package org.springblade.modules.FTP; |
| | | |
| | | |
| | | import org.json.JSONArray; |
| | | import org.json.JSONObject; |
| | | import org.springblade.common.utils.InvestigateUtil; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.io.File; |
| | | import java.sql.Connection; |
| | | import java.sql.DriverManager; |
| | | import java.sql.PreparedStatement; |
| | | import java.sql.SQLException; |
| | | import java.util.Date; |
| | | |
| | | import static org.springblade.common.config.FtpConfig.localPath; |
| | | import static org.springblade.common.config.FtpConfig.sqlConnect; |
| | | |
| | | @Component |
| | | public class MysqlCenlint { |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | //声明对象 |
| | | private static MysqlCenlint mysqlCenlint; |
| | | |
| | | /** |
| | | * 初始化 |
| | | */ |
| | | @PostConstruct |
| | | public void init(){ |
| | | mysqlCenlint = this; |
| | | mysqlCenlint.userService = this.userService; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 连接mysql数据库 新增 |
| | |
| | | if (!conn.isClosed ()) { |
| | | System.out.println ( "数据库连接成功:" ); |
| | | String sqls = sql; //sql |
| | | System.out.println("sqls = " + sqls); |
| | | PreparedStatement ps = conn.prepareStatement ( sqls ); |
| | | boolean execute = ps.execute(); |
| | | ps.close (); |
| | |
| | | } catch (SQLException e) { |
| | | e.printStackTrace (); |
| | | } |
| | | try { |
| | | Thread.sleep(300); |
| | | //对比 sql 字符串,如果是是往用户表里插入保安员数据,则调用公安审查接口 |
| | | String insertUserSql = "insert into blade_user"; |
| | | if (sql.contains(insertUserSql)){ |
| | | //如果包含,调用公安接口进行保安员审查 |
| | | getMxaminationSecurityInfo(sql); |
| | | } |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 审查保安员 |
| | | * @param sqls 新增的sql 语句 |
| | | */ |
| | | private static void getMxaminationSecurityInfo(String sqls) { |
| | | //解析sql,读取数据,取出角色,如果是保安员,则审查,如果不是就不审查 |
| | | //获取第一个 ( ) 的位置 |
| | | int a = sqls.indexOf("("); |
| | | int b = sqls.indexOf(")"); |
| | | //获取第二个 ( )的位置 |
| | | a = sqls.indexOf("(",a+1); |
| | | b = sqls.indexOf(")",b+1); |
| | | //截取字符串 |
| | | String subSql = sqls.substring(a, b); |
| | | String[] splitSql = subSql.split(","); |
| | | //读取角色 |
| | | String roleId = splitSql[10]; |
| | | //去除单引号 |
| | | String subRoleId = roleId.substring(1, roleId.length() - 1); |
| | | //如果是保安员 |
| | | if (subRoleId.equals("1412226235153731586")){ |
| | | //读取身份证号 |
| | | String cardid = splitSql[12]; |
| | | //去除单引号 |
| | | String subCardid = cardid.substring(1, cardid.length() - 1); |
| | | User user = new User(); |
| | | String userId = splitSql[0].substring(2, splitSql[0].length() - 1); |
| | | user.setId(Long.parseLong(userId)); |
| | | //远程调用接口 |
| | | String body = InvestigateUtil.httpGetOne(subCardid); |
| | | JSONObject jsonObject = new JSONObject(body); |
| | | Object data = jsonObject.get("data"); |
| | | JSONObject jsonData = new JSONObject(data.toString()); |
| | | JSONArray res = jsonData.getJSONArray("res"); |
| | | //设置审核时间 |
| | | user.setAuditTime(new Date()); |
| | | if (res.length() == 0) { |
| | | //没有数据正常 |
| | | user.setExaminationType("0"); |
| | | } else { |
| | | int count = 0; |
| | | user.setExaminationType("1"); |
| | | for (int i = 0; i < res.length(); i++) { |
| | | if (res.getJSONObject(i).get("zdrylbjh").toString() != null |
| | | && res.getJSONObject(i).get("zdrylbjh").toString() != "" |
| | | && res.getJSONObject(i).get("zdrylbjh").toString() != "null" |
| | | ) { |
| | | user.setExaminationMx(res.getJSONObject(i).get("zdrylbjh").toString()); |
| | | //更新用户数据 |
| | | mysqlCenlint.userService.updateById(user); |
| | | break; |
| | | } |
| | | if (res.getJSONObject(i).get("zdryxlmc").toString() != null |
| | | && res.getJSONObject(i).get("zdryxlmc").toString() != "" |
| | | && res.getJSONObject(i).get("zdryxlmc").toString() != "null" |
| | | ) { |
| | | user.setExaminationMx(res.getJSONObject(i).get("zdryxlmc").toString()); |
| | | //更新用户数据 |
| | | mysqlCenlint.userService.updateById(user); |
| | | break; |
| | | } |
| | | if (res.getJSONObject(i).get("ztrylx").toString() != null |
| | | && res.getJSONObject(i).get("ztrylx").toString() != "" |
| | | && res.getJSONObject(i).get("ztrylx").toString() != "null" |
| | | ) { |
| | | user.setExaminationMx(res.getJSONObject(i).get("ztrylx").toString()); |
| | | //更新用户数据 |
| | | mysqlCenlint.userService.updateById(user); |
| | | break; |
| | | } |
| | | // if (res.getJSONObject(i).get("ajlbmc").toString() != null |
| | | // && res.getJSONObject(i).get("ajlbmc").toString() != "") { |
| | | // user.setExaminationMx(res.getJSONObject(i).get("ajlbmc").toString()); |
| | | // //更新用户数据 |
| | | // userService.updateById(user); |
| | | // break; |
| | | // } |
| | | count++; |
| | | //条件中的数据都为空,则审查为正常 |
| | | if (count==res.length()){ |
| | | //更新用户数据,设为正常 |
| | | user.setExaminationType("0"); |
| | | mysqlCenlint.userService.updateById(user); |
| | | } |
| | | } |
| | | } |
| | | //更新用户数据 |
| | | mysqlCenlint.userService.updateById(user); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | ftp.login(ftpUserName, ftpPassword); |
| | | |
| | | // System.out.println("ftp.getReplyCode() = " + ftp.getReplyCode()); |
| | | System.out.println("ftp.getReplyCode() = " + ftp.getReplyCode()); |
| | | |
| | | // 检验登陆操作的返回码是否正确 |
| | | if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) { |
| | |
| | | */ |
| | | @GetMapping("export-coinspect") |
| | | @ApiOperation(value = "单位检查", notes = "传入coinspect") |
| | | public void exportSeinspect(CoinspectVO coinspect, HttpServletResponse response) { |
| | | public void exportCoinspect(CoinspectVO coinspect, HttpServletResponse response) { |
| | | List<CoinspectExcel> list = coinspectService.exportCoinspect(coinspect); |
| | | ExcelUtil.export(response, "单位检查数据" + DateUtil.time(), "单位检查数据表", list, CoinspectExcel.class); |
| | | } |
| | |
| | | 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},'%') |
| | | and bu.real_name like concat('%',#{coinspect.realName},'%') |
| | | </if> |
| | | <if test="coinspect.examinerDeptName!=null and coinspect.examinerDeptName!=''"> |
| | | bd.dept_name like concat('%',#{coinspect.examinerDeptName},'%') |
| | | and bd.dept_name like concat('%',#{coinspect.examinerDeptName},'%') |
| | | </if> |
| | | <if test="coinspect.reviewedDeptName!=null and coinspect.reviewedDeptName!=''"> |
| | | bd1.dept_name like concat('%',#{coinspect.reviewedDeptName},'%') |
| | | and bd1.dept_name like concat('%',#{coinspect.reviewedDeptName},'%') |
| | | </if> |
| | | <if test="coinspect.results!=null and coinspect.results!=''"> |
| | | sc.results like concat('%',#{coinspect.results},'%') |
| | | and sc.results like concat('%',#{coinspect.results},'%') |
| | | </if> |
| | | <if test="coinspect.startTime!=null and coinspect.startTime!=''"> |
| | | and sc.reviewTime >= #{coinspect.startTime} |
| | |
| | | bd1.dept_name reviewedDeptName, |
| | | bd.dept_name examinerDeptName, |
| | | sc.reviewTime reviewtime, |
| | | sc.content, |
| | | sc.result |
| | | sc.insid content, |
| | | sc.results result |
| | | from |
| | | sys_coinspect sc |
| | | left join |
| | |
| | | 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},'%') |
| | | and bu.real_name like concat('%',#{coinspect.realName},'%') |
| | | </if> |
| | | <if test="coinspect.examinerDeptName!=null and coinspect.examinerDeptName!=''"> |
| | | bd.dept_name like concat('%',#{coinspect.examinerDeptName},'%') |
| | | and bd.dept_name like concat('%',#{coinspect.examinerDeptName},'%') |
| | | </if> |
| | | <if test="coinspect.reviewedDeptName!=null and coinspect.reviewedDeptName!=''"> |
| | | bd1.dept_name like concat('%',#{coinspect.reviewedDeptName},'%') |
| | | and bd1.dept_name like concat('%',#{coinspect.reviewedDeptName},'%') |
| | | </if> |
| | | <if test="coinspect.results!=null and coinspect.results!=''"> |
| | | sc.results like concat('%',#{coinspect.results},'%') |
| | | and sc.results like concat('%',#{coinspect.results},'%') |
| | | </if> |
| | | <if test="coinspect.startTime!=null and coinspect.startTime!=''"> |
| | | and sc.reviewTime >= #{coinspect.startTime} |
| | |
| | | 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.apply.service.ApplyService; |
| | | import org.springblade.modules.exam.entity.ExamScore; |
| | | import org.springblade.modules.exam.excel.ExportExamScoreExcel; |
| | | import org.springblade.modules.exam.service.ExamScoreService; |
| | | import org.springblade.modules.exam.vo.ExamScoreVO; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | |
| | | /** |
| | | * 导出成绩 |
| | | */ |
| | | // @GetMapping("export-examScore") |
| | | // @ApiOperationSupport(order = 14) |
| | | // @ApiOperation(value = "导出成绩") |
| | | // public void exportExamScore(HttpServletResponse response, ExamScoreVO examScoreVO) { |
| | | // //按条件查询成绩数据 |
| | | // List<ExportExamScoreExcel> examScoreExcels = examScoreService.exportExamScoreList(examScoreVO); |
| | | // //导出成绩集合数据 |
| | | // ExcelUtil.export(response, "成绩数据", "成绩数据表", examScoreExcels, ExportExamScoreExcel.class); |
| | | // } |
| | | @GetMapping("export-examScore") |
| | | @ApiOperationSupport(order = 14) |
| | | @ApiOperation(value = "导出成绩") |
| | | public void exportExamScore(HttpServletResponse response,ExamScoreVO examScoreVO) { |
| | | //按条件查询成绩数据 |
| | | List<ExportExamScoreExcel> examScoreExcels = examScoreService.exportExamScoreList(examScoreVO); |
| | | //导出成绩集合数据 |
| | | ExcelUtil.export(response, "成绩数据"+ DateUtil.time(), "成绩数据表", examScoreExcels, ExportExamScoreExcel.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.exam.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; |
| | | |
| | | /** |
| | | * ExamPaymentExcel |
| | | * @author zhongrj |
| | | * @since 2021-10-19 |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class ExportExamScoreExcel implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ColumnWidth(30) |
| | | @ExcelProperty("考试名称") |
| | | private String examName; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("姓名") |
| | | private String securityName; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("身份证号码") |
| | | private String idCardNo; |
| | | |
| | | @ColumnWidth(25) |
| | | @ExcelProperty("所属公司") |
| | | private String companyName; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("考试开始时间") |
| | | private String examTime; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("考试结束时间") |
| | | private String examEndTime; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("理论成绩") |
| | | private Integer theoryGrade; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("实操成绩") |
| | | private Integer learnGrade; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("总成绩") |
| | | private Integer allGrade; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.exam.entity.ExamScore; |
| | | import org.springblade.modules.exam.excel.ExportExamScoreExcel; |
| | | import org.springblade.modules.exam.vo.ExamScoreVO; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | ExamScoreVO selectExamScoreInfo(@Param("examScore") ExamScore examScore); |
| | | |
| | | /** |
| | | * 按条件查询成绩数据 |
| | | * @param examScoreVO |
| | | * @return |
| | | */ |
| | | List<ExportExamScoreExcel> exportExamScoreList(@Param("examScore")ExamScoreVO examScoreVO); |
| | | } |
| | |
| | | and id = #{examScore.id} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!--考试成绩分页信息--> |
| | | <select id="exportExamScoreList" resultType="org.springblade.modules.exam.excel.ExportExamScoreExcel"> |
| | | SELECT |
| | | ke.exam_name examName,bu.real_name securityName,bu.cardid idCardNo, |
| | | bd.dept_name companyName, |
| | | es.exam_time examTime,exam_end_time examEndTime, |
| | | es.theory_grade theoryGrade,es.learn_grade learnGrade, |
| | | all_grade allGrade |
| | | from |
| | | exam_score es |
| | | left join |
| | | ksxt_exam ke |
| | | on |
| | | ke.id = es.exam_id |
| | | left join |
| | | blade_user bu |
| | | on |
| | | es.user_id = bu.id |
| | | left join |
| | | blade_dept bd |
| | | on |
| | | bd.id = bu.dept_id |
| | | left join |
| | | sys_training_registration str |
| | | on |
| | | str.id = es.apply_id |
| | | left join |
| | | sys_information si |
| | | on |
| | | si.departmentid = bd.id |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = si.jurisdiction |
| | | where |
| | | 1=1 |
| | | and (str.is_exam = 2 or str.is_exam = 3) |
| | | <if test="examScore.jurisdiction!=null and examScore.jurisdiction!='' and examScore.jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{coinspect.jurisdiction} or sj.parent_id = #{coinspect.jurisdiction}) |
| | | </if> |
| | | <if test="examScore.examName!=null and examScore.examName!=''"> |
| | | and ke.exam_name like concat('%', #{examScore.examName},'%') |
| | | </if> |
| | | <if test="examScore.companyName!=null and examScore.companyName!=''"> |
| | | and bd.dept_name like concat('%', #{examScore.companyName},'%') |
| | | </if> |
| | | <if test="examScore.securityName!=null and examScore.securityName!=''"> |
| | | and bu.real_name like concat('%', #{examScore.securityName},'%') |
| | | </if> |
| | | <if test="examScore.account!=null and examScore.account!=''"> |
| | | and bu.account like concat('%', #{examScore.account},'%') |
| | | </if> |
| | | <if test="examScore.trainUnitId!=null"> |
| | | and str.training_unit_id = #{examScore.trainUnitId} |
| | | </if> |
| | | <if test="examScore.userId!=null and examScore.userId!=''"> |
| | | and es.user_id = #{examScore.userId} |
| | | </if> |
| | | <if test="examScore.deptId!=null and examScore.deptId!=''"> |
| | | and bd.id = #{examScore.deptId} |
| | | </if> |
| | | <if test="examScore.isExam!=null and examScore.isExam!=''"> |
| | | and str.is_exam = #{examScore.isExam} |
| | | </if> |
| | | <if test="examScore.examType!=null and examScore.examType!=''"> |
| | | and ke.exam_type = #{examScore.examType} |
| | | </if> |
| | | <if test="examScore.candidateNo!=null and examScore.candidateNo!=''"> |
| | | and es.candidate_no = #{examScore.candidateNo} |
| | | </if> |
| | | <if test="examScore.qualified!=null"> |
| | | and es.qualified = #{examScore.qualified} |
| | | </if> |
| | | <if test="examScore.examDate!=null and examScore.examDate!=''"> |
| | | and date_format(es.exam_time,'%Y-%m-%d') = #{examScore.examDate} |
| | | </if> |
| | | order by es.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.exam.entity.ExamScore; |
| | | import org.springblade.modules.exam.excel.ExportExamScoreExcel; |
| | | import org.springblade.modules.exam.vo.ExamScoreVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 考试成绩服务类 |
| | |
| | | * @return |
| | | */ |
| | | Boolean saveExamScore(ExamScoreVO examScore); |
| | | |
| | | /** |
| | | * 按条件查询成绩数据 |
| | | * @param examScoreVO |
| | | * @return |
| | | */ |
| | | List<ExportExamScoreExcel> exportExamScoreList(ExamScoreVO examScoreVO); |
| | | } |
| | |
| | | import org.springblade.modules.exam.entity.ExamExaminationSubject; |
| | | import org.springblade.modules.exam.entity.ExamPaper; |
| | | import org.springblade.modules.exam.entity.ExamScore; |
| | | import org.springblade.modules.exam.excel.ExportExamScoreExcel; |
| | | import org.springblade.modules.exam.mapper.ExamScoreMapper; |
| | | import org.springblade.modules.exam.service.ExamPaperService; |
| | | import org.springblade.modules.exam.service.ExamScoreService; |
| | |
| | | //返回结果 |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询成绩数据 |
| | | * @param examScoreVO |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ExportExamScoreExcel> exportExamScoreList(ExamScoreVO examScoreVO) { |
| | | return baseMapper.exportExamScoreList(examScoreVO); |
| | | } |
| | | } |
| | |
| | | * 结束时间 |
| | | */ |
| | | private String endTime; |
| | | |
| | | /** |
| | | * 辖区 |
| | | */ |
| | | private String jurisdiction; |
| | | } |
| | |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.StringPool; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.excel.SecurityExcel; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.excel.UserImporter; |
| | | import org.springblade.modules.system.service.IUserService; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 导出用户审查明细 |
| | | */ |
| | | @GetMapping("export-security") |
| | | @ApiOperationSupport(order = 13) |
| | | @ApiOperation(value = "导出用户", notes = "传入user") |
| | | public void exportSecurity(UserVO user, HttpServletResponse response) { |
| | | List<SecurityExcel> list = userService.exportSecurity(user); |
| | | ExcelUtil.export(response, "保安员审查数据" + DateUtil.time(), "保安员审查数据表", list, SecurityExcel.class); |
| | | } |
| | | |
| | | /** |
| | | * 导出模板 |
| | | */ |
| | | @GetMapping("export-template") |
| 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.system.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelIgnore; |
| | | 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; |
| | | |
| | | /** |
| | | * UserExcel |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class SecurityExcel implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("保安姓名") |
| | | private String roleName; |
| | | |
| | | @ColumnWidth(10) |
| | | @ExcelProperty("保安公司") |
| | | private String deptName; |
| | | |
| | | @ColumnWidth(10) |
| | | @ExcelProperty("性别") |
| | | private String sex; |
| | | |
| | | @ExcelProperty("身份证号") |
| | | private String cardid; |
| | | |
| | | @ColumnWidth(15) |
| | | @ExcelProperty("年龄") |
| | | private String age; |
| | | |
| | | @ExcelProperty("保安证编号") |
| | | private String securitynumber; |
| | | |
| | | @ExcelProperty("联系方式") |
| | | private String phone; |
| | | |
| | | @ExcelProperty("审查状态") |
| | | private String examinationType; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("审查明细") |
| | | private String examinationMx; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("审查时间") |
| | | private Date paperTime; |
| | | |
| | | } |
| | |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.entity.UserInfo; |
| | | import org.springblade.modules.system.entity.UserOauth; |
| | | import org.springblade.modules.system.excel.SecurityExcel; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | UserVO getUserInfoBySecurityNumber(String securityNumber); |
| | | |
| | | /** |
| | | * 导出用户审查明细 |
| | | * @param user |
| | | * @return |
| | | */ |
| | | List<SecurityExcel> exportSecurity(UserVO user); |
| | | } |
| | |
| | | import org.springblade.core.tool.utils.*; |
| | | import org.springblade.modules.auth.enums.UserEnum; |
| | | import org.springblade.modules.system.entity.*; |
| | | import org.springblade.modules.system.excel.SecurityExcel; |
| | | import org.springblade.modules.system.excel.UserExcel; |
| | | import org.springblade.modules.system.mapper.UserMapper; |
| | | import org.springblade.modules.system.service.IRoleService; |
| | |
| | | public UserVO getUserInfoBySecurityNumber(String securityNumber) { |
| | | return baseMapper.getUserInfoBySecurityNumber(securityNumber); |
| | | } |
| | | |
| | | /** |
| | | * 导出用户审查明细 |
| | | * @param user |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<SecurityExcel> exportSecurity(UserVO user) { |
| | | return null; |
| | | } |
| | | } |
| | |
| | | sqlConnect: jdbc:mysql://223.82.109.183:2083/zhba-test?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
| | | ftpHost: 192.168.0.199 |
| | | ftpPort: 21 |
| | | # ftpUserName: anonymous |
| | | ftpUserName: arsn |
| | | ftpPassword: 123456 |
| | | ftpPath: anbao/ |