更新
This commit is contained in:
parent
b02a3b863a
commit
b2ce977796
@ -48,4 +48,7 @@ public class DlInspectionProject extends TenantBaseDO {
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ProjectRoyalty> projectRoyaltyList;
|
||||
}
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> datetimeRange;
|
||||
}
|
||||
|
||||
@ -43,4 +43,7 @@ public class OrderTableQuery {
|
||||
|
||||
/** 检测时长 */
|
||||
private String[] inspectionTime;
|
||||
|
||||
/** 时间范围 */
|
||||
private String[] datetimeRange;
|
||||
}
|
||||
|
||||
@ -241,23 +241,27 @@
|
||||
<!-- </select>-->
|
||||
<select id="getStaffCount" resultType="cn.iocoder.yudao.module.inspection.vo.StaffProjectCountVO"
|
||||
parameterType="cn.iocoder.yudao.module.inspection.entity.DlInspectionProject">
|
||||
SELECT
|
||||
ip.id,ip.project_name, count(iwn.id) as count,is2.user_id,su.nickname
|
||||
FROM inspection_staff is2
|
||||
LEFT JOIN inspection_work_node iwn ON is2.user_id = iwn.deal_user_id
|
||||
LEFT JOIN inspection_project ip ON iwn.project_id = ip.id
|
||||
LEFT JOIN system_users su on su.id = is2.user_id
|
||||
WHERE
|
||||
ip.id in (
|
||||
SELECT
|
||||
ip2.id
|
||||
FROM
|
||||
inspection_project ip2
|
||||
WHERE
|
||||
ip2.deleted = 0
|
||||
)
|
||||
group by is2.user_id,ip.project_name
|
||||
SELECT
|
||||
ip.id AS project_id,
|
||||
ip.project_name,
|
||||
is2.user_id,
|
||||
su.nickname,
|
||||
COUNT(iwn.id) AS count
|
||||
FROM inspection_staff is2
|
||||
CROSS JOIN inspection_project ip
|
||||
LEFT JOIN system_users su ON su.id = is2.user_id
|
||||
LEFT JOIN inspection_work_node iwn ON
|
||||
iwn.deal_user_id = is2.user_id
|
||||
AND iwn.project_id = ip.id
|
||||
<if test="datetimeRange != null">
|
||||
AND iwn.create_time BETWEEN #{datetimeRange[0]} AND #{datetimeRange[1]}
|
||||
</if>
|
||||
WHERE
|
||||
is2.deleted = 0
|
||||
AND ip.deleted = 0
|
||||
GROUP BY is2.user_id, ip.id
|
||||
</select>
|
||||
|
||||
<select id="selectExceptionNodesByInspectionIds" resultType="java.util.Map">
|
||||
SELECT
|
||||
w.inspection_info_id AS inspectionInfoId,
|
||||
|
||||
@ -710,7 +710,16 @@ FROM
|
||||
AND TIMESTAMPDIFF(MINUTE, ii.start_time, ii.end_time)
|
||||
BETWEEN #{query.inspectionTime[0]} AND #{query.inspectionTime[1]}
|
||||
</if>
|
||||
|
||||
<if test="query.chooseStatus == '5'.toString()">
|
||||
AND ii.reinspect_count != 0 AND ii.reinspect_count IS NOT NULL
|
||||
</if>
|
||||
<if test="query.chooseStatus == '6'.toString()">
|
||||
AND ii.recheck_count != 0 AND ii.recheck_count IS NOT NULL
|
||||
</if>
|
||||
<if test="query.datetimeRange != null">
|
||||
AND ii.create_time
|
||||
BETWEEN CONCAT(#{query.datetimeRange[0]},' 00:00:00') AND CONCAT(#{query.datetimeRange[1]},' 23:59:59')
|
||||
</if>
|
||||
<if test="query.inspectionTime[0] !=null and query.inspectionTime.length == 1">
|
||||
AND ii.start_time IS NOT NULL AND ii.end_time IS NOT NULL
|
||||
AND TIMESTAMPDIFF(MINUTE, ii.start_time, ii.end_time) >= #{query.inspectionTime[0]}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user