feat:核设施新增查询type,location接口,台站新增查询country_code接口
This commit is contained in:
parent
b658e37e19
commit
19f2824c11
|
@ -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){
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增台站信息接口
|
||||
*/
|
||||
|
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
|
@ -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
|
||||
|
|
|
@ -25,6 +25,12 @@ public interface IGardsStationsService extends IService<GardsStations> {
|
|||
*/
|
||||
GardsStations findInfo(Integer stationId);
|
||||
|
||||
/**
|
||||
* 查询COUNTRY_CODE
|
||||
* @return
|
||||
*/
|
||||
List<String> findCountryCode();
|
||||
|
||||
/**
|
||||
* 新增台站信息接口
|
||||
* @param gardsStations
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user