Commit 1c23f6ab by wangqi

帮扶组帮扶对象

parent d4f4b9c1
......@@ -59,6 +59,8 @@ public class SjBfzwh extends BaseEntity
/** 单位组 */
private Long[] deptIds;
private String deptNames;
public void setId(Long id)
{
this.id = id;
......@@ -171,4 +173,12 @@ public class SjBfzwh extends BaseEntity
public void setLxrname(String lxrname) {
this.lxrname = lxrname;
}
public String getDeptNames() {
return deptNames;
}
public void setDeptNames(String deptNames) {
this.deptNames = deptNames;
}
}
......@@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="xgr" column="xgr" />
<result property="xgsj" column="xgsj" />
<result property="bz" column="bz" />
<result property="deptNames" column="deptNames" />
</resultMap>
<sql id="selectSjBfzwhVo">
......@@ -23,18 +24,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectSjBfzwhList" parameterType="SjBfzwh" resultMap="SjBfzwhResult">
<include refid="selectSjBfzwhVo"/>
select a.id, a.bfzmc, a.lxr, a.nd, a.lrr, s.nick_name lxrname, a.lrsj, a.xgr, a.xgsj, a.bz,
GROUP_CONCAT(CONCAT(p.dept_name,'/',c.dept_name)) deptNames
from sj_bfzwh a
left join sys_user s on a.lxr = s.user_id
left join sj_bfzbfdx bfdx on bfdx.id = a.id
LEFT JOIN sys_dept c on bfdx.dept_id = c.dept_id
LEFT JOIN sys_dept p on c.parent_id = p.dept_id
<where>
<if test="bfzmc != null and bfzmc != ''"> and bfzmc = #{bfzmc}</if>
<if test="lxr != null and lxr != ''"> and lxr = #{lxr}</if>
<if test="nd != null and nd != ''"> and nd = #{nd}</if>
<if test="lrr != null and lrr != ''"> and lrr = #{lrr}</if>
<if test="lrsj != null "> and lrsj = #{lrsj}</if>
<if test="xgr != null and xgr != ''"> and xgr = #{xgr}</if>
<if test="xgsj != null "> and xgsj = #{xgsj}</if>
<if test="bz != null and bz != ''"> and bz = #{bz}</if>
<if test="bfzmc != null and bfzmc != ''"> and a.bfzmc = #{bfzmc}</if>
<if test="lxr != null and lxr != ''"> and a.lxr = #{lxr}</if>
<if test="nd != null and nd != ''"> and a.nd = #{nd}</if>
<if test="lrr != null and lrr != ''"> and a.lrr = #{lrr}</if>
<if test="lrsj != null "> and a.lrsj = #{lrsj}</if>
<if test="xgr != null and xgr != ''"> and a.xgr = #{xgr}</if>
<if test="xgsj != null "> and a.xgsj = #{xgsj}</if>
<if test="bz != null and bz != ''"> and a.bz = #{bz}</if>
</where>
group by a.id
</select>
<select id="selectSjBfzwhById" parameterType="Long" resultMap="SjBfzwhResult">
......
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