LAPTOP-BJJ3IV5R\SIWEI преди 9 месеца
родител
ревизия
d642b0a8bd

+ 152 - 114
onemap-modules/onemap-model/src/main/java/com/onemap/sanya/controller/SanYaController.java

@@ -7,6 +7,7 @@ import com.alibaba.fastjson2.JSONObject;
 import com.deepoove.poi.XWPFTemplate;
 import com.deepoove.poi.config.Configure;
 import com.deepoove.poi.data.PictureRenderData;
+import com.deepoove.poi.data.PictureType;
 import com.deepoove.poi.data.Pictures;
 import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
 import com.deepoove.poi.template.MetaTemplate;
@@ -30,10 +31,7 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.*;
 import java.net.URLEncoder;
 import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -49,27 +47,30 @@ public class SanYaController extends BaseController {
 
     /**
      * 导出选址报告word
-     *
      * @param request
      * @param response
      */
     @RequestMapping("/exportWord1")
     private void exportWord1(HttpServletRequest request, HttpServletResponse response) {
-        log.info("exportWord1!");
         try {
             SiteSelectionReport siteSelectionReport = setWordData1();
             if (siteSelectionReport == null) {
                 log.info("选址报告数据为空,导出失败!");
                 return;
             }
-            String basePath = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/word/";
-            //word模板地址
-            String resource = basePath + "01-选址报告-02.docx";
+//            String basePath = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/word/";
+//            //word模板地址
+//            String resource = basePath + "01-选址报告-02.docx";
+
+            String basePath = this.getClass().getClassLoader().getResource("template/word/").getPath();
+            String resource = basePath + "02-合规性分析报告-02.docx";
+            FileInputStream fileInputStream = new FileInputStream(resource);
+
             Configure configure = Configure.builder()
                     .bind("tableList", new LoopRowTableRenderPolicy())
                     .bind("analyseList", new AnalyseDetailTablePolicy()).build();
             // 通过 XWPFTemplate 编译文件并渲染数据到模板中
-            XWPFTemplate template = XWPFTemplate.compile(resource, configure).render(siteSelectionReport);
+            XWPFTemplate template = XWPFTemplate.compile(fileInputStream, configure).render(siteSelectionReport);
             //生成临时文件存放地址
             String temDir = basePath;
             //生成文件名
@@ -83,29 +84,32 @@ public class SanYaController extends BaseController {
 
     /**
      * 导出选址报告word
-     *
      * @param request
      * @param response
      */
     @RequestMapping("/exportWord2")
     private void exportWord2(HttpServletRequest request, HttpServletResponse response) {
-        log.info("exportWord2!");
         try {
             ComplianceAnalysisReport complianceAnalysisReport = setWordData2();
             if (complianceAnalysisReport == null) {
                 log.info("合规性分析报告数据为空,导出失败!");
                 return;
             }
-            String basePath = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/word/";
-            //word模板地址
+//            String basePath = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/word/";
+//            //word模板地址
+//            String resource = basePath + "02-合规性分析报告-02.docx";
+
+            String basePath = this.getClass().getClassLoader().getResource("template/word/").getPath();
             String resource = basePath + "02-合规性分析报告-02.docx";
+            FileInputStream fileInputStream = new FileInputStream(resource);
+
             Configure configure = Configure.builder()
                     .bind("tableList01", new LoopRowTableRenderPolicy())
                     .bind("tableList02", new LoopRowTableRenderPolicy())
                     .bind("analyseList01", new AnalyseDetailTablePolicy())
                     .bind("analyseList02", new AnalyseDetailTablePolicy()).build();
             // 通过 XWPFTemplate 编译文件并渲染数据到模板中
-            XWPFTemplate template = XWPFTemplate.compile(resource, configure).render(complianceAnalysisReport);
+            XWPFTemplate template = XWPFTemplate.compile(fileInputStream, configure).render(complianceAnalysisReport);
             List<MetaTemplate> elementTemplates = template.getElementTemplates();
             for (MetaTemplate elementTemplate : elementTemplates) {
                 String variable = elementTemplate.variable();
@@ -132,7 +136,6 @@ public class SanYaController extends BaseController {
 
     /**
      * 导出征收补偿预估报告word
-     *
      * @param request
      * @param response
      */
@@ -144,13 +147,18 @@ public class SanYaController extends BaseController {
                 log.info("征收补偿预估报告数据为空,导出失败!");
                 return;
             }
-            String basePath = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/word/";
-            //word模板地址
+//            String basePath = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/word/";
+//            //word模板地址
+//            String resource = basePath + "03-征收补偿预估报告-02.docx";
+
+            String basePath = this.getClass().getClassLoader().getResource("template/word/").getPath();
             String resource = basePath + "03-征收补偿预估报告-02.docx";
+            FileInputStream fileInputStream = new FileInputStream(resource);
+
             Configure configure = Configure.builder()
                     .bind("tableList01", new LoopRowTableRenderPolicy()).build();
             // 通过 XWPFTemplate 编译文件并渲染数据到模板中
-            XWPFTemplate template = XWPFTemplate.compile(resource, configure).render(compensateEstimateReport);
+            XWPFTemplate template = XWPFTemplate.compile(fileInputStream, configure).render(compensateEstimateReport);
             //生成临时文件存放地址
             String temDir = basePath;
             //生成文件名
@@ -164,7 +172,6 @@ public class SanYaController extends BaseController {
 
     /**
      * 导出基准地价报告word
-     *
      * @param request
      * @param response
      */
@@ -176,14 +183,28 @@ public class SanYaController extends BaseController {
                 log.info("基准地价报告数据为空,导出失败!");
                 return error("基准地价报告数据为空,导出失败!");
             }
-            String basePath = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/word/";
-            //word模板地址
+            List<PicData> picList = new ArrayList<>();
+            //将base64图片转为PictureRenderData
+            for (String base64ImageData:benchmarkLandPriceReport.getPicBase64List()) {
+
+                PictureRenderData pictureRenderData =Pictures.ofBase64(base64ImageData, PictureType.JPEG).size(300, 200).create();
+                picList.add(new PicData(pictureRenderData));
+            }
+            benchmarkLandPriceReport.setPicList(picList);
+
+//            String basePath = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/word/";
+//            //word模板地址
+//            String resource = basePath + "04-基准地价报告-02.docx";
+
+            String basePath = this.getClass().getClassLoader().getResource("template/word/").getPath();
             String resource = basePath + "04-基准地价报告-02.docx";
+            FileInputStream fileInputStream = new FileInputStream(resource);
+
             Configure configure = Configure.builder()
                     .bind("tableList01", new LoopRowTableRenderPolicy())
                     .bind("tableList02", new LoopRowTableRenderPolicy()).build();
             // 通过 XWPFTemplate 编译文件并渲染数据到模板中
-            XWPFTemplate template = XWPFTemplate.compile(resource, configure).render(benchmarkLandPriceReport);
+            XWPFTemplate template = XWPFTemplate.compile(fileInputStream, configure).render(benchmarkLandPriceReport);
             List<MetaTemplate> elementTemplates = template.getElementTemplates();
             for (MetaTemplate elementTemplate : elementTemplates) {
                 String variable = elementTemplate.variable();
@@ -198,11 +219,10 @@ public class SanYaController extends BaseController {
                 }
             }
             //生成文件存放地址
-            String temDir = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/storageword/";
-            ;
+            String temDir = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/storageword/";;
             //生成文件名
             String wordName = "04-基准地价报告-02" + "-" + System.currentTimeMillis();
-            String fileUrl = storageWord(response, temDir, wordName, template);
+            String fileUrl=storageWord(response, temDir, wordName, template);
 
             return success(fileUrl);
         } catch (Exception e) {
@@ -214,13 +234,12 @@ public class SanYaController extends BaseController {
 
     /**
      * 下载分析文档
-     *
      * @param fileName
      * @param response
      */
 
     @RequestMapping("/getWord")
-    private void getWord(String fileName, HttpServletResponse response) {
+    private void getWord( String fileName,HttpServletResponse response) {
         String filePath = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/storageword/";
         // 设置请求头
         response.setContentType("application/octet-stream");
@@ -233,9 +252,9 @@ public class SanYaController extends BaseController {
         try {
             // 输出
             os = response.getOutputStream();
-            File file = new File(filePath + fileName);
+            File file = new File(filePath+fileName);
             if (!file.exists()) {
-                throw new FileNotFoundException(filePath + fileName);
+                throw new FileNotFoundException(filePath+fileName);
             }
             fis = new FileInputStream(file);
             byte[] b = new byte[1024];
@@ -252,6 +271,7 @@ public class SanYaController extends BaseController {
     }
 
 
+
     /**
      * 封装-选址报告导出数据
      *
@@ -260,10 +280,15 @@ public class SanYaController extends BaseController {
     private SiteSelectionReport setWordData1() {
         try {
             SiteSelectionReport siteSelectionReport = new SiteSelectionReport();
-            // 模拟数据 读取静态JSON文件填充数据  根据resource文件路径,生成文件
-            File jsonFile = ResourceUtils.getFile("classpath:template/json/word.json");
-            // 解析文件为指定编码的字符串
-            String json = FileUtils.readFileToString(jsonFile, "UTF-8");
+//            // 模拟数据 读取静态JSON文件填充数据  根据resource文件路径,生成文件
+//            File jsonFile = ResourceUtils.getFile("classpath:template/json/word.json");
+//            // 解析文件为指定编码的字符串
+//            String json = FileUtils.readFileToString(jsonFile, "UTF-8");
+
+            ClassPathResource classPathResource = new ClassPathResource("template/json/word.json");
+            InputStream inputStream = classPathResource.getInputStream();
+            String json = org.apache.commons.io.IOUtils.toString(inputStream, StandardCharsets.UTF_8);
+
             // 转换格式
             JSONObject jsonObject = JSON.parseObject(json);
             // 读取模拟数据 并赋值给导出对象
@@ -303,7 +328,7 @@ public class SanYaController extends BaseController {
                         String cKey = child.getKey();
                         String cValue = child.getValue();
                         //封装一级,二级,模拟设置分析值
-                        analyseData = new AnalyseData(key, value, cKey, cValue, new Random().nextDouble() * 100, new Random().nextDouble() * 100);
+                        analyseData = new AnalyseData(key, value, cKey, cValue, new Random().nextDouble()*100, new Random().nextDouble()*100);
                         analyseList.add(analyseData);
                         //计算总面积
                         if (analyseData.getAreaValue() != null) {
@@ -339,10 +364,15 @@ public class SanYaController extends BaseController {
     private ComplianceAnalysisReport setWordData2() {
         try {
             ComplianceAnalysisReport complianceAnalysisReport = new ComplianceAnalysisReport();
-            // 模拟数据 读取静态JSON文件填充数据  根据resource文件路径,生成文件
-            File jsonFile = ResourceUtils.getFile("classpath:template/json/word.json");
-            // 解析文件为指定编码的字符串
-            String json = FileUtils.readFileToString(jsonFile, "UTF-8");
+//            // 模拟数据 读取静态JSON文件填充数据  根据resource文件路径,生成文件
+//            File jsonFile = ResourceUtils.getFile("classpath:template/json/word.json");
+//            // 解析文件为指定编码的字符串
+//            String json = FileUtils.readFileToString(jsonFile, "UTF-8");
+
+            ClassPathResource classPathResource = new ClassPathResource("template/json/word.json");
+            InputStream inputStream = classPathResource.getInputStream();
+            String json = org.apache.commons.io.IOUtils.toString(inputStream, StandardCharsets.UTF_8);
+
             // 转换格式
             JSONObject jsonObject = JSON.parseObject(json);
             // 读取模拟数据 并赋值给导出对象
@@ -370,8 +400,8 @@ public class SanYaController extends BaseController {
                         String cKey = child.getKey();
                         String cValue = child.getValue();
                         //封装一级,二级,模拟设置分析值
-                        analyseData01 = new AnalyseData(key, value, cKey, cValue, new Random().nextDouble() * 100, new Random().nextDouble() * 100);
-                        analyseData02 = new AnalyseData(key, value, cKey, cValue, new Random().nextDouble() * 100, new Random().nextDouble() * 100);
+                        analyseData01 = new AnalyseData(key, value, cKey, cValue, new Random().nextDouble()*100, new Random().nextDouble()*100);
+                        analyseData02 = new AnalyseData(key, value, cKey, cValue, new Random().nextDouble()*100, new Random().nextDouble()*100);
                         analyseList01.add(analyseData01);
                         analyseList02.add(analyseData02);
                         //计算现状分析总面积
@@ -459,10 +489,15 @@ public class SanYaController extends BaseController {
     private CompensateEstimateReport setWordData3() {
         try {
             CompensateEstimateReport compensateEstimateReport = new CompensateEstimateReport();
-            // 模拟数据 读取静态JSON文件填充数据  根据resource文件路径,生成文件
-            File jsonFile = ResourceUtils.getFile("classpath:template/json/word.json");
-            // 解析文件为指定编码的字符串
-            String json = FileUtils.readFileToString(jsonFile, "UTF-8");
+//            // 模拟数据 读取静态JSON文件填充数据  根据resource文件路径,生成文件
+//            File jsonFile = ResourceUtils.getFile("classpath:template/json/word.json");
+//            // 解析文件为指定编码的字符串
+//            String json = FileUtils.readFileToString(jsonFile, "UTF-8");
+
+            ClassPathResource classPathResource = new ClassPathResource("template/json/word.json");
+            InputStream inputStream = classPathResource.getInputStream();
+            String json = org.apache.commons.io.IOUtils.toString(inputStream, StandardCharsets.UTF_8);
+
             // 转换格式
             JSONObject jsonObject = JSON.parseObject(json);
             // 读取模拟数据 并赋值给导出对象
@@ -512,75 +547,75 @@ public class SanYaController extends BaseController {
      *
      * @return
      */
-    private BenchmarkLandPriceReport setWordData4() {
-        try {
-            BenchmarkLandPriceReport benchmarkLandPriceReport = new BenchmarkLandPriceReport();
-            // 模拟数据 读取静态JSON文件填充数据  根据resource文件路径,生成文件
-            File jsonFile = ResourceUtils.getFile("classpath:template/json/word.json");
-            // 解析文件为指定编码的字符串
-            String json = FileUtils.readFileToString(jsonFile, "UTF-8");
-            // 转换格式
-            JSONObject jsonObject = JSON.parseObject(json);
-            // 读取模拟数据 并赋值给导出对象
-            String wordDataJson = jsonObject.get("wordData4").toString();
-            benchmarkLandPriceReport = JSON.parseObject(wordDataJson, BenchmarkLandPriceReport.class);
-
-            //模拟读取静态图片 赋值给导出对象
-            String imgPath = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/img/test.png";
-            PictureRenderData pictureRenderData = Pictures.ofLocal(imgPath).size(300, 200).create();
-            List<PicData> picList = new ArrayList<>();
-            picList.add(new PicData(pictureRenderData));
-            picList.add(new PicData(pictureRenderData));
-            picList.add(new PicData(pictureRenderData));
-            benchmarkLandPriceReport.setPicList(picList);
-
-            //模拟 用地地价预估情况 数据,分为 国有建设用地 集体建设用地
-            List<LandPriceEstimation> tableList01 = new ArrayList<>();
-            List<LandPriceEstimation> tableList02 = new ArrayList<>();
-            for (int i = 0; i < 6; i++) {
-                tableList01.add(new LandPriceEstimation(LvArray[i], new Random().nextDouble() * 100, new Random().nextDouble() * 100, new Random().nextDouble() * 100));
-                tableList02.add(new LandPriceEstimation(LvArray[i], new Random().nextDouble() * 100, new Random().nextDouble() * 100, new Random().nextDouble() * 100));
-            }
-
-            //国有建设用地面积 国有土地地价预估 默认0
-            Double areaSCL = 0.0;
-            Double landPriceESCL = 0.0;
-            //集体建设用地面积 集体土地地价预估 默认0
-            Double areaCCL = 0.0;
-            Double landPriceECCL = 0.0;
-            //总面积 总地价预估 默认0
-            Double totalArea = 0.0;
-            Double totalLandPrice = 0.0;
-            if (tableList01 != null && tableList01.size() > 0) {
-                areaSCL = tableList01.stream().mapToDouble(obj -> obj.getArea() != null ? obj.getArea() : 0).sum();
-                landPriceESCL = tableList01.stream().mapToDouble(obj -> obj.getLandPriceES() != null ? obj.getLandPriceES() : 0).sum();
-            }
-            if (tableList02 != null && tableList02.size() > 0) {
-                areaCCL = tableList02.stream().mapToDouble(obj -> obj.getArea() != null ? obj.getArea() : 0).sum();
-                landPriceECCL = tableList02.stream().mapToDouble(obj -> obj.getLandPriceES() != null ? obj.getLandPriceES() : 0).sum();
-            }
-            if (areaSCL > 0 && areaCCL > 0) {
-                totalArea = areaSCL + areaCCL;
-            }
-            if (landPriceESCL > 0 && landPriceECCL > 0) {
-                totalLandPrice = landPriceESCL + landPriceECCL;
-            }
-            // 赋值导出对象
-            benchmarkLandPriceReport.setTableList01(tableList01);
-            benchmarkLandPriceReport.setTableList02(tableList02);
-            benchmarkLandPriceReport.setTotalArea(totalArea);
-            benchmarkLandPriceReport.setTotalLandPrice(totalLandPrice);
-            benchmarkLandPriceReport.setAreaSCL(areaSCL);
-            benchmarkLandPriceReport.setLandPriceESCL(landPriceESCL);
-            benchmarkLandPriceReport.setAreaCCL(areaCCL);
-            benchmarkLandPriceReport.setLandPriceECCL(landPriceECCL);
-            return benchmarkLandPriceReport;
-        } catch (Exception e) {
-            e.printStackTrace();
-            log.error("基准地价报告数据封装异常,{}" + e);
-        }
-        return null;
-    }
+//    private BenchmarkLandPriceReport setWordData4() {
+//        try {
+//            BenchmarkLandPriceReport benchmarkLandPriceReport = new BenchmarkLandPriceReport();
+//            // 模拟数据 读取静态JSON文件填充数据  根据resource文件路径,生成文件
+//            File jsonFile = ResourceUtils.getFile("classpath:template/json/word.json");
+//            // 解析文件为指定编码的字符串
+//            String json = FileUtils.readFileToString(jsonFile, "UTF-8");
+//            // 转换格式
+//            JSONObject jsonObject = JSON.parseObject(json);
+//            // 读取模拟数据 并赋值给导出对象
+//            String wordDataJson = jsonObject.get("wordData4").toString();
+//            benchmarkLandPriceReport = JSON.parseObject(wordDataJson, BenchmarkLandPriceReport.class);
+//
+//            //模拟读取静态图片 赋值给导出对象
+//            String imgPath = ClassUtils.getDefaultClassLoader().getResource("").getPath() + "template/img/test.png";
+//            PictureRenderData pictureRenderData = Pictures.ofLocal(imgPath).size(300, 200).create();
+//            List<PicData> picList = new ArrayList<>();
+//            picList.add(new PicData(pictureRenderData));
+//            picList.add(new PicData(pictureRenderData));
+//            picList.add(new PicData(pictureRenderData));
+//            benchmarkLandPriceReport.setPicList(picList);
+//
+//            //模拟 用地地价预估情况 数据,分为 国有建设用地 集体建设用地
+//            List<LandPriceEstimation> tableList01 = new ArrayList<>();
+//            List<LandPriceEstimation> tableList02 = new ArrayList<>();
+//            for (int i = 0; i < 6; i++) {
+//                tableList01.add(new LandPriceEstimation(LvArray[i], new Random().nextDouble()*100, new Random().nextDouble()*100, new Random().nextDouble()*100));
+//                tableList02.add(new LandPriceEstimation(LvArray[i], new Random().nextDouble()*100, new Random().nextDouble()*100, new Random().nextDouble()*100));
+//            }
+//
+//            //国有建设用地面积 国有土地地价预估 默认0
+//            Double areaSCL = 0.0;
+//            Double landPriceESCL = 0.0;
+//            //集体建设用地面积 集体土地地价预估 默认0
+//            Double areaCCL = 0.0;
+//            Double landPriceECCL = 0.0;
+//            //总面积 总地价预估 默认0
+//            Double totalArea = 0.0;
+//            Double totalLandPrice = 0.0;
+//            if (tableList01 != null && tableList01.size() > 0) {
+//                areaSCL = tableList01.stream().mapToDouble(obj -> obj.getArea() != null ? obj.getArea() : 0).sum();
+//                landPriceESCL = tableList01.stream().mapToDouble(obj -> obj.getLandPriceES() != null ? obj.getLandPriceES() : 0).sum();
+//            }
+//            if (tableList02 != null && tableList02.size() > 0) {
+//                areaCCL = tableList02.stream().mapToDouble(obj -> obj.getArea() != null ? obj.getArea() : 0).sum();
+//                landPriceECCL = tableList02.stream().mapToDouble(obj -> obj.getLandPriceES() != null ? obj.getLandPriceES() : 0).sum();
+//            }
+//            if (areaSCL > 0 && areaCCL > 0) {
+//                totalArea = areaSCL + areaCCL;
+//            }
+//            if (landPriceESCL > 0 && landPriceECCL > 0) {
+//                totalLandPrice = landPriceESCL + landPriceECCL;
+//            }
+//            // 赋值导出对象
+//            benchmarkLandPriceReport.setTableList01(tableList01);
+//            benchmarkLandPriceReport.setTableList02(tableList02);
+//            benchmarkLandPriceReport.setTotalArea(totalArea);
+//            benchmarkLandPriceReport.setTotalLandPrice(totalLandPrice);
+//            benchmarkLandPriceReport.setAreaSCL(areaSCL);
+//            benchmarkLandPriceReport.setLandPriceESCL(landPriceESCL);
+//            benchmarkLandPriceReport.setAreaCCL(areaCCL);
+//            benchmarkLandPriceReport.setLandPriceECCL(landPriceECCL);
+//            return benchmarkLandPriceReport;
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            log.error("基准地价报告数据封装异常,{}" + e);
+//        }
+//        return null;
+//    }
 
 
     /**
@@ -636,4 +671,7 @@ public class SanYaController extends BaseController {
         out.close();
         return fileName;
     }
+
+
+
 }

+ 1 - 1
onemap-modules/onemap-model/src/main/java/com/onemap/sanya/domain/BenchmarkLandPriceReport.java

@@ -67,7 +67,7 @@ public class BenchmarkLandPriceReport {
      * 图片集 分析范围
      */
     private List<PicData> picList;
-
+    private List<String> picBase64List;
     /**
      * 报告类型名称
      */

+ 102 - 0
onemap-modules/onemap-model/src/main/resources/template/storageword/04-基准地价报告-02.docx

@@ -0,0 +1,102 @@
+基准地价报告
+1 基准地价内涵
+  根据2020年《三亚市国有建设用地土地定级与基准地价》和《三亚市集体建设用地土地定级与基准地价》编制成果,实现指定范围内国有建设用地和集体建设用的基准地价预估。国有建设用地和集体建设用地基准地价内涵说明如下表。
+                                    内涵
+                                 商服用地
+                                 住宅用地
+                                工矿仓用地
+                       公共服务项目用地(一)
+                         公共服务项目用地(二)
+                                评估基准日
+2019年7月1日
+                              土地开发程度
+五通一平
+                                设定容积率
+2
+2.5
+1
+中心城区
+中心城区以外区域
+1
+                                       
+
+
+
+1.5
+1
+
+                              土地使用年限
+40年
+70年
+50年
+50年
+50年
+                                 价格类型
+平均楼面地价
+平均楼面地价
+地面地价
+地面地价
+地面地价
+                                    备注
+(1)商服用地、住宅用地的价格表现形式为平均楼面地价;
+(2)五通一平:即宗地外通路、通给水、通排水、通电力、通电讯和宗地内土地平整;
+(3) 公共服务项目用地(一) 指新闻出版、教育、科研、医疗卫生、社会福利、机关团体、文化设施、体育用地等项目用地;
+(4) 公共服务项目用地 (二) 指用于城乡基础设施的用地,包括公用设施、公园与绿地用地等项目用地;
+(5) 公共服务项目用地为非政府投资的公共服务用地价格。
+2 基准地价信息
+项目名称
+{{projectName}}
+分析时间
+{{analysisDate}}
+项目类型
+{{projectType}}
+建设单位
+{{buildUnit}}
+分析面积(亩)
+{{analysisArea}}
+总地价(万元)
+{{totalLandPrice}}
+国有建设用地面积(亩)
+{{areaSCL}}
+国有建设用地基准地价(万元)
+{{baseLandPriceSCL}}
+集体建设用地面积(亩)
+{{areaCCL}}
+集体建设用地基准地价(万元)
+{{baseLandPriceCCL}}
+分析范围
+{{?picList}}{{@img}}{{/picList}}
+3 {{definitionBLP}}用地地价预估情况
+  {{definitionBLP}}用地共{{totalArea}}亩,土地地价预估{{totalLandPrice}}万元,其中:{{definitionBLP}}国有建设用地共{{areaSCL}}亩,土地地价预估{{landPriceESCL}}万元;{{definitionBLP}}集体建设用地共{{areaCCL}}亩,土地地价预估{{landPriceECCL}}万元。具体如下:
+                                        
+                                        
+表1 {{definitionBLP}}用地地价预估情况{{definitionBLP}}用地预估情况
+土地权属
+                                    级别
+                              地价(元/亩)
+                             土地面积(亩)
+                          总地价预估(万元)
+{{tableList01}}
+国有建设用地
+[lv]
+[landPrice]
+[area]
+[landPriceES]
+
+
+
+
+
+{{tableList02}}
+集体建设用地
+[lv]
+[landPrice]
+[area]
+[landPriceES]
+                                       
+                                       
+                                       
+                                       
+                                       
+                                        
+ 

+ 8 - 10
onemap-modules/onemap-model/src/main/resources/template/word/04-基准地价报告-02.docx

@@ -52,29 +52,29 @@
 {{projectType}}
 建设单位
 {{buildUnit}}
-分析面积(平方米
+分析面积(
 {{analysisArea}}
 总地价(万元)
 {{totalLandPrice}}
-国有建设用地面积(平方米
+国有建设用地面积(
 {{areaSCL}}
 国有建设用地基准地价(万元)
 {{baseLandPriceSCL}}
-集体建设用地面积(平方米
+集体建设用地面积(
 {{areaCCL}}
 集体建设用地基准地价(万元)
 {{baseLandPriceCCL}}
 分析范围
 {{?picList}}{{@img}}{{/picList}}
-3 {{definitionBLP}}用地地价预估情况(XXX取值为商服用地、住宅用地、工矿仓储用地、公共服务项目用地(一)、公共服务项目用地(二))
-  {{definitionBLP}}用地共{{totalArea}}平方米,土地地价预估{{totalLandPrice}}万元,其中:{{definitionBLP}}国有建设用地共{{areaSCL}}平方米,土地地价预估{{landPriceESCL}}万元;{{definitionBLP}集体建设用地共{{areaCCL}}平方米,土地地价预估{{landPriceECCL}}万元。具体如下:
+3 {{definitionBLP}}用地地价预估情况
+  {{definitionBLP}}用地共{{totalArea}},土地地价预估{{totalLandPrice}}万元,其中:{{definitionBLP}}国有建设用地共{{areaSCL}}亩,土地地价预估{{landPriceESCL}}万元;{{definitionBLP}}集体建设用地共{{areaCCL}}亩,土地地价预估{{landPriceECCL}}万元。具体如下:
                                         
                                         
 表1 {{definitionBLP}}用地地价预估情况{{definitionBLP}}用地预估情况
 土地权属
                                     级别
-                           地价(元/平方米
-                          土地面积(平方米
+                              地价(元/亩
+                             土地面积(亩
                           总地价预估(万元)
 {{tableList01}}
 国有建设用地
@@ -99,6 +99,4 @@
                                        
                                        
                                         
-4 XXX用地地价预估情况
-  ......
-5 ......
+ 

+ 1 - 0
onemap-modules/pom.xml

@@ -14,6 +14,7 @@
         <module>onemap-apply</module>
         <module>onemap-analyse</module>
         <module>onemap-spatial</module>
+        <module>onemap-model</module>
     </modules>
     <dependencies>
         <!--postgresql-->

+ 10 - 1
sql/pgsql/0_init.sql

@@ -7,4 +7,13 @@ COMMENT ON COLUMN "base"."t_fzss_fzxz"."is_delete" IS '是否删除';
 UPDATE t_fzss_fzxz SET is_delete=FALSE;
 
 --修改坐标系
-update  vector."TB_TDGY_SJ" set  geom= st_setsrid(geom,4326)
+update  vector."TB_TDGY_SJ" set  geom= st_setsrid(geom,4326)
+
+-- vector新增表
+t_table
+t_table_conversion
+t_table_filed
+t_table_filed_relation
+t_table_inside_outside
+t_table_res_rule
+t_table_res_tabel