feat:核设施新增查询type,location接口,台站新增查询country_code接口

This commit is contained in:
qiaoqinzheng 2023-05-23 09:34:01 +08:00
parent b658e37e19
commit 19f2824c11
10 changed files with 99 additions and 0 deletions

View File

@ -13,6 +13,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController @RestController
@RequestMapping("gardsNuclearfacility") @RequestMapping("gardsNuclearfacility")
@Api(value = "核设施管理", tags = "核设施管理") @Api(value = "核设施管理", tags = "核设施管理")
@ -35,6 +37,20 @@ public class GardsNuclearfacilityController {
return result; 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") @PostMapping("create")
@ApiOperation(value = "新增核设施信息", notes = "新增核设施信息") @ApiOperation(value = "新增核设施信息", notes = "新增核设施信息")
public Result create(@RequestBody @Validated(value = InsertGroup.class) GardsNuclearfacility gardsNuclearfacility){ public Result create(@RequestBody @Validated(value = InsertGroup.class) GardsNuclearfacility gardsNuclearfacility){

View File

@ -13,6 +13,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController @RestController
@RequestMapping("/gardsStations") @RequestMapping("/gardsStations")
@Api(value = "台站管理", tags = "台站管理") @Api(value = "台站管理", tags = "台站管理")
@ -46,6 +48,13 @@ public class GardsStationsController {
return result; return result;
} }
@GetMapping("findCountryCode")
@ApiOperation(value = "查询COUNTRY_CODE", notes = "查询COUNTRY_CODE")
public List<String> findCountryCode(){
List<String> countryCode = gardsStationsService.findCountryCode();
return countryCode;
}
/** /**
* 新增台站信息接口 * 新增台站信息接口
*/ */

View File

@ -3,5 +3,12 @@ package org.jeecg.modules.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.system.entity.GardsNuclearfacility; import org.jeecg.modules.system.entity.GardsNuclearfacility;
import java.util.List;
public interface GardsNuclearfacilityMapper extends BaseMapper<GardsNuclearfacility> { public interface GardsNuclearfacilityMapper extends BaseMapper<GardsNuclearfacility> {
List<String> findType();
List<String> findLocation();
} }

View File

@ -3,5 +3,10 @@ package org.jeecg.modules.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.system.entity.GardsStations; import org.jeecg.modules.system.entity.GardsStations;
import java.util.List;
public interface GardsStationsMapper extends BaseMapper<GardsStations> { public interface GardsStationsMapper extends BaseMapper<GardsStations> {
List<String> findCountryCode();
} }

View File

@ -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>

View File

@ -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>

View File

@ -6,6 +6,8 @@ import org.jeecg.common.api.QueryRequest;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.system.entity.GardsNuclearfacility; import org.jeecg.modules.system.entity.GardsNuclearfacility;
import java.util.List;
public interface IGardsNuclearfacilityService extends IService<GardsNuclearfacility> { public interface IGardsNuclearfacilityService extends IService<GardsNuclearfacility> {
/** /**
@ -23,6 +25,18 @@ public interface IGardsNuclearfacilityService extends IService<GardsNuclearfacil
*/ */
GardsNuclearfacility findInfo(Integer id); GardsNuclearfacility findInfo(Integer id);
/**
* 查询Type
* @return
*/
List<String> findType();
/**
* 查询Location
* @return
*/
List<String> findLocation();
/** /**
* 新增核设施信息 * 新增核设施信息
* @param gardsNuclearfacility * @param gardsNuclearfacility

View File

@ -25,6 +25,12 @@ public interface IGardsStationsService extends IService<GardsStations> {
*/ */
GardsStations findInfo(Integer stationId); GardsStations findInfo(Integer stationId);
/**
* 查询COUNTRY_CODE
* @return
*/
List<String> findCountryCode();
/** /**
* 新增台站信息接口 * 新增台站信息接口
* @param gardsStations * @param gardsStations

View File

@ -15,7 +15,9 @@ import org.jeecg.modules.system.service.IGardsNuclearfacilityService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors;
@Service("gardsNuclearfacilityService") @Service("gardsNuclearfacilityService")
@DS("ora") @DS("ora")
@ -47,6 +49,18 @@ public class GardsNuclearfacilityServiceImpl extends ServiceImpl<GardsNuclearfac
return gardsNuclearfacility; 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 @Override
@Transactional @Transactional
public Result create(GardsNuclearfacility gardsNuclearfacility) { public Result create(GardsNuclearfacility gardsNuclearfacility) {

View File

@ -65,6 +65,12 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
return stations; return stations;
} }
@Override
public List<String> findCountryCode() {
this.baseMapper.findCountryCode();
return null;
}
/** /**
* 新增台站信息接口 * 新增台站信息接口
* @param gardsStations * @param gardsStations