Commit 9fa4453c authored by litengwei's avatar litengwei

任务 8612 任务 8695

parent 519f67fb
package com.yeejoin.amos.boot.module.jcs.api.dto; package com.yeejoin.amos.boot.module.jcs.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -21,60 +23,74 @@ import java.util.Date; ...@@ -21,60 +23,74 @@ import java.util.Date;
@ApiModel(value="SignDto", description="打卡记录") @ApiModel(value="SignDto", description="打卡记录")
public class SignDto extends BaseDto { public class SignDto extends BaseDto {
private static final long serialVersionUID = 1L;
@ExcelIgnore
@ApiModelProperty(value = "打卡人照片") @ApiModelProperty(value = "打卡人照片")
private String personPhotos; private String personPhotos;
@ExcelIgnore
@ApiModelProperty(value = "当前页") @ApiModelProperty(value = "当前页")
private int current; private int current;
@ExcelIgnore
@ApiModelProperty(value = "每页几条") @ApiModelProperty(value = "每页几条")
private int size; private int size;
@ExcelProperty(value = "打卡人", index = 1)
@ApiModelProperty(value = "打卡人名字") @ApiModelProperty(value = "打卡人名字")
private String name; private String name;
@ExcelIgnore
@ApiModelProperty(value = "打卡人id") @ApiModelProperty(value = "打卡人id")
private String userId; private String userId;
@ExcelProperty(value = "岗位", index = 2)
@ApiModelProperty(value = "打卡人岗位") @ApiModelProperty(value = "打卡人岗位")
private String jobTitle; private String jobTitle;
@ExcelIgnore
@ApiModelProperty(value = "换流站code") @ApiModelProperty(value = "换流站code")
private String bizOrgCode; private String bizOrgCode;
@ExcelProperty(value = "换流站", index = 0)
@ApiModelProperty(value = "换流站Name") @ApiModelProperty(value = "换流站Name")
private String bizOrgName; private String bizOrgName;
@ExcelIgnore
@ApiModelProperty(value = "打卡时间") @ApiModelProperty(value = "打卡时间")
private String date; private String date;
@ExcelIgnore
@ApiModelProperty(value = "打卡来源") @ApiModelProperty(value = "打卡来源")
private String source; private String source;
@ExcelIgnore
@ApiModelProperty(value = "打卡图片") @ApiModelProperty(value = "打卡图片")
private String photos; private String photos;
@ExcelProperty(value = "备注", index = 5)
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remarks; private String remarks;
@ExcelProperty(value = "打卡时间", index = 4)
@ApiModelProperty(value = "打卡时间") @ApiModelProperty(value = "打卡时间")
private Date signTime; private Date signTime;
@ExcelIgnore
@ApiModelProperty(value = "系统标识(数据隔离使用)") @ApiModelProperty(value = "系统标识(数据隔离使用)")
private String appKey; private String appKey;
@ExcelIgnore
@ApiModelProperty(value = "组件机构") @ApiModelProperty(value = "组件机构")
private String orgCode; private String orgCode;
@ExcelIgnore
@ApiModelProperty(value = "开始时间") @ApiModelProperty(value = "开始时间")
private String signTimeBIGGER; private String signTimeBIGGER;
@ExcelIgnore
@ApiModelProperty(value = "结束时间") @ApiModelProperty(value = "结束时间")
private String signTimeLESS; private String signTimeLESS;
@ExcelProperty(value = "打卡类型", index = 3)
@ApiModelProperty(value = "打卡类型") @ApiModelProperty(value = "打卡类型")
private String type; private String type;
} }
...@@ -27,7 +27,8 @@ public enum ExcelEnums { ...@@ -27,7 +27,8 @@ public enum ExcelEnums {
JYZB ("救援装备", "救援装备", "com.yeejoin.amos.boot.module.common.api.dto.RescueEquipmentDto","JYZB"),//("JYZB","救援装备") JYZB ("救援装备", "救援装备", "com.yeejoin.amos.boot.module.common.api.dto.RescueEquipmentDto","JYZB"),//("JYZB","救援装备")
XFZB ("消防装备", "消防装备", "com.yeejoin.amos.boot.module.common.api.dto.EquipmentDetailDownloadTemplateDto","XFZB"),//("XFZB","消防装备") XFZB ("消防装备", "消防装备", "com.yeejoin.amos.boot.module.common.api.dto.EquipmentDetailDownloadTemplateDto","XFZB"),//("XFZB","消防装备")
WXXFZB("微型消防站值班", "微型消防站值班", "com.yeejoin.amos.boot.module.common.api.dto.DutyFireFightingExcleDto","WXXFZB"),//("WXXFZB","微型消防站值班") WXXFZB("微型消防站值班", "微型消防站值班", "com.yeejoin.amos.boot.module.common.api.dto.DutyFireFightingExcleDto","WXXFZB"),//("WXXFZB","微型消防站值班")
JJZB("120急救站值班", "120急救站值班", "com.yeejoin.amos.boot.module.common.api.dto.DutyFirstAidExcleDto","JJZB"),//("JJZB","120急救站值班") JJZB("120急救站值班", "120急救站值班", "com.yeejoin.amos.boot.module.common.api.dto.DutyFirstAidExcleDto","JJZB"),
QDSJ("签到数据", "签到数据", "com.yeejoin.amos.boot.module.jcs.api.dto.SignDto","QDSJ"),//("QDSJ","签到数据")
XFAQBG("消防安全报告", "消防安全报告", "com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrSafeReportExcelDto","XFAQBG");//("XFAQBG","微型消防站值班") XFAQBG("消防安全报告", "消防安全报告", "com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrSafeReportExcelDto","XFAQBG");//("XFAQBG","微型消防站值班")
private String fileName; private String fileName;
private String sheetName; private String sheetName;
......
...@@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletResponse;
import com.yeejoin.amos.boot.module.common.api.dto.*; import com.yeejoin.amos.boot.module.common.api.dto.*;
import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint; import com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint;
import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper; import com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper;
import com.yeejoin.amos.boot.module.jcs.api.dto.SignDto;
import org.apache.commons.beanutils.ConvertUtils; import org.apache.commons.beanutils.ConvertUtils;
import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Row;
...@@ -182,6 +183,9 @@ public class ExcelServiceImpl { ...@@ -182,6 +183,9 @@ public class ExcelServiceImpl {
@Autowired @Autowired
private OrgUsrMapper orgUsrMapper; private OrgUsrMapper orgUsrMapper;
@Autowired
SignServiceImpl signServiceImpl;
public void templateExport(HttpServletResponse response, ExcelDto excelDto) throws ClassNotFoundException { public void templateExport(HttpServletResponse response, ExcelDto excelDto) throws ClassNotFoundException {
String url = excelDto.getClassUrl(); String url = excelDto.getClassUrl();
Class<?> clz = Class.forName(url); Class<?> clz = Class.forName(url);
...@@ -312,6 +316,15 @@ public class ExcelServiceImpl { ...@@ -312,6 +316,15 @@ public class ExcelServiceImpl {
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(),
maintenancePersonExcelDtoList, MaintenancePersonExcleDto.class, null, false); maintenancePersonExcelDtoList, MaintenancePersonExcleDto.class, null, false);
break; break;
case "QDSJ":
List<SignDto> signDtos = signServiceImpl
.queryForSignList();
signDtos.stream().forEach(e->{
e.setType(e.getType().equals("0") ? "上班打卡" :"下班打卡" );
});
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(),
signDtos, SignDto.class, null, false);
break;
case "KEYSITE": case "KEYSITE":
if(!authFalg) { if(!authFalg) {
ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null, ExcelUtil.createTemplate(response, excelDto.getFileName(), excelDto.getSheetName(), null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment