|
@@ -29,13 +29,20 @@
|
|
<result column="phone" property="phone" />
|
|
<result column="phone" property="phone" />
|
|
<result column="dept_id" property="deptId" />
|
|
<result column="dept_id" property="deptId" />
|
|
<result column="role_name" property="roleName" />
|
|
<result column="role_name" property="roleName" />
|
|
|
|
+ <result column="total" property="totalScore"/>
|
|
<association property="score" resultMap="BaseResultMapScore">
|
|
<association property="score" resultMap="BaseResultMapScore">
|
|
</association>
|
|
</association>
|
|
</resultMap>
|
|
</resultMap>
|
|
<resultMap id="BaseResultMapDeptVO" type="com.hssx.pcbms.entity.vo.DepartmentVO">
|
|
<resultMap id="BaseResultMapDeptVO" type="com.hssx.pcbms.entity.vo.DepartmentVO">
|
|
<result column="department_guid" property="departmentGuid" />
|
|
<result column="department_guid" property="departmentGuid" />
|
|
<result column="department_name" property="departmentName" />
|
|
<result column="department_name" property="departmentName" />
|
|
- <collection property="userVOS">
|
|
|
|
|
|
+ <collection property="userVOS" ofType="com.hssx.pcbms.entity.vo.UserVO">
|
|
|
|
+ <result column="id" property="id" />
|
|
|
|
+ <result column="name" property="name" />
|
|
|
|
+ <result column="phone" property="phone" />
|
|
|
|
+ <result column="total" property="totalScore"/>
|
|
|
|
+ <result column="dept_id" property="deptId" />
|
|
|
|
+ <result column="role_name" property="roleName" />
|
|
</collection>
|
|
</collection>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
@@ -55,9 +62,11 @@
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
id, head_url, name, phone, dept_id, is_pass, indate, password, role_name, email, sex, birthday, office_phone, job_title, login_name, login_password, xing_zhi, key_code
|
|
id, head_url, name, phone, dept_id, is_pass, indate, password, role_name, email, sex, birthday, office_phone, job_title, login_name, login_password, xing_zhi, key_code
|
|
</sql>
|
|
</sql>
|
|
- <select id="selectListByCondition" resultMap="BaseResultMapDeptVO">
|
|
|
|
|
|
+ <select id="selectDeptUserListByCondition" resultMap="BaseResultMapDeptVO">
|
|
SELECT
|
|
SELECT
|
|
- u.id, u.name, u.phone, u.dept_id,sr.rolename role_name,(SELECT total FROM score WHERE uid = u.id AND scoring_year_month = DATE_FORMAT(NOW(),'%Y-%m')) total
|
|
|
|
|
|
+ dt.department_guid,dt.department_name,u.id, u.name, u.phone,
|
|
|
|
+ u.dept_id,sr.rolename role_name,
|
|
|
|
+ (SELECT total FROM score WHERE uid = u.id AND scoring_year_month = DATE_FORMAT(NOW(),'%Y-%m')) totalScore
|
|
FROM
|
|
FROM
|
|
department dt
|
|
department dt
|
|
left join
|
|
left join
|