package cn.gistack.sm.sjztmd.controller;
|
|
import cn.gistack.sm.exam.entity.ExamPlan;
|
import cn.gistack.sm.patrol.entity.PatrolConfig;
|
import cn.gistack.sm.sjztmd.entity.AttResBase;
|
import cn.gistack.sm.sjztmd.entity.AttResStagChar;
|
import cn.gistack.sm.sjztmd.service.IAttResBaseService;
|
import cn.gistack.sm.sjztmd.service.IAttResStagCharService;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.AllArgsConstructor;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springblade.core.boot.ctrl.BladeController;
|
import org.springblade.core.mp.support.Condition;
|
import org.springblade.core.mp.support.Query;
|
import org.springblade.core.tool.api.R;
|
import org.springblade.core.tool.utils.StringUtil;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* @ClassName AttAdBaseController
|
* @Description TODO
|
* @Author aix
|
* @Date 2023/4/21 20:09
|
* @Version 1.0
|
*/
|
@Slf4j
|
@Api(tags = "中台水库特征水位")
|
@RestController
|
@RequestMapping("/sjztmd/attResStagChar")
|
@AllArgsConstructor
|
public class AttResStagCharController extends BladeController {
|
|
private final IAttResStagCharService attResStagCharService;
|
|
/**
|
* 通过resGuid查询
|
*
|
* @param resGuid
|
* @return
|
*/
|
@ApiOperation(value="水库特征水位-通过id查询", notes="水库特征水位-通过id查询")
|
@GetMapping(value = "/queryById")
|
public R queryById(@RequestParam(name="resGuid",required=true) String resGuid) {
|
AttResStagChar attResStagChar = attResStagCharService.getByResGuid(resGuid);
|
return R.data(attResStagChar);
|
}
|
|
/**
|
* 编辑
|
*
|
* @param attResStagChar
|
* @return
|
*/
|
@ApiOperation(value = "水库特征水位-编辑", notes = "水库特征水位-编辑")
|
@PostMapping(value = "/edit")
|
public R edit(@RequestBody AttResStagChar attResStagChar) {
|
if (StringUtil.isBlank(attResStagChar.getResGuid())) {
|
return R.fail("参数不正确");
|
}
|
return R.data(attResStagCharService.customizeUpdateByGuid(attResStagChar));
|
// return R.data(attResStagCharService.updateById(attResStagChar));
|
}
|
|
}
|