1
0
chenendian 1 день назад
Родитель
Сommit
49cec14584

+ 5 - 2
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/cadastre/SupplyController.java

@@ -279,9 +279,12 @@ public class SupplyController extends BaseController {
      * @return
      * @return
      */
      */
     @GetMapping("/useMethodList")
     @GetMapping("/useMethodList")
-    public R<List<LandSupplyProjectVO>> useTypeAndMethodList(@RequestParam String year, @RequestParam(required = false) String useType, @RequestParam(required = false) String supplyType) {
+    public R<List<LandSupplyProjectVO>> useTypeAndMethodList(@RequestParam String year,
+                                                             @RequestParam(required = false) String useType,
+                                                             @RequestParam(required = false) String methodType,
+                                                             @RequestParam(required = true) String supplyType) {
         try {
         try {
-            List<LandSupplyProjectVO> resList =  supplyService.useTypeAndMethodList(year,useType,supplyType);
+            List<LandSupplyProjectVO> resList =  supplyService.useTypeAndMethodList(year,useType,supplyType,methodType);
             return R.ok(resList);
             return R.ok(resList);
         } catch (Exception e) {
         } catch (Exception e) {
             e.printStackTrace();
             e.printStackTrace();

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

@@ -36,7 +36,7 @@ public interface ISupplyService {
 
 
     List<Map<String, Object>> supplyList(String tableName,String sourceType,String year);
     List<Map<String, Object>> supplyList(String tableName,String sourceType,String year);
 
 
-    List<LandSupplyProjectVO> useTypeAndMethodList(String year,String useType,String  supplyType);
+    List<LandSupplyProjectVO> useTypeAndMethodList(String year,String useType,String  supplyType,String methodType);
 
 
 
 
 }
 }

+ 34 - 6
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/SupplyServiceImpl.java

@@ -62,10 +62,11 @@ public class SupplyServiceImpl implements ISupplyService {
     }
     }
 
 
 
 
+
     @Override
     @Override
-    public List<LandSupplyProjectVO> useTypeAndMethodList(String year,String useType,String  supplyType) {
+    public List<LandSupplyProjectVO> useTypeAndMethodList(String year,String useType,String  supplyType,String methodType) {
         List<LandSupplyProjectVO> resList = new ArrayList<>();
         List<LandSupplyProjectVO> resList = new ArrayList<>();
-        {
+        if("0".equals(supplyType)){
             GongdiJihuaFilterVo filterVo = new GongdiJihuaFilterVo();
             GongdiJihuaFilterVo filterVo = new GongdiJihuaFilterVo();
             filterVo.setYear(year);
             filterVo.setYear(year);
             filterVo.setPageSize(100000);
             filterVo.setPageSize(100000);
@@ -116,11 +117,39 @@ public class SupplyServiceImpl implements ISupplyService {
             if(CollectionUtils.isNotEmpty(resList2)) {
             if(CollectionUtils.isNotEmpty(resList2)) {
                 resList.addAll(resList2);
                 resList.addAll(resList2);
             }
             }
+        } else if ("2".equals(supplyType)) {
+            //这里合并两部分数据
+            List<TdgyStatisticsRes> completeList = new ArrayList<>();
+            List<TdgyStatisticsRes> completeBusinessStatusList = dgyMapper.getListByYear(year, null, null, null);
+            List<TdgyStatisticsRes> completeSjgdList = dgyMapper.getSjgdListByYear(year, null, null, null);
+            if(CollectionUtils.isNotEmpty(completeBusinessStatusList)){
+                completeList.addAll(completeBusinessStatusList);
+            }
+            if(CollectionUtils.isNotEmpty(completeSjgdList)){
+                completeList.addAll(completeSjgdList);
+            }
+
+            resList = completeList.stream().map(item -> {
+                LandSupplyProjectVO vo = new LandSupplyProjectVO();
+                vo.setProjectPropertyId(item.getProjectId());
+                vo.setProjectName(item.getXmmc());
+                vo.setCompanyName(item.getCompany());
+                vo.setSupplyMethod(item.getGyfs());
+                vo.setSupplyType(supplyType.toString());
+                vo.setDateType(supplyType.toString());
+                if(StringUtils.isBlank(item.getProjectId())){
+                    vo.setDateType("3");
+                }
+                vo.setNodeId(item.getNodeId());
+                vo.setGeom(item.getGeom());
+                vo.setYear(item.getGysj());
+                return vo;
+            }).collect(Collectors.toList());
         }
         }
 
 
-        if(StringUtils.isNotBlank(supplyType)){
-            if("出让".equals(supplyType)||"划拨".equals(supplyType)){
-                resList = resList.stream().filter(o->o.getSupplyMethod().equals(supplyType)).collect(Collectors.toList());
+        if(StringUtils.isNotBlank(methodType)){
+            if("出让".equals(methodType)||"划拨".equals(methodType)){
+                resList = resList.stream().filter(o->o.getSupplyMethod().equals(methodType)).collect(Collectors.toList());
             }else {
             }else {
                 resList = resList.stream().filter(o->!o.getSupplyMethod().equals("出让")).filter(o->!o.getSupplyMethod().equals("划拨")).collect(Collectors.toList());
                 resList = resList.stream().filter(o->!o.getSupplyMethod().equals("出让")).filter(o->!o.getSupplyMethod().equals("划拨")).collect(Collectors.toList());
             }
             }
@@ -136,7 +165,6 @@ public class SupplyServiceImpl implements ISupplyService {
 
 
 
 
 
 
-
     public String getTdytCodeByName(String useName) {
     public String getTdytCodeByName(String useName) {
         if (allLandTypeList.isEmpty()) {
         if (allLandTypeList.isEmpty()) {
             List<LandType> all = landTypeMapper.selectAll();
             List<LandType> all = landTypeMapper.selectAll();