zuoxiao
2025-08-29 5137b520f931f7f062b8b48decda073c33880fcd
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/manure/ManureCtrl.java
@@ -35,15 +35,43 @@
    }
    /**
     * 根据指定条件查询最新记录
     * @param manureId
     * @return
     */
    @GetMapping(path = "oneLast")
    @SsoAop()
    public BaseResponse<VoManure> oneLast(Long manureId){
        try {
            if(manureId == null){
                return BaseResponseUtils.buildFail("水肥机id不能为空") ;
            }
            return BaseResponseUtils.buildSuccess(sv.oneLast(manureId));
        } catch (Exception e) {
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
    /**
     * 根据指定条件查询历史记录
     * @param qo
     * @return
     */
    @GetMapping(path = "history")
    @GetMapping(path = "oneHistory")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoManure>>> selectHistory(ManureQo qo){
    public BaseResponse<QueryResultVo<List<VoManure>>> oneHistory(ManureQo qo){
        try {
            return BaseResponseUtils.buildSuccess(sv.selectHistory(qo));
            if(qo.manureId == null){
                return BaseResponseUtils.buildFail("水肥机id不能为空") ;
            }
            String dtStart = qo.timeStart ;
            qo.completionTime();
            if(qo.timeStop == null || qo.timeStop.trim().equals("")){
                if(dtStart != null && !dtStart.trim().equals("")){
                    qo.timeStop = dtStart + " 23:59:59";
                }
            }
            return BaseResponseUtils.buildSuccess(sv.oneHistory(qo));
        } catch (Exception e) {
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
@@ -54,11 +82,28 @@
     * @param qo
     * @return
     */
    @GetMapping(path = "last")
    @GetMapping(path = "someLast")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoManure>>> selectLast(ManureQo qo){
    public BaseResponse<QueryResultVo<List<VoManure>>> someLast(ManureQo qo){
        try {
            return BaseResponseUtils.buildSuccess(sv.selectLast(qo));
            qo.completionTime();
            return BaseResponseUtils.buildSuccess(sv.someLast(qo));
        } catch (Exception e) {
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }
    }
    /**
     * 根据指定条件查询历史记录
     * @param qo
     * @return
     */
    @GetMapping(path = "someHistory")
    @SsoAop()
    public BaseResponse<QueryResultVo<List<VoManure>>> someHistory(ManureQo qo){
        try {
            qo.completionTime();
            return BaseResponseUtils.buildSuccess(sv.someHistory(qo));
        } catch (Exception e) {
            return BaseResponseUtils.buildException(e.getMessage()) ;
        }