7个文件已修改
1个文件已添加
231 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoManure.java 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoWeather.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/manure/ManureCtrl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/soil/SoilCtrl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/weather/WeatherCtrl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/video/VideoCtrl.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/video/VideoQo.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/video/VideoSv.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoManure.java
@@ -20,7 +20,10 @@
        "stirRunning1", "stirRunning2", "stirRunning3", "stirRunning4",
        "injectRunning", "irrRunning",
        "manureFlow", "manureTime", "stirTime",
        "stirDuration", "injectDuration"
        "stirDuration", "injectDuration",
        "alarmStr",
        "stirRunning1Str", "stirRunning2Str", "stirRunning3Str", "stirRunning4Str",
        "injectRunningStr", "irrRunningStr"
})
public class VoManure  {
    public static final long serialVersionUID = 202506251634001L;
@@ -125,4 +128,98 @@
    @Schema(description = "注肥设定时间(秒)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Integer injectDuration;
    @Schema(hidden = true)
    @JSONField(name = "alarmStr") // 指定 JSON 中的字段名
    public String getAlarmStr() {
        String str = "" ;
        if(this.alarm != null){
            if(this.alarm == 1){
                str = "故障" ;
            }else if(this.alarm == 0){
                str = "正常" ;
            }
        }
        return str ;
    }
    @Schema(hidden = true)
    @JSONField(name = "stirRunning1Str") // 指定 JSON 中的字段名
    public String getStirRunning1Str() {
        String str = "" ;
        if(this.stirRunning1 != null){
            if(this.stirRunning1 == 1){
                str = "启动" ;
            }else if(this.stirRunning1 == 0){
                str = "停止" ;
            }
        }
        return str ;
    }
    @Schema(hidden = true)
    @JSONField(name = "stirRunning2Str") // 指定 JSON 中的字段名
    public String getStirRunning2Str() {
        String str = "" ;
        if(this.stirRunning2 != null){
            if(this.stirRunning2 == 1){
                str = "启动" ;
            }else if(this.stirRunning2 == 0){
                str = "停止" ;
            }
        }
        return str ;
    }
    @Schema(hidden = true)
    @JSONField(name = "stirRunning3Str") // 指定 JSON 中的字段名
    public String getStirRunning3Str() {
        String str = "" ;
        if(this.stirRunning3 != null){
            if(this.stirRunning3 == 1){
                str = "启动" ;
            }else if(this.stirRunning3 == 0){
                str = "停止" ;
            }
        }
        return str ;
    }
    @Schema(hidden = true)
    @JSONField(name = "stirRunning4Str") // 指定 JSON 中的字段名
    public String getStirRunning4Str() {
        String str = "" ;
        if(this.stirRunning4 != null){
            if(this.stirRunning4 == 1){
                str = "启动" ;
            }else if(this.stirRunning4 == 0){
                str = "停止" ;
            }
        }
        return str ;
    }
    @Schema(hidden = true)
    @JSONField(name = "injectRunningStr") // 指定 JSON 中的字段名
    public String getInjectRunningStr() {
        String str = "" ;
        if(this.injectRunning != null){
            if(this.injectRunning == 1){
                str = "启动" ;
            }else if(this.injectRunning == 0){
                str = "停止" ;
            }
        }
        return str ;
    }
    @Schema(hidden = true)
    @JSONField(name = "irrRunningStr") // 指定 JSON 中的字段名
    public String getIrrRunningStr() {
        String str = "" ;
        if(this.irrRunning != null){
            if(this.irrRunning == 1){
                str = "启动" ;
            }else if(this.irrRunning == 0){
                str = "停止" ;
            }
        }
        return str ;
    }
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voRm/VoWeather.java
@@ -122,6 +122,7 @@
     西北(NW)    146°~169°     157.5°
     北(N)        169°~191°     180°
     */
    @Schema(hidden = true)
    @JSONField(name = "windDirectionStr") // 指定 JSON 中的字段名
    public String getWindDirectionStr() {
        String str = "" ;
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/manure/ManureCtrl.java
@@ -64,7 +64,13 @@
            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()) ;
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/soil/SoilCtrl.java
@@ -153,7 +153,13 @@
            if(qo.soilId == 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()) ;
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/weather/WeatherCtrl.java
@@ -64,7 +64,13 @@
            if(qo.weatherId == 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()) ;
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/video/VideoCtrl.java
@@ -2,6 +2,7 @@
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.common.webUtil.ResultCodeMsg;
import com.dy.pipIrrGlobal.pojoVi.ViYsApp;
import com.dy.pipIrrGlobal.voVi.VoCamera;
@@ -17,6 +18,7 @@
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
@@ -74,4 +76,62 @@
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
    /**
     * 客户端分页请求摄像头信息
     * @param queryQo 查询条件
     * @return 分页请求摄像头信息
     *
     * 使用示例:
     * GET /video/some?pageCurr=1&pageSize=10&name=摄像头1&type=1
     *
     * 查询参数说明:
     * - pageCurr: 当前页码(默认1)
     * - pageSize: 每页记录数(默认10)
     * - name: 摄像头名称(支持模糊查询)
     * - type: 摄像头类型(1:萤石)
     * - onScreen: 是否大屏展示(1:是,0:否)
     * - devNo: 设备序列号
     */
    @Operation(summary = "分页获取摄像头信息", description = "根据查询条件分页返回摄像头信息")
    @ApiResponses(value = {
            @ApiResponse(
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "返回分页摄像头信息数据(BaseResponse.content:QueryResultVo[List[VoVideo]])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = QueryResultVo.class))}
            )
    })
    @GetMapping(path = "some")
    public BaseResponse<QueryResultVo<List<VoVideo>>> some(VideoQo queryQo) {
        try {
            // 获取分页查询结果
            QueryResultVo<List<VoCamera>> pageResult = this.sv.some(queryQo);
            List<VoVideo> reList = new ArrayList<>();
            ViYsApp app = this.sv.ysApp();
            if (pageResult != null && pageResult.obj != null && pageResult.obj.size() > 0) {
                for (VoCamera voCamera : pageResult.obj) {
                    VoVideo vvo = new VoVideo();
                    vvo.from(voCamera, app == null ? null : app.accessToken);
                    reList.add(vvo);
                }
            }
            // 构建分页结果
            QueryResultVo<List<VoVideo>> result = new QueryResultVo<>();
            result.pageSize = pageResult.pageSize;
            result.pageCurr = pageResult.pageCurr;
            result.pageTotal = pageResult.pageTotal;
            result.itemTotal = pageResult.itemTotal;
            result.obj = reList;
            return BaseResponseUtils.buildSuccess(result);
        } catch (Exception e) {
            log.error("分页查询摄像头信息异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
}
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/video/VideoQo.java
New file
@@ -0,0 +1,33 @@
package com.dy.pipIrrWechat.video;
import com.dy.common.webUtil.QueryConditionVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
/**
 * @Author: liurunyu
 * @Date: 2025/6/9 9:03
 * @Description
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@Builder
@Schema(name = "视频监控查询条件")
public class VideoQo extends QueryConditionVo {
    @Schema(description = "摄像头名称(支持模糊查询)")
    public String name;
    @Schema(description = "摄像头类型(1:萤石)")
    public Byte type;
    @Schema(description = "是否大屏展示(1:是,0:否)")
    public Byte onScreen;
    @Schema(description = "设备序列号")
    public String devNo;
}
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/video/VideoSv.java
@@ -1,14 +1,17 @@
package com.dy.pipIrrWechat.video;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoVi.ViCameraMapper;
import com.dy.pipIrrGlobal.daoVi.ViYsAppMapper;
import com.dy.pipIrrGlobal.pojoVi.ViYsApp;
import com.dy.pipIrrGlobal.voVi.VoCamera;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
 * @Author: liurunyu
@@ -32,6 +35,23 @@
        return dao.selectAll4Monitor() ;
    }
    /**
     * 分页查询摄像头信息
     * @param queryQo 查询条件
     * @return 分页结果
     */
    public QueryResultVo<List<VoCamera>> some(VideoQo queryQo) {
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryQo);
        Long itemTotal = dao.selectTotal4Monitor(params);
        QueryResultVo<List<VoCamera>> rsVo = new QueryResultVo<>();
        rsVo.pageSize = queryQo.getPageSize();
        rsVo.pageCurr = queryQo.getPageCurr();
        rsVo.calculateAndSet(itemTotal, params);
        rsVo.obj = dao.selectSome4Monitor(params);
        return rsVo;
    }
    public ViYsApp ysApp(){
        List<ViYsApp> all = this.viYsAppDao.selectAll() ;
        if(all == null || all.size() == 0){