瀏覽代碼

宗地报表权利类型

chenendian 3 天之前
父節點
當前提交
3d8e67be5c

+ 4 - 5
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/cadastre/ParcelAnalysisController.java

@@ -85,9 +85,9 @@ public class ParcelAnalysisController extends BaseController {
      * @return ZdqlReportVO 含列头定义、各地籍子区数据行、合计行
      */
     @GetMapping("/report/zdql")
-    public R<ZdqlReportVO> getZdqlReport() {
+    public R<ZdqlReportVO> getZdqlReport(@RequestParam(value = "landRightType", required = true) String landRightType) {
         try {
-            ZdqlReportVO res = parcelService.getZdqlReport();
+            ZdqlReportVO res = parcelService.getZdqlReport(landRightType);
             return R.ok(res);
         } catch (Exception e) {
             e.printStackTrace();
@@ -95,7 +95,6 @@ public class ParcelAnalysisController extends BaseController {
         }
     }
 
-
     /**
      * 导出宗地权利报表(Excel格式)
      * 表格结构:
@@ -106,9 +105,9 @@ public class ParcelAnalysisController extends BaseController {
      *   - 末行:合计行
      */
     @PostMapping("/zdql/export")
-    public void exportZdqlReport(HttpServletResponse response) {
+    public void exportZdqlReport(HttpServletResponse response,@RequestParam(value = "landRightType",required = true) String landRightType) {
         try {
-            ZdqlReportVO res = parcelService.getZdqlReport();
+            ZdqlReportVO res = parcelService.getZdqlReport(landRightType);
             if (res == null) {
                 return;
             }

+ 1 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/mapper/cadastre/ZdjbxxMapper.java

@@ -77,7 +77,7 @@ public interface ZdjbxxMapper {
      * @param qllxCodes 要统计的权利类型代码列表(逗号分隔的字符串,如 '10','11','12','40','20')
      * @return 统计结果列表
      */
-    List<Map<String, Object>> getZdqlReportData(@Param("qllxCodes") List<String> qllxCodes);
+    List<Map<String, Object>> getZdqlReportData(@Param("qllxCodes") List<String> qllxCodes,@Param("landRightType")String landRightType);
 
     /**
      * 按土地用途(一级分类)× 权利性质统计宗地面积(用于宗地用途报表)

+ 1 - 2
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/IParcelService.java

@@ -13,12 +13,11 @@ public interface IParcelService {
 
     List<Zdjbxx> zdList(String djzqdm,String type);
 
-    ZdqlReportVO getZdqlReport();
+    ZdqlReportVO getZdqlReport(String landRightType);
 
     ZdytReportVO getZdytReport();
 
     List<ParcelStatisticsRes.QlxzDTO> getZdqlxzReport();
 
-
 }
 

+ 5 - 2
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/CadastreManageServiceImpl.java

@@ -1286,7 +1286,9 @@ public class CadastreManageServiceImpl implements CadastreManageService {
                 map.put("valid_flag", 0);
                 cleanDataForInsert(map, columnTypeMap);
                 if(tableName.equalsIgnoreCase("zdjbxx")){//这里使用主键自增
-                    map.put("bsm", "DEFAULT");
+                    map.remove("bsm");
+                    //map.put("bsm", "DEFAULT");
+                    //宗地权利类型(1-使用权;2-所有权)
                     if(StringUtils.isNotBlank(landRightType)){
                         map.put("sm", landRightType.trim());
                     }
@@ -1467,7 +1469,8 @@ public class CadastreManageServiceImpl implements CadastreManageService {
                 map.put("valid_flag", 0);
                 cleanDataForInsert(map, columnTypeMap);
                 if(tableName.equalsIgnoreCase("zdjbxx")){//这里使用主键自增
-                    map.put("bsm", "DEFAULT");
+                    map.remove("bsm");
+                    //map.put("bsm", "DEFAULT");
                     //宗地权利类型(1-使用权;2-所有权)
                     if(StringUtils.isNotBlank(landRightType)){
                         map.put("sm", landRightType.trim());

+ 2 - 2
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/ParcelServiceImpl.java

@@ -366,7 +366,7 @@ public class ParcelServiceImpl implements IParcelService {
      * @return ZdqlReportVO
      */
     @Override
-    public ZdqlReportVO getZdqlReport() {
+    public ZdqlReportVO getZdqlReport(String landRightType) {
         // ---------------------------------------------------
         // 1. 定义报表关注的权利类型列(顺序即为展示顺序)
         // ---------------------------------------------------
@@ -383,7 +383,7 @@ public class ParcelServiceImpl implements IParcelService {
         // ---------------------------------------------------
         // 2. 查询原始聚合数据(地籍子区 × 权利类型 × 登记状态)
         // ---------------------------------------------------
-        List<Map<String, Object>> rawData = zdjbxxMapper.getZdqlReportData(qllxCodes);
+        List<Map<String, Object>> rawData = zdjbxxMapper.getZdqlReportData(qllxCodes,landRightType);
 
         // ---------------------------------------------------
         // 3. 按地籍子区聚合:Map<djzqdm, Map<qllx, double[2]>>

+ 3 - 0
siwei-modules/siwei-apply/src/main/resources/mapper/cadastre/ZdjbxxMapper.xml

@@ -325,6 +325,9 @@
                 #{code}
             </foreach>
         </if>
+        <if test="landRightType != null and landRightType !=''">
+            AND zd.sm = #{landRightType}
+        </if>
         GROUP BY dq.djzqdm, dq.djzqmc, zd.qllx, zd.djzt
         ORDER BY dq.djzqdm, zd.qllx, zd.djzt
     </select>