From c938fb8837432557fe37082c25f20918244e21d7 Mon Sep 17 00:00:00 2001 From: "XB-20210411SXIT\\Administrator" Date: Thu, 29 Jul 2021 16:38:20 +0800 Subject: [PATCH] =?UTF-8?q?1.0.0=20=E6=96=B0=E5=A2=9E=E6=97=A5=E5=8E=86?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=87=A0=E6=A3=B5=E8=97=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/LandListedController.java | 19 +++++++++--- .../com/air/land/mapper/LandListedMapper.java | 21 ++++++++++++++ .../air/land/service/LandListedService.java | 10 +++++++ .../service/impl/LandListedServiceImpl.java | 27 +++++++++++++++++ air/src/main/resources/application.yml | 3 +- .../resources/mapper/LandListedMapper.xml | 29 +++++++++++++++++++ 6 files changed, 104 insertions(+), 5 deletions(-) diff --git a/air/src/main/java/com/air/applets/controller/LandListedController.java b/air/src/main/java/com/air/applets/controller/LandListedController.java index f5acbbd..c6434a4 100644 --- a/air/src/main/java/com/air/applets/controller/LandListedController.java +++ b/air/src/main/java/com/air/applets/controller/LandListedController.java @@ -17,10 +17,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -111,6 +108,20 @@ public class LandListedController { return landListedService.appletsStatistics(appletsVo); } + /** + * 按日期统计地块数量(日历) + * @author peihao + * @param date 日期(yyyy-MM) + * @param city 城市 + * @date 2021/7/9 + * @return + **/ + @ApiOperation(value = "按日期统计地块数量(日历)", notes = "按日期统计地块数量(日历)") + @GetMapping("/calendar") + public R> appletsCalendar(@RequestParam String date , String city) { + return landListedService.appletsCalendar(date,city); + } + } diff --git a/air/src/main/java/com/air/land/mapper/LandListedMapper.java b/air/src/main/java/com/air/land/mapper/LandListedMapper.java index 33614b2..152e014 100644 --- a/air/src/main/java/com/air/land/mapper/LandListedMapper.java +++ b/air/src/main/java/com/air/land/mapper/LandListedMapper.java @@ -40,4 +40,25 @@ public interface LandListedMapper extends BaseMapper { * @return **/ List appletsLandListed(Page page , @Param("landVo")LandVo landVo); + + + /** + * 按挂牌日期统计地块数量(日历) + * @author peihao + * @param annoDate 挂牌日期(yyyy-MM) + * @param city 城市 + * @date 2021/7/9 + * @return + **/ + List appletsCalendarToAnnoDate(@Param("annoDate") String annoDate , @Param("city") String city); + + /** + * 按拍卖日期统计地块数量(日历) + * @author peihao + * @param auctionDate 拍卖日期(yyyy-MM) + * @param city 城市 + * @date 2021/7/9 + * @return + **/ + List appletsCalendarToAuctionDate(@Param("auctionDate") String auctionDate , @Param("city") String city); } diff --git a/air/src/main/java/com/air/land/service/LandListedService.java b/air/src/main/java/com/air/land/service/LandListedService.java index 6cf1afc..ae9f738 100644 --- a/air/src/main/java/com/air/land/service/LandListedService.java +++ b/air/src/main/java/com/air/land/service/LandListedService.java @@ -33,6 +33,16 @@ public interface LandListedService extends IService { **/ R appletsStatistics(LandListedAppletsVo appletsVo); + /** + * 按日期统计地块数量 + * @author peihao + * @param date 日期(yyyy-MM) + * @param city 城市 + * @date 2021/7/9 + * @return + **/ + R> appletsCalendar(String date , String city); + /** * 导入已挂牌地块信息 * @author peihao diff --git a/air/src/main/java/com/air/land/service/impl/LandListedServiceImpl.java b/air/src/main/java/com/air/land/service/impl/LandListedServiceImpl.java index fe8a60a..c560e04 100644 --- a/air/src/main/java/com/air/land/service/impl/LandListedServiceImpl.java +++ b/air/src/main/java/com/air/land/service/impl/LandListedServiceImpl.java @@ -1,5 +1,6 @@ package com.air.land.service.impl; +import cn.hutool.core.collection.CollectionUtil; import com.air.applets.dto.LandDto; import com.air.applets.vo.LandVo; import com.air.land.dto.LandListedDto; @@ -61,6 +62,32 @@ public class LandListedServiceImpl extends ServiceImpl> appletsCalendar(String date, String city) { + List annoDateList = baseMapper.appletsCalendarToAnnoDate(date, city); + List auctionDateList = baseMapper.appletsCalendarToAuctionDate(date, city); + if (CollectionUtil.isEmpty(annoDateList)){ + return R.ok(auctionDateList); + } + if (CollectionUtil.isEmpty(auctionDateList)){ + return R.ok(annoDateList); + } + List indexs = new ArrayList<>(); + for(LandListedStatisticsDto annoDateVo : annoDateList){ + for(int i =0 ;i dataList; diff --git a/air/src/main/resources/application.yml b/air/src/main/resources/application.yml index 2eda14e..c0c212e 100644 --- a/air/src/main/resources/application.yml +++ b/air/src/main/resources/application.yml @@ -52,7 +52,7 @@ spring: mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl - tenant-enable: ture + tenant-enable: true mapper-locations: classpath*:/mapper/**/*Mapper.xml global-config: banner: false @@ -77,6 +77,7 @@ security: scope: server ignore-urls: - /druid/** +# - /** # 文件系统 minio: diff --git a/air/src/main/resources/mapper/LandListedMapper.xml b/air/src/main/resources/mapper/LandListedMapper.xml index 5300161..998a89a 100644 --- a/air/src/main/resources/mapper/LandListedMapper.xml +++ b/air/src/main/resources/mapper/LandListedMapper.xml @@ -118,4 +118,33 @@ + + + + +