|
@@ -284,6 +284,28 @@
|
|
|
ORDER BY a.creator_id ASC
|
|
|
</select>
|
|
|
|
|
|
+ <!--根据任务id,全部报告信息-->
|
|
|
+ <select id="getReportByTask" resultType="java.util.Map">
|
|
|
+ SELECT a.id,my.id as userId, my.name as userName, a.project_id as projectId,b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
|
|
|
+ a.end_time as endTime, b.incharger_id as inchargerId,b.project_code as projectCode,
|
|
|
+ a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
|
|
|
+ a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
|
|
|
+ , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName,
|
|
|
+ department.department_name as auditDeptName, a.is_dept_audit as isDeptAudit, a.project_audit_state as projectAuditState,task_group.name as groupName,a.group_id as groupId, a.custom_data as customData
|
|
|
+ ,u.name as projectAuditorName, a.project_auditor_id as projectAuditorId, a.overtime_hours as overtimeHours, a.custom_text as customText,a.evaluate as evaluate,a.report_auto_approve as reportAutoApprove
|
|
|
+ FROM report AS a
|
|
|
+ JOIN project AS b ON a.project_id=b.id
|
|
|
+ left join sub_project as d on d.id = a.sub_project_id
|
|
|
+ left join task on task.id = a.task_id
|
|
|
+ left join report_extra_degree on report_extra_degree.id = a.degree_id
|
|
|
+ left join department on department.department_id = a.audit_deptid
|
|
|
+ left join task_group on task_group.id = a.group_id
|
|
|
+ left join user u on u.id = a.project_auditor_id
|
|
|
+ left join user my on my.id = a.creator_id
|
|
|
+ WHERE a.task_id=#{taskId}
|
|
|
+ ORDER BY a.id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
<!--根据项目经理id,日期获取相关项目的全部报告信息-->
|
|
|
<select id="getInchargeReportByDate" resultType="java.util.Map">
|
|
|
SELECT a.id, a.project_id as projectId, b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType,
|