|
@@ -62,7 +62,7 @@
|
|
|
</sql>
|
|
|
<!--根据日期获取全部报告信息-->
|
|
|
<select id="getAllReportByDate" resultType="java.util.Map">
|
|
|
- SELECT a.id, c.name,c.job_number as jobNumber,c.corpwx_userid as corpwxUserId,c.corpwx_deptid as corpwxDeptId, b.project_name AS project,b.project_code as projectCode,b.category_name as categoryName, a.working_time AS duration, a.content, a.create_time AS time,a.create_date as createDate,
|
|
|
+ SELECT a.id, c.name,uwb.name as realName,c.job_number as jobNumber,c.corpwx_userid as corpwxUserId,c.corpwx_deptid as corpwxDeptId, b.project_name AS project,b.project_code as projectCode,b.category_name as categoryName, 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,u.job_number as jobNumber,
|
|
|
a.end_time as endTime, d.name as subProjectName,d.code as subProjectCode,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,a.is_dept_audit as isDeptAudit,a.group_audit_state as groupAuditState,task_group.incharger_id as inchargerId,a.project_audit_state as projectAuditState,a.audit_dept_managerid as deptAuditorName
|
|
@@ -75,6 +75,7 @@
|
|
|
JOIN project AS b ON a.project_id=b.id
|
|
|
LEFT JOIN project_separate AS ps on b.id=ps.id
|
|
|
LEFT JOIN user AS c ON a.creator_id=c.id
|
|
|
+ LEFT JOIN user_with_beisen AS uwb ON c.job_number=c.job_number
|
|
|
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
|
|
@@ -118,7 +119,7 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getAllReportByDateWithReportLog" resultType="java.util.Map">
|
|
|
- SELECT a.id, c.name,c.job_number as jobNumber,c.corpwx_userid as corpwxUserId,c.corpwx_deptid as corpwxDeptId, b.project_name AS project,b.project_code as projectCode,b.category_name as categoryName, a.working_time AS duration, a.content, a.create_time AS time,a.create_date as createDate,
|
|
|
+ SELECT a.id, c.name,uwb.name as realName,c.job_number as jobNumber,c.corpwx_userid as corpwxUserId,c.corpwx_deptid as corpwxDeptId, b.project_name AS project,b.project_code as projectCode,b.category_name as categoryName, 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,u.job_number as jobNumber,
|
|
|
a.end_time as endTime, d.name as subProjectName,d.code as subProjectCode,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,a.is_dept_audit as isDeptAudit,a.group_audit_state as groupAuditState,task_group.incharger_id as inchargerId,a.project_audit_state as projectAuditState,a.audit_dept_managerid as deptAuditorName
|
|
@@ -131,6 +132,7 @@
|
|
|
JOIN project AS b ON a.project_id=b.id
|
|
|
LEFT JOIN project_separate AS ps on b.id=ps.id
|
|
|
LEFT JOIN user AS c ON a.creator_id=c.id
|
|
|
+ LEFT JOIN user_with_beisen AS uwb ON c.job_number=c.job_number
|
|
|
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
|
|
@@ -1063,8 +1065,9 @@
|
|
|
ps.contract_code as contractCode,ps.project_category_sub as projectCategorySub,ps.region,DATE_FORMAT(p.create_date,'%Y-%m-%d') as createDate,DATE_FORMAT(ps.warranty_start_date,'%Y-%m-%d') as warrantyStartDate,
|
|
|
DATE_FORMAT(ps.warranty_end_date,'%Y-%m-%d') as warrantyEndDate,DATE_FORMAT(p.finish_date,'%Y-%m-%d') as finishDate,ps.bu,IFNULL(p.man_day*8,0) as planTime,IFNULL(SUM(r.working_time),0) as realityTime,
|
|
|
case when p.man_day*8-SUM(r.working_time) >= 0 then '否' else '是' end as isOver ,case when p.man_day*8-SUM(r.working_time) > 0 then (p.man_day*8-SUM(r.working_time)) else '0' end as remaining,
|
|
|
- (select GROUP_CONCAT(CONCAT(u.job_number,'/',u.name)) from participation pa
|
|
|
+ (select GROUP_CONCAT(CONCAT(u.job_number,'/',uwb.name)) from participation pa
|
|
|
left join user u on pa.user_id=u.id
|
|
|
+ left join user_with_beisen uwb on u.job_number=uwb.job_number
|
|
|
where pa.project_id=p.id ) as participations
|
|
|
from project p
|
|
|
left join project_main pm on p.project_main_id=pm.id
|
|
@@ -1096,12 +1099,14 @@
|
|
|
|
|
|
<select id="getTaskGroupPlanTime" resultType="java.util.Map">
|
|
|
select tg.project_id as projectId,tg.task_group_code as taskGroupCode,tg.name,tg.wbs_code as wbsCode,IFNULL(tg.man_day*8,0) as planTime,tg.id as groupId,
|
|
|
- CONCAT(uu.job_number,'/',uu.name) as incahrgerName,
|
|
|
- (select GROUP_CONCAT(CONCAT(u.job_number,'/',u.name)) from group_participator gp
|
|
|
+ CONCAT(uu.job_number,'/',uwb2.name) as incahrgerName,
|
|
|
+ (select GROUP_CONCAT(CONCAT(u.job_number,'/',uwb1.name)) from group_participator gp
|
|
|
left join user u on gp.user_id=u.id
|
|
|
+ left join user_with_beisen uwb1 on u.job_number=uwb1.job_number
|
|
|
where gp.group_id=tg.id ) as participations
|
|
|
from task_group tg
|
|
|
left join user uu on uu.id=tg.incharger_id
|
|
|
+ left join user_with_beisen uwb2 on uu.job_number=uwb2.job_number
|
|
|
<where>
|
|
|
tg.project_id in
|
|
|
<foreach collection="list" open="(" close=")" separator="," item="item">
|