后管:【ID1000466】仪器管理-序列号列表,状态仅支持填写【有效无效】
parent
e53e63d24c
commit
2ef834ebf4
@ -0,0 +1,25 @@
|
|||||||
|
package com.flossom.common.core.utils.poi;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.poi.ss.usermodel.Cell;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link com.flossom.common.core.domain.req.WxInstrumentSerialImportVm#validStatus}
|
||||||
|
*/
|
||||||
|
public class InstrumentSerialValidStatusAdapter implements ExcelHandlerAdapter {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object format(Object value, String[] args, Cell cell, Workbook wb) {
|
||||||
|
String v = (String) value;
|
||||||
|
if (StringUtils.equals(v, "有效")) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (StringUtils.equals(v, "无效")) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue