|
@@ -299,23 +299,27 @@
|
|
|
where project_status =0
|
|
where project_status =0
|
|
|
</select>
|
|
</select>
|
|
|
<resultMap id="AllProjectMonthMap" type="com.ruoyi.project.bo.ProjectTaskAllBo">
|
|
<resultMap id="AllProjectMonthMap" type="com.ruoyi.project.bo.ProjectTaskAllBo">
|
|
|
- <id property="id" column="id"/>
|
|
|
|
|
- <result property="name" column="name" />
|
|
|
|
|
- <collection property="months" ofType="String">
|
|
|
|
|
- <result column="recordTime" />
|
|
|
|
|
|
|
+ <result column="company_name" property="companyName" />
|
|
|
|
|
+ <collection property="projectList" ofType="com.ruoyi.project.bo.ProjectTaskBo">
|
|
|
|
|
+ <id column="id" property="id" />
|
|
|
|
|
+ <result column="name" property="name" />
|
|
|
|
|
+ <collection property="months" ofType="String">
|
|
|
|
|
+ <result column="recordTime" />
|
|
|
|
|
+ </collection>
|
|
|
</collection>
|
|
</collection>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<select id="getAllProjectMonth" resultMap="AllProjectMonthMap">
|
|
<select id="getAllProjectMonth" resultMap="AllProjectMonthMap">
|
|
|
- select x.id,x.name,x.recordTime
|
|
|
|
|
- from (select a.id,a.name ,date_format(b.record_time,'%Y-%m')recordTime
|
|
|
|
|
- from project_task a left join project_staff_record b on a.id =b.pid
|
|
|
|
|
- left join sys_user c on b.aid=c.user_id left join sys_dept d on c.dept_id=d.dept_id
|
|
|
|
|
|
|
+ select x.id,x.name,x.recordTime,x.company_name companyName
|
|
|
|
|
+ from (select a.id,a.name ,date_format(b.record_time,'%Y-%m')recordTime,d.company_name
|
|
|
|
|
+ from project_task a left join project_staff_record b on a.id =b.pid
|
|
|
|
|
+ left join sys_user c on b.aid=c.user_id left join sys_dept d on c.dept_id=d.dept_id
|
|
|
where b.process_status=2
|
|
where b.process_status=2
|
|
|
<if test="companyId !=null">
|
|
<if test="companyId !=null">
|
|
|
and d.company_id= #{companyId}
|
|
and d.company_id= #{companyId}
|
|
|
</if>
|
|
</if>
|
|
|
- )x where x.recordTime is not null group by x.id,x.name,x.recordTime
|
|
|
|
|
|
|
+ )x where x.recordTime is not null
|
|
|
|
|
+ group by x.id,x.name,x.recordTime,x.company_name
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|