Просмотр исходного кода

1.利润分析应收金额导出明细将数据不分私有和平台合成一条数据
2.添加对接人和协议类型字段

wuhp 1 год назад
Родитель
Сommit
2ae95b123d

+ 49 - 10
src/main/java/com/ydtech/modules/admin/model/dto/ReceivableExcel.java

@@ -45,26 +45,65 @@ public class ReceivableExcel {
     @ExcelProperty(value = "非车险含保费",index = 12)
     private String noPremium;
 
-    @ExcelProperty(value = "手续费比例",index = 13)
-    private String commissionFeerate;
 
-    @ExcelProperty(value = "跟单费用比例",index = 14)
-    private String otherFeerate;
+    @ExcelProperty(value = "交强手续费比例",index = 13)
+    private String jqSuperviseCostsProportion;
 
-    @ExcelProperty(value = "手续费金额",index = 15)
-    private String commissionFeevalue;
+    @ExcelProperty(value = "商业手续费比例",index = 14)
+    private String sySuperviseCostsProportion;
 
-    @ExcelProperty(value = "跟单费用金额",index = 16)
-    private String otherFeevalue;
+    @ExcelProperty(value = "非车手续费比例",index = 15)
+    private String noSuperviseCostsProportion;
 
 
-    @ExcelProperty(value = "维护人",index = 17)
-    private String leaderName;
+    @ExcelProperty(value = "交强手续费",index = 16)
+    private String jqSuperviseCostsPremiums;
+
+    @ExcelProperty(value = "商业手续费",index = 17)
+    private String sySuperviseCostsPremiums;
+
+    @ExcelProperty(value = "非车手续费",index = 18)
+    private String noSuperviseCostsPremiums;
+
+
+    @ExcelProperty(value = "交强跟单比例",index = 19)
+    private String jqOtherCostsProportion;
+
+    @ExcelProperty(value = "商业跟单比例",index = 20)
+    private String syOtherCostsProportion;
+
+    @ExcelProperty(value = "非车跟单比例",index = 21)
+    private String noOtherCostsProportion;
 
 
+    @ExcelProperty(value = "交强跟单金额",index = 22)
+    private String jqOtherCostsPremium;
 
+    @ExcelProperty(value = "商业跟单金额",index = 23)
+    private String syOtherCostsPremium;
 
+    @ExcelProperty(value = "非车跟单金额",index = 24)
+    private String noOtherCostsPremium;
 
+    @ExcelProperty(value = "手续费比例",index = 25)
+    private String commissionFeerate;
+
+    @ExcelProperty(value = "跟单费用比例",index = 26)
+    private String otherFeerate;
+
+    @ExcelProperty(value = "手续费金额",index = 27)
+    private String commissionFeevalue;
+
+    @ExcelProperty(value = "跟单费用金额",index = 28)
+    private String otherFeevalue;
+
+
+    @ExcelProperty(value = "维护人",index = 29)
+    private String leaderName;
 
+    @ExcelProperty(value = "协议类型",index = 30)
+    private String agreementType;
 
+    @ExcelProperty(value = "对接人",index = 31)
+    private String dockingPerson;
 }

+ 35 - 4
src/main/resources/mapper/modules/console/ProfitAnalysisMapper.xml

@@ -321,15 +321,46 @@
 
 
     <select id="receivableExcel" resultType="com.ydtech.modules.admin.model.dto.ReceivableExcel">
-        SELECT
-        *
-        FROM
-        ins_ply_income a
+        select
+        a.orderno ,
+        max(a.policyno) as "policyno",
+        max(a.signdate) as "signdate",
+        max(a.agreement_id) as "agreementId",
+        max(a.dept_id) as "deptId",
+        max(a.licenseno) as "licenseno",
+        max(a.no_policyno) as "noNolicyno",
+        sum(a.commission_feerate) as "commissionFeerate",
+        sum(a.other_feerate) as "otherFeerate",
+        sum(a.commission_feevalue) as "commissionFeevalue",
+        sum(a.other_feevalue) as "otherFeevalue",
+        sum(a.jq_supervise_costs_premiums) as "jqSuperviseCostsPremiums",
+        sum(a.jq_supervise_costs_proportion) as "jqSuperviseCostsProportion",
+        sum(a.sy_supervise_costs_premiums) as "sySuperviseCostsPremiums",
+        sum(a.sy_supervise_costs_proportion) as "sySuperviseCostsProportion",
+        sum(a.no_supervise_costs_premiums) as "noSuperviseCostsPremiums",
+        sum(a.no_supervise_costs_proportion) as "noSuperviseCostsProportion",
+        sum(a.jq_premium) as "jqPremium",
+        sum(a.sy_premium) as "syPremium",
+        sum(a.no_premium) as "noPremium",
+        sum(a.jq_other_costs_premium) as "jqOtherCostsPremium",
+        sum(a.sy_other_costs_premium) as "syOtherCostsPremium",
+        sum(a.no_other_costs_premium) as "noOtherCostsPremium",
+        sum(a.jq_other_costs_proportion) as "jqOtherCostsProportion",
+        sum(a.sy_other_costs_proportion) as "syOtherCostsProportion",
+        sum(a.no_other_costs_proportion) as "noOtherCostsProportion",
+        max(a.company_name) as "companyName",
+        max(a.partner_companies_name) as "partnerCompaniesName",
+        max(a.leader_name) as "leaderName",
+        CASE WHEN max(agree.agreement_type)='1' THEN "平台" ELSE "私有" END   as "agreementType",
+        max(agree.docking_person ) as "dockingPerson"
+        from ins_ply_income a
+        left join ptl_agreement agree  on  agree.id =a.agreement_id
         <where>
             <if test="vo.year !=null  and  vo.year !=''">
                 and DATE_FORMAT( a.signdate, '%Y') =#{vo.year}
             </if>
         </where>
+       GROUP BY  a.orderno
     </select>