全量提交

This commit is contained in:
2026-02-28 15:20:47 +08:00
parent cb41bcf367
commit 697fe67780
10 changed files with 630 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.oa.mapper.PerformanceReportMapper">
<select id="selectLeaveDetails" resultType="com.ruoyi.oa.domain.vo.performance.HrmLeaveReqVo">
SELECT
lr.biz_id AS bizId,
lr.emp_id AS empId,
he.user_id AS userId,
lr.project_id AS projectId,
lr.leave_type AS leaveType,
lr.start_time AS startTime,
lr.end_time AS endTime,
lr.hours AS hours,
lr.reason AS reason,
lr.status AS status,
lr.accessory_apply_ids AS accessoryApplyIds,
lr.accessory_receipt_ids AS accessoryReceiptIds,
lr.remark AS remark,
lr.create_time AS createTime,
lr.create_by AS createBy
FROM hrm_leave_req lr
INNER JOIN hrm_employee he ON lr.emp_id = he.emp_id AND he.del_flag = 0
WHERE lr.del_flag = 0
AND he.user_id = #{userId}
AND lr.start_time &lt;= #{endDate}
AND lr.end_time &gt;= #{startDate}
ORDER BY lr.start_time ASC
</select>
<select id="selectResponsibleProjects" resultType="com.ruoyi.oa.domain.vo.SysOaProjectVo">
SELECT
project_id AS projectId,
project_name AS projectName,
project_num AS projectNum,
project_type AS projectType,
address AS address,
funds AS funds,
functionary AS functionary,
begin_time AS beginTime,
finish_time AS finishTime,
introduction AS introduction,
project_grade AS projectGrade,
project_status AS projectStatus,
trade_type AS tradeType,
project_code AS projectCode,
pre_pay AS prePay,
is_top AS isTop,
remark AS remark,
create_by AS createBy,
create_time AS createTime,
update_by AS updateBy,
update_time AS updateTime
FROM sys_oa_project
WHERE del_flag = 0
AND functionary IS NOT NULL
AND functionary LIKE CONCAT('%', #{nickName}, '%')
ORDER BY update_time DESC, create_time DESC
</select>
</mapper>

View File

@@ -215,6 +215,95 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY soti.create_time DESC
</select>
<!-- 绩效报告:按用户 + 时间范围查询任务明细(包含 task_item 子项) -->
<select id="selectPerformanceTaskList" resultMap="SysOaTaskResult">
SELECT sot.task_id,
sot.project_id,
sot.create_user_id,
sot.worker_id,
sot.task_title,
sot.task_type,
sot.task_grade,
sot.collaborator,
sot.finish_time,
sot.temp_time,
sot.begin_time,
sot.origin_finish_time,
sot.postponements,
sot.completed_time,
sot.rank_number,
sot.remark,
sot.task_rank,
sot.state,
sot.time_gap,
sot.status,
sot.accessory,
sot.create_by,
sot.create_time,
sot.update_by,
sot.update_time,
sot.del_flag,
sot.own_rank,
sot.track_id,
stepAgg.tab_node AS tabNode,
stepAgg.first_level_node AS firstLevelNode,
stepAgg.second_level_node AS secondLevelNode,
sop.project_name,
sop.project_num,
sop.project_code,
su1.nick_name AS createUserNickName,
su2.nick_name AS workerNickName,
sd.dept_name AS deptName,
IF(
sot.completed_time IS NULL,
IF(
(
SELECT a.end_time
FROM sys_oa_task_item a
WHERE a.task_id = sot.task_id
AND a.completed_time IS NULL
LIMIT 1
) IS NOT NULL,
DATEDIFF(
NOW(),
(
SELECT a.end_time
FROM sys_oa_task_item a
WHERE a.task_id = sot.task_id
AND a.completed_time IS NULL
LIMIT 1
)
),
DATEDIFF(NOW(), sot.finish_time)
),
0
) AS overDays
FROM sys_oa_task sot
LEFT JOIN sys_user su1 ON su1.user_id = sot.create_user_id
LEFT JOIN sys_user su2 ON su2.user_id = sot.worker_id
LEFT JOIN sys_oa_project sop ON sop.project_id = sot.project_id
LEFT JOIN sys_dept sd ON sd.dept_id = su2.dept_id
LEFT JOIN oa_project_schedule_step stepAgg ON stepAgg.track_id = sot.track_id
WHERE sot.del_flag = '0'
AND (
sot.create_user_id = #{userId}
OR sot.worker_id = #{userId}
OR EXISTS (
SELECT 1 FROM sys_oa_task_user sotu
WHERE sotu.task_id = sot.task_id
AND sotu.user_id = #{userId}
AND sotu.del_flag = 0
)
)
AND (
(COALESCE(sot.begin_time, sot.create_time) &lt;= #{endDate}
AND COALESCE(sot.finish_time, sot.temp_time, sot.completed_time, sot.create_time) &gt;= #{startDate})
OR (sot.create_time BETWEEN #{startDate} AND #{endDate})
OR (sot.completed_time BETWEEN #{startDate} AND #{endDate})
)
ORDER BY sot.create_time DESC
</select>
<select id="getMonthlyData"
parameterType="java.lang.String"
resultType="com.ruoyi.oa.domain.UserMonthlyData">