wks 1 년 전
부모
커밋
17bc41176d
1개의 변경된 파일7개의 추가작업 그리고 8개의 파일을 삭제
  1. 7 8
      src/main/resources/mapper/modules/protocol/TaxSourceMapper.xml

+ 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>