地质所 沉降监测网建设项目
zmk
2024-05-23 80125173e0051ffdd9914d33586b739e80362e78
javaweb-plus/javaweb-cms/src/main/resources/mapper/geo/TubLogMapper.xml
@@ -56,10 +56,11 @@
        SELECT
            a.tub_name,
            b.inbound_number,
            a.outbound_number
            a.outbound_number,
            a.unit
        FROM
            ( SELECT tub_name, SUM( number ) AS outbound_number FROM js_tub_log WHERE outbound_date IS NOT NULL GROUP BY tub_name ) a
            LEFT JOIN ( SELECT tub_name, SUM( number ) AS inbound_number FROM js_tub_log WHERE inbound_date IS NOT NULL GROUP BY tub_name ) b ON a.tub_name = b.tub_name
            ( SELECT tub_name, SUM( number ) AS outbound_number, unit FROM js_tub_log WHERE outbound_date IS NOT NULL GROUP BY tub_name ) a
            LEFT JOIN ( SELECT tub_name, SUM( number ) AS inbound_number, unit FROM js_tub_log WHERE inbound_date IS NOT NULL GROUP BY tub_name ) b ON a.tub_name = b.tub_name
    </select>
    <insert id="insertTubLog" parameterType="TubLog" useGeneratedKeys="true" keyProperty="id">