修改设备
This commit is contained in:
@@ -66,10 +66,10 @@ public class CsEquipmentDeliveryDTO {
|
||||
*/
|
||||
private String devAccessMethod;
|
||||
|
||||
/**
|
||||
* 装置程序版本
|
||||
*/
|
||||
private String programVersion;
|
||||
// /**
|
||||
// * 装置程序版本
|
||||
// */
|
||||
// private String programVersion;
|
||||
|
||||
/**
|
||||
* 调试人员
|
||||
|
||||
@@ -57,12 +57,12 @@ public class CsEquipmentDeliveryAddParm{
|
||||
@NotBlank(message="装置型号不能为空!")
|
||||
private String devModel;
|
||||
|
||||
/**
|
||||
* 装置程序版本
|
||||
*/
|
||||
@ApiModelProperty(value="装置程序版本")
|
||||
@NotBlank(message="装置程序版本不能为空!")
|
||||
private String programVersion;
|
||||
// /**
|
||||
// * 装置程序版本
|
||||
// */
|
||||
// @ApiModelProperty(value="装置程序版本")
|
||||
// @NotBlank(message="装置程序版本不能为空!")
|
||||
// private String programVersion;
|
||||
|
||||
// /**
|
||||
// * 调试人员
|
||||
|
||||
@@ -60,11 +60,11 @@ public class CsEquipmentDeliveryAuditParm {
|
||||
@ApiModelProperty(value="装置接入方式")
|
||||
private String devAccessMethod;
|
||||
|
||||
/**
|
||||
* 装置程序版本
|
||||
*/
|
||||
@ApiModelProperty(value="装置程序版本")
|
||||
private String programVersion;
|
||||
// /**
|
||||
// * 装置程序版本
|
||||
// */
|
||||
// @ApiModelProperty(value="装置程序版本")
|
||||
// private String programVersion;
|
||||
|
||||
// /**
|
||||
// * 调试人员
|
||||
|
||||
@@ -64,11 +64,7 @@ public class CsEquipmentDeliveryPO extends BaseEntity {
|
||||
@TableField(value = "dev_access_method")
|
||||
private String devAccessMethod;
|
||||
|
||||
/**
|
||||
* 装置程序版本
|
||||
*/
|
||||
@TableField(value = "program_version")
|
||||
private String programVersion;
|
||||
|
||||
|
||||
/**
|
||||
* 合同号
|
||||
|
||||
@@ -56,11 +56,11 @@ public class CsEquipmentDeliveryVO extends BaseEntity {
|
||||
@ApiModelProperty(value="装置型号")
|
||||
private String devModel;
|
||||
|
||||
/**
|
||||
* 装置程序版本
|
||||
*/
|
||||
@ApiModelProperty(value="装置程序版本")
|
||||
private String programVersion;
|
||||
// /**
|
||||
// * 装置程序版本
|
||||
// */
|
||||
// @ApiModelProperty(value="装置程序版本")
|
||||
// private String programVersion;
|
||||
|
||||
/**
|
||||
* 调试人员
|
||||
|
||||
@@ -3,9 +3,15 @@ package com.njcn.csdevice.utils;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelForEachParams;
|
||||
import cn.afterturn.easypoi.excel.export.styler.IExcelExportStyler;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import org.apache.poi.hssf.util.HSSFColor;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
@@ -155,4 +161,40 @@ public class ExcelStyleUtil implements IExcelExportStyler {
|
||||
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
return style;
|
||||
}
|
||||
|
||||
public static void exportFileByWorkbook(Workbook workbook, String fileName, HttpServletResponse response) {
|
||||
response.reset();
|
||||
|
||||
try {
|
||||
ServletOutputStream outputStream = response.getOutputStream();
|
||||
Throwable var4 = null;
|
||||
|
||||
try {
|
||||
fileName = URLEncoder.encode(fileName, "UTF-8");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8");
|
||||
workbook.write(outputStream);
|
||||
} catch (Throwable var14) {
|
||||
var4 = var14;
|
||||
throw var14;
|
||||
} finally {
|
||||
if (outputStream != null) {
|
||||
if (var4 != null) {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (Throwable var13) {
|
||||
var4.addSuppressed(var13);
|
||||
}
|
||||
} else {
|
||||
outputStream.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception var16) {
|
||||
var16.printStackTrace();
|
||||
throw new BusinessException(CommonResponseEnum.EXPORT_FILE_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user