tangzy
2021-09-08 ec5c0176b5ecc52a051867b412e541c56b70320b
src/main/java/org/springblade/modules/mountainrain/mapper/MountainrainMapper.xml
@@ -182,7 +182,6 @@
    <select id="selectcInfos" resultMap="mountainrainResultMapcInfo">
        SELECT
            cs.id,
            cs1.c,
            cs.cenconding,
            cs.crainfall,
            isnull(cs.gohour,0) gohour,
@@ -208,24 +207,12 @@
            ( SELECT id,cenconding,crainfall,township, village, village_group, dj, bw,county,fyear,tyear,oyear,gohour,gthour,gshour,imohour,imthour,imshour FROM blade_mountain ) cs
                INNER JOIN (
                SELECT
                    ISNULL( COUNT ( * ), 0 ) AS c,
                    STCD
                FROM
                    dbo.ST_PPTN_R
                WHERE
                    TM &gt;=#{dateEnd24}
                  AND TM &lt;=#{times}
                GROUP BY
                    STCD
            ) cs1 ON cs.cenconding = cs1.STCD
                INNER JOIN (
                SELECT
                    ISNULL( SUM ( str.DRP ), 0 ) AS drp1,
                    STCD
                FROM
                    dbo.ST_PPTN_R str
                WHERE
                    str.TM &gt;=#{dateEnd1}
                    str.TM &gt;#{dateEnd1}
                  AND str.TM &lt;=#{times}
                GROUP BY
                    STCD
@@ -237,7 +224,7 @@
                FROM
                    dbo.ST_PPTN_R s
                WHERE
                    s.TM &gt;=#{dateEnd3}
                    s.TM &gt;#{dateEnd3}
                  AND s.TM &lt;=#{times}
                GROUP BY
                    STCD
@@ -249,7 +236,7 @@
                FROM
                    dbo.ST_PPTN_R strs
                WHERE
                    strs.TM &gt;=#{dateEnd6}
                    strs.TM &gt;#{dateEnd6}
                  AND strs.TM &lt;=#{times}
                GROUP BY
                    STCD
@@ -260,11 +247,9 @@
                FROM
                    dbo.ST_PPTN_R strd
                WHERE
                    strd.TM &gt;=#{timess}
                    strd.TM &gt;#{timess}
                  AND strd.TM &lt;=#{times}
                GROUP BY STCD
            ) csd on csd.STCD=cs.cenconding
        WHERE
            cs.cenconding IS NOT NULL order by id
    </select>
</mapper>