|
|
@@ -142,17 +142,17 @@
|
|
|
|
|
|
|
|
|
<select id="getExceptionDevicePage" resultType="cn.iocoder.yudao.module.pms.controller.admin.vo.IotDeviceSimple">
|
|
|
- select b.device_code as deviceCode, b.device_name as deviceName, a.orderCount,a.dept_id as deptId, from (select device_id,count(distinct order_id) as orderCount from rq_iot_inspect_order_detail c
|
|
|
+ select b.device_code as deviceCode, b.device_name as deviceName, a.orderCount,a.dept_id as deptId from (select device_id,count(distinct order_id) as orderCount,dept_id from rq_iot_inspect_order_detail c
|
|
|
<where>
|
|
|
c.if_normal = false and c.deleted=0
|
|
|
<if test="reqVO.createTime[0] != null">
|
|
|
- AND a.create_time >= #{reqVO.createTime[0]}
|
|
|
+ AND c.create_time >= #{reqVO.createTime[0]}
|
|
|
</if>
|
|
|
<if test="reqVO.createTime.length > 1 and reqVO.createTime[1] != null">
|
|
|
- AND a.create_time <= #{reqVO.createTime[1]}
|
|
|
+ AND c.create_time <= #{reqVO.createTime[1]}
|
|
|
</if>
|
|
|
<if test="reqVO.deptIds != null and reqVO.deptIds.size > 0">
|
|
|
- AND a.dept_id IN
|
|
|
+ AND c.dept_id IN
|
|
|
<foreach collection="reqVO.deptIds" index="index" item="key" open="(" separator="," close=")">
|
|
|
#{key}
|
|
|
</foreach>
|