|
|
@@ -131,8 +131,7 @@
|
|
|
left join sys_user su on io.userid =su.id
|
|
|
left join sys_dept sd on sd.id =su.dept_id
|
|
|
<where>
|
|
|
- iac.orderstatus = '3'
|
|
|
- and io.orderstatus = '3'
|
|
|
+ iac.orderstatus = '3'
|
|
|
<if test="vo.createtimeStart != null and vo.createtimeStart!='' and vo.createtimeEnd != null and vo.createtimeEnd!=''">
|
|
|
AND DATE_FORMAT( iac.createtime, '%Y-%m-%d') BETWEEN DATE_FORMAT( #{vo.createtimeStart}, '%Y-%m-%d') AND
|
|
|
DATE_FORMAT( #{vo.createtimeEnd}, '%Y-%m-%d')
|
|
|
@@ -146,6 +145,9 @@
|
|
|
and su.name=#{vo.userName}
|
|
|
</if>
|
|
|
|
|
|
+ <if test="vo.userId !=null and vo.userId!=''">
|
|
|
+ and su.id=#{vo.userId}
|
|
|
+ </if>
|
|
|
|
|
|
<if test="vo.userIds !=null and vo.userIds!='' and vo.userIds.size()>0">
|
|
|
and su.id in
|
|
|
@@ -154,23 +156,22 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
|
|
|
- <if test="vo.userId !=null and vo.userId!=''">
|
|
|
- and su.id=#{vo.userId}
|
|
|
+ <if test="vo.deptId !=null and vo.deptId!=''">
|
|
|
+ and io.deptid like concat('%',#{vo.deptId},'%')
|
|
|
</if>
|
|
|
|
|
|
<if test="vo.managementSource !=null and vo.managementSource!=''">
|
|
|
and sd.management_source=#{vo.managementSource}
|
|
|
</if>
|
|
|
-
|
|
|
<if test="vo.deptIds != null and vo.deptIds != '' and vo.deptIds.size() > 0">
|
|
|
- AND io.deptid in
|
|
|
+ AND io.deptid in
|
|
|
<foreach collection="vo.deptIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
|
|
|
<if test="vo.userIds != null and vo.userIds != '' and vo.userIds.size() > 0">
|
|
|
- AND io.userid in
|
|
|
+ AND io.userid in
|
|
|
<foreach collection="vo.userIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
@@ -188,6 +189,7 @@
|
|
|
left join sys_dept sd on sd.id =su.dept_id
|
|
|
<where>
|
|
|
1=1
|
|
|
+ and iac.orderstatus ='3'
|
|
|
<if test="vo.createtimeStart != null and vo.createtimeStart!='' and vo.createtimeEnd != null and vo.createtimeEnd!=''">
|
|
|
AND DATE_FORMAT( iac.createtime, '%Y-%m-%d') BETWEEN DATE_FORMAT( #{vo.createtimeStart}, '%Y-%m-%d') AND
|
|
|
DATE_FORMAT( #{vo.createtimeEnd}, '%Y-%m-%d')
|
|
|
@@ -201,9 +203,9 @@
|
|
|
and su.id=#{vo.userId}
|
|
|
</if>
|
|
|
|
|
|
- <if test="vo.userIds !=null and vo.userIds!='' and vo.userIds.size()>0">
|
|
|
+ <if test="vo.proportionUserIds !=null and vo.proportionUserIds!='' and vo.proportionUserIds.size()>0">
|
|
|
and su.id in
|
|
|
- <foreach collection="vo.userIds" item="item" open="(" separator="," close=")">
|
|
|
+ <foreach collection="vo.proportionUserIds" item="item" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
@@ -217,13 +219,6 @@
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</if>
|
|
|
-
|
|
|
- <if test="vo.userIds != null and vo.userIds != '' and vo.userIds.size() > 0">
|
|
|
- AND io.userid in
|
|
|
- <foreach collection="vo.userIds" item="item" open="(" separator="," close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|