1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- package com.sooka.sponest.mobile.data.digitalenvironmentcontroller;
- import com.ruoyi.common.core.web.domain.AjaxResult;
- import com.ruoyi.common.core.web.page.PageDomain;
- import com.ruoyi.common.core.web.page.TableSupport;
- import com.sooka.sponest.data.api.digitalenvironment.domain.EnvironmentBiggas;
- import com.sooka.sponest.data.api.digitalenvironment.service.RemoteBiggasService;
- import com.sooka.sponest.mobile.system.camera.service.AppCameraService;
- import org.springframework.web.bind.annotation.*;
- import javax.annotation.Resource;
- import java.util.List;
- import java.util.Map;
- /**
- * @Author LG
- * @Date 2023/9/6 - 14:41
- */
- @RestController
- @RequestMapping("/AppBiggasController")
- public class BiggasController {
- @Resource
- private RemoteBiggasService biggasService;
- @Resource
- AppCameraService appCameraService;
- /**
- * 查询大气监测点/水质监测点/污染源监测点管理列表
- */
- @GetMapping("/biggas/list")
- public AjaxResult list(EnvironmentBiggas biggas) {
- PageDomain pageDomain = TableSupport.buildPageRequest();
- Integer pageNum = pageDomain.getPageNum();
- Integer pageSize = pageDomain.getPageSize();
- String type = biggas.getType();
- return AjaxResult.success(biggasService.getList(pageNum, pageSize, type).getRows());
- }
- /**
- * 获取重点企业详细信息
- */
- @GetMapping("/biggas/edit")
- public AjaxResult getInfo(EnvironmentBiggas biggas) {
- AjaxResult ajaxResult = biggasService.getEdit(biggas.getId());
- if("200".equals(ajaxResult.get("code").toString())){
- Map<String, Object> info = (Map<String, Object>) ajaxResult.get("data");
- return appCameraService.selectCameraByIds(info);
- }else{
- return ajaxResult;
- }
- }
- /**
- * 新增重点企业
- */
- @PostMapping("/biggas")
- public AjaxResult add(@RequestBody String json) {
- return biggasService.add(json);
- }
- /**
- * 修改重点企业
- */
- @PostMapping("/biggas/put")
- public AjaxResult edit(@RequestBody String json) {
- return biggasService.edit(json);
- }
- /**
- * 删除重点企业
- */
- @GetMapping("/biggas/del")
- public AjaxResult remove(@RequestParam("id") List<String> id) {
- return biggasService.del(id.toArray(new String[0]));
- }
- }
|