package com.dy.pipIrrRemote.mqttSd1.manure;
|
|
import com.dy.common.aop.SsoAop;
|
import com.dy.common.webUtil.BaseResponse;
|
import com.dy.common.webUtil.BaseResponseUtils;
|
import com.dy.common.webUtil.QueryResultVo;
|
import com.dy.pipIrrGlobal.voRm.VoManure;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
import lombok.RequiredArgsConstructor;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
/**
|
* @Author: liurunyu
|
* @Date: 2025/6/25 16:17
|
* @Description
|
*/
|
@Slf4j
|
@Tag(name = "水肥数据查询", description = "水肥数据查询")
|
@RestController("rmManureCtrl")
|
@RequestMapping(path = "manure")
|
@RequiredArgsConstructor
|
public class ManureCtrl {
|
|
private ManureSv sv;
|
|
@Autowired
|
public void setSv(ManureSv sv){
|
this.sv = sv ;
|
}
|
|
/**
|
* 根据指定条件查询历史记录
|
* @param qo
|
* @return
|
*/
|
@GetMapping(path = "history")
|
@SsoAop()
|
public BaseResponse<QueryResultVo<List<VoManure>>> selectHistory(ManureQo qo){
|
try {
|
return BaseResponseUtils.buildSuccess(sv.selectHistory(qo));
|
} catch (Exception e) {
|
return BaseResponseUtils.buildException(e.getMessage()) ;
|
}
|
}
|
|
/**
|
* 根据指定条件查询最新记录
|
* @param qo
|
* @return
|
*/
|
@GetMapping(path = "last")
|
@SsoAop()
|
public BaseResponse<QueryResultVo<List<VoManure>>> selectLast(ManureQo qo){
|
try {
|
return BaseResponseUtils.buildSuccess(sv.selectLast(qo));
|
} catch (Exception e) {
|
return BaseResponseUtils.buildException(e.getMessage()) ;
|
}
|
}
|
}
|