| | |
| | | <result property="personId" column="person_id" /> |
| | | <result property="projectId" column="project_id" /> |
| | | <result property="signPath" column="sign_path" /> |
| | | <result property="insurancePicId" column="insurance_pic_id" /> |
| | | <result property="insurancePath" column="insurance_path" /> |
| | | <result property="delFlag" column="del_flag" /> |
| | | <result property="version" column="version" /> |
| | | <result property="createBy" column="create_by" /> |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | <association property="faceRecord" javaType="com.gkhy.assess.system.domain.AssFaceRecord" resultMap="faceRecordesult" /> |
| | | <association property="person" javaType="com.gkhy.assess.system.domain.SysUser" resultMap="userResult" /> |
| | | <association property="planPerson" javaType="com.gkhy.assess.system.domain.AssPlanPerson" resultMap="personResult" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="faceRecordesult" type="com.gkhy.assess.system.domain.AssFaceRecord"> |
| | | <id property="id" column="person_id" /> |
| | | <result property="facePath" column="face_path" /> |
| | | <result property="updateTime" column="face_time" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="personResult" type="com.gkhy.assess.system.domain.AssPlanPerson"> |
| | | <id property="id" column="person_id" /> |
| | | <result property="jobType" column="job_type" /> |
| | | <result property="playRole" column="play_role" /> |
| | | <result property="projectId" column="project_id" /> |
| | | <association property="person" javaType="com.gkhy.assess.system.domain.AssFaceRecord" resultMap="userResult" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="userResult" type="com.gkhy.assess.system.domain.SysUser"> |
| | |
| | | <result property="phone" column="person_phone" /> |
| | | <result property="post" column="person_post" /> |
| | | <result property="level" column="person_level" /> |
| | | <collection property="majorNames" ofType="java.lang.String" select="getMajorById" column="{major=person_major}"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectFaceRecognitionVo"> |
| | | select f.id,f.person_id,f.project_id,f.sign_path,f.insurance_pic_id, |
| | | select f.id,f.person_id,f.project_id,f.sign_path,f.insurance_path, |
| | | f.version,f.del_flag,f.create_by,f.create_time,f.update_by,f.update_time,f.remark, |
| | | p.job_type,p.play_role, |
| | | u.name as person_name,u.major as person_major,u.phone as person_phone,u.post as person_post,u.level as person_level, |
| | | a.face_path,a.update_time as face_time |
| | | from ass_face_recognition f |
| | | left join ass_plan_person p on p.person_id=f.person_id and p.project_id=f.project_id |
| | | left join sys_user u on u.id=f.person_id |
| | | left join ass_face_record a on a.person_id=f.person_id |
| | | left join ass_face_record a on a.person_id=f.person_id and a.project_id=f.project_id |
| | | |
| | | </sql> |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="getFaceRecognitionByProjectId" resultMap="faceRecognitionResult"> |
| | | <include refid="selectFaceRecognitionVo"/> |
| | | where f.project_id=#{projectId} and f.del_flag=0 and a.del_flag=0 |
| | | select f.id,f.person_id,p.project_id,f.sign_path,f.insurance_path, |
| | | f.version,f.del_flag,f.create_by,f.create_time,f.update_by,f.update_time,f.remark, |
| | | p.job_type,p.play_role, |
| | | u.name as person_name,u.major as person_major,u.phone as person_phone,u.post as person_post,u.level as person_level, |
| | | a.face_path,a.update_time as face_time |
| | | from ass_plan_person p |
| | | left join ass_face_recognition f on f.person_id=p.person_id and f.project_id=p.project_id and f.del_flag=0 |
| | | left join sys_user u on u.id=p.person_id |
| | | left join ass_face_record a on a.person_id=p.person_id and a.project_id=p.project_id and a.del_flag=0 |
| | | where p.project_id=#{projectId} and p.del_flag=0 |
| | | </select> |
| | | |
| | | <select id="getFaceRecognitionById" resultMap="faceRecognitionResult"> |
| | |
| | | select count(1) from ass_face_recognition where project_id=#{projectId} and del_flag=0 |
| | | </select> |
| | | |
| | | <select id="getMajorById" resultType="java.lang.String"> |
| | | select label from sys_dict_data where id in |
| | | <foreach item="item" index="index" collection="major.split(',')" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | |
| | | </mapper> |