Procházet zdrojové kódy

收储列表增加入参类型(用途,征地方式)

chenendian před 6 dny
rodič
revize
d19a16c543

+ 4 - 3
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/cadastre/StorageController.java

@@ -152,7 +152,6 @@ public class StorageController extends BaseController {
 
 
 
-
     /**
      * 根据年份和类型查询土地收储统计项目列表
      * supplyType: 0-全部,1-计划,2-完成
@@ -160,9 +159,11 @@ public class StorageController extends BaseController {
     @GetMapping("/projectList")
     public R<List<LandSupplyProjectVO>> getProjectList(@RequestParam(required = false) String year,
                                                        @RequestParam Integer supplyType,
-                                                       @RequestParam(required = false) String keyWord) {
+                                                       @RequestParam(required = false) String supplyMethod,
+                                                       @RequestParam(required = false) String useType) {
+
         try {
-            List<LandSupplyProjectVO> resList = storageServiceImpl.projectList(year, supplyType, keyWord);
+            List<LandSupplyProjectVO> resList = storageServiceImpl.projectList(year, supplyType, supplyMethod,useType);
             return R.ok(resList);
         } catch (Exception e) {
             e.printStackTrace();

+ 6 - 0
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/CadastreManageServiceImpl.java

@@ -972,6 +972,9 @@ public class CadastreManageServiceImpl implements CadastreManageService {
             for (Map<String, Object> map : theValueList) {
                 map.put("valid_flag", 0);
                 cleanDataForInsert(map, columnTypeMap);
+                if(tableName.equalsIgnoreCase("zdjbxx")){//这里使用主键自增
+                    map.put("bsm", "DEFAULT");
+                }
                 cadastreFileMapper.insertTableData(tableName, map, shpDbSRID);
             }
             addRes = true;
@@ -1147,6 +1150,9 @@ public class CadastreManageServiceImpl implements CadastreManageService {
             for (Map<String, Object> map : theValueList) {
                 map.put("valid_flag", 0);
                 cleanDataForInsert(map, columnTypeMap);
+                if(tableName.equalsIgnoreCase("zdjbxx")){//这里使用主键自增
+                    map.put("bsm", "DEFAULT");
+                }
                 cadastreFileMapper.insertTableData(tableName, map, shpDbSRID);
             }
             addRes = true;

+ 21 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/StorageServiceImpl.java

@@ -741,11 +741,28 @@ public class StorageServiceImpl {
     }
 
 
-
     public List<LandSupplyProjectVO> projectList(String year, Integer supplyType) {
         return projectList(year, supplyType, null);
     }
 
+    public List<LandSupplyProjectVO> projectList(String year, Integer supplyType, String supplyMethod,String useType){
+        List<LandSupplyProjectVO> res = new ArrayList<>();
+        List<LandSupplyProjectVO> list = projectList(year, supplyType, null);
+        if(CollectionUtils.isNotEmpty(list)){
+            if(StringUtils.isNotBlank(useType)) {
+                list = list.stream().filter(s -> s.getUseType().equals(useType)).collect(Collectors.toList());
+            }
+            if(StringUtils.isNotBlank(supplyMethod)) {
+                list = list.stream().filter(s -> s.getSupplyMethod().equals(supplyMethod)).collect(Collectors.toList());
+            }
+            res.addAll(list);
+        }
+        return res;
+    }
+
+
+
+
     public List<LandSupplyProjectVO> projectList(String year, Integer supplyType, String keyWord) {
         List<LandSupplyProjectVO> resList = new ArrayList<>();
         if (supplyType == 1) {
@@ -799,6 +816,7 @@ public class StorageServiceImpl {
             vo.setSupplyMethod(item.getGyfs());
             vo.setSupplyType("1");
             vo.setDateType("1");
+            vo.setUseType(item.getTdyt());
             vo.setGeom(item.getGeom());
             vo.setYear(item.getGysj());
             vo.setArea(String.format("%.2f", item.getMjMu() == null ? BigDecimal.ZERO : item.getMjMu()));
@@ -823,6 +841,8 @@ public class StorageServiceImpl {
             vo.setGeom(item.getGeom());
             vo.setYear(item.getGysj());
             vo.setArea(String.valueOf(item.getMjMu()));
+            vo.setUseType(item.getTdyt());
+
             return vo;
         }).collect(Collectors.toList());
     }

+ 1 - 1
siwei-modules/siwei-apply/src/main/resources/mapper/GjShijiShouchuMapper.xml

@@ -171,7 +171,7 @@
             xmmc AS xmmc,
             yqsdw AS company,
             CAST(gid AS VARCHAR) AS nodeId,
-            COALESCE(ghyt, '其它') AS tdyt,
+            COALESCE(NULLIF(ghyt, ''), '其它') AS tdyt,
             scfs AS gyfs,
             to_timestamp(scsj, 'YYYY/MM/DD') AS gysj,
             ROUND(CAST(mj_m AS NUMERIC), 2) AS mjMu,

+ 1 - 1
siwei-modules/siwei-apply/src/main/resources/mapper/GjShouchuJihuaMapper.xml

@@ -53,7 +53,7 @@
             mj_12 AS mjPfm,
             ROUND(COALESCE(mj_m, 0), 2) AS mjMu,
             COALESCE(xmmc, htmc, dzjgh, CONCAT('收储计划-', gid)) AS xmmc,
-            ghyt AS tdyt,
+            COALESCE(NULLIF(ghyt, ''), '其它') AS tdyt,
             scfs AS gyfs,
             COALESCE(qdrq, TO_DATE(scnf || '-01-01', 'YYYY-MM-DD')) AS gysj,
             sccb AS cost,