|  | @@ -39,6 +39,9 @@
 | 
												
													
														
															|  |  		<include refid="orderLeftJoinColumns"/>
 |  |  		<include refid="orderLeftJoinColumns"/>
 | 
												
													
														
															|  |  		<where>
 |  |  		<where>
 | 
												
													
														
															|  |  			a.del_flag = #{DEL_FLAG_NORMAL}
 |  |  			a.del_flag = #{DEL_FLAG_NORMAL}
 | 
												
													
														
															|  | 
 |  | +			<if test="team != null and team != ''">
 | 
												
													
														
															|  | 
 |  | +				and a.team = #{team}
 | 
												
													
														
															|  | 
 |  | +			</if>
 | 
												
													
														
															|  |  			<if test="orderStatus != null and orderStatus == 0">
 |  |  			<if test="orderStatus != null and orderStatus == 0">
 | 
												
													
														
															|  |  				<if test="beginDate !=null">
 |  |  				<if test="beginDate !=null">
 | 
												
													
														
															|  |  					and a.scheduled >= #{beginDate}
 |  |  					and a.scheduled >= #{beginDate}
 | 
												
											
												
													
														
															|  | @@ -62,6 +65,9 @@
 | 
												
													
														
															|  |  		SELECT count(DISTINCT a.id)
 |  |  		SELECT count(DISTINCT a.id)
 | 
												
													
														
															|  |  		from the_order a
 |  |  		from the_order a
 | 
												
													
														
															|  |  	  	<where>
 |  |  	  	<where>
 | 
												
													
														
															|  | 
 |  | +			<if test="team != null and team != ''">
 | 
												
													
														
															|  | 
 |  | +				and a.team = #{team}
 | 
												
													
														
															|  | 
 |  | +			</if>
 | 
												
													
														
															|  |  			<if test="orderStatus != null and orderStatus == 0">
 |  |  			<if test="orderStatus != null and orderStatus == 0">
 | 
												
													
														
															|  |  				<if test="beginDate !=null">
 |  |  				<if test="beginDate !=null">
 | 
												
													
														
															|  |  					and a.scheduled >= #{beginDate}
 |  |  					and a.scheduled >= #{beginDate}
 | 
												
											
												
													
														
															|  | @@ -77,6 +83,9 @@
 | 
												
													
														
															|  |  	<select id="getLeadershipList" resultType="com.jeeplus.modules.wexintheorder.entity.TheOrder">
 |  |  	<select id="getLeadershipList" resultType="com.jeeplus.modules.wexintheorder.entity.TheOrder">
 | 
												
													
														
															|  |  		select distinct(a.team) as department from the_order a
 |  |  		select distinct(a.team) as department from the_order a
 | 
												
													
														
															|  |  		<where>
 |  |  		<where>
 | 
												
													
														
															|  | 
 |  | +			<if test="team != null and team != ''">
 | 
												
													
														
															|  | 
 |  | +				and a.team = #{team}
 | 
												
													
														
															|  | 
 |  | +			</if>
 | 
												
													
														
															|  |  			<if test="beginDate !=null">
 |  |  			<if test="beginDate !=null">
 | 
												
													
														
															|  |  				and a.scheduled >= #{beginDate}
 |  |  				and a.scheduled >= #{beginDate}
 | 
												
													
														
															|  |  			</if>
 |  |  			</if>
 | 
												
											
												
													
														
															|  | @@ -90,11 +99,14 @@
 | 
												
													
														
															|  |  	select (@rownum :=@rownum + 1) as "serialNumber",theOrder.* from (
 |  |  	select (@rownum :=@rownum + 1) as "serialNumber",theOrder.* from (
 | 
												
													
														
															|  |  		select
 |  |  		select
 | 
												
													
														
															|  |  			<include refid="orderColumns"/>
 |  |  			<include refid="orderColumns"/>
 | 
												
													
														
															|  | -		,a.department
 |  | 
 | 
												
													
														
															|  | 
 |  | +		, concat_ws(" / ",a.department,a.specific) as department
 | 
												
													
														
															|  |  		from the_order a
 |  |  		from the_order a
 | 
												
													
														
															|  |  			<include refid="orderLeftJoinColumns"/>
 |  |  			<include refid="orderLeftJoinColumns"/>
 | 
												
													
														
															|  |  		<where>
 |  |  		<where>
 | 
												
													
														
															|  |  			a.team=#{department}
 |  |  			a.team=#{department}
 | 
												
													
														
															|  | 
 |  | +			<if test="team != null and team != ''">
 | 
												
													
														
															|  | 
 |  | +				and a.team = #{team}
 | 
												
													
														
															|  | 
 |  | +			</if>
 | 
												
													
														
															|  |  			<if test="beginDate !=null">
 |  |  			<if test="beginDate !=null">
 | 
												
													
														
															|  |  				and a.scheduled >= #{beginDate}
 |  |  				and a.scheduled >= #{beginDate}
 | 
												
													
														
															|  |  			</if>
 |  |  			</if>
 | 
												
											
												
													
														
															|  | @@ -102,7 +114,7 @@
 | 
												
													
														
															|  |  				and a.scheduled < #{endDate}
 |  |  				and a.scheduled < #{endDate}
 | 
												
													
														
															|  |  			</if>
 |  |  			</if>
 | 
												
													
														
															|  |  		</where>
 |  |  		</where>
 | 
												
													
														
															|  | -		order by sc.id desc ,so.id desc,a.create_date asc) as theOrder ,(select @rownum := 0) temp
 |  | 
 | 
												
													
														
															|  | 
 |  | +		order by a.team asc,a.department asc,a.specific desc,sc.id desc ,so.id desc,a.create_date asc) as theOrder ,(select @rownum := 0) temp
 | 
												
													
														
															|  |  	</select>
 |  |  	</select>
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  
 |  |  
 | 
												
											
												
													
														
															|  | @@ -114,6 +126,9 @@
 | 
												
													
														
															|  |  		from the_order a
 |  |  		from the_order a
 | 
												
													
														
															|  |  		<include refid="orderLeftJoinColumns"/>
 |  |  		<include refid="orderLeftJoinColumns"/>
 | 
												
													
														
															|  |  		<where>
 |  |  		<where>
 | 
												
													
														
															|  | 
 |  | +			<if test="team != null and team != ''">
 | 
												
													
														
															|  | 
 |  | +				and a.team = #{team}
 | 
												
													
														
															|  | 
 |  | +			</if>
 | 
												
													
														
															|  |  			<if test="beginDate !=null">
 |  |  			<if test="beginDate !=null">
 | 
												
													
														
															|  |  				and a.scheduled >= #{beginDate}
 |  |  				and a.scheduled >= #{beginDate}
 | 
												
													
														
															|  |  			</if>
 |  |  			</if>
 | 
												
											
												
													
														
															|  | @@ -121,8 +136,8 @@
 | 
												
													
														
															|  |  				and a.scheduled < #{endDate}
 |  |  				and a.scheduled < #{endDate}
 | 
												
													
														
															|  |  			</if>
 |  |  			</if>
 | 
												
													
														
															|  |  		</where>
 |  |  		</where>
 | 
												
													
														
															|  | -		group by a.specific
 |  | 
 | 
												
													
														
															|  | -		order by a.specific desc,a.team asc,a.department asc,sc.id desc ,so.id desc,a.create_date asc) as theOrder ,(select @rownum := 0) temp
 |  | 
 | 
												
													
														
															|  | 
 |  | +		group by a.team,a.specific
 | 
												
													
														
															|  | 
 |  | +		order by a.team asc,a.department asc,a.specific desc,sc.id desc ,so.id desc,a.create_date asc) as theOrder ,(select @rownum := 0) temp
 | 
												
													
														
															|  |  	</select>
 |  |  	</select>
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  |  </mapper>
 |  |  </mapper>
 |