Commit f44b10c3 authored by 鲍德's avatar 鲍德

一人多岗列表

parent 2a6e1a18
......@@ -37,7 +37,6 @@ public class CurrentRiskPostListController extends BaseController
/**
* 查询现状风险岗位用户巡查清单列表
*/
@PreAuthorize("@ss.hasPermi('system:riskPostList:list')")
@GetMapping("/list")
public TableDataInfo list(CurrentRiskPostList currentRiskPostList)
{
......@@ -46,6 +45,14 @@ public class CurrentRiskPostListController extends BaseController
return getDataTable(list);
}
@GetMapping("/list2")
public TableDataInfo list2(CurrentRiskPostList currentRiskPostList)
{
startPage();
List<CurrentRiskPostList> list = currentRiskPostListService.selectCurrentRiskPostListList2(currentRiskPostList);
return getDataTable(list);
}
/**
* 导出现状风险岗位用户巡查清单列表
*/
......
......@@ -49,4 +49,9 @@ public class CurrentRiskPostList extends BaseEntityClean
private String delFlag;
private String currentRiskType;
private Long currentRiskId2;
private String currentRiskType2;
private String nickName;
}
......@@ -59,4 +59,7 @@ public interface CurrentRiskPostListMapper extends MPJBaseMapper<CurrentRiskPos
* @return 结果
*/
public int deleteCurrentRiskPostListByIds(Long[] ids);
public List<CurrentRiskPostList> selectCurrentRiskPostListList2(CurrentRiskPostList currentRiskPostList);
}
......@@ -58,4 +58,7 @@ public interface ICurrentRiskPostListService extends MPJBaseService<CurrentRisk
* @return 结果
*/
public int deleteCurrentRiskPostListById(Long id);
public List<CurrentRiskPostList> selectCurrentRiskPostListList2(CurrentRiskPostList currentRiskPostList);
}
......@@ -93,4 +93,9 @@ public class CurrentRiskPostListServiceImpl extends MPJBaseServiceImpl<CurrentRi
{
return currentRiskPostListMapper.deleteCurrentRiskPostListById(id);
}
@Override
public List<CurrentRiskPostList> selectCurrentRiskPostListList2(CurrentRiskPostList currentRiskPostList) {
return currentRiskPostListMapper.selectCurrentRiskPostListList2(currentRiskPostList);
}
}
......@@ -19,6 +19,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="currentRiskType" column="currentRiskType" />
<result property="currentRiskId2" column="current_risk_id2" />
<result property="currentRiskType2" column="currentRiskType2" />
<result property="nickName" column="nick_name" />
</resultMap>
<sql id="selectCurrentRiskPostListVo">
......@@ -55,6 +58,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
GROUP BY a.current_risk_id
</select>
<select id="selectCurrentRiskPostListList2" parameterType="com.censoft.censoftrongtong.domain.CurrentRiskPostList" resultMap="CurrentRiskPostListResult">
SELECT
a.id,
a.project_id,
a.post_id,
a.user_id,
a.current_risk_id,
a.patrol_type,
a.sort_num,
a.del_flag,
a.create_by,
a.create_time,
a.update_by,
a.update_time,
a.remark,
c.nick_name,
GROUP_CONCAT(a.current_risk_id) current_risk_id2,
GROUP_CONCAT(DISTINCT b.type)currentRiskType2
FROM
current_risk_post_list a
LEFT JOIN risk_plan_existing_list b on a.current_risk_id = b.id
LEFT JOIN sys_user c on a.user_id = c.user_id
<where>
<if test="projectId != null "> and a.project_id = #{projectId}</if>
<if test="postId != null "> and a.post_id = #{postId}</if>
<if test="userId != null "> and a.user_id = #{userId}</if>
<if test="currentRiskId != null "> and a.current_risk_id = #{currentRiskId}</if>
<if test="patrolType != null and patrolType != ''"> and a.patrol_type = #{patrolType}</if>
</where>
GROUP BY a.user_id
</select>
<select id="selectCurrentRiskPostListById" parameterType="Long" resultMap="CurrentRiskPostListResult">
<include refid="selectCurrentRiskPostListVo"/>
where id = #{id}
......
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