1.字典表 终端类型改为型号 2.分布式光伏台账
This commit is contained in:
@@ -7,9 +7,12 @@ import com.njcn.web.utils.HttpServletUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.hssf.usermodel.DVConstraint;
|
||||
import org.apache.poi.hssf.usermodel.HSSFDataValidation;
|
||||
import org.apache.poi.ss.usermodel.DataValidationHelper;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.util.CellRangeAddressList;
|
||||
import org.apache.poi.xssf.usermodel.XSSFDataValidation;
|
||||
import org.apache.poi.xssf.usermodel.XSSFDataValidationConstraint;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -96,13 +99,15 @@ public class ExcelUtil {
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
// 生成下拉列表
|
||||
// 只对(x,x)单元格有效
|
||||
CellRangeAddressList cellRangeAddressList = new CellRangeAddressList(3, 65535, firstCol, lastCol);
|
||||
CellRangeAddressList cellRangeAddressList = new CellRangeAddressList(2, 65535, firstCol, lastCol);
|
||||
// 生成下拉框内容
|
||||
DVConstraint dvConstraint = DVConstraint.createExplicitListConstraint(strings);
|
||||
HSSFDataValidation dataValidation = new HSSFDataValidation(cellRangeAddressList, dvConstraint);
|
||||
DataValidationHelper dvHelper = sheet.getDataValidationHelper();
|
||||
XSSFDataValidationConstraint dvConstraint = (XSSFDataValidationConstraint)
|
||||
dvHelper.createExplicitListConstraint(strings);
|
||||
XSSFDataValidation validation =(XSSFDataValidation)dvHelper.createValidation(
|
||||
dvConstraint, cellRangeAddressList);
|
||||
// 对sheet页生效
|
||||
sheet.addValidationData(dataValidation);
|
||||
|
||||
sheet.addValidationData(validation);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ public class Knife4jSwaggerConfig {
|
||||
List<String> controllerPath = Stream.of(
|
||||
"com.njcn.user.controller",
|
||||
"com.njcn.device.controller",
|
||||
"com.njcn.pvdevice.controller",
|
||||
"com.njcn.auth.controller",
|
||||
"com.njcn.system.controller",
|
||||
"com.njcn.harmonic.controller",
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.njcn.web.pojo.annotation;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
*
|
||||
* 校验前台传的时间格式是否正确
|
||||
* @author cdf
|
||||
* @date 2022/1/11
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<module>common-web</module>
|
||||
<module>common-autocode</module>
|
||||
<module>common-influxdb</module>
|
||||
<!-- <module>common-echarts</module>-->
|
||||
<module>common-poi</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
||||
Reference in New Issue
Block a user