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