|
@@ -122,7 +122,7 @@ ORDER BY t1.call_date Desc;
|
|
|
<select id="listSelect" resultType="com.huimv.guowei.admin.entity.EnvRegularCallFeeding">
|
|
|
SELECT a.duck_num duckNum,a.unit_name unitName,a.id duckId,IFNULL(b.duckWeight,'0') duckWeight,IFNULL(b.callDate,#{date}) callDate ,b.callCode callCode
|
|
|
from base_duck_info a LEFT JOIN
|
|
|
-(select IFNULL(SUM(duck_weight),0) duckWeight,duck_num duckNum,duck_id duckId,call_date callDate ,call_code callCode from env_regular_call_feeding where call_date>#{date} and farm_id=#{farmId}) b ON a.id=b.duckId
|
|
|
+(select IFNULL(SUM(duck_weight),0) duckWeight,duck_num duckNum,duck_id duckId,call_date callDate ,call_code callCode from env_regular_call_feeding where call_date>#{date} and farm_id=#{farmId} GROUP BY call_code) b ON a.id=b.duckId
|
|
|
where farm_id=#{farmId} and a.is_cage='0'
|
|
|
ORDER BY b.callDate DESC
|
|
|
</select>
|