Commit 6f090816 by levphon

工单详情-导入

1 parent d8741627
......@@ -82,11 +82,11 @@ public class WorkOrderController {
}
@PostMapping(value = "/import", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public R importCustomers(@RequestParam("file") MultipartFile file) throws IOException {
public R importWorkOrders(@RequestParam("file") MultipartFile file) throws IOException {
WorkOrderImportListener listener = new WorkOrderImportListener(workOrderService);
EasyExcel.read(file.getInputStream(), WorkOrderImport.class, listener)
.head(WorkOrderImport.class)
.ignoreEmptyRow(false)
.ignoreEmptyRow(true)
.sheet().doRead();
BaseImportInfo importInfo = listener.getBaseImportInfo();
return R.ok().data(importInfo);
......
......@@ -76,7 +76,7 @@ public class WorkOrderImportListener extends AnalysisEventListener<WorkOrderImpo
continue;
}
String excelPropertyName = property.value()[0];
if (excelPropertyName.equals("客户状态") || excelPropertyName.equals("导入失败原因")) {
if (excelPropertyName.equals("导入失败原因")) {
continue;
}
String excelColumnName = headMap.get(property.index());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!