|
@@ -1,7 +1,9 @@
|
|
package com.sooka.sponest.mobile.data.digitalwatercontroller;
|
|
package com.sooka.sponest.mobile.data.digitalwatercontroller;
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
|
+import com.ruoyi.common.core.constant.HttpStatus;
|
|
|
|
+import com.ruoyi.common.core.domain.R;
|
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
import com.ruoyi.common.core.web.page.PageDomain;
|
|
import com.ruoyi.common.core.web.page.PageDomain;
|
|
import com.ruoyi.common.core.web.page.TableSupport;
|
|
import com.ruoyi.common.core.web.page.TableSupport;
|
|
@@ -40,25 +42,34 @@ public class CenterdataTHydraulicRiverAppController {
|
|
String estuary = centerdataTHydraulicRiver.getEstuary();
|
|
String estuary = centerdataTHydraulicRiver.getEstuary();
|
|
return AjaxResult.success(digitalWaterAppService.selectCenterdataTHydraulicRiverList(pageNum, pageSize, name, riverSource, estuary).getRows());
|
|
return AjaxResult.success(digitalWaterAppService.selectCenterdataTHydraulicRiverList(pageNum, pageSize, name, riverSource, estuary).getRows());
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查询河流资源列表无分页
|
|
* 查询河流资源列表无分页
|
|
*/
|
|
*/
|
|
@GetMapping("/THydraulicRiverInfo/listAll")
|
|
@GetMapping("/THydraulicRiverInfo/listAll")
|
|
- public AjaxResult listAll(HydraulicRiverApp centerdataTHydraulicRiver) {
|
|
|
|
|
|
+ public AjaxResult listAll() {
|
|
HydraulicRiverApp hydraulicRiverApp = new HydraulicRiverApp();
|
|
HydraulicRiverApp hydraulicRiverApp = new HydraulicRiverApp();
|
|
- return digitalWaterAppService.selectCenterdataTHydraulicRiverListAll(hydraulicRiverApp);
|
|
|
|
|
|
+ JSONObject json = (JSONObject) JSONObject.toJSON(hydraulicRiverApp);
|
|
|
|
+ R result = digitalWaterAppService.selectCenterdataTHydraulicRiverListAll(json.toJSONString());
|
|
|
|
+ if (HttpStatus.SUCCESS == result.getCode()) {
|
|
|
|
+ return AjaxResult.success(result.getData());
|
|
|
|
+ } else {
|
|
|
|
+
|
|
|
|
+ return AjaxResult.error(result.getCode(), result.getMsg());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 获取河流资源详细信息
|
|
* 获取河流资源详细信息
|
|
*/
|
|
*/
|
|
@GetMapping("/THydraulicRiverInfo/edit")
|
|
@GetMapping("/THydraulicRiverInfo/edit")
|
|
public AjaxResult getInfo(String id) {
|
|
public AjaxResult getInfo(String id) {
|
|
AjaxResult ajaxResult = digitalWaterAppService.selectCenterdataTHydraulicRiverById(id);
|
|
AjaxResult ajaxResult = digitalWaterAppService.selectCenterdataTHydraulicRiverById(id);
|
|
- if("200".equals(ajaxResult.get("code").toString())){
|
|
|
|
|
|
+ if ("200".equals(ajaxResult.get("code").toString())) {
|
|
Map<String, Object> info = (Map<String, Object>) ajaxResult.get("data");
|
|
Map<String, Object> info = (Map<String, Object>) ajaxResult.get("data");
|
|
PictureReplaceAll.StringToList(info);
|
|
PictureReplaceAll.StringToList(info);
|
|
return appCameraService.selectCameraByIds(info);
|
|
return appCameraService.selectCameraByIds(info);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
return ajaxResult;
|
|
return ajaxResult;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -66,7 +77,7 @@ public class CenterdataTHydraulicRiverAppController {
|
|
/**
|
|
/**
|
|
* 新增河流资源
|
|
* 新增河流资源
|
|
*/
|
|
*/
|
|
- @PostMapping( "/THydraulicRiverInfo")
|
|
|
|
|
|
+ @PostMapping("/THydraulicRiverInfo")
|
|
public AjaxResult add(@RequestBody String json) {
|
|
public AjaxResult add(@RequestBody String json) {
|
|
return digitalWaterAppService.insertCenterdataTHydraulicRiver(json);
|
|
return digitalWaterAppService.insertCenterdataTHydraulicRiver(json);
|
|
}
|
|
}
|
|
@@ -74,7 +85,7 @@ public class CenterdataTHydraulicRiverAppController {
|
|
/**
|
|
/**
|
|
* 修改河流资源
|
|
* 修改河流资源
|
|
*/
|
|
*/
|
|
- @PostMapping( "/THydraulicRiverInfo/put")
|
|
|
|
|
|
+ @PostMapping("/THydraulicRiverInfo/put")
|
|
public AjaxResult edit(@RequestBody String json) {
|
|
public AjaxResult edit(@RequestBody String json) {
|
|
return digitalWaterAppService.updateCenterdataTHydraulicRiver(json);
|
|
return digitalWaterAppService.updateCenterdataTHydraulicRiver(json);
|
|
}
|
|
}
|