<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="vip.xiaonuo.quality.mapper.QualityFenxibaogaoMapper">

    <select id="getChengPinQuXianMonth" resultType="vip.xiaonuo.quality.param.vo.ChengPinQuXianVo">
         SELECT ROUND(IFNULL(AVG(inspec_standards), 0), 2)  inspec_standards ,
   ROUND(IFNULL(AVG(specific_otation), 0), 2)  specific_otation ,
    DATE_FORMAT(report_date, '%Y-%m') AS ymonth
        FROM `quality_fenxibaogao`
         ${ew.customSqlSegment}
    </select>
    <select id="getChengPinQuXianYear" resultType="vip.xiaonuo.quality.param.vo.ChengPinQuXianVo">
         SELECT ROUND(IFNULL(AVG(inspec_standards), 0), 2)  inspec_standards ,
   ROUND(IFNULL(AVG(specific_otation), 0), 2)  specific_otation ,
    DATE_FORMAT(report_date, '%Y') AS ymonth
        FROM `quality_fenxibaogao`
         ${ew.customSqlSegment}

    </select>
</mapper>