Commit d4b664fa by 111-PC\111

[+]设备导入

1 parent e9e0ccf5
......@@ -62,5 +62,5 @@ public interface DeviceMgrService {
* @param list 入参
* @return
*/
Map<String, Object> importDevice(Collection<DeviceImportVo> list);
Map<String, Object> importDevice(List<DeviceImportVo> list);
}
package cn.com.glsx.openplatform.vo;
import com.glsx.excel.poi.Version;
import com.glsx.excel.poi.annotation.ExcelColumn;
import com.glsx.excel.poi.annotation.ExcelExport;
import com.glsx.excel.poi.annotation.ExcelImport;
import com.glsx.poi.util.ExcelAnnotation;
import java.io.Serializable;
......@@ -8,15 +12,17 @@ import java.io.Serializable;
* @author zhouhaibao
* @date 2021/1/5 9:57
*/
@ExcelExport(version = Version.EXCEL2007, autoWidth = false)
@ExcelImport(startRow = 1)
public class DeviceImportVo implements Serializable {
@ExcelAnnotation("SN")
@ExcelColumn(value = "SN", index = 0)
private String deviceSn;
@ExcelAnnotation("类型")
private String deviceType;
@ExcelAnnotation("客户")
@ExcelColumn(value = "客户", index = 1)
private String customerName;
@ExcelAnnotation("版本号")
@ExcelColumn(value = "类型", index = 2)
private String deviceType;
@ExcelColumn(value = "版本号", index = 3)
private String version;
private Integer customerId;
......
......@@ -74,7 +74,7 @@ public class DeviceMgrServiceImpl implements DeviceMgrService {
}
@Override
public Map<String, Object> importDevice(Collection<DeviceImportVo> list) {
public Map<String, Object> importDevice(List<DeviceImportVo> list) {
Map<String, Object> objectMap = new HashMap<>();
if (!CollectionUtils.isEmpty(list)) {
checkDevice(list, objectMap);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!