|
@@ -98,6 +98,61 @@
|
|
ORDER BY a.creator_id, a.create_date desc
|
|
ORDER BY a.creator_id, a.create_date desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="getProjectMembReportByDate" resultType="java.util.Map">
|
|
|
|
+ SELECT c.name, b.project_name AS project, a.working_time AS duration, a.content, a.create_time AS time, a.create_date as createDate,
|
|
|
|
+ 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, 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.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
|
|
|
|
+ FROM report AS a
|
|
|
|
+ JOIN project AS b ON a.project_id=b.id
|
|
|
|
+ LEFT JOIN user AS c ON a.creator_id=c.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
|
|
|
|
+ WHERE a.state = 1
|
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
|
+ AND a.create_date between #{startDate} and #{endDate}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="companyId != null">
|
|
|
|
+ AND c.company_id = #{companyId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="leaderId != null">
|
|
|
|
+ AND b.incharger_id = #{leaderId}
|
|
|
|
+ </if>
|
|
|
|
+ ORDER BY a.creator_id, a.create_date desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getDeptMembReportByDate" resultType="java.util.Map">
|
|
|
|
+ SELECT c.name, b.project_name AS project, a.working_time AS duration, a.content, a.create_time AS time, a.create_date as createDate,
|
|
|
|
+ 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, 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.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
|
|
|
|
+ FROM report AS a
|
|
|
|
+ JOIN project AS b ON a.project_id=b.id
|
|
|
|
+ LEFT JOIN user AS c ON a.creator_id=c.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
|
|
|
|
+ WHERE a.state = 1
|
|
|
|
+ <if test="startDate != null and startDate != ''">
|
|
|
|
+ AND a.create_date between #{startDate} and #{endDate}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="companyId != null">
|
|
|
|
+ AND c.company_id = #{companyId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deptIds != null">
|
|
|
|
+ AND c.department_id in
|
|
|
|
+ <foreach collection="deptIds" item="deptId" separator="," close=")" open="(" index="index">
|
|
|
|
+ #{deptId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ ORDER BY a.creator_id, a.create_date desc
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
<!--根据员工id,日期获取当天全部报告信息-->
|
|
<!--根据员工id,日期获取当天全部报告信息-->
|
|
<select id="getReportByDate" resultType="java.util.Map">
|
|
<select id="getReportByDate" 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, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
|
|
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, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
|
|
@@ -167,7 +222,7 @@
|
|
<if test="date != null and date != ''">
|
|
<if test="date != null and date != ''">
|
|
AND a.create_date=#{date}
|
|
AND a.create_date=#{date}
|
|
</if>
|
|
</if>
|
|
- <if test="targetUserId != null">
|
|
|
|
|
|
+ <if test="targetUserId != null and targetUserId != ''">
|
|
AND a.creator_id=#{targetUserId}
|
|
AND a.creator_id=#{targetUserId}
|
|
</if>
|
|
</if>
|
|
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
|
|
<if test="startDate != null and startDate != '' and endDate != null and endDate != ''">
|