|
@@ -1155,8 +1155,15 @@
|
|
|
<if test='taskStatisticsVo.userName !=null and taskStatisticsVo.userName!="" '>
|
|
<if test='taskStatisticsVo.userName !=null and taskStatisticsVo.userName!="" '>
|
|
|
and su.name like concat('%',#{taskStatisticsVo.userName},'%')
|
|
and su.name like concat('%',#{taskStatisticsVo.userName},'%')
|
|
|
</if>
|
|
</if>
|
|
|
- <if test='taskStatisticsVo.leaderId !=null and taskStatisticsVo.leaderId!="" '>
|
|
|
|
|
- and su.leader_id =#{taskStatisticsVo.leaderId}
|
|
|
|
|
|
|
+<!-- <if test='taskStatisticsVo.leaderId !=null and taskStatisticsVo.leaderId!="" '>-->
|
|
|
|
|
+<!-- and su.leader_id =#{taskStatisticsVo.leaderId}-->
|
|
|
|
|
+<!-- </if>-->
|
|
|
|
|
+
|
|
|
|
|
+ <if test="taskStatisticsVo.leaderIds != null and taskStatisticsVo.leaderIds != '' and taskStatisticsVo.leaderIds.size() > 0">
|
|
|
|
|
+ AND su.leader_id in
|
|
|
|
|
+ <foreach collection="taskStatisticsVo.leaderIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
</if>
|
|
</if>
|
|
|
<if test='taskStatisticsVo.userId !=null and taskStatisticsVo.userId!="" '>
|
|
<if test='taskStatisticsVo.userId !=null and taskStatisticsVo.userId!="" '>
|
|
|
and su.id =#{taskStatisticsVo.userId}
|
|
and su.id =#{taskStatisticsVo.userId}
|
|
@@ -1269,9 +1276,16 @@
|
|
|
<if test='taskStatisticsVo.userName !=null and taskStatisticsVo.userName!="" '>
|
|
<if test='taskStatisticsVo.userName !=null and taskStatisticsVo.userName!="" '>
|
|
|
and su.name like concat('%',#{taskStatisticsVo.userName},'%')
|
|
and su.name like concat('%',#{taskStatisticsVo.userName},'%')
|
|
|
</if>
|
|
</if>
|
|
|
- <if test='taskStatisticsVo.leaderId !=null and taskStatisticsVo.leaderId!="" '>
|
|
|
|
|
- and su.leader_id =#{taskStatisticsVo.leaderId}
|
|
|
|
|
|
|
+<!-- <if test='taskStatisticsVo.leaderId !=null and taskStatisticsVo.leaderId!="" '>-->
|
|
|
|
|
+<!-- and su.leader_id =#{taskStatisticsVo.leaderId}-->
|
|
|
|
|
+<!-- </if>-->
|
|
|
|
|
+ <if test="taskStatisticsVo.leaderIds != null and taskStatisticsVo.leaderIds != '' and taskStatisticsVo.leaderIds.size() > 0">
|
|
|
|
|
+ AND su.leader_id in
|
|
|
|
|
+ <foreach collection="taskStatisticsVo.leaderIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+
|
|
|
<if test='taskStatisticsVo.userId !=null and taskStatisticsVo.userId!="" '>
|
|
<if test='taskStatisticsVo.userId !=null and taskStatisticsVo.userId!="" '>
|
|
|
and su.id =#{taskStatisticsVo.userId}
|
|
and su.id =#{taskStatisticsVo.userId}
|
|
|
</if>
|
|
</if>
|
|
@@ -1301,6 +1315,13 @@
|
|
|
and io.deptid like "${taskStatisticsVo.houseId}%"
|
|
and io.deptid like "${taskStatisticsVo.houseId}%"
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
|
|
+ <if test="taskStatisticsVo.leaderIds != null and taskStatisticsVo.leaderIds != '' and taskStatisticsVo.leaderIds.size() > 0">
|
|
|
|
|
+ AND su.leader_id in
|
|
|
|
|
+ <foreach collection="taskStatisticsVo.leaderIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
<if test="taskStatisticsVo.createtimeStart !=null and taskStatisticsVo.createtimeStart != '' and taskStatisticsVo.createtimeEnd !=null and taskStatisticsVo.createtimeEnd != ''">
|
|
<if test="taskStatisticsVo.createtimeStart !=null and taskStatisticsVo.createtimeStart != '' and taskStatisticsVo.createtimeEnd !=null and taskStatisticsVo.createtimeEnd != ''">
|
|
|
AND DATE_FORMAT( io.createtime, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.createtimeStart} AND #{taskStatisticsVo.createtimeEnd}
|
|
AND DATE_FORMAT( io.createtime, '%Y-%m-%d') BETWEEN #{taskStatisticsVo.createtimeStart} AND #{taskStatisticsVo.createtimeEnd}
|
|
|
</if>
|
|
</if>
|
|
@@ -1358,6 +1379,7 @@
|
|
|
ins_area_company iac
|
|
ins_area_company iac
|
|
|
LEFT JOIN ins_orders io ON io.orderno = iac.orderno
|
|
LEFT JOIN ins_orders io ON io.orderno = iac.orderno
|
|
|
LEFT JOIN sys_dept sd ON sd.id = io.deptid
|
|
LEFT JOIN sys_dept sd ON sd.id = io.deptid
|
|
|
|
|
+ left join sys_user su on su.id = io.userid
|
|
|
<where>
|
|
<where>
|
|
|
sd.management_source = '1'
|
|
sd.management_source = '1'
|
|
|
<if test="taskStatisticsVo.provinceId != null and taskStatisticsVo.provinceId != ''">
|
|
<if test="taskStatisticsVo.provinceId != null and taskStatisticsVo.provinceId != ''">
|
|
@@ -1393,6 +1415,14 @@
|
|
|
#{item}
|
|
#{item}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="taskStatisticsVo.leaderIds != null and taskStatisticsVo.leaderIds != '' and taskStatisticsVo.leaderIds.size() > 0">
|
|
|
|
|
+ AND su.leader_id in
|
|
|
|
|
+ <foreach collection="taskStatisticsVo.leaderIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
<if test="taskStatisticsVo.userIds != null and taskStatisticsVo.userIds != '' and taskStatisticsVo.userIds.size() > 0">
|
|
<if test="taskStatisticsVo.userIds != null and taskStatisticsVo.userIds != '' and taskStatisticsVo.userIds.size() > 0">
|
|
|
AND io.userid in
|
|
AND io.userid in
|
|
|
<foreach collection="taskStatisticsVo.userIds" item="item" open="(" separator="," close=")">
|
|
<foreach collection="taskStatisticsVo.userIds" item="item" open="(" separator="," close=")">
|
|
@@ -1612,8 +1642,16 @@
|
|
|
<if test='taskStatisticsVo.leaderId !=null and taskStatisticsVo.leaderId!="" '>
|
|
<if test='taskStatisticsVo.leaderId !=null and taskStatisticsVo.leaderId!="" '>
|
|
|
and su.leader_id =#{taskStatisticsVo.leaderId}
|
|
and su.leader_id =#{taskStatisticsVo.leaderId}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test='taskStatisticsVo.userId !=null and taskStatisticsVo.userId!="" '>
|
|
|
|
|
- and su.id =#{taskStatisticsVo.userId}
|
|
|
|
|
|
|
+<!-- -->
|
|
|
|
|
+<!-- <if test='taskStatisticsVo.userId !=null and taskStatisticsVo.userId!="" '>-->
|
|
|
|
|
+<!-- and su.id =#{taskStatisticsVo.userId}-->
|
|
|
|
|
+<!-- </if>-->
|
|
|
|
|
+
|
|
|
|
|
+ <if test="taskStatisticsVo.leaderIds != null and taskStatisticsVo.leaderIds != '' and taskStatisticsVo.leaderIds.size() > 0">
|
|
|
|
|
+ AND su.leader_id in
|
|
|
|
|
+ <foreach collection="taskStatisticsVo.leaderIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
<if test="taskStatisticsVo.createtimeStart !=null and taskStatisticsVo.createtimeStart != '' and taskStatisticsVo.createtimeEnd !=null and taskStatisticsVo.createtimeEnd != ''">
|
|
<if test="taskStatisticsVo.createtimeStart !=null and taskStatisticsVo.createtimeStart != '' and taskStatisticsVo.createtimeEnd !=null and taskStatisticsVo.createtimeEnd != ''">
|
|
@@ -1687,9 +1725,17 @@
|
|
|
<if test='taskStatisticsVo.userName !=null and taskStatisticsVo.userName!="" '>
|
|
<if test='taskStatisticsVo.userName !=null and taskStatisticsVo.userName!="" '>
|
|
|
and su.name like concat('%',#{taskStatisticsVo.userName},'%')
|
|
and su.name like concat('%',#{taskStatisticsVo.userName},'%')
|
|
|
</if>
|
|
</if>
|
|
|
- <if test='taskStatisticsVo.leaderId !=null and taskStatisticsVo.leaderId!="" '>
|
|
|
|
|
- and su.leader_id =#{taskStatisticsVo.leaderId}
|
|
|
|
|
|
|
+<!-- <if test='taskStatisticsVo.leaderId !=null and taskStatisticsVo.leaderId!="" '>-->
|
|
|
|
|
+<!-- and su.leader_id =#{taskStatisticsVo.leaderId}-->
|
|
|
|
|
+<!-- </if>-->
|
|
|
|
|
+
|
|
|
|
|
+ <if test="taskStatisticsVo.leaderIds != null and taskStatisticsVo.leaderIds != '' and taskStatisticsVo.leaderIds.size() > 0">
|
|
|
|
|
+ AND su.leader_id in
|
|
|
|
|
+ <foreach collection="taskStatisticsVo.leaderIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
+ #{item}
|
|
|
|
|
+ </foreach>
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+
|
|
|
<if test='taskStatisticsVo.userId !=null and taskStatisticsVo.userId!="" '>
|
|
<if test='taskStatisticsVo.userId !=null and taskStatisticsVo.userId!="" '>
|
|
|
and su.id =#{taskStatisticsVo.userId}
|
|
and su.id =#{taskStatisticsVo.userId}
|
|
|
</if>
|
|
</if>
|