|
@@ -5,29 +5,51 @@
|
|
|
<mapper namespace="com.ydtech.modules.protocol.dao.PtlAgreementMapper">
|
|
<mapper namespace="com.ydtech.modules.protocol.dao.PtlAgreementMapper">
|
|
|
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.ydtech.modules.protocol.entity.po.PtlAgreement">
|
|
<resultMap id="BaseResultMap" type="com.ydtech.modules.protocol.entity.po.PtlAgreement">
|
|
|
- <id property="id" column="id" jdbcType="BIGINT"/>
|
|
|
|
|
- <result property="agreementType" column="agreement_type" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="agreementCode" column="agreement_code" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="agreementName" column="agreement_name" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="agreementAbbreviation" column="agreement_abbreviation" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="insuranceCompany" column="insurance_company" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="startDate" column="start_date" jdbcType="DATE"/>
|
|
|
|
|
- <result property="endDate" column="end_date" jdbcType="DATE"/>
|
|
|
|
|
- <result property="moneyTime" column="money_time" jdbcType="INTEGER"/>
|
|
|
|
|
- <result property="matchType" column="match_type" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="dockingPerson" column="docking_person" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="dockingPhone" column="docking_phone" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="withTax" column="with_tax" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="moneyType" column="money_type" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="cooperationChannels" column="cooperation_channels" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="validStatus" column="valid_status" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="fileId" column="file_id" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="auditContent" column="audit_content" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="auditStatus" column="audit_status" jdbcType="TINYINT"/>
|
|
|
|
|
- <result property="creator" column="creator" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
|
|
- <result property="modifiedBy" column="modified_by" jdbcType="VARCHAR"/>
|
|
|
|
|
- <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
|
|
|
|
|
+ <id property="id" column="id" jdbcType="BIGINT"/>
|
|
|
|
|
+ <result property="agreementType" column="agreement_type" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="agreementCode" column="agreement_code" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="agreementName" column="agreement_name" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="agreementAbbreviation" column="agreement_abbreviation" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="insuranceCompany" column="insurance_company" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="startDate" column="start_date" jdbcType="DATE"/>
|
|
|
|
|
+ <result property="endDate" column="end_date" jdbcType="DATE"/>
|
|
|
|
|
+ <result property="moneyTime" column="money_time" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result property="matchType" column="match_type" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="dockingPerson" column="docking_person" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="dockingPhone" column="docking_phone" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="withTax" column="with_tax" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="moneyType" column="money_type" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="cooperationChannels" column="cooperation_channels" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="validStatus" column="valid_status" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="fileId" column="file_id" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="auditContent" column="audit_content" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="auditStatus" column="audit_status" jdbcType="TINYINT"/>
|
|
|
|
|
+ <result property="creator" column="creator" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result property="modifiedBy" column="modified_by" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap id="AgreementCompanyResultMap" type="com.ydtech.modules.protocol.entity.dto.PtlAgreementInsCompanyDto">
|
|
|
|
|
+ <id property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="name" column="name" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="parentId" column="parent_id" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="namesimple" column="namesimple" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="remark" column="remark" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="orderNum" column="order_num" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result property="lastUpdateBy" column="last_update_by" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="lastUpdateTime" column="last_update_time" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result property="delFlag" column="del_flag" jdbcType="TINYINT"/>
|
|
|
|
|
+ <result property="openQuote" column="open_quote" jdbcType="TINYINT"/>
|
|
|
|
|
+ <result property="cnName" column="cn_name" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <collection property="agreement" ofType="com.ydtech.modules.protocol.entity.dto.PtlAgreementDto">
|
|
|
|
|
+ <id property="id" column="agreement_id"/>
|
|
|
|
|
+ <result property="agreementName" column="agreement_name"/>
|
|
|
|
|
+ <result property="apiType" column="api_type"/>
|
|
|
|
|
+ </collection>
|
|
|
|
|
+
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
@@ -40,4 +62,16 @@
|
|
|
creator,create_time,modified_by,
|
|
creator,create_time,modified_by,
|
|
|
update_time
|
|
update_time
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="getAgreementCompany" resultMap="AgreementCompanyResultMap">
|
|
|
|
|
+ select eic.*, pa.id as agreement_id, pa.agreement_name, paa.api_type
|
|
|
|
|
+ from esm_ins_company as eic
|
|
|
|
|
+ right join ptl_agreement as pa on pa.insurance_company = eic.id
|
|
|
|
|
+ left join ptl_agreement_attribution as paa on paa.id = pa.id
|
|
|
|
|
+ where (#{localDate} between start_date and end_date)
|
|
|
|
|
+ and pa.id in (select distinct agreement_id
|
|
|
|
|
+ from ptl_agreement_dept
|
|
|
|
|
+ where dept_id = #{deptId})
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|