Commit 96679816 authored by 赵建伟's avatar 赵建伟

update codes

parent 89c73561
......@@ -216,7 +216,7 @@
<workItem from="1588148891822" duration="2318000" />
<workItem from="1588152718016" duration="1463000" />
<workItem from="1588154601852" duration="28557000" />
<workItem from="1588344252163" duration="7420000" />
<workItem from="1588344252163" duration="7786000" />
</task>
<servers />
</component>
......
......@@ -134,21 +134,26 @@ public class ExcelServiceImpl implements ExcelService {
* @param value
*/
private void setCellValue(XSSFCell cell, Object value) {
if (value instanceof String) {
cell.setCellValue((String) value);
} else if (value instanceof Integer) {
cell.setCellValue((Integer) value);
} else if (value instanceof Float) {
cell.setCellValue((Float) value);
} else if (value instanceof Double){
cell.setCellValue((Double)value);
} else if (value instanceof Date) {
cell.setCellValue((Date) value);
} else if (value instanceof Boolean) {
cell.setCellValue((Boolean) value);
} else {
if(null != value){
if (value instanceof String) {
cell.setCellValue((String) value);
} else if (value instanceof Integer) {
cell.setCellValue((Integer) value);
} else if (value instanceof Float) {
cell.setCellValue((Float) value);
} else if (value instanceof Double){
cell.setCellValue((Double)value);
} else if (value instanceof Date) {
cell.setCellValue((Date) value);
} else if (value instanceof Boolean) {
cell.setCellValue((Boolean) value);
} else {
cell.setCellValue("unknown value type");
logger.error("value's type is {}!",value.getClass().toString());
}
}else{
cell.setCellValue("");
logger.error("value's type is unknown!");
logger.error("the value is 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