|
|
@@ -1214,9 +1214,6 @@
|
|
|
<if test="taskStatisticsVo.beginDate !=null and taskStatisticsVo.beginDate != '' and taskStatisticsVo.endDate !=null and taskStatisticsVo.endDate != ''">
|
|
|
AND DATE_FORMAT( iac.createtime, '%Y-%m-%d') BETWEEN DATE_FORMAT( #{taskStatisticsVo.beginDate}, '%Y-%m-%d') AND DATE_FORMAT( #{taskStatisticsVo.endDate}, '%Y-%m-%d')
|
|
|
</if>
|
|
|
- <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- and iac.createtime >= DATE_SUB(NOW(), INTERVAL #{taskStatisticsVo.days} DAY)
|
|
|
- </if>
|
|
|
|
|
|
<if test="taskStatisticsVo.deptIds != null and taskStatisticsVo.deptIds != '' and taskStatisticsVo.deptIds.size() > 0">
|
|
|
AND sd.id in
|
|
|
@@ -1231,21 +1228,7 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
|
|
|
- <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- <choose>
|
|
|
- <when test="taskStatisticsVo.days =='1'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 1 DAY)
|
|
|
- </when>
|
|
|
|
|
|
- <when test="taskStatisticsVo.days =='7'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 7 DAY)
|
|
|
- </when>
|
|
|
-
|
|
|
- <when test="taskStatisticsVo.days =='30'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 30 DAY)
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- </if>
|
|
|
</where>
|
|
|
GROUP BY
|
|
|
io.userid,
|
|
|
@@ -1313,9 +1296,6 @@
|
|
|
<if test="taskStatisticsVo.beginDate !=null and taskStatisticsVo.beginDate != '' and taskStatisticsVo.endDate !=null and taskStatisticsVo.endDate != ''">
|
|
|
AND DATE_FORMAT( iac.createtime, '%Y-%m-%d') BETWEEN DATE_FORMAT( #{taskStatisticsVo.beginDate}, '%Y-%m-%d') AND DATE_FORMAT( #{taskStatisticsVo.endDate}, '%Y-%m-%d')
|
|
|
</if>
|
|
|
- <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- and iac.createtime >= DATE_SUB(NOW(), INTERVAL #{taskStatisticsVo.days} DAY)
|
|
|
- </if>
|
|
|
|
|
|
<if test="taskStatisticsVo.userId != null and taskStatisticsVo.userId != ''">
|
|
|
and io.userid =#{taskStatisticsVo.userId}
|
|
|
@@ -1334,21 +1314,6 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
|
|
|
- <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- <choose>
|
|
|
- <when test="taskStatisticsVo.days =='1'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 1 DAY)
|
|
|
- </when>
|
|
|
-
|
|
|
- <when test="taskStatisticsVo.days =='7'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 7 DAY)
|
|
|
- </when>
|
|
|
-
|
|
|
- <when test="taskStatisticsVo.days =='30'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 30 DAY)
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- </if>
|
|
|
</where>
|
|
|
GROUP BY
|
|
|
io.userid
|
|
|
@@ -1386,9 +1351,6 @@
|
|
|
<if test="taskStatisticsVo.beginDate !=null and taskStatisticsVo.beginDate != '' and taskStatisticsVo.endDate !=null and taskStatisticsVo.endDate != ''">
|
|
|
AND DATE_FORMAT( iac.createtime, '%Y-%m-%d') BETWEEN DATE_FORMAT( #{taskStatisticsVo.beginDate}, '%Y-%m-%d') AND DATE_FORMAT( #{taskStatisticsVo.endDate}, '%Y-%m-%d')
|
|
|
</if>
|
|
|
- <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- and iac.createtime >= DATE_SUB(NOW(), INTERVAL #{taskStatisticsVo.days} DAY)
|
|
|
- </if>
|
|
|
|
|
|
<if test="taskStatisticsVo.userId != null and taskStatisticsVo.userId != ''">
|
|
|
and io.userid =#{taskStatisticsVo.userId}
|
|
|
@@ -1415,21 +1377,6 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
|
|
|
- <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- <choose>
|
|
|
- <when test="taskStatisticsVo.days =='1'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 1 DAY)
|
|
|
- </when>
|
|
|
-
|
|
|
- <when test="taskStatisticsVo.days =='7'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 7 DAY)
|
|
|
- </when>
|
|
|
-
|
|
|
- <when test="taskStatisticsVo.days =='30'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 30 DAY)
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- </if>
|
|
|
</where>
|
|
|
GROUP BY
|
|
|
io.userid
|
|
|
@@ -1647,9 +1594,6 @@
|
|
|
AND DATE_FORMAT( iac.createtime, '%Y-%m-%d') BETWEEN DATE_FORMAT( #{taskStatisticsVo.beginDate}, '%Y-%m-%d') AND DATE_FORMAT( #{taskStatisticsVo.endDate}, '%Y-%m-%d')
|
|
|
</if>
|
|
|
|
|
|
- <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- and iac.createtime >= DATE_SUB(NOW(), INTERVAL #{taskStatisticsVo.days} DAY)
|
|
|
- </if>
|
|
|
|
|
|
<if test="taskStatisticsVo.deptIds != null and taskStatisticsVo.deptIds != '' and taskStatisticsVo.deptIds.size() > 0">
|
|
|
AND sd.id in
|
|
|
@@ -1664,21 +1608,6 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
|
|
|
- <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- <choose>
|
|
|
- <when test="taskStatisticsVo.days =='1'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 1 DAY)
|
|
|
- </when>
|
|
|
-
|
|
|
- <when test="taskStatisticsVo.days =='7'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 7 DAY)
|
|
|
- </when>
|
|
|
-
|
|
|
- <when test="taskStatisticsVo.days =='30'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 30 DAY)
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- </if>
|
|
|
</where>
|
|
|
GROUP BY io.userid , su.name, sd.id , sd.name,suLeader.name,suLeader.mobile,sd.management_source
|
|
|
</select>
|
|
|
@@ -1737,25 +1666,7 @@
|
|
|
and io.userid =#{taskStatisticsVo.userId}
|
|
|
</if>
|
|
|
|
|
|
- <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- and iac.createtime >= DATE_SUB(NOW(), INTERVAL #{taskStatisticsVo.days} DAY)
|
|
|
- </if>
|
|
|
-
|
|
|
- <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- <choose>
|
|
|
- <when test="taskStatisticsVo.days =='1'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 1 DAY)
|
|
|
- </when>
|
|
|
-
|
|
|
- <when test="taskStatisticsVo.days =='7'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 7 DAY)
|
|
|
- </when>
|
|
|
|
|
|
- <when test="taskStatisticsVo.days =='30'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 30 DAY)
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- </if>
|
|
|
</where>
|
|
|
GROUP BY io.userid
|
|
|
) a
|
|
|
@@ -2612,9 +2523,6 @@
|
|
|
<if test="vo.createtimeStart != null and vo.createtimeStart!='' and vo.createtimeEnd != null and vo.createtimeEnd!=''">
|
|
|
AND DATE_FORMAT( iac.signing_time, '%Y-%m-%d') BETWEEN DATE_FORMAT( #{vo.createtimeStart}, '%Y-%m-%d') AND DATE_FORMAT( #{vo.createtimeEnd}, '%Y-%m-%d')
|
|
|
</if>
|
|
|
- <if test="vo.days !=null and vo.days !='' and vo.days != 0 ">
|
|
|
- and iac.createtime >= DATE_SUB(NOW(), INTERVAL #{vo.days} DAY)
|
|
|
- </if>
|
|
|
<if test="vo.provinceId != null and vo.provinceId != ''">
|
|
|
and io.deptid like "${vo.provinceId}%"
|
|
|
</if>
|
|
|
@@ -2993,21 +2901,6 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
|
|
|
- <if test="taskStatisticsVo.days !=null and taskStatisticsVo.days !='' ">
|
|
|
- <choose>
|
|
|
- <when test="taskStatisticsVo.days =='1'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 1 DAY)
|
|
|
- </when>
|
|
|
-
|
|
|
- <when test="taskStatisticsVo.days =='7'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 7 DAY)
|
|
|
- </when>
|
|
|
-
|
|
|
- <when test="taskStatisticsVo.days =='30'">
|
|
|
- and io.createtime >= DATE_SUB(NOW(), INTERVAL 30 DAY)
|
|
|
- </when>
|
|
|
- </choose>
|
|
|
- </if>
|
|
|
</where>
|
|
|
GROUP BY
|
|
|
io.userid,
|
|
|
@@ -3720,6 +3613,7 @@
|
|
|
left join ins_orders io on iac.orderno =io.orderno
|
|
|
<where>
|
|
|
iac.entry_status ='2'
|
|
|
+ and iac.orderstatus ='3'
|
|
|
<if test="taskStatisticsVo.userId !=null and taskStatisticsVo.userId != ''">
|
|
|
and io.userid =#{taskStatisticsVo.userId}
|
|
|
</if>
|