<script>
SELECT status , count(*) AS total_num FROM UPCLOUD_BIZ_OUTBOUND.WMS_PICK_TASK_H   picktaskH
 WHERE 1=1
<if test="params.warehouseId != null and params.warehouseId != ''">
 and  picktaskH.warehouse_id = #{warehouseId}
</if>
<if test="params.stationCode != null and params.stationCode != ''">
 and  picktaskH.station_code = #{stationCode}
</if>
GROUP BY picktaskH.status
</script>