|
|
@ -30,10 +30,8 @@
|
|
|
|
IFNULL( SUM( CASE b.unit WHEN 0 THEN b.settlement ELSE b.settlement / 1000 END ), 0 ) naturalSum
|
|
|
|
IFNULL( SUM( CASE b.unit WHEN 0 THEN b.settlement ELSE b.settlement / 1000 END ), 0 ) naturalSum
|
|
|
|
FROM
|
|
|
|
FROM
|
|
|
|
jg_natural a
|
|
|
|
jg_natural a
|
|
|
|
LEFT JOIN jg_poundlist b ON a.id = b.natural_id
|
|
|
|
LEFT JOIN jg_poundlist b ON a.id = b.natural_id AND b.delete_mark = '0'
|
|
|
|
WHERE
|
|
|
|
WHERE a.delete_mark = '0'
|
|
|
|
( a.delete_mark != 1 OR a.delete_mark IS NULL )
|
|
|
|
|
|
|
|
AND ( b.delete_mark != 1 OR b.delete_mark IS NULL )
|
|
|
|
|
|
|
|
GROUP BY
|
|
|
|
GROUP BY
|
|
|
|
a.id) a ${ew.customSqlSegment}
|
|
|
|
a.id) a ${ew.customSqlSegment}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|