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