| | |
| | | ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING( bu.cardid,7,4),0) age, |
| | | bu1.real_name applyName, |
| | | bt1.dept_name applyUnit, |
| | | bu.registered, |
| | | bu.user_type userType |
| | | FROM |
| | | sys_accreditation_records sar |
| | |
| | | ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING( bu.cardid,7,4),0) age, |
| | | bu1.real_name applyName, |
| | | bt1.dept_name applyUnit, |
| | | bu.registered, |
| | | bu.user_type userType |
| | | FROM |
| | | sys_accreditation_records sar |
| | | left join |
| | | blade_user bu |
| | | on |
| | | sar.user_id = bu.id |
| | | LEFT JOIN |
| | | blade_dept bt |
| | | ON |
| | | bu.dept_id = bt.id |
| | | left join |
| | | blade_user bu1 |
| | | on |
| | | sar.create_user = bu1.id |
| | | LEFT JOIN |
| | | blade_dept bt1 |
| | | ON |
| | | bu1.dept_id = bt1.id |
| | | left join |
| | | sys_information si |
| | | on |
| | | bt.id = si.departmentid |
| | | left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = si.jurisdiction |
| | | WHERE |
| | | 1=1 |
| | | and bu.status = 1 |
| | | and bu.is_deleted = 0 |
| | | left join blade_user bu on sar.user_id = bu.id |
| | | LEFT JOIN blade_dept bt ON bu.dept_id = bt.id |
| | | left join blade_user bu1 on sar.create_user = bu1.id |
| | | LEFT JOIN blade_dept bt1 ON bu1.dept_id = bt1.id |
| | | left join sys_information si on bt.id = si.departmentid |
| | | left join sys_jurisdiction sj on sj.id = si.jurisdiction |
| | | WHERE 1=1 and bu.status = 1 and bu.is_deleted = 0 |
| | | <if test="accreditationRecords.deptName!=null and accreditationRecords.deptName!=''"> |
| | | and bt.dept_name like concat('%', #{accreditationRecords.deptName},'%') |
| | | </if> |
| | |
| | | (id, |
| | | tenant_id,account,password,name,real_name,avatar,email,phone,sex, |
| | | role_id,dept_id,cardid,nativePlace,nation,fingerprint,education, |
| | | politicaloutlook,healstats,height,address,registered,securitynumber, |
| | | hold,jurisdiction,examination_type,status,is_deleted,dispatch,create_time,unit_name |
| | | politicaloutlook,healstats,height,securitynumber, |
| | | hold,jurisdiction,examination_type,status,is_deleted,dispatch,create_time |
| | | ) |
| | | values |
| | | <foreach collection="list" item="user" separator=","> |
| | | (#{user.id}, |
| | | ( |
| | | #{user.id}, |
| | | #{user.tenantId},#{user.account},#{user.password},#{user.name},#{user.realName},#{user.avatar},#{user.email},#{user.phone},#{user.sex}, |
| | | #{user.roleId},#{user.deptId},#{user.cardid},#{user.nativeplace},#{user.nation},#{user.fingerprint},#{user.education}, |
| | | #{user.politicaloutlook},#{user.healstats},#{user.height},#{user.address},#{user.registered},#{user.securitynumber}, |
| | | #{user.hold},#{user.jurisdiction},#{user.examinationType},#{user.status},#{user.isDeleted},#{user.dispatch},#{user.createTime},#{user.unitName} |
| | | #{user.politicaloutlook},#{user.healstats},#{user.height},#{user.securitynumber}, |
| | | #{user.hold},#{user.jurisdiction},#{user.examinationType},#{user.status},#{user.isDeleted},#{user.dispatch},#{user.createTime} |
| | | ) |
| | | </foreach> |
| | | </insert> |