feat:探测器新增查询Type属性,台站新增查询Type属性
This commit is contained in:
parent
21b73368dc
commit
a0f8a237d2
|
@ -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("gardsDetectors")
|
@RequestMapping("gardsDetectors")
|
||||||
@Api(value = "监测器管理", tags = "监测器管理")
|
@Api(value = "监测器管理", tags = "监测器管理")
|
||||||
|
@ -35,6 +37,13 @@ public class GardsDetectorsController {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("findType")
|
||||||
|
@ApiOperation(value = "查询Type属性值", notes = "查询Type属性值")
|
||||||
|
public List<String> findType(){
|
||||||
|
List<String> result = gardsDetectorsService.findType();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("create")
|
@PostMapping("create")
|
||||||
@ApiOperation(value = "新增监测器信息", notes = "新增监测器信息")
|
@ApiOperation(value = "新增监测器信息", notes = "新增监测器信息")
|
||||||
public Result create(@RequestBody @Validated(value = InsertGroup.class) GardsDetectors gardsDetectors){
|
public Result create(@RequestBody @Validated(value = InsertGroup.class) GardsDetectors gardsDetectors){
|
||||||
|
|
|
@ -48,11 +48,18 @@ public class GardsStationsController {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("findType")
|
||||||
|
@ApiOperation(value = "查询Type属性值", notes = "查询Type属性值")
|
||||||
|
public List<String> findType(){
|
||||||
|
List<String> result = gardsStationsService.findType();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("findCountryCode")
|
@GetMapping("findCountryCode")
|
||||||
@ApiOperation(value = "查询COUNTRY_CODE", notes = "查询COUNTRY_CODE")
|
@ApiOperation(value = "查询COUNTRY_CODE", notes = "查询COUNTRY_CODE")
|
||||||
public List<String> findCountryCode(){
|
public List<String> findCountryCode(){
|
||||||
List<String> countryCode = gardsStationsService.findCountryCode();
|
List<String> result = gardsStationsService.findCountryCode();
|
||||||
return countryCode;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,8 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.jeecg.modules.system.entity.GardsDetectors;
|
import org.jeecg.modules.system.entity.GardsDetectors;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface GardsDetectorsMapper extends BaseMapper<GardsDetectors> {
|
public interface GardsDetectorsMapper extends BaseMapper<GardsDetectors> {
|
||||||
|
|
||||||
Page<GardsDetectors> findPage(Page<GardsDetectors> page, GardsDetectors gardsDetectors);
|
Page<GardsDetectors> findPage(Page<GardsDetectors> page, GardsDetectors gardsDetectors);
|
||||||
|
|
||||||
|
List<String> findType();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@ import java.util.List;
|
||||||
|
|
||||||
public interface GardsStationsMapper extends BaseMapper<GardsStations> {
|
public interface GardsStationsMapper extends BaseMapper<GardsStations> {
|
||||||
|
|
||||||
|
List<String> findType();
|
||||||
|
|
||||||
List<String> findCountryCode();
|
List<String> findCountryCode();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
and DETECTOR_CODE like CONCAT('%',#{gardsDetectors.detectorCode},'%')
|
and DETECTOR_CODE like CONCAT('%',#{gardsDetectors.detectorCode},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="gardsDetectors.type != '' and gardsDetectors.type != null">
|
<if test="gardsDetectors.type != '' and gardsDetectors.type != null">
|
||||||
and RTRIM(TYPE, ' ') = #{gardsDetectors.type}
|
and TYPE = #{gardsDetectors.type}
|
||||||
</if>
|
</if>
|
||||||
<if test="gardsDetectors.status != '' and gardsDetectors.status != null">
|
<if test="gardsDetectors.status != '' and gardsDetectors.status != null">
|
||||||
and RTRIM(STATUS, ' ') = #{gardsDetectors.status}
|
and RTRIM(STATUS, ' ') = #{gardsDetectors.status}
|
||||||
|
@ -34,4 +34,8 @@
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="findType" resultType="java.lang.String">
|
||||||
|
SELECT DISTINCT TYPE FROM GARDS_DETECTORS
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -2,6 +2,10 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!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">
|
<mapper namespace="org.jeecg.modules.system.mapper.GardsStationsMapper">
|
||||||
|
|
||||||
|
<select id="findType" resultType="java.lang.String">
|
||||||
|
SELECT DISTINCT TYPE FROM GARDS_STATIONS
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="findCountryCode" resultType="java.lang.String">
|
<select id="findCountryCode" resultType="java.lang.String">
|
||||||
SELECT DISTINCT COUNTRY_CODE FROM GARDS_STATIONS
|
SELECT DISTINCT COUNTRY_CODE FROM GARDS_STATIONS
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -24,6 +24,12 @@ public interface IGardsDetectorsService extends IService<GardsDetectors> {
|
||||||
*/
|
*/
|
||||||
GardsDetectors findInfo(Integer id);
|
GardsDetectors findInfo(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询Type属性值
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<String> findType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增监测器信息
|
* 新增监测器信息
|
||||||
* @param gardsDetectors
|
* @param gardsDetectors
|
||||||
|
|
|
@ -25,6 +25,12 @@ public interface IGardsStationsService extends IService<GardsStations> {
|
||||||
*/
|
*/
|
||||||
GardsStations findInfo(Integer stationId);
|
GardsStations findInfo(Integer stationId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询TYPE
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<String> findType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询COUNTRY_CODE
|
* 查询COUNTRY_CODE
|
||||||
* @return
|
* @return
|
||||||
|
|
|
@ -78,6 +78,12 @@ public class GardsDetectorsServiceImpl extends ServiceImpl<GardsDetectorsMapper,
|
||||||
return gardsDetectors;
|
return gardsDetectors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> findType() {
|
||||||
|
List<String> type = this.baseMapper.findType();
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result create(GardsDetectors gardsDetectors) {
|
public Result create(GardsDetectors gardsDetectors) {
|
||||||
Result result = new Result();
|
Result result = new Result();
|
||||||
|
|
|
@ -65,6 +65,12 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
|
||||||
return stations;
|
return stations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> findType() {
|
||||||
|
List<String> type = this.baseMapper.findType();
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> findCountryCode() {
|
public List<String> findCountryCode() {
|
||||||
List<String> countryCode = this.baseMapper.findCountryCode();
|
List<String> countryCode = this.baseMapper.findCountryCode();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user