浏览代码

导入带图像

suntianwu 3 年之前
父节点
当前提交
de9737f141

+ 1 - 1
src/main/java/com/iden/bms/controller/CameraController.java

@@ -196,7 +196,7 @@ public class CameraController {
     })
     @PostMapping(value = "/importWithExcel",  headers = "content-type=multipart/form-data")
     public Result<Object> importWithExcel(  @RequestParam(value = "type", required = true) String type,
-                                            @RequestParam(value = "file") MultipartFile multipartFile) throws Exception {
+                                            @RequestParam(value = "file") MultipartFile multipartFile) {
         try {
             boolean flag = cameraService.importWithExcel(type,multipartFile);
             if(flag){

+ 1 - 1
src/main/java/com/iden/bms/controller/CommunityController.java

@@ -126,7 +126,7 @@ public class CommunityController {
 
     @ApiOperation(value = "导入Excel")
     @PostMapping(value = "/importWithExcel",  headers = "content-type=multipart/form-data")
-    public Result<Object> importWithExcel(@RequestParam(value = "file") MultipartFile multipartFile) throws Exception {
+    public Result<Object> importWithExcel(@RequestParam(value = "file") MultipartFile multipartFile) {
         try {
             boolean flag = communityService.importWithExcel(multipartFile);
             if(flag){

+ 60 - 0
src/main/java/com/iden/bms/controller/PersonController.java

@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 
 /**
@@ -112,6 +113,65 @@ public class PersonController {
         }
     }
 
+    /**
+     * 导出列表
+     * @param
+     * @return
+     */
+    @ApiOperation(value = "导出Excel")
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(paramType = "query", name = "type", value = "类型:1、重点人员,2、小区人员"),
+            @ApiImplicitParam(paramType = "query", name = "nameOrCred", value = "名称/身份证"),
+            @ApiImplicitParam(paramType = "query", name = "district", value = "所属区域"),
+            @ApiImplicitParam(paramType = "query", name = "subdistrict", value = "所属街道"),
+            @ApiImplicitParam(paramType = "query", name = "communityId", value = "小区ID"),
+            @ApiImplicitParam(paramType = "query", name = "crowdId", value = "人群id"),
+            @ApiImplicitParam(paramType = "query", name = "address", value = "详细地址"),
+            @ApiImplicitParam(paramType = "query", name = "gender", value = "性别:M:男 W:女"),
+            @ApiImplicitParam(paramType = "query", name = "populationType", value = "人口类型:1:常住人口 2:暂住人口 3:境外长住人口 4:流动人口 5:寄住人口 6: 临时住宿人口 99其他")
+    })
+    @GetMapping({"/exportToExcel"})
+    @LogAnnotation(
+            type = OperateType.EXPORT,
+            moduleName = "导出人员列表",
+            description = "导出人员列表"
+    )
+    public void exportToExcel(HttpServletRequest request,@RequestHeader(name = "token", required = true) String token,
+                              @RequestParam(value = "type", required = true) String type,
+                              @RequestParam(value = "nameOrCred", required = false) String nameOrCred,
+                              @RequestParam(value = "district", required = false) String district,
+                              @RequestParam(value = "subdistrict", required = false) String subdistrict,
+                              @RequestParam(value = "communityId", required = false) Long communityId,
+                              @RequestParam(value = "crowdId", required = false) Long crowdId,
+                              @RequestParam(value = "address", required = false) String address,
+                              @RequestParam(value = "gender", required = false) String gender,
+                              @RequestParam(value = "populationType", required = false) String populationType,
+                              HttpServletResponse response) {
+        try {
+            UserLoginedConvertVO loginUser = WebPageUtils.getCurrentLoginedUser(request);
+            this.personService.exportToExcel(type,nameOrCred,district,subdistrict,communityId,crowdId,address,gender,populationType,loginUser, response);
+        } catch (BDException e) {
+            log.error("导出人员列表出现异常",e);
+        } catch (Exception e) {
+            log.error("人员管理: 导出人员列表出现异常",e);
+        }
+    }
+
+    @ApiOperation(value = "导入Excel")
+    @PostMapping(value = "/importWithExcel",  headers = "content-type=multipart/form-data")
+    public Result<Object> importWithExcel(@RequestParam(value = "file") MultipartFile multipartFile) {
+        try {
+            personService.importWithExcel(multipartFile);
+            return  Result.success("导入成功!");
+        } catch (BDException e) {
+            log.error("导入人员列表出现异常",e);
+            return Result.error(e.getMessage());
+        } catch (Exception e) {
+            log.error("人员管理: 导入人员列表出现异常",e);
+            return Result.error("导入人员失败!");
+        }
+    }
+
     @ApiOperation(value = "图像上传")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "token", value = "放在请求头中的令牌",

+ 255 - 4
src/main/java/com/iden/bms/service/PersonService.java

@@ -2,18 +2,30 @@ package com.iden.bms.service;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.StrUtil;
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.write.metadata.WriteSheet;
+import com.alibaba.excel.write.metadata.fill.FillConfig;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.iden.bms.face.FaceIdenService;
 import com.iden.bms.face.FaceIdenTool;
 import com.iden.common.entity.IdenCommunity;
 import com.iden.common.entity.IdenCrowd;
 import com.iden.common.entity.IdenPerson;
 
 import com.iden.common.entity.IdenPersonCrowdRef;
+import com.iden.common.enums.CredentialsTyoeEnum;
+import com.iden.common.enums.GenderEnum;
 import com.iden.common.enums.PersonTypeEnum;
 import com.iden.common.enums.PopulationTypeEnum;
+import com.iden.common.exceltool.CommonExcelParse;
+import com.iden.common.exceltool.ExcelUtil;
+import com.iden.common.exceltool.IExcelParser;
+import com.iden.common.exceltool.MultipartFileToFile;
 import com.iden.common.exception.BDException;
 import com.iden.common.service.IdenCommunityService;
 import com.iden.common.service.IdenCrowdService;
@@ -22,11 +34,15 @@ import com.iden.common.service.IdenPersonService;
 import com.iden.common.util.DateUtils;
 import com.iden.common.util.ImgUtil;
 import com.iden.common.util.MyBeanUtils;
-import com.iden.common.vo.PersonStaVO;
-import com.iden.common.vo.PersonVO;
-import com.iden.common.vo.PageReqVO;
-import com.iden.common.vo.UserLoginedConvertVO;
+import com.iden.common.vo.*;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.poi.POIXMLDocumentPart;
+import org.apache.poi.hssf.usermodel.*;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.xssf.usermodel.*;
+import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -34,8 +50,13 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
 import java.io.File;
 import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLEncoder;
 import java.util.*;
 
 /**
@@ -61,6 +82,7 @@ public class PersonService {
     @Value("${file.url:#{null}}")
     private String fileUrl;
 
+    private static final Logger logger = LogManager.getLogger(PersonService.class);
 
     public PersonStaVO getPersonStaVO(String type, String nameOrCred, String district, String subdistrict, Long communityId, Long crowdId, String address, String gender, String populationType, UserLoginedConvertVO loginUser) {
         QueryWrapper<IdenPerson> queryWrapper = new QueryWrapper<>();
@@ -142,7 +164,21 @@ public class PersonService {
                     BeanUtils.copyProperties(item,resVO);
                     resVO.setPopulationTypeName(PopulationTypeEnum.getValueToName(resVO.getPopulationType()));
                     resVO.setTypeName(PersonTypeEnum.getValueToName(resVO.getType()));
+                    resVO.setGenderName(GenderEnum.getValueToName(resVO.getGender()));
+                    resVO.setCredentialsTyoeName(CredentialsTyoeEnum.getValueToName(resVO.getCredentialsTyoe()));
 
+                    try {
+                        resVO.setImageUrl(new URL(resVO.getImage()));
+                    } catch (Exception e){
+                        e.printStackTrace();
+                    }
+                    Long communityId1 = resVO.getCommunityId();
+                    if(communityId1 != null){
+                        IdenCommunity idenCommunity = this.idenCommunityService.getById(communityId1);
+                        if(idenCommunity != null) {
+                            resVO.setCommunityName(idenCommunity.getName());
+                        }
+                    }
                     QueryWrapper<IdenPersonCrowdRef> queryWrapper1 = new QueryWrapper<>();
                     queryWrapper1.lambda().eq(IdenPersonCrowdRef::getPersonId,resVO.getId());
                     List<IdenPersonCrowdRef> listIdenPersonCrowdRef = idenPersonCrowdRefService.list(queryWrapper1);
@@ -167,6 +203,221 @@ public class PersonService {
             return results;
     }
 
+    public void exportToExcel(String type, String nameOrCred, String district, String subdistrict, Long communityId, Long crowdId, String address, String gender, String populationType, UserLoginedConvertVO loginUser, HttpServletResponse response)  throws Exception {
+        QueryWrapper<IdenPerson> queryWrapper = new QueryWrapper<>();
+        queryWrapper.lambda().like(IdenPerson::getType,type)
+                .like(StrUtil.isNotEmpty(address), IdenPerson::getAddress,address)
+                .eq(StrUtil.isNotEmpty(gender),IdenPerson::getGender,gender)
+                .eq(StrUtil.isNotEmpty(populationType),IdenPerson::getPopulationType,populationType)
+                .eq(StrUtil.isNotEmpty(district),IdenPerson::getDistrict,district)
+                .eq(StrUtil.isNotEmpty(subdistrict),IdenPerson::getSubdistrict,subdistrict)
+                .eq(communityId != null,IdenPerson::getCommunityId,communityId)
+                .and(StrUtil.isNotEmpty(nameOrCred),wrapper -> wrapper.like(IdenPerson::getName,nameOrCred)
+                        .or().like(IdenPerson::getCredentialsCode,nameOrCred))
+                .orderByDesc(IdenPerson::getModifyTime)
+                .orderByDesc(IdenPerson::getCreateTime);
+
+        if (crowdId != null) {
+            queryWrapper.apply(" in ( select person_id from iden_person_crowd_ref ipcr where ipcr.crowd_id = "+ crowdId + ")");
+        }
+
+        List<IdenPerson>  list =  this.idenPersonService.list(queryWrapper);
+        List<PersonVO> records = new ArrayList<>();
+        if (CollUtil.isNotEmpty(list)) {
+            list.forEach(item->{
+                PersonVO resVO = new PersonVO();
+                BeanUtils.copyProperties(item,resVO);
+                resVO.setPopulationTypeName(PopulationTypeEnum.getValueToName(resVO.getPopulationType()));
+                resVO.setTypeName(PersonTypeEnum.getValueToName(resVO.getType()));
+                resVO.setGenderName(GenderEnum.getValueToName(resVO.getGender()));
+                resVO.setCredentialsTyoeName(CredentialsTyoeEnum.getValueToName(resVO.getCredentialsTyoe()));
+
+                try {
+                    resVO.setImageUrl(new URL(resVO.getImage()));
+                } catch (Exception e){
+                    e.printStackTrace();
+                }
+                Long communityId1 = resVO.getCommunityId();
+                if(communityId1 != null){
+                    IdenCommunity idenCommunity = this.idenCommunityService.getById(communityId1);
+                    if(idenCommunity != null) {
+                        resVO.setCommunityName(idenCommunity.getName());
+                    }
+                }
+                QueryWrapper<IdenPersonCrowdRef> queryWrapper1 = new QueryWrapper<>();
+                queryWrapper1.lambda().eq(IdenPersonCrowdRef::getPersonId,resVO.getId());
+                List<IdenPersonCrowdRef> listIdenPersonCrowdRef = idenPersonCrowdRefService.list(queryWrapper1);
+                StringBuilder sb = new StringBuilder();
+                if (CollUtil.isNotEmpty(listIdenPersonCrowdRef)) {
+                    for(IdenPersonCrowdRef idenPersonCrowdRef : listIdenPersonCrowdRef){
+                        IdenCrowd idenCrowd = idenCrowdService.getById(idenPersonCrowdRef.getCrowdId());
+                        if(idenCrowd != null) {
+                            sb.append(idenCrowd.getName()).append(",");
+                        }
+                    }
+                }
+                String crowdName = sb.toString();
+                if(crowdName != null && crowdName.endsWith(",")) {
+                    crowdName = crowdName.substring(0, crowdName.length() - 1);
+                }
+                resVO.setCrowdName(crowdName);
+                records.add(resVO);
+            });
+        }
+
+        try {
+            response.reset(); // 非常重要
+            response.setContentType("application/vnd.ms-excel");
+            response.setCharacterEncoding("utf-8");
+            final String fileName = URLEncoder.encode("人员表", "UTF-8");
+            response.setHeader("Content-disposition", "attachment;filename=" + fileName + System.currentTimeMillis() + ".xlsx");
+
+            EasyExcel.write(response.getOutputStream(), PersonVO.class).sheet("人员表").doWrite(records);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 导入
+     * @param file
+     * @return
+     * @throws Exception
+     */
+    @Transactional(rollbackFor = Exception.class)
+    public void importWithExcel(MultipartFile file) throws BDException {
+            try {
+
+                //上传的目录
+                String uploadSubDir = "data/final/person/image";
+
+                //图片对应的行和图片数据
+                Map<Integer, PictureData> sheetIndexPicMap = new HashMap<>();
+
+                //图片对应的行和存放路径
+                Map<Integer, String> path = new HashMap<>();
+
+                Sheet sheet = null;
+                if (file.getName().substring(file.getName().length() - 4).equals("xlsx")) {
+                    XSSFWorkbook workBook = new XSSFWorkbook(file.getInputStream());
+                    sheet = workBook.getSheetAt(0);
+
+                    //读取sheet的图片放入Map
+                    for (POIXMLDocumentPart dr : ((XSSFSheet) sheet).getRelations()) {
+                        if (dr instanceof XSSFDrawing) {
+                            XSSFDrawing drawing = (XSSFDrawing) dr;
+                            List<XSSFShape> shapes = drawing.getShapes();
+                            for (XSSFShape shape : shapes) {
+                                XSSFPicture pic = (XSSFPicture) shape;
+                                XSSFClientAnchor anchor = pic.getPreferredSize();
+                                CTMarker ctMarker = anchor.getFrom();
+                                sheetIndexPicMap.put(ctMarker.getRow(), pic.getPictureData());
+
+                                //获取图片格式
+                                String ext = pic.getPictureData().suggestFileExtension();
+                                if(!"jpg".equalsIgnoreCase(ext)){
+                                    throw new BDException("Excel中只能放jpg格式图像");
+                                }
+                                //保存的文件名
+                                String fileName = UUID.randomUUID().toString() + "." + ext;
+
+                                path.put(ctMarker.getRow(), uploadSubDir + "/" + fileName);
+                            }
+                        }
+                    }
+                } else {
+                   throw new BDException("导入Excel只支持xlsx格式");
+                }
+
+                if (sheet.getLastRowNum() == 0) {
+                    logger.error("表中无数据!");
+                    throw new BDException("表中无数据");
+                }
+
+                //定义数据集合存放excel所有数据
+                List<IdenPerson> idenPersonList = new ArrayList<>();
+
+                for (int i = 1; i <= sheet.getLastRowNum(); i++) {
+
+                    //错误提示消息
+                    StringBuffer msg = new StringBuffer();
+
+                    Row row = sheet.getRow(i);
+
+                    if (null == row)
+                        continue;
+
+                    IdenPerson idenPerson = new IdenPerson();
+
+                    idenPerson.setImage(path.get(i));
+
+                    for (int j = 0; j < 23; j++) {
+                        Cell cell = row.getCell(j);
+
+                        String value = null;
+
+                        if (null != cell) {
+                            //全部作为文本处理
+                            cell.setCellType(HSSFCell.CELL_TYPE_STRING);
+
+                            value = cell.getStringCellValue();
+                        }
+
+                        if (1 == j) {//姓名
+                            if (StringUtils.isNotBlank(value)){
+                                idenPerson.setName(value);
+                            }else {
+                                msg.append("请填写姓名!\n");
+                            }
+                        } else if (2 == j) {//备注
+                            idenPerson.setRemark(value);
+                        }
+                    }
+
+                    if (!StringUtils.isBlank(msg.toString())) {
+                        logger.error("第\t" + i + "行: " + msg.toString());
+                        throw new BDException("第\\t" + i + "行: " + msg.toString());
+                    }
+
+                    idenPersonList.add(idenPerson);
+
+                }
+
+                if (!idenPersonList.isEmpty()) {
+
+                    if (!sheetIndexPicMap.isEmpty()) {
+
+                        for (Map.Entry<Integer, PictureData> map : sheetIndexPicMap.entrySet()) {
+
+                            // 获取图片流
+                            PictureData pic = map.getValue();
+
+                            byte[] data = pic.getData();
+
+                            //输出全路径
+                            String outPath = idenRoot + path.get(map.getKey());
+
+                            FileOutputStream out = new FileOutputStream(outPath);
+                            out.write(data);
+                            out.close();
+                        }
+                    }
+
+                    //批量保存
+                    this.idenPersonService.saveBatch(idenPersonList);
+
+                }
+
+            } catch (Exception e) {
+                logger.error("导入异常", e);
+                e.printStackTrace();
+                throw new BDException("导入异常:" + e.getMessage());
+            }
+
+        }
+
+
     /**
      * 删除人员
      * @param id

+ 41 - 0
src/main/java/com/iden/common/enums/CredentialsTyoeEnum.java

@@ -0,0 +1,41 @@
+package com.iden.common.enums;
+
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * @Author:java
+ * @Date: 2021/05/27
+ */
+public enum CredentialsTyoeEnum {
+    /**
+     * 证件类型类型
+     */
+    IDCARD("1","身份证"),
+    PASSPORT("2","护照"),
+    OL("3","军官证");
+    private String value;
+    private String name;
+    CredentialsTyoeEnum(String value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+    public String getValue() {
+        return value;
+    }
+
+    public static String getValueToName(String value){
+        if (StrUtil.isEmpty(value)){
+            return null;
+        }
+        if (IDCARD.getValue().equals(value)){
+            return  IDCARD.name;
+        } else if (PASSPORT.getValue().equals(value)){
+            return  PASSPORT.name;
+        } else if (OL.getValue().equals(value)){
+        return  OL.name;
+    }
+
+        return null;
+    }
+}

+ 38 - 0
src/main/java/com/iden/common/enums/GenderEnum.java

@@ -0,0 +1,38 @@
+package com.iden.common.enums;
+
+
+import cn.hutool.core.util.StrUtil;
+
+/**
+ * @Author:java
+ * @Date: 2021/05/27
+ */
+public enum GenderEnum {
+    /**
+     * 男女
+     */
+    MAN("M","男"),
+    WOMAN("W","女");
+    private String value;
+    private String name;
+    GenderEnum(String value, String name) {
+        this.value = value;
+        this.name = name;
+    }
+    public String getValue() {
+        return value;
+    }
+
+    public static String getValueToName(String value){
+        if (StrUtil.isEmpty(value)){
+            return null;
+        }
+        if (MAN.getValue().equals(value)){
+            return  MAN.name;
+        }else if (WOMAN.getValue().equals(value)){
+            return  WOMAN.name;
+        }
+
+        return null;
+    }
+}

+ 35 - 1
src/main/java/com/iden/common/vo/PersonVO.java

@@ -1,6 +1,9 @@
 package com.iden.common.vo;
 
 
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.converters.url.UrlImageConverter;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -8,6 +11,7 @@ import lombok.Data;
 
 
 import java.io.Serializable;
+import java.net.URL;
 import java.util.Date;
 
 /**
@@ -28,6 +32,7 @@ public class PersonVO implements Serializable {
     private String uid;
 
     @ApiModelProperty("人员编码(人员ID)")
+    @ExcelProperty("人员编码")
     private String code;
 
     @ApiModelProperty("人脸特征码")
@@ -35,26 +40,38 @@ public class PersonVO implements Serializable {
 
 
     @ApiModelProperty("姓名")
+    @ExcelProperty("姓名")
     private String name;
 
 
     @ApiModelProperty("图像")
     private String image;
 
+    @ExcelProperty(value = "图像",converter = UrlImageConverter.class)
+    @ColumnWidth(60)
+    private URL imageUrl;
 
     @ApiModelProperty("性别:M:男 W:女")
     private String gender;
 
+    @ApiModelProperty("性别")
+    @ExcelProperty("性别")
+    private String genderName;
 
     @ApiModelProperty("证件类型:1:身份证 2:护照  3 军官证")
     private String credentialsTyoe;
 
+    @ApiModelProperty("证件类型")
+    @ExcelProperty("证件类型")
+    private String credentialsTyoeName;
 
     @ApiModelProperty("证件号码")
+    @ExcelProperty("证件号码")
     private String credentialsCode;
 
 
     @ApiModelProperty("手机号码")
+    @ExcelProperty("手机号码")
     private String phone;
 
 
@@ -62,43 +79,56 @@ public class PersonVO implements Serializable {
     private String populationType;
 
     @ApiModelProperty("人口类型:1:常住人口 2:暂住人口 3:境外长住人口 4:流动人口 5:寄住人口 6: 临时住宿人口 99其他")
+    @ExcelProperty("人口类型")
     private String populationTypeName;
 
     @ApiModelProperty("民族")
+    @ExcelProperty("民族")
     private String nation;
 
 
     @ApiModelProperty("政治面貌")
+    @ExcelProperty("政治面貌")
     private String policitalStatus;
 
 
     @ApiModelProperty("婚姻")
+    @ExcelProperty("婚姻")
     private String marriage;
 
 
     @ApiModelProperty("口音")
+    @ExcelProperty("口音")
     private String voice;
 
 
     @ApiModelProperty("所属区域")
+    @ExcelProperty("所属区域")
     private String district;
 
     @ApiModelProperty("所属街道")
+    @ExcelProperty("所属街道")
     private String subdistrict;
 
     @ApiModelProperty("所属小区id")
     private Long communityId;
 
+    @ApiModelProperty("所属小区")
+    @ExcelProperty("所属小区")
+    private String communityName;
 
     @ApiModelProperty("地址")
+    @ExcelProperty("地址")
     private String address;
 
 
     @ApiModelProperty("工作单位")
+    @ExcelProperty("工作单位")
     private String workPlace;
 
 
     @ApiModelProperty("单位地址")
+    @ExcelProperty("单位地址")
     private String workAddress;
 
 
@@ -106,16 +136,20 @@ public class PersonVO implements Serializable {
     private String type;
 
     @ApiModelProperty("类型名:2、重点人员,3、小区人员,多个用逗号分割")
+    @ExcelProperty("类型名")
     private String typeName;
 
     @ApiModelProperty("人群类型,多个用逗号分割")
+    @ExcelProperty("人群类型")
     private String crowdName;
 
     @ApiModelProperty("备注")
+    @ExcelProperty("备注")
     private String remark;
 
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
-    @ApiModelProperty("createTime")
+    @ApiModelProperty("创建时间")
+    @ExcelProperty("创建时间")
     private Date createTime;
 
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")