Explorar o código

Merge remote-tracking branch 'origin/test' into test

dongxin hai 1 ano
pai
achega
9391b22254

+ 7 - 8
src/main/resources/mapper/modules/protocol/TaxSourceMapper.xml

@@ -36,19 +36,18 @@
             insurance_company_id = #{companyId}
     </select>
     <select id="getInsureCompany" resultType="com.ydtech.modules.esm.model.EsmInsCompany">
-
         SELECT
-            eic.*
+        eic.*
         FROM
         esm_ins_company eic
         LEFT JOIN ptl_agreement pa ON eic.id = pa.insurance_company_id
-        <where>
-            <if test="params.id != null and params.id != ''">
-                eic.id = #{params.id}
-            </if>
-        </where>
+        where parent_id = '0'
+        and pa.is_external = '0'
+        <if test="params.id != null and params.id != ''">
+           and eic.id = #{params.id}
+        </if>
         GROUP BY
-            eic.id
+        eic.id
     </select>
 
 </mapper>