|
@@ -71,6 +71,20 @@
|
|
|
GROUP BY user.id, report.create_date;
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getMyDailyWorkTime" resultType="java.util.Map">
|
|
|
+ SELECT user.id, user.name,department.department_name as departmentName,department.corpwx_deptid as corpwxDeptId, report.create_date as createDate, sum(working_time) as workingTime,user.inactive_date as inactiveDate,user.corpwx_userid as corpwxUserId
|
|
|
+ FROM user
|
|
|
+ left join report on user.id = report.creator_id
|
|
|
+ left join department on department.department_id = user.department_id
|
|
|
+ WHERE user.id = #{userId}
|
|
|
+ <if test="startDate != null">
|
|
|
+ AND report.create_date >= #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">
|
|
|
+ AND report.create_date <= #{endDate}
|
|
|
+ </if>
|
|
|
+ group by report.create_date
|
|
|
+ </select>
|
|
|
|
|
|
<!--根据日期,部门,指定人员获取报告上传人-->
|
|
|
<select id="getReportNameByDateAndDept" resultType="java.util.Map">
|
|
@@ -96,22 +110,6 @@
|
|
|
</select>
|
|
|
|
|
|
|
|
|
- <!--根据员工id,日期获取当天全部报告信息-->
|
|
|
- <select id="getReportByDate" resultMap="FullMap">
|
|
|
- select a.*,b.name as productName,prod_procedure.name as procedureName,checker.name as checkerName,u.name as creatorName
|
|
|
- FROM report AS a
|
|
|
- left JOIN product AS b ON a.product_id=b.id
|
|
|
- left join prod_procedure on prod_procedure.id = a.prod_procedure_id
|
|
|
- left join user u on u.id = a.creator_id
|
|
|
- left join user checker on checker.id = a.checker_id
|
|
|
- WHERE 1=1
|
|
|
- <if test="date != null and date != ''">
|
|
|
- AND a.create_date=#{date}
|
|
|
- </if>
|
|
|
- AND a.creator_id=#{id}
|
|
|
- ORDER BY a.creator_id ASC
|
|
|
- </select>
|
|
|
-
|
|
|
<!-- 批量获取员工某天的报告 -->
|
|
|
<select id="getUserReportByDate" resultMap="FullMap">
|
|
|
select a.*,b.name as productName,prod_procedure.name as procedureName,checker.name as checkerName,u.name as creatorName,
|