liurunyu
2025-08-21 ceee4240e066c092aa0a2b5b96773fb9508a3613
完善代码
4个文件已修改
2个文件已添加
105 ■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoLargeScreen/Ls4StatisticsMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voMd/VoCropsSimple.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voMd/VoEt0Simple.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ls4StatisticsMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/largeScreen/Ls4StatisticsCtrl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/largeScreen/Ls4StatisticsSv.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoLargeScreen/Ls4StatisticsMapper.java
@@ -1,10 +1,11 @@
package com.dy.pipIrrGlobal.daoLargeScreen;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dy.pipIrrGlobal.pojoMd.MdEt0;
import com.dy.pipIrrGlobal.voMd.VoCrops;
import com.dy.pipIrrGlobal.voSpecial.VoTopXClient;
import com.dy.pipIrrGlobal.voSpecial.VoTopXIntake;
import com.dy.pipIrrGlobal.voMd.VoCropsSimple;
import com.dy.pipIrrGlobal.voMd.VoEt0Simple;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -149,14 +150,14 @@
     * 所有作物
     * @return 实体集合
     */
    List<VoCrops> allCropts() ;
    List<VoCropsSimple> allCropts() ;
    /**
     * 所有作物
     * @return 实体集合
     */
    List<MdEt0> et0InWeek(@Param("cropId") Long cropId, @Param("startDate")String startDate, @Param("endDate")String endDate) ;
    List<VoEt0Simple> et0InWeek(@Param("cropId") Long cropId, @Param("startDate")String startDate, @Param("endDate")String endDate) ;
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voMd/VoCropsSimple.java
New file
@@ -0,0 +1,32 @@
package com.dy.pipIrrGlobal.voMd;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.Data;
import java.io.Serializable;
/**
 * @Author: liurunyu
 * @Date: 2025/8/21 11:42
 * @Description
 */
@Data
@JsonPropertyOrder({"id", "name" })
public class VoCropsSimple implements Serializable {
    public static final long serialVersionUID = 202508211143001L;
    /**
     * 主键
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long id;
    /**
     * 作物名称
     */
    public String name;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voMd/VoEt0Simple.java
New file
@@ -0,0 +1,39 @@
package com.dy.pipIrrGlobal.voMd;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * @Author: liurunyu
 * @Date: 2025/8/21 11:44
 * @Description
 */
@Data
@JsonPropertyOrder({"id", "dt", "et0"})
public class VoEt0Simple implements Serializable {
    public static final long serialVersionUID = 202508211143002L;
    /**
     * 主键
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long id;
    @JsonFormat(pattern = "yyyy-MM-dd")
    public Date dt;
    /**
     * 蒸腾量
     */
    @Schema(description = "本日作物蒸腾量", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @JsonFormat(shape = JsonFormat.Shape.NUMBER, pattern = "0.00")
    public Double et0;
}
pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ls4StatisticsMapper.xml
@@ -321,14 +321,14 @@
        </trim>
    </select>
    <select id="allCropts" resultType="com.dy.pipIrrGlobal.voMd.VoCrops">
    <select id="allCropts" resultType="com.dy.pipIrrGlobal.voMd.VoCropsSimple">
        select mTb.id as id, mTb.name as name
        from md_crops mTb
        where mTb.deleted != 1
        order by mTb.id DESC
    </select>
    <select id="et0InWeek" resultType="com.dy.pipIrrGlobal.pojoMd.MdEt0">
    <select id="et0InWeek" resultType="com.dy.pipIrrGlobal.voMd.VoEt0Simple">
        select mTb.id as id, mTb.dt as dt, mTb.et0 as et0
        from md_et0 mTb
        <where>
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/largeScreen/Ls4StatisticsCtrl.java
@@ -10,6 +10,8 @@
import com.dy.pipIrrGlobal.voLargeScreen.VoCurrentInfo;
import com.dy.pipIrrGlobal.voLargeScreen.VoMonitorInfo;
import com.dy.pipIrrGlobal.voMd.VoCrops;
import com.dy.pipIrrGlobal.voMd.VoCropsSimple;
import com.dy.pipIrrGlobal.voMd.VoEt0Simple;
import com.dy.pipIrrGlobal.voSpecial.VoTopXClient;
import com.dy.pipIrrGlobal.voSpecial.VoTopXIntake;
import io.swagger.v3.oas.annotations.Operation;
@@ -187,13 +189,13 @@
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "得到所有作物(BaseResponse.content:[VoTopXIntake{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = VoCrops.class))}
                            schema = @Schema(implementation = VoCropsSimple.class))}
            )
    })
    @GetMapping(path = "allCropts")
    @SsoAop()
    public BaseResponse<List<VoCrops>> allCropts(){
        List<VoCrops> res = this.sv.allCropts();
    public BaseResponse<List<VoCropsSimple>> allCropts(){
        List<VoCropsSimple> res = this.sv.allCropts();
        return BaseResponseUtils.buildSuccess(res);
    }
@@ -208,13 +210,13 @@
                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
                    description = "一个作物一周内的蒸腾量(BaseResponse.content:[VoTopXIntake{}])",
                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
                            schema = @Schema(implementation = MdEt0.class))}
                            schema = @Schema(implementation = VoEt0Simple.class))}
            )
    })
    @GetMapping(path = "et0InWeek")
    @SsoAop()
    public BaseResponse<List<MdEt0>> et0InWeek(Long cropId){
        List<MdEt0> res = this.sv.et0InWeek(cropId);
    public BaseResponse<List<VoEt0Simple>> et0InWeek(Long cropId){
        List<VoEt0Simple> res = this.sv.et0InWeek(cropId);
        return BaseResponseUtils.buildSuccess(res);
    }
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/largeScreen/Ls4StatisticsSv.java
@@ -8,17 +8,16 @@
import com.dy.common.util.IDLongGenerator;
import com.dy.common.webUtil.BaseResponse;
import com.dy.pipIrrGlobal.daoLargeScreen.Ls4StatisticsMapper;
import com.dy.pipIrrGlobal.pojoMd.MdEt0;
import com.dy.pipIrrGlobal.rtuMw.CodeLocal;
import com.dy.pipIrrGlobal.rtuMw.Web2RtuMw;
import com.dy.pipIrrGlobal.voLargeScreen.VoBaseInfo;
import com.dy.pipIrrGlobal.voLargeScreen.VoCurrentInfo;
import com.dy.pipIrrGlobal.voLargeScreen.VoMonitorInfo;
import com.dy.pipIrrGlobal.voMd.VoCrops;
import com.dy.pipIrrGlobal.voMd.VoCropsSimple;
import com.dy.pipIrrGlobal.voMd.VoEt0Simple;
import com.dy.pipIrrGlobal.voSpecial.VoTopXClient;
import com.dy.pipIrrGlobal.voSpecial.VoTopXIntake;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;
@@ -178,14 +177,14 @@
     * 所有作物
     * @return 实体集合
     */
    public List<VoCrops> allCropts(){
    public List<VoCropsSimple> allCropts(){
        return this.dao.allCropts() ;
    }
    /**
     * 所有作物
     * @return 实体集合
     */
    public List<MdEt0> et0InWeek(Long cropId){
    public List<VoEt0Simple> et0InWeek(Long cropId){
        String startDate = DateTime.lastXDay_yyyy_MM_dd(8) ;//8天前
        String endDate = DateTime.lastXDay_yyyy_MM_dd(1) ;//昨天
        return this.dao.et0InWeek(cropId, startDate, endDate) ;