Commit 635761ec authored by cq990612's avatar cq990612

优化代码结构

parent 51d0c1c7
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</select> </select>
<select id="getManagerProjectsDto" resultType="cn.wisenergy.model.dto.ManagerProjectsDto"> <select id="getManagerProjectsDto" resultType="cn.wisenergy.model.dto.ManagerProjectsDto">
select select
p.id,p.oa_project_id,p.project_name,p.manager_id,p.dept_id,p.modify_time,p.type,p.create_time,p.is_conclusion, p.id,p.oa_project_id,p.project_name,p.manager_id,lu.manager_name,p.dept_id,p.modify_time,p.type,p.create_time,p.is_conclusion,
GROUP_CONCAT(DISTINCT(u.name)) as 'participants',p.cost_budget,p.work_time,p.start_time,p.end_time, GROUP_CONCAT(DISTINCT(u.name)) as 'participants',p.cost_budget,p.work_time,p.start_time,p.end_time,
if(cost is NULL,0,0 + cast(cost as char)) as 'currentLaborCost',if(total_time is NULL,0,0 + cast(total_time as if(cost is NULL,0,0 + cast(cost as char)) as 'currentLaborCost',if(total_time is NULL,0,0 + cast(total_time as
char)) as 'totalCurrentWorkingHours', char)) as 'totalCurrentWorkingHours',
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
from work_project p LEFT JOIN (select project_id,SUM(total_time) as 'total_time',SUM(cost)/10000 as 'cost' from work_project p LEFT JOIN (select project_id,SUM(total_time) as 'total_time',SUM(cost)/10000 as 'cost'
FROM work_project_time_cost FROM work_project_time_cost
GROUP BY project_id) o on p.id = o.project_id GROUP BY project_id) o on p.id = o.project_id
LEFT JOIN (select id,`name` as 'manager_name'from work_user) lu on p.manager_id=lu.id
LEFT JOIN work_user_project up ON p.id = up.project_id LEFT JOIN work_user_project up ON p.id = up.project_id
LEFT JOIN work_user u on u.id = up.user_id LEFT JOIN work_user u on u.id = up.user_id
<where> <where>
......
...@@ -34,9 +34,12 @@ public class ManagerProjectsDto implements Serializable { ...@@ -34,9 +34,12 @@ public class ManagerProjectsDto implements Serializable {
@ApiModelProperty(name = "type",value = "1:项目,2:商机") @ApiModelProperty(name = "type",value = "1:项目,2:商机")
private Integer type; private Integer type;
@ApiModelProperty(name = "managerId",value = "项目经理userId") @ApiModelProperty(name = "managerId",value = "项目负责人id")
private Integer managerId; private Integer managerId;
@ApiModelProperty(name = "managerName", value = "项目负责人名字")
private String managerName;
@ApiModelProperty(name = "deptId",value = "部门id") @ApiModelProperty(name = "deptId",value = "部门id")
private Integer deptId; private Integer deptId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment