6 changed files with 66 additions and 13 deletions
@ -0,0 +1,14 @@ |
|||||
|
package com.ccsens.tall.persist.dao; |
||||
|
|
||||
|
import com.ccsens.tall.bean.dto.LwbsDto; |
||||
|
import com.ccsens.tall.bean.vo.LwbsVo; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Repository |
||||
|
public interface IInputDocDao { |
||||
|
|
||||
|
List<LwbsVo.SelByProjectIdToTasksVo> selectById(@Param("param") LwbsDto.SelByProjectIdToTaskDto param, @Param("userId") Long userId); |
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
<?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"> |
||||
|
<mapper namespace="com.ccsens.tall.persist.dao.IInputDocDao"> |
||||
|
|
||||
|
<select id="selectById" resultType="com.ccsens.tall.bean.vo.LwbsVo$SelByProjectIdToTasksVo"> |
||||
|
SELECT |
||||
|
tptd.project_id AS id, |
||||
|
tptd.`name`, |
||||
|
tptd.description, |
||||
|
tptst.begin_time, |
||||
|
tptst.end_time, |
||||
|
( tptst.end_time - tptst.begin_time ) / 1000 / 3600 AS cha, |
||||
|
tptd.milestone |
||||
|
FROM |
||||
|
t_pro_task_detail tptd, |
||||
|
t_pro_task_sub_time tptst |
||||
|
WHERE |
||||
|
tptd.`level` = 2 |
||||
|
AND tptd.rec_status = 0 |
||||
|
AND tptd.executor_role IN ( |
||||
|
SELECT |
||||
|
tpmr.role_id |
||||
|
FROM |
||||
|
t_pro_member_role tpmr |
||||
|
WHERE |
||||
|
tpmr.rec_status = 0 |
||||
|
AND tpmr.member_id IN ( SELECT id FROM t_pro_member tpm WHERE tpm.user_id = #{userId} AND tpm.rec_status = 0 ) |
||||
|
) |
||||
|
AND tptst.task_detail_id = tptd.id |
||||
|
and tptst.begin_time=< #{param.startTime} |
||||
|
and tptst.end_time >= #{param.endTime} |
||||
|
<if test="param.id != null"> |
||||
|
and tptd.project_id=#{id} |
||||
|
</if> |
||||
|
</select> |
||||
|
</mapper> |
Loading…
Reference in new issue