wuhp 2 лет назад
Родитель
Сommit
c2a2c7b8a0
1 измененных файлов с 10 добавлено и 17 удалено
  1. 10 17
      src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml

+ 10 - 17
src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml

@@ -855,7 +855,7 @@
         count(agree.partner_companies_id) as "orderSuccessNumber",
         agree.insurance_company AS companyName,
         agree.partner_companies_id AS parterCompanyId,
-        iac.company_id as "companId",
+        iac.company_id as "companyId",
         count( iac.orderstatus ) AS qutationCount,
         count( iac.id ) AS orderSuccessNumberRate,
         COUNT( CASE WHEN iac.orderstatus = 2 THEN 1 END ) +  COUNT( CASE WHEN iac.orderstatus = 3 THEN 1 END )  AS underwritingCount,
@@ -897,24 +897,17 @@
         count(iace.id) as "areaCompanyErrNumber"
         FROM
         ins_area_company_error iace
-        LEFT JOIN ins_orders io ON iace.orderno = io.orderno
-        LEFT JOIN sys_dept sd ON sd.id = io.deptid
         LEFT JOIN ptl_agreement agree ON iace.agreement_id = agree.id
+        <where>
+            1=1
+            <if test="vo.companyId  != null  and  vo.companyId!='' ">
+                AND agree.insurance_company_id = #{vo.companyId}
+            </if>
+            <if test="vo.parterCompanyId  != null  and  vo.parterCompanyId!='' ">
+                AND agree.partner_companies_id = #{vo.parterCompanyId}
+            </if>
+        </where>
 
-        WHERE
-        agree.id IS NOT NULL
-        <if test="vo.companyId  != null  and  vo.companyId!='' ">
-            AND agree.insurance_company_id = #{vo.companyId}
-        </if>
-        <if test="vo.parterCompanyId  != null  and  vo.parterCompanyId!='' ">
-            AND agree.partner_companies_id = #{vo.parterCompanyId}
-        </if>
-        <if test="vo.beginDate  != null  and  vo.beginDate!=''  and vo.endDate  != null  and  vo.endDate!=''">
-            AND iace.create_time BETWEEN #{vo.beginDate} AND #{vo.endDate}
-        </if>
-        <if test="vo.managementSource  != null  and  vo.managementSource!=''">
-            AND sd.management_source =#{vo.managementSource}
-        </if>
     </select>
 
     <select id="queryCompanyQutationCountDataPageTotal"