6 changed files with 0 additions and 264 deletions
			
			
		| @ -1,109 +0,0 @@ | |||||||
| package com.ruoyi.code.camera.controller; |  | ||||||
| 
 |  | ||||||
| import java.util.List; |  | ||||||
| import java.util.Arrays; |  | ||||||
| import java.util.Map; |  | ||||||
| import javax.servlet.http.HttpServletResponse; |  | ||||||
| import javax.annotation.Resource; |  | ||||||
| import com.ruoyi.common.core.page.R; |  | ||||||
| import com.ruoyi.common.core.page.TableDataInfo; |  | ||||||
| import org.springframework.security.access.prepost.PreAuthorize; |  | ||||||
| import org.springframework.beans.factory.annotation.Autowired; |  | ||||||
| import org.springframework.web.bind.annotation.GetMapping; |  | ||||||
| import org.springframework.web.bind.annotation.PostMapping; |  | ||||||
| import org.springframework.web.bind.annotation.PutMapping; |  | ||||||
| import org.springframework.web.bind.annotation.DeleteMapping; |  | ||||||
| import org.springframework.web.bind.annotation.PathVariable; |  | ||||||
| import org.springframework.web.bind.annotation.RequestBody; |  | ||||||
| import org.springframework.web.bind.annotation.RequestMapping; |  | ||||||
| import org.springframework.web.bind.annotation.RequestParam; |  | ||||||
| import org.springframework.web.bind.annotation.RestController; |  | ||||||
| import com.ruoyi.common.annotation.Log; |  | ||||||
| import com.ruoyi.common.core.controller.BaseController; |  | ||||||
| import com.ruoyi.common.enums.BusinessType; |  | ||||||
| import com.ruoyi.code.camera.domain.ScStationInfo; |  | ||||||
| import com.ruoyi.code.camera.service.IScStationInfoService; |  | ||||||
| import com.ruoyi.common.utils.poi.ExcelUtil; |  | ||||||
| /** |  | ||||||
|  * 水尺-测站信息Controller |  | ||||||
|  * |  | ||||||
|  * @author ruoyi |  | ||||||
|  * @date 2022-06-29 |  | ||||||
|  */ |  | ||||||
| @RestController |  | ||||||
| @RequestMapping("/system/info") |  | ||||||
| public class ScStationInfoController extends BaseController |  | ||||||
| { |  | ||||||
|     @Resource |  | ||||||
|     private IScStationInfoService scStationInfoService; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 查询列表 |  | ||||||
|      */ |  | ||||||
|     @PreAuthorize("@ss.hasPermi('system:info:list')") |  | ||||||
|     @RequestMapping("/list") |  | ||||||
|     public R list(@RequestParam Map<String, Object> params){ |  | ||||||
|         return scStationInfoService.queryPage(params); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 获取详细信息 |  | ||||||
|      */ |  | ||||||
|     @RequestMapping("/info/{id}") |  | ||||||
|     @PreAuthorize("@ss.hasPermi('system:info:query')") |  | ||||||
|     public R info(@PathVariable("id") Long id){ |  | ||||||
|         ScStationInfo scStationInfo = scStationInfoService.getById(id); |  | ||||||
| 
 |  | ||||||
|         return R.ok().put("data", scStationInfo); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 导出列表 |  | ||||||
|      */ |  | ||||||
|     @PreAuthorize("@ss.hasPermi('system:info:export')") |  | ||||||
|     @Log(title = "列表", businessType = BusinessType.EXPORT) |  | ||||||
|     @PostMapping("/export") |  | ||||||
|     public void export(HttpServletResponse response, ScStationInfo scStationInfo) |  | ||||||
|     { |  | ||||||
|         List<ScStationInfo> list = scStationInfoService.list(); |  | ||||||
|         ExcelUtil<ScStationInfo> util = new ExcelUtil<ScStationInfo>(ScStationInfo.class); |  | ||||||
|         util.exportExcel(response, list, "列表数据"); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 新增 |  | ||||||
|      */ |  | ||||||
|     @RequestMapping("/add") |  | ||||||
|     @Log(title = "ScStationInfo", businessType = BusinessType.INSERT) |  | ||||||
|     @PreAuthorize("@ss.hasPermi('system:info:add')") |  | ||||||
|     public R add(@RequestBody ScStationInfo scStationInfo){ |  | ||||||
|         scStationInfoService.save(scStationInfo); |  | ||||||
|         return R.ok(); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|     * 修改 |  | ||||||
|     */ |  | ||||||
|     @RequestMapping("/edit") |  | ||||||
|     @PreAuthorize("@ss.hasPermi('system:info:edit')") |  | ||||||
|     @Log(title = "ScStationInfo", businessType = BusinessType.UPDATE) |  | ||||||
|     public R edit(@RequestBody ScStationInfo scStationInfo){ |  | ||||||
|         scStationInfoService.updateById(scStationInfo); |  | ||||||
|         return R.ok(); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|       * 删除 |  | ||||||
|       */ |  | ||||||
|     @RequestMapping("/delete/{ids}") |  | ||||||
|     @PreAuthorize("@ss.hasPermi('system:info:remove')") |  | ||||||
|     @Log(title = "ScStationInfo", businessType = BusinessType.DELETE) |  | ||||||
|     public R delete(@PathVariable Long[] ids){ |  | ||||||
|         scStationInfoService.removeByIds(Arrays.asList(ids)); |  | ||||||
|         return R.ok(); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,70 +0,0 @@ | |||||||
| package com.ruoyi.code.camera.domain; |  | ||||||
| 
 |  | ||||||
| import java.math.BigDecimal; |  | ||||||
| import com.baomidou.mybatisplus.annotation.IdType; |  | ||||||
| import org.apache.commons.lang3.builder.ToStringBuilder; |  | ||||||
| import org.apache.commons.lang3.builder.ToStringStyle; |  | ||||||
| import com.baomidou.mybatisplus.annotation.TableName; |  | ||||||
| import com.baomidou.mybatisplus.annotation.TableId; |  | ||||||
| import com.ruoyi.common.annotation.Excel; |  | ||||||
| import java.io.Serializable; |  | ||||||
| import lombok.Data; |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * 水尺-测站信息对象 sc_station_info |  | ||||||
|  * |  | ||||||
|  * @author ruoyi |  | ||||||
|  * @date 2022-06-29 |  | ||||||
|  */ |  | ||||||
| @Data |  | ||||||
| @TableName("sc_station_info") |  | ||||||
| public class ScStationInfo implements Serializable |  | ||||||
| { |  | ||||||
|     private static final long serialVersionUID = 1L; |  | ||||||
| 
 |  | ||||||
|     /** 测站id */ |  | ||||||
|     @TableId(type = IdType.INPUT) |  | ||||||
|     private Long id; |  | ||||||
| 
 |  | ||||||
|     /** 测站名称 */ |  | ||||||
|     private String stnm; |  | ||||||
| 
 |  | ||||||
|     /** 经度 */ |  | ||||||
|     private BigDecimal longitude; |  | ||||||
| 
 |  | ||||||
|     /** 纬度 */ |  | ||||||
|     private BigDecimal latitude; |  | ||||||
| 
 |  | ||||||
|     /** 测站状态: 0正常,1信道故障,5站点关闭 */ |  | ||||||
|     private String status; |  | ||||||
| 
 |  | ||||||
|     /** 测站编码 */ |  | ||||||
|     private String staid; |  | ||||||
| 
 |  | ||||||
|     /** 河流 */ |  | ||||||
|     private String rvnm; |  | ||||||
| 
 |  | ||||||
|     /** 水系 */ |  | ||||||
|     private String hnnm; |  | ||||||
| 
 |  | ||||||
|     /** 流域 */ |  | ||||||
|     private String bsnm; |  | ||||||
| 
 |  | ||||||
|     /** 站址 */ |  | ||||||
|     private String stlc; |  | ||||||
| 
 |  | ||||||
|     /** 测站编码 */ |  | ||||||
|     private String isState; |  | ||||||
| 
 |  | ||||||
|     /** 保证水位 */ |  | ||||||
|     private BigDecimal bzsw; |  | ||||||
| 
 |  | ||||||
|     /** 摄像头编号 */ |  | ||||||
|     private String cameraSn; |  | ||||||
| 
 |  | ||||||
|     /** 删除标识0未删除,1已删除 */ |  | ||||||
|     private String delFlag; |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,23 +0,0 @@ | |||||||
| package com.ruoyi.code.camera.mapper; |  | ||||||
| 
 |  | ||||||
| import java.util.List; |  | ||||||
| import java.util.Map; |  | ||||||
| 
 |  | ||||||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; |  | ||||||
| import com.baomidou.mybatisplus.core.metadata.IPage; |  | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |  | ||||||
| import org.apache.ibatis.annotations.Mapper; |  | ||||||
| import com.ruoyi.code.camera.domain.ScStationInfo; |  | ||||||
| import org.apache.ibatis.annotations.Param; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * Mapper接口 |  | ||||||
|  * |  | ||||||
|  * @author ruoyi |  | ||||||
|  * @date 2022-06-29 |  | ||||||
|  */ |  | ||||||
| @Mapper |  | ||||||
| public interface ScStationInfoMapper extends BaseMapper<ScStationInfo> |  | ||||||
| { |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,23 +0,0 @@ | |||||||
| package com.ruoyi.code.camera.service; |  | ||||||
| 
 |  | ||||||
| import com.baomidou.mybatisplus.extension.service.IService; |  | ||||||
| import com.ruoyi.common.core.page.R; |  | ||||||
| 
 |  | ||||||
| import java.util.List; |  | ||||||
| import java.util.Map; |  | ||||||
| import com.ruoyi.code.camera.domain.ScStationInfo; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * Service接口 |  | ||||||
|  * |  | ||||||
|  * @author ruoyi |  | ||||||
|  * @date 2022-06-29 |  | ||||||
|  */ |  | ||||||
| public interface IScStationInfoService extends IService<ScStationInfo> |  | ||||||
| { |  | ||||||
|     /** |  | ||||||
|      * 查询 |  | ||||||
|      */ |  | ||||||
|     R queryPage(Map<String, Object> params); |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -1,38 +0,0 @@ | |||||||
| package com.ruoyi.code.camera.service.impl; |  | ||||||
| 
 |  | ||||||
| import java.util.List; |  | ||||||
| import java.util.Map; |  | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |  | ||||||
| import com.baomidou.mybatisplus.core.metadata.IPage; |  | ||||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |  | ||||||
| import com.ruoyi.common.core.page.R; |  | ||||||
| import com.ruoyi.common.utils.Query; |  | ||||||
| import org.springframework.beans.factory.annotation.Autowired; |  | ||||||
| import org.springframework.stereotype.Service; |  | ||||||
| import com.ruoyi.code.camera.mapper.ScStationInfoMapper; |  | ||||||
| import com.ruoyi.code.camera.domain.ScStationInfo; |  | ||||||
| import com.ruoyi.code.camera.service.IScStationInfoService; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * Service业务层处理 |  | ||||||
|  * |  | ||||||
|  * @author ruoyi |  | ||||||
|  * @date 2022-06-29 |  | ||||||
|  */ |  | ||||||
| @Service("scStationInfoService") |  | ||||||
| public class ScStationInfoServiceImpl extends ServiceImpl<ScStationInfoMapper, ScStationInfo> implements IScStationInfoService |  | ||||||
| { |  | ||||||
|     @Autowired |  | ||||||
|     private ScStationInfoMapper scStationInfoMapper; |  | ||||||
|     @Override |  | ||||||
|     public R queryPage(Map<String, Object> params) { |  | ||||||
|         IPage<ScStationInfo> page = this.page( |  | ||||||
|                 new Query<ScStationInfo>().getPage(params), |  | ||||||
|                 new QueryWrapper<ScStationInfo>() |  | ||||||
|         ); |  | ||||||
| 
 |  | ||||||
|         return R.ok().put("count", page.getTotal()).put("data", page.getRecords()); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
					Loading…
					
					
				
		Reference in new issue