|
|
@@ -119,35 +119,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
119
|
119
|
<select id="selectOnlineServiceReport" parameterType="api.entity.database.Report.ScreenReport" resultMap="SysOnlineServiceReport">
|
|
120
|
120
|
SELECT `kf_user` userCode, (SELECT `nick_name` FROM `sys_user` WHERE `user_name`=a.`kf_user` LIMIT 1) userName ,
|
|
121
|
121
|
(SELECT COUNT(DISTINCT COALESCE(`kh_user`,'NULL')) FROM `online_message` WHERE `kf_user` =a.`kf_user`
|
|
122
|
|
- <if test="startTime != null ">
|
|
|
122
|
+ <if test="startTime != null and startTime !=''">
|
|
123
|
123
|
AND UNIX_TIMESTAMP(`create_time`)>=UNIX_TIMESTAMP(#{startTime})
|
|
124
|
124
|
</if>
|
|
125
|
|
- <if test="endTime != null ">
|
|
|
125
|
+ <if test="endTime != null and endTime !=''">
|
|
126
|
126
|
AND UNIX_TIMESTAMP(`create_time`)<![CDATA[<=]]> UNIX_TIMESTAMP(#{endTime})
|
|
127
|
127
|
</if>
|
|
128
|
128
|
)
|
|
129
|
129
|
sessionVolume,
|
|
130
|
130
|
(SELECT COUNT(1) FROM `online_message` WHERE `kf_user` =a.`kf_user`
|
|
131
|
|
- <if test="startTime != null ">
|
|
|
131
|
+ <if test="startTime != null and startTime !=''">
|
|
132
|
132
|
AND UNIX_TIMESTAMP(`create_time`)>=UNIX_TIMESTAMP(#{startTime} )
|
|
133
|
133
|
</if>
|
|
134
|
|
- <if test="endTime != null ">
|
|
|
134
|
+ <if test="endTime != null and endTime !=''">
|
|
135
|
135
|
AND UNIX_TIMESTAMP(`create_time`)<![CDATA[<=]]> UNIX_TIMESTAMP(#{endTime})
|
|
136
|
136
|
</if>
|
|
137
|
137
|
) message,
|
|
138
|
138
|
(SELECT COUNT(*) FROM `wo_workorderbase` WHERE `createuser` =a.`kf_user`
|
|
139
|
|
- <if test="startTime != null ">
|
|
|
139
|
+ <if test="startTime != null and startTime !=''">
|
|
140
|
140
|
AND UNIX_TIMESTAMP(`createtime`)>=UNIX_TIMESTAMP(#{startTime} )
|
|
141
|
141
|
</if>
|
|
142
|
|
- <if test="endTime != null ">
|
|
|
142
|
+ <if test="endTime != null and endTime !='' ">
|
|
143
|
143
|
AND UNIX_TIMESTAMP(`createtime`) <![CDATA[<=]]> UNIX_TIMESTAMP(#{endTime})
|
|
144
|
144
|
</if>
|
|
145
|
145
|
)workOrderNum FROM `online_link` a
|
|
146
|
146
|
where 1=1
|
|
147
|
|
- <if test="startTime != null ">
|
|
|
147
|
+ <if test="startTime != null and startTime !=''">
|
|
148
|
148
|
AND UNIX_TIMESTAMP(`last_time`)>=UNIX_TIMESTAMP(#{startTime} )
|
|
149
|
149
|
</if>
|
|
150
|
|
- <if test="endTime != null ">
|
|
|
150
|
+ <if test="endTime != null and endTime !=''">
|
|
151
|
151
|
AND UNIX_TIMESTAMP(`last_time`) <![CDATA[<=]]> UNIX_TIMESTAMP(#{endTime})
|
|
152
|
152
|
</if>
|
|
153
|
153
|
<if test="usercode != null and usercode != ''">
|
|
|
@@ -164,10 +164,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
164
|
164
|
SUM(CASE WHEN workorderstate=6 THEN 1 ELSE 0 END ) completed
|
|
165
|
165
|
FROM `wo_workorderbase` a
|
|
166
|
166
|
WHERE `isdelete`=0
|
|
167
|
|
- <if test="startTime != null ">
|
|
|
167
|
+ <if test="startTime != null and startTime !=''">
|
|
168
|
168
|
AND UNIX_TIMESTAMP(`createtime`)>=UNIX_TIMESTAMP(#{startTime} )
|
|
169
|
169
|
</if>
|
|
170
|
|
- <if test="endTime != null ">
|
|
|
170
|
+ <if test="endTime != null and endTime !=''">
|
|
171
|
171
|
AND UNIX_TIMESTAMP(`createtime`) <![CDATA[<=]]> UNIX_TIMESTAMP(#{endTime})
|
|
172
|
172
|
</if>
|
|
173
|
173
|
<if test="workordertype >0 ">
|
|
|
@@ -189,10 +189,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
189
|
189
|
FROM `rep_cdr` a
|
|
190
|
190
|
WHERE 1=1 AND `callee_agent`!='' AND `callee_agent` IS NOT NULL
|
|
191
|
191
|
AND `call_type`=0
|
|
192
|
|
- <if test="startTime != null ">
|
|
|
192
|
+ <if test="startTime != null and startTime !=''">
|
|
193
|
193
|
AND UNIX_TIMESTAMP(`create_time`)>=UNIX_TIMESTAMP(#{startTime})
|
|
194
|
194
|
</if>
|
|
195
|
|
- <if test="endTime != null ">
|
|
|
195
|
+ <if test="endTime != null and endTime !=''">
|
|
196
|
196
|
AND UNIX_TIMESTAMP(`create_time`) <![CDATA[<=]]> UNIX_TIMESTAMP(#{endTime})
|
|
197
|
197
|
</if>
|
|
198
|
198
|
<if test="usercode != null and usercode != ''">
|