jyy
2021-06-04 afe2515103b5013c80a65cc8f0c08104d1d78f9e
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
@@ -196,7 +196,41 @@
      </where>
   </select>
<!--
 统计员工业绩
select
      u.name,
      g.su_name guwen,
      cast(SUM(b.ZK_TOTAL) AS decimal(15,2)) as zk_total,
      cast(SUM(a.his_consume) AS decimal(15,2)),
      cast(SUM(a.free_consume) AS decimal(15,2)),
      cast(SUM(a.proj_percentage) AS decimal(15,2)),
      cast(SUM(a.number_of_people) AS decimal(15,2)),
      cast(SUM(a.proj_num) AS decimal(15,2)),
      cast(SUM(a.proj_time) AS decimal(15,2)),
      h.shop_short_name shop_name,
      a.order_type,
      a.achieveType
      from
      achieve_new a
      left join sys_order b on a.order_id=b.id
      left join sys_vip_info c on a.vip_id=c.id
      left join sys_vip_level d on c.LEVEL_ID=d.id
      left join shopping_goods e on a.shopping_goods_id=e.id
      LEFT JOIN sys_users f on a.beault_id=f.su_id
      LEFT JOIN sys_users g on a.sale_id = g.su_id
      LEFT JOIN sys_shop_info h ON a.SHOP_ID = h.ID
      LEFT JOIN shopping_goods_category i ON e.cate_id = i.id
      left join sys_proj_services l on a.service_order_id=l.id
      left join sys_order_item j on a.order_item_id=j.ID
      left join achieve_rule u on u.id=e.achieve_rule_id
 where h.shop_short_name='龙华店'
   GROUP BY g.su_name , a.order_type, h.id,a.achieveType
   ORDER BY g.su_name
-->
   <select id="findSumDailyInfoNew" resultMap="AchieveNewMap">