فهرست منبع

协议 python对接

wks 3 سال پیش
والد
کامیت
620aba1a18

+ 1 - 0
src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml

@@ -8,6 +8,7 @@
         <id property="id" column="id" jdbcType="VARCHAR"/>
         <result property="orderno" column="orderno" jdbcType="VARCHAR"/>
         <result property="companyId" column="company_id" jdbcType="VARCHAR"/>
+        <result property="agreementId" column="agreement_id" jdbcType="VARCHAR"/>
         <result property="inscompany" column="inscompany" jdbcType="VARCHAR"/>
         <result property="reqtxt" column="reqtxt" javaType="com.alibaba.fastjson.JSONObject" typeHandler = "com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" jdbcType="VARCHAR"/>
         <result property="reptxt" column="reptxt" javaType="com.alibaba.fastjson.JSONObject" typeHandler = "com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" jdbcType="VARCHAR"/>

+ 10 - 9
src/main/resources/mapper/modules/protocol/PtlAgreementAttributionMapper.xml

@@ -5,19 +5,20 @@
 <mapper namespace="com.ydtech.modules.protocol.dao.PtlAgreementAttributionMapper">
 
     <resultMap id="BaseResultMap" type="com.ydtech.modules.protocol.entity.po.PtlAgreementAttribution">
-            <id property="id" column="id" jdbcType="BIGINT"/>
-            <result property="insCompanyId" column="ins_company_id" jdbcType="VARCHAR"/>
-            <result property="insCompanyName" column="ins_company_name" jdbcType="VARCHAR"/>
-            <result property="apiType" column="api_type" jdbcType="TINYINT"/>
-            <result property="fields" column="fields" javaType="com.alibaba.fastjson.JSONArray"
-                    typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" jdbcType="VARCHAR"/>
-            <result property="username" column="username" jdbcType="VARCHAR"/>
-            <result property="password" column="password" jdbcType="VARCHAR"/>
+        <id property="id" column="id" jdbcType="BIGINT"/>
+        <result property="insCompanyId" column="ins_company_id" jdbcType="VARCHAR"/>
+        <result property="insCompanyName" column="ins_company_name" jdbcType="VARCHAR"/>
+        <result property="templateId" column="template_id" jdbcType="BIGINT"/>
+        <result property="apiType" column="api_type" jdbcType="TINYINT"/>
+        <result property="fields" column="fields" javaType="com.alibaba.fastjson.JSONArray"
+                typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" jdbcType="VARCHAR"/>
+        <result property="username" column="username" jdbcType="VARCHAR"/>
+        <result property="password" column="password" jdbcType="VARCHAR"/>
     </resultMap>
 
     <sql id="Base_Column_List">
         id,agreement_id,ins_company_id,
-        ins_company_name,api_type,fields,
+        ins_company_name,template_id, api_type,fields,
         username,password
     </sql>
 </mapper>

+ 57 - 23
src/main/resources/mapper/modules/protocol/PtlAgreementMapper.xml

@@ -5,29 +5,51 @@
 <mapper namespace="com.ydtech.modules.protocol.dao.PtlAgreementMapper">
 
     <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>
 
     <sql id="Base_Column_List">
@@ -40,4 +62,16 @@
         creator,create_time,modified_by,
         update_time
     </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>

+ 14 - 5
src/main/resources/mapper/modules/protocol/PtlCrawlerApiMapper.xml

@@ -5,15 +5,24 @@
 <mapper namespace="com.ydtech.modules.protocol.dao.PtlCrawlerApiMapper">
 
     <resultMap id="BaseResultMap" type="com.ydtech.modules.protocol.entity.po.PtlCrawlerApi">
-            <id property="id" column="id" jdbcType="BIGINT"/>
-            <result property="templateId" column="template_id" jdbcType="BIGINT"/>
-            <result property="apiType" column="api_type" jdbcType="TINYINT"/>
-            <result property="apiName" column="api_name" jdbcType="VARCHAR"/>
-            <result property="url" column="url" jdbcType="VARCHAR"/>
+        <id property="id" column="id" jdbcType="BIGINT"/>
+        <result property="templateId" column="template_id" jdbcType="BIGINT"/>
+        <result property="apiType" column="api_type" jdbcType="TINYINT"/>
+        <result property="apiName" column="api_name" jdbcType="VARCHAR"/>
+        <result property="url" column="url" jdbcType="VARCHAR"/>
     </resultMap>
 
     <sql id="Base_Column_List">
         id,template_id,api_type,
         api_name,url
     </sql>
+
+    <select id="getApiUrl" resultType="java.lang.String">
+        select url
+        from ptl_crawler_api
+        where template_id = (select template_id from ptl_agreement_attribution where id = #{agreementId})
+          and api_type = #{crawlerApiType}
+        limit 1
+    </select>
+
 </mapper>