|
|
@@ -8,18 +8,43 @@
|
|
|
<select id="selectCerListByCertBo" parameterType="com.zhongzheng.bo.SysCertificateBo" resultType="com.zhongzheng.domian.SysCertificate">
|
|
|
select distinct
|
|
|
a.*
|
|
|
+ ,p.person_name,p.id_card,p.phone
|
|
|
+ ,c.company_name
|
|
|
from sys_certificate a
|
|
|
inner JOIN sys_certificate_addition b on a.certificate_id = b.certificate_id
|
|
|
+ inner join sys_person p on p.person_id=a.person_id
|
|
|
+ inner join sys_company c on c.company_id=a.company_id
|
|
|
where a.Status=1
|
|
|
<if test="cet.userId != null and cet.userId != ''">
|
|
|
- AND user_id =#{cet.userId}
|
|
|
+ AND a.user_id =#{cet.userId}
|
|
|
</if>
|
|
|
<if test="cet.companyId != null and cet.companyId != ''">
|
|
|
- AND company_id =#{cet.companyType}
|
|
|
+ AND a.company_id =#{cet.companyType}
|
|
|
</if>
|
|
|
<if test="cet.personId != null and cet.personId != ''">
|
|
|
- AND person_id =#{cet.personId}
|
|
|
+ AND a.person_id =#{cet.personId}
|
|
|
</if>
|
|
|
+ <if test="cet.certificateType != null and cet.certificateType != ''">
|
|
|
+ AND certificateType =#{cet.certificateType}
|
|
|
+ </if>
|
|
|
+ <if test="cet.certificateTypeId != null and cet.certificateTypeId != ''">
|
|
|
+ AND certificateTypeId =#{cet.certificateTypeId}
|
|
|
+ </if>
|
|
|
+ <if test="cet.certificateTypeId2 != null and cet.certificateTypeId2 != ''">
|
|
|
+ AND certificateTypeId2 =#{cet.certificateTypeId2}
|
|
|
+ </if>
|
|
|
+ <if test="cet.beginTime != null and cet.beginTime != ''">
|
|
|
+ AND b.expiry_date >=#{cet.beginTime}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="cet.endTime != null and cet.endTime != null">
|
|
|
+ <![CDATA[ AND b.expiry_date <= #{cet.endTime} ]]>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="cet.warningState != null and cet.warningState != ''">
|
|
|
+ AND b.warning_state >=#{cet.warningState}
|
|
|
+ </if>
|
|
|
+
|
|
|
<if test="cet.personIds != null and cet.personIds.size()>0">
|
|
|
AND company_id in
|
|
|
<foreach item="id" collection="cet.personIds" open="(" separator="," close=")">
|
|
|
@@ -31,4 +56,43 @@
|
|
|
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectEnterpriseCerList" parameterType="com.zhongzheng.bo.SysCertificateBo" resultType="com.zhongzheng.domian.SysCertificate">
|
|
|
+ select distinct
|
|
|
+ a.*
|
|
|
+ ,c.company_name
|
|
|
+ from sys_certificate a
|
|
|
+ inner JOIN sys_certificate_addition b on a.certificate_id = b.certificate_id
|
|
|
+ inner join sys_company c on c.company_id=a.company_id
|
|
|
+ where a.Status=1
|
|
|
+ <if test="cet.userId != null and cet.userId != ''">
|
|
|
+ AND a.user_id =#{cet.userId}
|
|
|
+ </if>
|
|
|
+ <if test="cet.companyId != null and cet.companyId != ''">
|
|
|
+ AND a.company_id =#{cet.companyType}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="cet.certificateType != null and cet.certificateType != ''">
|
|
|
+ AND certificateType =#{cet.certificateType}
|
|
|
+ </if>
|
|
|
+ <if test="cet.certificateTypeId != null and cet.certificateTypeId != ''">
|
|
|
+ AND certificateTypeId =#{cet.certificateTypeId}
|
|
|
+ </if>
|
|
|
+ <if test="cet.certificateTypeId2 != null and cet.certificateTypeId2 != ''">
|
|
|
+ AND certificateTypeId2 =#{cet.certificateTypeId2}
|
|
|
+ </if>
|
|
|
+ <if test="cet.beginTime != null and cet.beginTime != ''">
|
|
|
+ AND b.expiry_date >=#{cet.beginTime}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="cet.endTime != null and cet.endTime != null">
|
|
|
+ <![CDATA[ AND b.expiry_date <= #{cet.endTime} ]]>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="cet.warningState != null and cet.warningState != ''">
|
|
|
+ AND b.warning_state >=#{cet.warningState}
|
|
|
+ </if>
|
|
|
+
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|