shudonghui 1 an în urmă
părinte
comite
574e326047

+ 5 - 2
sop-business/src/main/resources/mapper/CrmAnalyseMapper.xml

@@ -41,7 +41,7 @@
         left join t_b_service_region r on r.service_id=s.id
         left join t_b_service_region_detail rd on rd.service_region_id=r.id
         <where>
-            and s.`status`='PUBLISH' and c.service_id is not null and r.id is not null
+           and  s.`status` IN ( 'PUBLISH', 'FINISH' ) and c.service_id is not null and r.id is not null
             <if test="type != null and type != ''">
                 and cu.type = #{type}
             </if>
@@ -177,6 +177,7 @@
         LEFT JOIN t_b_service s ON c.service_id = s.id
         LEFT JOIN sys_custom cu ON cu.id = c.custom_id
         <where>
+            and s.`status` IN ( 'PUBLISH', 'FINISH' ) and c.service_id is not null
             <if test="type != null and type != ''">
                 and cu.type = #{type}
             </if>
@@ -268,13 +269,14 @@
         <where>
 
             <if test="serviceId != null and serviceId != ''">
+                tbs.`status` IN ( 'PUBLISH', 'FINISH' ) and a.crm_no is not null
                 and a.service_id = #{serviceId}
             </if>
             <!--            <if test="regionId != null and regionId != ''">-->
             <!--                and r.id = #{regionId}-->
             <!--            </if>-->
             <if test="province != null and province != ''">
-                and tbs.`status`='PUBLISH' and a.service_id is not null and r.id is not null
+                and tbs.`status` IN ( 'PUBLISH', 'FINISH' ) and a.service_id is not null and r.id is not null
                 and rd.province = #{province}
             </if>
             <if test="type != null and type != ''">
@@ -301,6 +303,7 @@
                 </if>
             </if>
             <if test="crmYear != null and crmYear != ''">
+                and tbs.`status` IN ( 'PUBLISH', 'FINISH' ) and a.service_id is not null
                 and YEAR (FROM_UNIXTIME( a.begin_time / 1000))= #{crmYear}
             </if>
             <if test="month != null and month != ''">