1
0
Просмотр исходного кода

调整兼容年份字符传入

chenendian 2 месяцев назад
Родитель
Сommit
82e6286cc3

+ 4 - 4
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/controller/JsydghxkController.java

@@ -41,10 +41,10 @@ public class JsydghxkController extends BaseController {
     @PostMapping()
     public R<Map> Add(@RequestBody JsydghxkVo jsydghxkVo) {
         try {
-            Boolean b = jsydghxkService.isExit(jsydghxkVo.getProjectId());
-            if (b == true) {
-                return R.fail("此项目已添加建设用地规划许可");
-            }
+//            Boolean b = jsydghxkService.isExit(jsydghxkVo.getProjectId());
+//            if (b == true) {
+//                return R.fail("此项目已添加建设用地规划许可");
+//            }
             String id = jsydghxkService.add(jsydghxkVo);
             Map<String, String> map = new HashMap<>();
             map.put("id", id);

+ 18 - 3
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/BatchServiceImpl.java

@@ -26,12 +26,12 @@ public class BatchServiceImpl{
     @Autowired
     private YdbpDataMapper ydbpDataMapper;
 
-
     public List<?> getNotSupplyList(String year) {
         List<Map<String, Object>> resList = new ArrayList<>();
-        if(StringUtils.isBlank(year)||"0".equals(year)){
+        if(StringUtils.isBlank(year)||"0".equals(year)||"1000".equals(year)||"2016年前".equals(year)){
             year ="";
         }
+
         List<Map<String,Object>> ydbpNotSupplyList =  ydbpMapper.queryRemainGeomListByYearOfYdbp(year);
         List<Map<String,Object>> ydbpDataNotSupplyList =  ydbpDataMapper.queryDifferenceGeomAreaByYear(year);
 
@@ -41,6 +41,22 @@ public class BatchServiceImpl{
         if(CollectionUtils.isNotEmpty(ydbpDataNotSupplyList)){
             resList.addAll(ydbpDataNotSupplyList);
         }
+
+        //条件过滤兼容特使情况
+        if("1000".equals(year)){
+            resList = resList.stream().filter(s->"其它".equals(s.get("year")+"")).collect(Collectors.toList());
+        }else if("2016年前".equals(year)) {
+            resList = resList.stream().filter(s -> {
+                String yearString = s.get("year").toString();
+                String nf = s.get("nf").toString();
+                if (StringUtils.isNumeric(yearString) && Integer.parseInt(yearString) < 2016) {
+                    return true;
+                } else if (StringUtils.isNumeric(nf) && Integer.parseInt(nf) < 2016) {
+                    return true;
+                }
+                return false;
+            }).collect(Collectors.toList());
+        }
         return resList;
     }
 
@@ -341,7 +357,6 @@ public class BatchServiceImpl{
 
 
 
-
     public List<Map<String,Object>> approvalAndNotSupply_delete(String year) {
         if (StringUtils.isBlank(year) || "0".equals(year)) {
             year = "";

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

@@ -144,7 +144,7 @@
             LEFT JOIN "public"."t_node_land" node    on  node.geom_db_id=upload.id
             LEFT JOIN  "public"."t_ydbp_data" ydbp   on  node.node_id=ydbp.id
         where ydbp.has_onchain=true
-          AND  public.ST_Intersects(geom.geom, (SELECT geom FROM "t_geom_db_details" WHERE  id = #{detailsId) )
+          AND  public.ST_Intersects(geom.geom, (SELECT geom FROM "t_geom_db_details" WHERE  id = #{detailsId}) )
         order by node.node_id,  ydbp.created_at desc
     </select>
 

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

@@ -164,7 +164,7 @@
         SELECT
         gd.id as details_id,
         '' as project_id,
-        LEFT(bp.pf_date, '4') AS year,
+        COALESCE(LEFT(bp.pf_date,  '其它') AS year,
         bp.id  as  node_id,
         bp.id  as  id,
         '1' AS batch_type,