|
@@ -1,6 +1,7 @@
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?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">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.management.platform.mapper.ReportMapper">
|
|
<mapper namespace="com.management.platform.mapper.ReportMapper">
|
|
|
|
+
|
|
<!-- 通用查询映射结果 -->
|
|
<!-- 通用查询映射结果 -->
|
|
<resultMap id="BaseResultMap" type="com.management.platform.entity.Report">
|
|
<resultMap id="BaseResultMap" type="com.management.platform.entity.Report">
|
|
<id column="id" property="id" />
|
|
<id column="id" property="id" />
|
|
@@ -11,17 +12,13 @@
|
|
<result column="cost" property="cost" />
|
|
<result column="cost" property="cost" />
|
|
<result column="dept_id" property="deptId" />
|
|
<result column="dept_id" property="deptId" />
|
|
<result column="company_id" property="companyId" />
|
|
<result column="company_id" property="companyId" />
|
|
- <result column="group_id" property="groupId" />
|
|
|
|
<result column="plan_id" property="planId" />
|
|
<result column="plan_id" property="planId" />
|
|
<result column="progress" property="progress" />
|
|
<result column="progress" property="progress" />
|
|
<result column="product_id" property="productId" />
|
|
<result column="product_id" property="productId" />
|
|
<result column="prod_procedure_id" property="prodProcedureId" />
|
|
<result column="prod_procedure_id" property="prodProcedureId" />
|
|
<result column="check_type" property="checkType" />
|
|
<result column="check_type" property="checkType" />
|
|
<result column="checker_id" property="checkerId" />
|
|
<result column="checker_id" property="checkerId" />
|
|
- <result column="task_change_notice_num" property="taskChangeNoticeNum" />
|
|
|
|
- <result column="task_name" property="taskName" />
|
|
|
|
- <result column="task_type_id" property="taskTypeId" />
|
|
|
|
- <result column="task_type_name" property="taskTypeName" />
|
|
|
|
|
|
+ <result column="user_procedure_team_id" property="userProcedureTeamId" />
|
|
</resultMap>
|
|
</resultMap>
|
|
<resultMap id="FullMap" type="com.management.platform.entity.vo.ReportVO" extends="BaseResultMap">
|
|
<resultMap id="FullMap" type="com.management.platform.entity.vo.ReportVO" extends="BaseResultMap">
|
|
<result column="creatorName" property="creatorName" />
|
|
<result column="creatorName" property="creatorName" />
|
|
@@ -29,10 +26,9 @@
|
|
<result column="procedureName" property="procedureName" />
|
|
<result column="procedureName" property="procedureName" />
|
|
<result column="checkerName" property="checkerName" />
|
|
<result column="checkerName" property="checkerName" />
|
|
</resultMap>
|
|
</resultMap>
|
|
-
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
- id, creator_id, create_date, working_time, create_time, cost, dept_id, company_id, group_id, plan_id, progress, product_id, prod_procedure_id, check_type, checker_id, task_change_notice_num, task_name, task_type_id, task_type_name
|
|
|
|
|
|
+ id, creator_id, create_date, working_time, create_time, cost, dept_id, company_id, plan_id, progress, product_id, prod_procedure_id, check_type, checker_id, user_procedure_team_id
|
|
</sql>
|
|
</sql>
|
|
<select id="getReportFillStatus" resultType="java.util.Map">
|
|
<select id="getReportFillStatus" resultType="java.util.Map">
|
|
SELECT DATE_FORMAT(create_date,'%Y-%m-%d') as createDate FROM report
|
|
SELECT DATE_FORMAT(create_date,'%Y-%m-%d') as createDate FROM report
|
|
@@ -102,12 +98,11 @@
|
|
|
|
|
|
<!--根据员工id,日期获取当天全部报告信息-->
|
|
<!--根据员工id,日期获取当天全部报告信息-->
|
|
<select id="getReportByDate" resultMap="FullMap">
|
|
<select id="getReportByDate" resultMap="FullMap">
|
|
- select a.*,product.name as productName,prod_procedure.name as procedureName,checker.name as checkerName,u.name as creatorName
|
|
|
|
|
|
+ select a.*,b.name as productName,prod_procedure.name as procedureName,checker.name as checkerName,u.name as creatorName
|
|
FROM report AS a
|
|
FROM report AS a
|
|
left JOIN product AS b ON a.product_id=b.id
|
|
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 prod_procedure on prod_procedure.id = a.prod_procedure_id
|
|
- left join sub_project as d on d.id = a.sub_project_id
|
|
|
|
- left join user u on u.id = a.project_auditor_id
|
|
|
|
|
|
+ left join user u on u.id = a.creator_id
|
|
left join user checker on checker.id = a.checker_id
|
|
left join user checker on checker.id = a.checker_id
|
|
WHERE 1=1
|
|
WHERE 1=1
|
|
<if test="date != null and date != ''">
|
|
<if test="date != null and date != ''">
|
|
@@ -119,13 +114,14 @@
|
|
|
|
|
|
<!-- 批量获取员工某天的报告 -->
|
|
<!-- 批量获取员工某天的报告 -->
|
|
<select id="getUserReportByDate" resultMap="FullMap">
|
|
<select id="getUserReportByDate" resultMap="FullMap">
|
|
- select a.*,product.name as productName,prod_procedure.name as procedureName,checker.name as checkerName,u.name as creatorName
|
|
|
|
|
|
+ select a.*,b.name as productName,prod_procedure.name as procedureName,checker.name as checkerName,u.name as creatorName,
|
|
|
|
+ plan.task_type_name,plan.task_name,plan.task_change_notice_num,plan.product_scheduling_num,plan.plan_type,plan.start_date,plan.end_date
|
|
FROM report AS a
|
|
FROM report AS a
|
|
left JOIN product AS b ON a.product_id=b.id
|
|
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 prod_procedure on prod_procedure.id = a.prod_procedure_id
|
|
- left join sub_project as d on d.id = a.sub_project_id
|
|
|
|
- left join user u on u.id = a.project_auditor_id
|
|
|
|
|
|
+ left join user u on u.id = a.creator_id
|
|
left join user checker on checker.id = a.checker_id
|
|
left join user checker on checker.id = a.checker_id
|
|
|
|
+ left join plan on plan.id = a.plan_id
|
|
WHERE 1=1
|
|
WHERE 1=1
|
|
<if test="date != null and date != ''">
|
|
<if test="date != null and date != ''">
|
|
AND a.create_date=#{date}
|
|
AND a.create_date=#{date}
|