From 19f2824c11bdaa9d4fd18d29e929c1b1ac69915d Mon Sep 17 00:00:00 2001 From: qiaoqinzheng <qiaoqinzheng> Date: Tue, 23 May 2023 09:34:01 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=A0=B8=E8=AE=BE=E6=96=BD?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9F=A5=E8=AF=A2type=EF=BC=8Clocation?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=EF=BC=8C=E5=8F=B0=E7=AB=99=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2country=5Fcode=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GardsNuclearfacilityController.java | 16 ++++++++++++++++ .../controller/GardsStationsController.java | 9 +++++++++ .../mapper/GardsNuclearfacilityMapper.java | 7 +++++++ .../system/mapper/GardsStationsMapper.java | 5 +++++ .../mapper/xml/GardsNuclearfacilityMapper.xml | 13 +++++++++++++ .../system/mapper/xml/GardsStationsMapper.xml | 9 +++++++++ .../service/IGardsNuclearfacilityService.java | 14 ++++++++++++++ .../system/service/IGardsStationsService.java | 6 ++++++ .../impl/GardsNuclearfacilityServiceImpl.java | 14 ++++++++++++++ .../service/impl/GardsStationsServiceImpl.java | 6 ++++++ 10 files changed, 99 insertions(+) create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/GardsNuclearfacilityMapper.xml create mode 100644 jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/GardsStationsMapper.xml diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/GardsNuclearfacilityController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/GardsNuclearfacilityController.java index 99a10013..09532b33 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/GardsNuclearfacilityController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/GardsNuclearfacilityController.java @@ -13,6 +13,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; + @RestController @RequestMapping("gardsNuclearfacility") @Api(value = "核设施管理", tags = "核设施管理") @@ -35,6 +37,20 @@ public class GardsNuclearfacilityController { return result; } + @GetMapping("findType") + @ApiOperation(value = "查询核设施Type属性", notes = "查询核设施Type属性") + public List<String> findType(){ + List<String> result = gardsNuclearfacilityService.findType(); + return result; + } + + @GetMapping("findLocation") + @ApiOperation(value = "查询核设施Location属性", notes = "查询核设施Location属性") + public List<String> findLocation(){ + List<String> result = gardsNuclearfacilityService.findLocation(); + return result; + } + @PostMapping("create") @ApiOperation(value = "新增核设施信息", notes = "新增核设施信息") public Result create(@RequestBody @Validated(value = InsertGroup.class) GardsNuclearfacility gardsNuclearfacility){ diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/GardsStationsController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/GardsStationsController.java index 0798a1c1..497b468e 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/GardsStationsController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/GardsStationsController.java @@ -13,6 +13,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.List; + @RestController @RequestMapping("/gardsStations") @Api(value = "台站管理", tags = "台站管理") @@ -46,6 +48,13 @@ public class GardsStationsController { return result; } + @GetMapping("findCountryCode") + @ApiOperation(value = "查询COUNTRY_CODE", notes = "查询COUNTRY_CODE") + public List<String> findCountryCode(){ + List<String> countryCode = gardsStationsService.findCountryCode(); + return countryCode; + } + /** * 新增台站信息接口 */ diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/GardsNuclearfacilityMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/GardsNuclearfacilityMapper.java index ac8b6d1d..eb05b898 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/GardsNuclearfacilityMapper.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/GardsNuclearfacilityMapper.java @@ -3,5 +3,12 @@ package org.jeecg.modules.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.jeecg.modules.system.entity.GardsNuclearfacility; +import java.util.List; + public interface GardsNuclearfacilityMapper extends BaseMapper<GardsNuclearfacility> { + + List<String> findType(); + + List<String> findLocation(); + } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/GardsStationsMapper.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/GardsStationsMapper.java index 142405b2..0cce035a 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/GardsStationsMapper.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/GardsStationsMapper.java @@ -3,5 +3,10 @@ package org.jeecg.modules.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.jeecg.modules.system.entity.GardsStations; +import java.util.List; + public interface GardsStationsMapper extends BaseMapper<GardsStations> { + + List<String> findCountryCode(); + } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/GardsNuclearfacilityMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/GardsNuclearfacilityMapper.xml new file mode 100644 index 00000000..8750836d --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/GardsNuclearfacilityMapper.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="org.jeecg.modules.system.mapper.GardsNuclearfacilityMapper"> + + <select id="findType" resultType="java.lang.String"> + SELECT DISTINCT TYPE FROM GARDS_NUCLEARFACILITY + </select> + + <select id="findLocation" resultType="java.lang.String"> + SELECT DISTINCT LOCATION FROM GARDS_NUCLEARFACILITY + </select> + +</mapper> \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/GardsStationsMapper.xml b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/GardsStationsMapper.xml new file mode 100644 index 00000000..23b55542 --- /dev/null +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/GardsStationsMapper.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="org.jeecg.modules.system.mapper.GardsStationsMapper"> + + <select id="findCountryCode" resultType="java.lang.String"> + SELECT DISTINCT COUNTRY_CODE FROM GARDS_STATIONS + </select> + +</mapper> \ No newline at end of file diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/IGardsNuclearfacilityService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/IGardsNuclearfacilityService.java index 1a1374a5..1e59bbaf 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/IGardsNuclearfacilityService.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/IGardsNuclearfacilityService.java @@ -6,6 +6,8 @@ import org.jeecg.common.api.QueryRequest; import org.jeecg.common.api.vo.Result; import org.jeecg.modules.system.entity.GardsNuclearfacility; +import java.util.List; + public interface IGardsNuclearfacilityService extends IService<GardsNuclearfacility> { /** @@ -23,6 +25,18 @@ public interface IGardsNuclearfacilityService extends IService<GardsNuclearfacil */ GardsNuclearfacility findInfo(Integer id); + /** + * 查询Type + * @return + */ + List<String> findType(); + + /** + * 查询Location + * @return + */ + List<String> findLocation(); + /** * 新增核设施信息 * @param gardsNuclearfacility diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/IGardsStationsService.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/IGardsStationsService.java index 5cd9c401..1f6b992b 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/IGardsStationsService.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/IGardsStationsService.java @@ -25,6 +25,12 @@ public interface IGardsStationsService extends IService<GardsStations> { */ GardsStations findInfo(Integer stationId); + /** + * 查询COUNTRY_CODE + * @return + */ + List<String> findCountryCode(); + /** * 新增台站信息接口 * @param gardsStations diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/GardsNuclearfacilityServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/GardsNuclearfacilityServiceImpl.java index 13c67634..1b2a8c25 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/GardsNuclearfacilityServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/GardsNuclearfacilityServiceImpl.java @@ -15,7 +15,9 @@ import org.jeecg.modules.system.service.IGardsNuclearfacilityService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; @Service("gardsNuclearfacilityService") @DS("ora") @@ -47,6 +49,18 @@ public class GardsNuclearfacilityServiceImpl extends ServiceImpl<GardsNuclearfac return gardsNuclearfacility; } + @Override + public List<String> findType() { + List<String> types = this.baseMapper.findType(); + return types; + } + + @Override + public List<String> findLocation() { + this.baseMapper.findLocation() + return locations; + } + @Override @Transactional public Result create(GardsNuclearfacility gardsNuclearfacility) { diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/GardsStationsServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/GardsStationsServiceImpl.java index 7c0bcdb0..b0b6d945 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/GardsStationsServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/GardsStationsServiceImpl.java @@ -65,6 +65,12 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G return stations; } + @Override + public List<String> findCountryCode() { + this.baseMapper.findCountryCode(); + return null; + } + /** * 新增台站信息接口 * @param gardsStations