浏览代码

no message

leoone8322 3 月之前
父节点
当前提交
97054ce332

+ 5 - 0
src/main/java/com/jzlife/report/dto/kaocf/KaoCom.java

@@ -3,6 +3,8 @@ package com.jzlife.report.dto.kaocf;
 import cn.afterturn.easypoi.excel.annotation.Excel;
 import lombok.Data;
 
+import java.math.BigDecimal;
+
 /**
  * 花王-销售履约
  */
@@ -27,4 +29,7 @@ public class KaoCom {
     @Excel(name = "已完成次数")
     private Integer servicedTime;
 
+    @Excel(name = "已完成服务GMV")
+    private BigDecimal gmv;
+
 }

+ 3 - 1
src/main/resources/mybatis/mapper/kaocf/KaocfMapper.xml

@@ -32,11 +32,13 @@
                b.goods_name     as goodsName,
                ch.name          as orderChannel,
                count(1)  as serviceTime,
-               sum(if(a.status in (3,4),1,0)) as servicedTime
+               sum(if(a.status in (3,4),1,0)) as servicedTime,
+               sum(c.actual_price/bk.service_times) as gmv
         from jlife_nurse.jz_order_book_detail a
              join jlife_nurse.jz_order_goods b on a.order_id=b.order_id
              join jlife_nurse.jz_order       c on c.id=a.order_id
              join jlife_nurse.jz_dm_channel ch on c.order_channel=ch.id
+             join jlife_nurse.jz_order_book bk on a.book_id=bk.id
         where  a.book_date between #{startTime} and #{endTime}
            and a.status in (1,2,3,4,7)
            and b.goods_name like '%花王%'