Commit a4d2a5b3 authored by 韩桐桐's avatar 韩桐桐

fix(jg):延炼八大类设备导入

parent af793dfb
...@@ -11,7 +11,7 @@ import java.util.Map; ...@@ -11,7 +11,7 @@ import java.util.Map;
public class EquCategoryConverter implements Converter<String> { public class EquCategoryConverter implements Converter<String> {
private static final Map<String, String> equipmentMap = new HashMap<>(); public static final Map<String, String> equipmentMap = new HashMap<>();
static { static {
// 填充映射关系 // 填充映射关系
...@@ -80,4 +80,13 @@ public class EquCategoryConverter implements Converter<String> { ...@@ -80,4 +80,13 @@ public class EquCategoryConverter implements Converter<String> {
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception { public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
return new CellData(""); return new CellData("");
} }
public static String getKeyByValue(String value) {
for (Map.Entry<String, String> entry : equipmentMap.entrySet()) {
if (entry.getValue().equals(value)) {
return entry.getKey();
}
}
return null;
}
} }
...@@ -108,4 +108,13 @@ public class EquDefineConverter implements Converter<String> { ...@@ -108,4 +108,13 @@ public class EquDefineConverter implements Converter<String> {
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception { public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
return new CellData(""); return new CellData("");
} }
public static String getKeyByValue(String value) {
for (Map.Entry<String, String> entry : equipmentMap.entrySet()) {
if (entry.getValue().equals(value)) {
return entry.getKey();
}
}
return null;
}
} }
...@@ -58,5 +58,13 @@ public class DataDockController { ...@@ -58,5 +58,13 @@ public class DataDockController {
} }
return ResponseHelper.buildResponse(dataDockService.dataCheckAndImportEquipmentData(remark, file)); return ResponseHelper.buildResponse(dataDockService.dataCheckAndImportEquipmentData(remark, file));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/delete")
@ApiOperation(httpMethod = "POST", value = "八大类历史设备导入shanchu", notes = "八大类历史设备导入shachu")
public Object importData() {
dataDockService.delete();
return ResponseHelper.buildResponse("ok");
}
} }
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