|
@@ -7,10 +7,12 @@ import com.siwei.apply.domain.RowUpdateContent;
|
|
|
import com.siwei.apply.domain.vo.*;
|
|
import com.siwei.apply.domain.vo.*;
|
|
|
import com.siwei.apply.service.cadastre.CadastreManageService;
|
|
import com.siwei.apply.service.cadastre.CadastreManageService;
|
|
|
import com.siwei.apply.service.cadastre.impl.FzssFxrwrzHandleService;
|
|
import com.siwei.apply.service.cadastre.impl.FzssFxrwrzHandleService;
|
|
|
|
|
+import com.siwei.apply.utils.ServiceFileUtil;
|
|
|
import com.siwei.common.core.domain.R;
|
|
import com.siwei.common.core.domain.R;
|
|
|
import com.siwei.common.core.utils.bean.BeanUtils;
|
|
import com.siwei.common.core.utils.bean.BeanUtils;
|
|
|
import com.siwei.common.core.utils.poi.ExcelUtil;
|
|
import com.siwei.common.core.utils.poi.ExcelUtil;
|
|
|
import com.siwei.common.core.web.controller.BaseController;
|
|
import com.siwei.common.core.web.controller.BaseController;
|
|
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.gdal.ogr.*;
|
|
import org.gdal.ogr.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -25,6 +27,7 @@ import java.util.*;
|
|
|
import java.net.URLEncoder;
|
|
import java.net.URLEncoder;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.nio.charset.StandardCharsets;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/cadastre/manage")
|
|
@RequestMapping("/cadastre/manage")
|
|
@@ -333,17 +336,19 @@ public class CadastreManageController extends BaseController {
|
|
|
return R.ok();
|
|
return R.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
@PostMapping("/export")
|
|
@PostMapping("/export")
|
|
|
- public void exportList(HttpServletResponse response, RowUpdateContent content) {
|
|
|
|
|
|
|
+ public void exportList(HttpServletResponse response, @RequestBody RowUpdateContent content) {
|
|
|
try {
|
|
try {
|
|
|
- YdbpDataFilterVo filterVo = new YdbpDataFilterVo();
|
|
|
|
|
-// BeanUtils.copyProperties(ydbpExcelVo, filterVo);
|
|
|
|
|
-// Map<String, Object> result = ydbpDataService.getList(filterVo);
|
|
|
|
|
-// List<YdbpExcelVo> list = ydbpDataService.transformation(result);
|
|
|
|
|
-// ExcelUtil<YdbpExcelVo> util = new ExcelUtil<>(YdbpExcelVo.class);
|
|
|
|
|
-// ExcelUtil<Map<String,Object>> util = new ExcelUtil<Map>(Map.class);
|
|
|
|
|
-// util.exportExcel(response, list, "报批数据");
|
|
|
|
|
|
|
+ String tableName = content.getTableName();
|
|
|
|
|
+ List<Map<String, Object>> paramlist = content.getRowList();
|
|
|
|
|
+ List<Object> bsmList = null;
|
|
|
|
|
+ List<String> ywhList = null;
|
|
|
|
|
+ if(CollectionUtils.isNotEmpty(paramlist)){
|
|
|
|
|
+ bsmList = paramlist.stream().filter(map -> map.containsKey("bsm")).map(map -> map.get("bsm")).collect(Collectors.toList());
|
|
|
|
|
+ ywhList = paramlist.stream().filter(map -> map.containsKey("ywh")).map(map -> map.get("ywh").toString()).collect(Collectors.toList());
|
|
|
|
|
+ }
|
|
|
|
|
+ List<Map<String, Object>> list = cadastreManageService.selectTableRowExcel(tableName, "0", bsmList, ywhList);
|
|
|
|
|
+ ServiceFileUtil.exportExcel(response,list,tableName+"导出");
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
@@ -351,7 +356,4 @@ public class CadastreManageController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|