
select talent.id id,
		talent.user_id userid,
		du.id dutiesid,
		talent.description as description,
		if(talent.money < 0,talentStrategy.money, talent.money) as money,
		talent.talent_strategy_id talentStrategyId,
		talentStrategy.factor talentStrategyName,
		if(talent.money < 0, '1','0') as isDefaultMoney,
	u.realname as realname,sus.userNum as userNum, d.departname,d.id as departid,du.duties_name as dutiesname from t_bus_user_talent_subsidy talent
	left join t_s_base_user u on u.id = talent.user_id
	left join t_s_user sus on u.id= sus.id 
	LEFT JOIN t_s_user_org uo ON u.ID = uo.user_id and uo.ifpluralism = 0 and uo.status = 0
	left join t_s_depart d on uo.org_id = d.id 
	left join t_bus_user_personnel p on p.userid = u.id 
	left join t_bus_duties du on du.id = p.belong_dutiesid
	left join t_bus_talent_subsidy_strategy talentStrategy on talentStrategy.id = talent.talent_strategy_id
	where 1=1
		and talent.delete_flag != '1' and u.delete_flag != '1'
		<#if (userquery)?? && userquery ?length gt 0>
		    /* 员工 */
			and u.id = :userquery
		</#if>
	
		