Bladeren bron

1. 查询逻辑修改

wuhp 2 jaren geleden
bovenliggende
commit
22b01fc64f

+ 1 - 0
src/main/java/com/ydtech/modules/fnc/service/impl/InsPlyIncomeServiceImpl.java

@@ -366,6 +366,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
         insPlyIncome.setJqPremium(insFeeOrderNew.getJqPremium());
         insPlyIncome.setSyPremium(insFeeOrderNew.getSyPremium());
         insPlyIncome.setNoPremium(insFeeOrderNew.getNoPremium());
+        insPlyIncome.setReceivableAmount(allAmount);
         insPlyIncome.setJqNoTaxPremium(insFeeOrderNew.getJqNoTaxPremium());
         insPlyIncome.setSyNoTaxPremium(insFeeOrderNew.getSyNoTaxPremium());
         insPlyIncome.setNoNoTaxPremium(insFeeOrderNew.getNoNoTaxPremium());

+ 9 - 9
src/main/resources/mapper/modules/fnc/InsPlyIncomeMapper.xml

@@ -191,7 +191,7 @@
             </if>
 
             <if test="provincePartnerCompaniesId !=null  and  provincePartnerCompaniesId  !=''">
-                and eic.parent_id =#{provincePartnerCompaniesId}
+                and eic.parent_id LIKE CONCAT(#{provincePartnerCompaniesId}, '%')
             </if>
 
             <if test="dockingPerson !=null  and  dockingPerson  !=''">
@@ -315,7 +315,7 @@
                 AND  a.insured_name =#{insuredName}
             </if>
             <if test="jqStartDate  !=null  and  jqStartDate  != ''  and  jqEndDate   != null  and  jqEndDate   !=''">
-                AND DATE(a.jq_start_date) BETWEEN #{syStartDate} AND #{syEndDate}
+                AND DATE(a.jq_start_date) BETWEEN #{jqStartDate} AND #{jqEndDate}
 
             </if>
             <if test="syStartDate  !=null  and  syStartDate  != ''  and  syEndDate   != null  and  syEndDate   !=''">
@@ -678,7 +678,7 @@
                     and a.is_not_car =#{isNotCar}
                 </if>
                 <if test="jqStartDate  !=null  and  jqStartDate  != ''  and  jqEndDate   != null  and  jqEndDate   !=''">
-                    AND DATE(a.jq_start_date) BETWEEN #{syStartDate} AND #{syEndDate}
+                    AND DATE(a.jq_start_date) BETWEEN #{jqStartDate} AND #{jqEndDate}
 
                 </if>
                 <if test="syStartDate  !=null  and  syStartDate  != ''  and  syEndDate   != null  and  syEndDate   !=''">
@@ -808,10 +808,10 @@
                     and a.is_not_car =#{isNotCar}
                 </if>
                 <if test="jqStartDate  !=null  and  jqStartDate  != ''  and  jqEndDate   != null  and  jqEndDate   !=''">
-                    AND a.jq_end_date BETWEEN #{jqStartDate} AND #{jqEndDate}  AND a.jq_start_date &gt; = #{jqStartDate}
+                    AND DATE(a.jq_start_date) BETWEEN #{jqStartDate} AND #{jqEndDate}
                 </if>
                 <if test="syStartDate  !=null  and  syStartDate  != ''  and  syEndDate   != null  and  syEndDate   !=''">
-                    AND a.sy_start_date BETWEEN #{syStartDate} AND #{syEndDate}  AND a.sy_start_date &gt; = #{syStartDate}
+                    AND DATE(a.sy_start_date) BETWEEN #{syStartDate} AND #{syEndDate}
                 </if>
 
                 <if test="isOther !=null  and  isOther  !=''">
@@ -1053,7 +1053,7 @@
                 AND eic.parent_id LIKE CONCAT(#{allPartnerCompaniesId}, '%')
             </if>
             <if test="provincePartnerCompaniesId !=null  and  provincePartnerCompaniesId  !=''">
-                and eic.parent_id =#{provincePartnerCompaniesId}
+                and eic.parent_id LIKE CONCAT(#{provincePartnerCompaniesId}, '%')
             </if>
             <if test="companyName !=null  and  companyName  !=''">
                 and a.company_id =#{companyName}
@@ -1187,7 +1187,7 @@
                 AND eic.parent_id LIKE CONCAT(#{allPartnerCompaniesId}, '%')
             </if>
             <if test="provincePartnerCompaniesId !=null  and  provincePartnerCompaniesId  !=''">
-                and eic.parent_id =#{provincePartnerCompaniesId}
+                and eic.parent_id LIKE CONCAT(#{provincePartnerCompaniesId}, '%')
             </if>
             <if test="licenseno != null and licenseno != ''">
                 and a.licenseno  =#{licenseno}
@@ -1496,10 +1496,10 @@
                        AND  a.insured_name =#{insuredName}
                    </if>
                    <if test="jqStartDate  !=null  and  jqStartDate  != ''  and  jqEndDate   != null  and  jqEndDate   !=''">
-                       AND a.jq_end_date BETWEEN #{jqStartDate} AND #{jqEndDate}  AND a.jq_start_date &gt; = #{jqStartDate}
+                       AND DATE(a.jq_start_date) BETWEEN #{jqStartDate} AND #{jqEndDate}
                    </if>
                    <if test="syStartDate  !=null  and  syStartDate  != ''  and  syEndDate   != null  and  syEndDate   !=''">
-                       AND a.sy_start_date BETWEEN #{syStartDate} AND #{syEndDate}  AND a.sy_start_date &gt; = #{syStartDate}
+                       AND DATE(a.sy_start_date) BETWEEN #{syStartDate} AND #{syEndDate}
                    </if>
                </where>
                GROUP BY YEAR(a.signdate), MONTH(a.signdate)