2026-06-22 16:15:17 +08:00
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
<mapper namespace="org.qinan.safetyeval.infrastructure.mapper.OrgPersonnelCertMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="org.qinan.safetyeval.infrastructure.dataobject.OrgPersonnelCertDO">
|
|
|
|
|
|
<id column="id" property="id"/>
|
|
|
|
|
|
<result column="org_id" property="orgId"/>
|
|
|
|
|
|
<result column="personnel_id" property="personnelId"/>
|
|
|
|
|
|
<result column="cert_name" property="certName"/>
|
|
|
|
|
|
<result column="cert_type_code" property="certTypeCode"/>
|
2026-07-24 17:11:12 +08:00
|
|
|
|
<result column="cert_level" property="certLevel"/>
|
2026-06-22 16:15:17 +08:00
|
|
|
|
<result column="cert_category_code" property="certCategoryCode"/>
|
|
|
|
|
|
<result column="cert_category_name" property="certCategoryName"/>
|
|
|
|
|
|
<result column="operation_category_code" property="operationCategoryCode"/>
|
|
|
|
|
|
<result column="operation_category_name" property="operationCategoryName"/>
|
|
|
|
|
|
<result column="cert_no" property="certNo"/>
|
|
|
|
|
|
<result column="issue_org" property="issueOrg"/>
|
|
|
|
|
|
<result column="valid_start_date" property="validStartDate"/>
|
|
|
|
|
|
<result column="valid_end_date" property="validEndDate"/>
|
|
|
|
|
|
<result column="review_date" property="reviewDate"/>
|
|
|
|
|
|
<result column="cert_attachment_url" property="certAttachmentUrl"/>
|
2026-07-16 11:16:58 +08:00
|
|
|
|
<result column="business_scope" property="businessScope"/>
|
2026-07-16 11:33:42 +08:00
|
|
|
|
<result column="professional_capability_code" property="professionalCapabilityCode"/>
|
2026-07-16 17:02:14 +08:00
|
|
|
|
<result column="industry_professional_standards_id" property="industryProfessionalStandardsId"/>
|
2026-06-22 16:15:17 +08:00
|
|
|
|
<result column="delete_enum" property="deleteEnum"/>
|
|
|
|
|
|
<result column="remarks" property="remarks"/>
|
|
|
|
|
|
<result column="create_name" property="createName"/>
|
|
|
|
|
|
<result column="update_name" property="updateName"/>
|
|
|
|
|
|
<result column="tenant_id" property="tenantId"/>
|
|
|
|
|
|
<result column="version" property="version"/>
|
|
|
|
|
|
<result column="create_time" property="createTime"/>
|
|
|
|
|
|
<result column="update_time" property="updateTime"/>
|
|
|
|
|
|
<result column="create_id" property="createId"/>
|
|
|
|
|
|
<result column="update_id" property="updateId"/>
|
|
|
|
|
|
<result column="env" property="env"/>
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
|
|
|
<sql id="Base_Column_List">
|
2026-07-24 17:11:12 +08:00
|
|
|
|
`id`, `org_id`, `personnel_id`, `cert_name`, `cert_type_code`, `cert_level`, `cert_category_code`, `cert_category_name`, `operation_category_code`, `operation_category_name`, `cert_no`, `issue_org`, `valid_start_date`, `valid_end_date`, `review_date`, `cert_attachment_url`, `business_scope`, `professional_capability_code`, `industry_professional_standards_id`, `delete_enum`, `remarks`, `create_name`, `update_name`, `tenant_id`, `version`, `create_time`, `update_time`, `create_id`, `update_id`, `env`
|
2026-06-22 16:15:17 +08:00
|
|
|
|
</sql>
|
|
|
|
|
|
|
2026-07-16 14:14:25 +08:00
|
|
|
|
<!-- 根据人员id列表查询证书专业能力信息 -->
|
|
|
|
|
|
<select id="selectCapabilityByPersonnelIds"
|
|
|
|
|
|
resultType="org.qinan.safetyeval.client.co.OrgPersonnelCertCapabilityComplianceCheckCO">
|
|
|
|
|
|
SELECT personnel_id,
|
2026-07-29 15:08:19 +08:00
|
|
|
|
business_scope,
|
|
|
|
|
|
ips.professional_capability_code,
|
2026-07-31 17:12:34 +08:00
|
|
|
|
industry_professional_standards_id,
|
|
|
|
|
|
orc.operation_category_code,
|
|
|
|
|
|
orc.cert_type_code,
|
|
|
|
|
|
orc.cert_level
|
2026-07-29 15:08:19 +08:00
|
|
|
|
FROM org_personnel_cert orc
|
|
|
|
|
|
join industry_professional_standards ips on orc.industry_professional_standards_id = ips.id
|
|
|
|
|
|
WHERE ips.delete_enum = 'false'
|
2026-07-16 14:14:25 +08:00
|
|
|
|
AND personnel_id IN
|
|
|
|
|
|
<foreach collection="personnelIds" item="personnelId" open="(" separator="," close=")">
|
|
|
|
|
|
#{personnelId}
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
2026-08-10 11:41:18 +08:00
|
|
|
|
<!-- 根据人员id列表查询人员证书信息 -->
|
|
|
|
|
|
<select id="selectCertByPersonnelIds"
|
|
|
|
|
|
resultType="org.qinan.safetyeval.client.co.PersonnelCertFilingCheckCO">
|
|
|
|
|
|
SELECT opc.id,
|
|
|
|
|
|
opc.personnel_id,
|
|
|
|
|
|
opc.professional_capability_code,
|
|
|
|
|
|
opc.cert_type_code,
|
|
|
|
|
|
opc.cert_level
|
|
|
|
|
|
FROM org_personnel_cert opc
|
|
|
|
|
|
WHERE opc.delete_enum = 'false' and opc.personnel_id IN
|
|
|
|
|
|
<foreach collection="personnelIds" item="personnelId" open="(" separator="," close=")">
|
|
|
|
|
|
#{personnelId}
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
2026-07-16 16:44:50 +08:00
|
|
|
|
<!-- 根据主键ID查询人员证书详情(关联industry_professional_standards获取专业能力名称) -->
|
|
|
|
|
|
<select id="selectDetailById"
|
|
|
|
|
|
resultType="org.qinan.safetyeval.client.co.OrgPersonnelCertDetailCO">
|
|
|
|
|
|
SELECT opc.id,
|
|
|
|
|
|
opc.personnel_id,
|
|
|
|
|
|
opc.cert_name,
|
|
|
|
|
|
opc.cert_type_code,
|
2026-07-24 17:11:12 +08:00
|
|
|
|
opc.cert_level,
|
2026-07-16 16:44:50 +08:00
|
|
|
|
opc.cert_category_code,
|
|
|
|
|
|
opc.cert_category_name,
|
|
|
|
|
|
opc.operation_category_code,
|
|
|
|
|
|
opc.operation_category_name,
|
|
|
|
|
|
opc.cert_no,
|
|
|
|
|
|
opc.issue_org,
|
|
|
|
|
|
opc.valid_start_date,
|
|
|
|
|
|
opc.valid_end_date,
|
|
|
|
|
|
opc.review_date,
|
|
|
|
|
|
opc.cert_attachment_url,
|
|
|
|
|
|
opc.business_scope,
|
|
|
|
|
|
opc.professional_capability_code,
|
2026-07-16 17:02:14 +08:00
|
|
|
|
opc.industry_professional_standards_id,
|
2026-07-16 16:44:50 +08:00
|
|
|
|
opc.tenant_id,
|
|
|
|
|
|
ips.professional_capability_name
|
|
|
|
|
|
FROM org_personnel_cert opc
|
|
|
|
|
|
LEFT JOIN industry_professional_standards ips
|
2026-07-16 17:02:14 +08:00
|
|
|
|
ON ips.id = opc.industry_professional_standards_id
|
2026-07-16 16:44:50 +08:00
|
|
|
|
AND ips.delete_enum = 'false'
|
|
|
|
|
|
WHERE opc.delete_enum = 'false'
|
|
|
|
|
|
AND opc.id = #{id}
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
2026-06-22 16:15:17 +08:00
|
|
|
|
</mapper>
|