IncomeStatisticDaySMapper.xml 19.2 KB
<?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="com.zteits.order.mapper.smapper.IncomeStatisticDaySMapper">
  <resultMap id="BaseResultMap" type="com.zteits.order.domain.IncomeStatisticDay">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="static_date" jdbcType="DATE" property="staticDate" />
    <result column="static_date_str" jdbcType="VARCHAR" property="staticDateStr" />
    <result column="org_id" jdbcType="INTEGER" property="orgId" />
    <result column="area_id" jdbcType="VARCHAR" property="areaId" />
    <result column="area_name" jdbcType="VARCHAR" property="areaName" />
    <result column="pl_no" jdbcType="VARCHAR" property="plNo" />
    <result column="pl_name" jdbcType="VARCHAR" property="plName" />
    <result column="pl_type" jdbcType="INTEGER" property="plType" />
    <result column="park_order_num" jdbcType="INTEGER" property="parkOrderNum" />
    <result column="park_short_time_free_num" jdbcType="INTEGER" property="parkShortTimeFreeNum" />
    <result column="park_temp_num" jdbcType="INTEGER" property="parkTempNum" />
    <result column="park_authorization_free_num" jdbcType="INTEGER" property="parkAuthorizationFreeNum" />
    <result column="park_hand_open_num" jdbcType="INTEGER" property="parkHandOpenNum" />
    <result column="park_white_car_num" jdbcType="INTEGER" property="parkWhiteCarNum" />
    <result column="park_total_fee" jdbcType="BIGINT" property="parkTotalFee" />
    <result column="park_act_fee" jdbcType="BIGINT" property="parkActFee" />
    <result column="park_dicount_fee" jdbcType="BIGINT" property="parkDicountFee" />
    <result column="park_arrearage_fee" jdbcType="BIGINT" property="parkArrearageFee" />
    <result column="park_refund_fee" jdbcType="BIGINT" property="parkRefundFee" />
    <result column="park_ali_fee" jdbcType="BIGINT" property="parkAliFee" />
    <result column="park_ali_charge_num" jdbcType="INTEGER" property="parkAliChargeNum" />
    <result column="park_wx_fee" jdbcType="BIGINT" property="parkWxFee" />
    <result column="park_wx_charge_num" jdbcType="INTEGER" property="parkWxChargeNum" />
    <result column="park_cash_fee" jdbcType="BIGINT" property="parkCashFee" />
    <result column="park_cash_charge_num" jdbcType="INTEGER" property="parkCashChargeNum" />
    <result column="park_balance_fee" jdbcType="BIGINT" property="parkBalanceFee" />
    <result column="park_balance_charge_num" jdbcType="INTEGER" property="parkBalanceChargeNum" />
    <result column="card_order_num" jdbcType="INTEGER" property="cardOrderNum" />
    <result column="card_total_fee" jdbcType="BIGINT" property="cardTotalFee" />
    <result column="card_act_fee" jdbcType="BIGINT" property="cardActFee" />
    <result column="card_dicount_fee" jdbcType="BIGINT" property="cardDicountFee" />
    <result column="card_app_num" jdbcType="INTEGER" property="cardAppNum" />
    <result column="card_wx_num" jdbcType="INTEGER" property="cardWxNum" />
    <result column="card_platform_num" jdbcType="INTEGER" property="cardPlatformNum" />
    <result column="card_site_num" jdbcType="INTEGER" property="cardSiteNum" />
    <result column="card_ali_fee" jdbcType="BIGINT" property="cardAliFee" />
    <result column="card_ali_charge_num" jdbcType="INTEGER" property="cardAliChargeNum" />
    <result column="card_wx_fee" jdbcType="BIGINT" property="cardWxFee" />
    <result column="card_wx_charge_num" jdbcType="INTEGER" property="cardWxChargeNum" />
    <result column="card_cash_fee" jdbcType="BIGINT" property="cardCashFee" />
    <result column="card_cash_charge_num" jdbcType="INTEGER" property="cardCashChargeNum" />
    <result column="card_balance_fee" jdbcType="BIGINT" property="cardBalanceFee" />
    <result column="card_balance_charge_num" jdbcType="INTEGER" property="cardBalanceChargeNum" />
    <result column="card_year_card_fee" jdbcType="BIGINT" property="cardYearCardFee" />
    <result column="card_month_card_fee" jdbcType="BIGINT" property="cardMonthCardFee" />
    <result column="card_season_card_fee" jdbcType="BIGINT" property="cardSeasonCardFee" />
    <result column="card_half_year_card_fee" jdbcType="BIGINT" property="cardHalfYearCardFee" />
    <result column="card_day_card_fee" jdbcType="BIGINT" property="cardDayCardFee" />
    <result column="back_order_num" jdbcType="INTEGER" property="backOrderNum" />
    <result column="back_total_fee" jdbcType="BIGINT" property="backTotalFee" />
    <result column="back_act_fee" jdbcType="BIGINT" property="backActFee" />
    <result column="back_dicount_fee" jdbcType="BIGINT" property="backDicountFee" />
    <result column="back_app_num" jdbcType="INTEGER" property="backAppNum" />
    <result column="back_wx_num" jdbcType="INTEGER" property="backWxNum" />
    <result column="back_platform_num" jdbcType="INTEGER" property="backPlatformNum" />
    <result column="back_site_num" jdbcType="INTEGER" property="backSiteNum" />
    <result column="back_ali_fee" jdbcType="BIGINT" property="backAliFee" />
    <result column="back_ali_charge_num" jdbcType="INTEGER" property="backAliChargeNum" />
    <result column="back_wx_fee" jdbcType="BIGINT" property="backWxFee" />
    <result column="back_wx_charge_num" jdbcType="INTEGER" property="backWxChargeNum" />
    <result column="back_cash_fee" jdbcType="BIGINT" property="backCashFee" />
    <result column="back_cash_charge_num" jdbcType="INTEGER" property="backCashChargeNum" />
    <result column="back_balance_fee" jdbcType="BIGINT" property="backBalanceFee" />
    <result column="back_balance_charge_num" jdbcType="INTEGER" property="backBalanceChargeNum" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
    <result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modfiy_emp_id" jdbcType="VARCHAR" property="modfiyEmpId" />
    <result column="modfiy_emp_name" jdbcType="VARCHAR" property="modfiyEmpName" />
    <result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
  </resultMap>

  <sql id="Base_Column_List" >
     id, static_date, static_date_str, org_id, area_id, area_name, pl_no, pl_name, pl_type,
    park_order_num, park_short_time_free_num, park_temp_num, park_authorization_free_num,
    park_hand_open_num, park_white_car_num, park_total_fee, park_act_fee, park_dicount_fee,
    park_arrearage_fee, park_refund_fee, park_ali_fee, park_ali_charge_num, park_wx_fee,
    park_wx_charge_num, park_cash_fee, park_cash_charge_num, park_balance_fee, park_balance_charge_num,
    card_order_num, card_total_fee, card_act_fee, card_dicount_fee, card_app_num, card_wx_num,
    card_platform_num, card_site_num, card_ali_fee, card_ali_charge_num, card_wx_fee,
    card_wx_charge_num, card_cash_fee, card_cash_charge_num, card_balance_fee, card_balance_charge_num,
    card_year_card_fee, card_month_card_fee, card_season_card_fee, card_half_year_card_fee,
    card_day_card_fee, back_order_num, back_total_fee, back_act_fee, back_dicount_fee,
    back_app_num, back_wx_num, back_platform_num, back_site_num, back_ali_fee, back_ali_charge_num,
    back_wx_fee, back_wx_charge_num, back_cash_fee, back_cash_charge_num, back_balance_fee,
    back_balance_charge_num, data_state, create_emp_id, create_emp_name, create_date,
    modfiy_emp_id, modfiy_emp_name, modfiy_date, remark
  </sql>

  <select id="statisticIncomeFromDayByPlNo"  resultType="com.zteits.order.domain.IncomeStatisticDay">
    SELECT
    pl_no plNo,
    IFNULL(SUM(park_order_num), 0)  parkOrderNum,
    IFNULL(SUM(park_short_time_free_num),0) parkShortTimeFreeNum,
    IFNULL(SUM(park_temp_num ),0) parkTempNum,
    IFNULL(SUM(park_authorization_free_num),0) parkAuthorizationFreeNum,
    IFNULL(SUM(park_hand_open_num),0) parkHandOpenNum,
    IFNULL(SUM(park_white_car_num),0) parkWhiteCarNum,
    IFNULL(SUM(park_total_fee), 0)  parkTotalFee,
    IFNULL(SUM(park_act_fee),0)  parkActFee,
    IFNULL(SUM(park_dicount_fee),0)  parkDicountFee,
    IFNULL(SUM(park_arrearage_fee),0)  parkArrearageFee,
    IFNULL(SUM(park_refund_fee),0)  parkRefundFee,
    IFNULL(SUM(park_ali_fee),0)  parkAliFee,
    IFNULL(SUM(park_ali_charge_num),0)  parkAliChargeNum,
    IFNULL(SUM(park_wx_fee),0)  parkWxFee,
    IFNULL(SUM(park_wx_charge_num),0)  parkWxChargeNum,
    IFNULL(SUM(park_cash_fee),0)  parkCashFee,
    IFNULL(SUM(park_cash_charge_num),0)  parkCashChargeNum,
    IFNULL(SUM(park_balance_fee),0)  parkBalanceFee,
    IFNULL(SUM(park_balance_charge_num),0)  parkBalanceChargeNum,
    IFNULL(SUM(card_order_num),0)  cardOrderNum,
    IFNULL(SUM(card_total_fee),0)  cardTotalFee,
    IFNULL(SUM(card_act_fee),0)  cardActFee,
    IFNULL(SUM(card_dicount_fee),0)  cardDicountFee,
    IFNULL(SUM(card_app_num),0)  cardAppNum,
    IFNULL(SUM(card_wx_num),0)  cardWxNum,
    IFNULL(SUM(card_platform_num),0)  cardPlatformNum,
    IFNULL(SUM(card_site_num),0)  cardSiteNum,
    IFNULL(SUM(card_ali_fee),0)  cardAliFee,
    IFNULL(SUM(card_ali_charge_num),0)  cardAliChargeNum,
    IFNULL(SUM(card_wx_fee),0)  cardWxFee,
    IFNULL(SUM(card_wx_charge_num),0)  cardWxChargeNum,
    IFNULL(SUM(card_cash_fee),0)  cardCashFee,
    IFNULL(SUM(card_cash_charge_num),0)  cardCashChargeNum,
    IFNULL(SUM(card_balance_fee),0)  cardBalanceFee,
    IFNULL(SUM(card_balance_charge_num),0)  cardBalanceChargeNum,
    IFNULL(SUM(card_year_card_fee),0)  cardYearCardFee,
    IFNULL(SUM(card_month_card_fee),0)  cardMonthCardFee,
    IFNULL(SUM(card_season_card_fee),0)  cardSeasonCardFee,
    IFNULL(SUM(card_half_year_card_fee),0)  cardHalfYearCardFee,
    IFNULL(SUM(card_day_card_fee),0)  cardDayCardFee,
    IFNULL(SUM(back_order_num),0)  backOrderNum,
    IFNULL(SUM(back_total_fee),0)  backTotalFee,
    IFNULL(SUM(back_act_fee),0)  backActFee,
    IFNULL(SUM(back_dicount_fee),0)  backDicountFee,
    IFNULL(SUM(back_app_num),0)  backAppNum,
    IFNULL(SUM(back_wx_num),0)  backWxNum,
    IFNULL(SUM(back_platform_num),0)  backPlatformNum,
    IFNULL(SUM(back_site_num),0)  backSiteNum,
    IFNULL(SUM(back_ali_fee),0)  backAliFee,
    IFNULL(SUM(back_ali_charge_num),0)  backAliChargeNum,
    IFNULL(SUM(back_wx_fee),0)  backWxFee,
    IFNULL(SUM(back_wx_charge_num),0)  backWxChargeNum,
    IFNULL(SUM(back_cash_fee),0)  backCashFee,
    IFNULL(SUM(back_cash_charge_num),0)  backCashChargeNum,
    IFNULL(SUM(back_balance_fee),0)  backBalanceFee,
    IFNULL(SUM(back_balance_charge_num),0)  backBalanceChargeNum
    FROM income_statistic_day
    where data_state = 1
     AND pl_no = #{plNo}
     AND static_date &gt;= #{startDate}
     AND static_date &lt; #{endDate}
    GROUP BY pl_no
  </select>

  <select id="selectStatisticFeeVipCardByPlNos"  resultType="com.zteits.clouds.api.dto.bill.vipcard.IncomeStatisticFeeVipCardDTO">
    SELECT
    IFNULL(SUM(card_order_num),0)  cardOrderNum,
    IFNULL(SUM(card_total_fee),0)  cardTotalFee,
    IFNULL(SUM(card_act_fee),0)  cardActFee,
    IFNULL(SUM(card_dicount_fee),0)  cardDicountFee,
    IFNULL(SUM(card_app_num),0)  cardAppNum,
    IFNULL(SUM(card_wx_num),0)  cardWxNum,
    IFNULL(SUM(card_platform_num),0)  cardPlatformNum,
    IFNULL(SUM(card_site_num),0)  cardSiteNum,
    IFNULL(SUM(card_ali_fee),0)  cardAliFee,
    IFNULL(SUM(card_ali_charge_num),0)  cardAliChargeNum,
    IFNULL(SUM(card_wx_fee),0)  cardWxFee,
    IFNULL(SUM(card_wx_charge_num),0)  cardWxChargeNum,
    IFNULL(SUM(card_cash_fee),0)  cardCashFee,
    IFNULL(SUM(card_cash_charge_num),0)  cardCashChargeNum,
    IFNULL(SUM(card_balance_fee),0)  cardBalanceFee,
    IFNULL(SUM(card_balance_charge_num),0)  cardBalanceChargeNum,
    IFNULL(SUM(card_year_card_fee),0)  cardYearCardFee,
    IFNULL(SUM(card_month_card_fee),0)  cardMonthCardFee,
    IFNULL(SUM(card_season_card_fee),0)  cardSeasonCardFee,
    IFNULL(SUM(card_half_year_card_fee),0)  cardHalfYearCardFee,
    IFNULL(SUM(card_day_card_fee),0)  cardDayCardFee
    FROM income_statistic_day
    where data_state = 1
    <if test="plNos != null and plNos.size >0">
      AND pl_no IN
      <foreach collection="plNos" open="(" close=")" item="plNo" separator=",">
        #{plNo}
      </foreach>
    </if>
  </select>


  <select id="selectStatisticAllFeePlNos"  resultType="com.zteits.clouds.api.dto.order.income.dto.IncomeAllStatisticDTO" >
    SELECT
    static_date staticDate,
    IFNULL(SUM(park_order_num), 0)  parkOrderNum,
    IFNULL(SUM(park_short_time_free_num),0) parkShortTimeFreeNum,
    IFNULL(SUM(park_temp_num ),0) parkTempNum,
    IFNULL(SUM(park_authorization_free_num),0) parkAuthorizationFreeNum,
    IFNULL(SUM(park_hand_open_num),0) parkHandOpenNum,
    IFNULL(SUM(park_white_car_num),0) parkWhiteCarNum,
    IFNULL(SUM(park_total_fee), 0)  parkTotalFee,
    IFNULL(SUM(park_act_fee),0)  parkActFee,
    IFNULL(SUM(park_dicount_fee),0)  parkDicountFee,
    IFNULL(SUM(park_arrearage_fee),0)  parkArrearageFee,
    IFNULL(SUM(park_refund_fee),0)  parkRefundFee,
    IFNULL(SUM(park_ali_fee),0)  parkAliFee,
    IFNULL(SUM(park_ali_charge_num),0)  parkAliChargeNum,
    IFNULL(SUM(park_wx_fee),0)  parkWxFee,
    IFNULL(SUM(park_wx_charge_num),0)  parkWxChargeNum,
    IFNULL(SUM(park_cash_fee),0)  parkCashFee,
    IFNULL(SUM(park_cash_charge_num),0)  parkCashChargeNum,
    IFNULL(SUM(park_balance_fee),0)  parkBalanceFee,
    IFNULL(SUM(park_balance_charge_num),0)  parkBalanceChargeNum,
    IFNULL(SUM(card_order_num),0)  cardOrderNum,
    IFNULL(SUM(card_total_fee),0)  cardTotalFee,
    IFNULL(SUM(card_act_fee),0)  cardActFee,
    IFNULL(SUM(card_dicount_fee),0)  cardDicountFee,
    IFNULL(SUM(card_app_num),0)  cardAppNum,
    IFNULL(SUM(card_wx_num),0)  cardWxNum,
    IFNULL(SUM(card_platform_num),0)  cardPlatformNum,
    IFNULL(SUM(card_site_num),0)  cardSiteNum,
    IFNULL(SUM(card_ali_fee),0)  cardAliFee,
    IFNULL(SUM(card_ali_charge_num),0)  cardAliChargeNum,
    IFNULL(SUM(card_wx_fee),0)  cardWxFee,
    IFNULL(SUM(card_wx_charge_num),0)  cardWxChargeNum,
    IFNULL(SUM(card_cash_fee),0)  cardCashFee,
    IFNULL(SUM(card_cash_charge_num),0)  cardCashChargeNum,
    IFNULL(SUM(card_balance_fee),0)  cardBalanceFee,
    IFNULL(SUM(card_balance_charge_num),0)  cardBalanceChargeNum,
    IFNULL(SUM(card_year_card_fee),0)  cardYearCardFee,
    IFNULL(SUM(card_month_card_fee),0)  cardMonthCardFee,
    IFNULL(SUM(card_season_card_fee),0)  cardSeasonCardFee,
    IFNULL(SUM(card_half_year_card_fee),0)  cardHalfYearCardFee,
    IFNULL(SUM(card_day_card_fee),0)  cardDayCardFee,
    IFNULL(SUM(back_order_num),0)  backOrderNum,
    IFNULL(SUM(back_total_fee),0)  backTotalFee,
    IFNULL(SUM(back_act_fee),0)  backActFee,
    IFNULL(SUM(back_dicount_fee),0)  backDicountFee,
    IFNULL(SUM(back_app_num),0)  backAppNum,
    IFNULL(SUM(back_wx_num),0)  backWxNum,
    IFNULL(SUM(back_platform_num),0)  backPlatformNum,
    IFNULL(SUM(back_site_num),0)  backSiteNum,
    IFNULL(SUM(back_ali_fee),0)  backAliFee,
    IFNULL(SUM(back_ali_charge_num),0)  backAliChargeNum,
    IFNULL(SUM(back_wx_fee),0)  backWxFee,
    IFNULL(SUM(back_wx_charge_num),0)  backWxChargeNum,
    IFNULL(SUM(back_cash_fee),0)  backCashFee,
    IFNULL(SUM(back_cash_charge_num),0)  backCashChargeNum,
    IFNULL(SUM(back_balance_fee),0)  backBalanceFee,
    IFNULL(SUM(back_balance_charge_num),0)  backBalanceChargeNum
    FROM income_statistic_day
    where data_state = 1
    <if test="plNos != null and plNos.size >0">
      AND pl_no IN
      <foreach collection="plNos" open="(" close=")" item="plNo" separator=",">
        #{plNo}
      </foreach>
    </if>
    <if test="startDate != null">
      AND static_date &gt;= #{startDate}
    </if>
    <if test="endDate != null">
      AND static_date &lt; #{endDate}
    </if>
    GROUP BY staticDate DESC
  </select>
  
  <select id="getOrderCollections"  resultType="com.zteits.clouds.api.dto.order.income.dto.IncomeAllStatisticDTO" >
    SELECT
    pl_no as plNo,
    static_date staticDate,
    IFNULL(SUM(park_order_num), 0)  parkOrderNum,
    IFNULL(SUM(park_short_time_free_num),0) parkShortTimeFreeNum,
    IFNULL(SUM(park_temp_num ),0) parkTempNum,
    IFNULL(SUM(park_authorization_free_num),0) parkAuthorizationFreeNum,
    IFNULL(SUM(park_hand_open_num),0) parkHandOpenNum,
    IFNULL(SUM(park_white_car_num),0) parkWhiteCarNum,
    IFNULL(SUM(park_total_fee), 0)  parkTotalFee,
    IFNULL(SUM(park_act_fee),0)  parkActFee,
    IFNULL(SUM(park_dicount_fee),0)  parkDicountFee,
    IFNULL(SUM(park_arrearage_fee),0)  parkArrearageFee,
    IFNULL(SUM(park_refund_fee),0)  parkRefundFee,
    IFNULL(SUM(park_ali_fee),0)  parkAliFee,
    IFNULL(SUM(park_ali_charge_num),0)  parkAliChargeNum,
    IFNULL(SUM(park_wx_fee),0)  parkWxFee,
    IFNULL(SUM(park_wx_charge_num),0)  parkWxChargeNum,
    IFNULL(SUM(park_cash_fee),0)  parkCashFee,
    IFNULL(SUM(park_cash_charge_num),0)  parkCashChargeNum,
    IFNULL(SUM(park_balance_fee),0)  parkBalanceFee,
    IFNULL(SUM(park_balance_charge_num),0)  parkBalanceChargeNum,
    IFNULL(SUM(card_order_num),0)  cardOrderNum,
    IFNULL(SUM(card_total_fee),0)  cardTotalFee,
    IFNULL(SUM(card_act_fee),0)  cardActFee,
    IFNULL(SUM(card_dicount_fee),0)  cardDicountFee,
    IFNULL(SUM(card_app_num),0)  cardAppNum,
    IFNULL(SUM(card_wx_num),0)  cardWxNum,
    IFNULL(SUM(card_platform_num),0)  cardPlatformNum,
    IFNULL(SUM(card_site_num),0)  cardSiteNum,
    IFNULL(SUM(card_ali_fee),0)  cardAliFee,
    IFNULL(SUM(card_ali_charge_num),0)  cardAliChargeNum,
    IFNULL(SUM(card_wx_fee),0)  cardWxFee,
    IFNULL(SUM(card_wx_charge_num),0)  cardWxChargeNum,
    IFNULL(SUM(card_cash_fee),0)  cardCashFee,
    IFNULL(SUM(card_cash_charge_num),0)  cardCashChargeNum,
    IFNULL(SUM(card_balance_fee),0)  cardBalanceFee,
    IFNULL(SUM(card_balance_charge_num),0)  cardBalanceChargeNum,
    IFNULL(SUM(card_year_card_fee),0)  cardYearCardFee,
    IFNULL(SUM(card_month_card_fee),0)  cardMonthCardFee,
    IFNULL(SUM(card_season_card_fee),0)  cardSeasonCardFee,
    IFNULL(SUM(card_half_year_card_fee),0)  cardHalfYearCardFee,
    IFNULL(SUM(card_day_card_fee),0)  cardDayCardFee,
    IFNULL(SUM(back_order_num),0)  backOrderNum,
    IFNULL(SUM(back_total_fee),0)  backTotalFee,
    IFNULL(SUM(back_act_fee),0)  backActFee,
    IFNULL(SUM(back_dicount_fee),0)  backDicountFee,
    IFNULL(SUM(back_app_num),0)  backAppNum,
    IFNULL(SUM(back_wx_num),0)  backWxNum,
    IFNULL(SUM(back_platform_num),0)  backPlatformNum,
    IFNULL(SUM(back_site_num),0)  backSiteNum,
    IFNULL(SUM(back_ali_fee),0)  backAliFee,
    IFNULL(SUM(back_ali_charge_num),0)  backAliChargeNum,
    IFNULL(SUM(back_wx_fee),0)  backWxFee,
    IFNULL(SUM(back_wx_charge_num),0)  backWxChargeNum,
    IFNULL(SUM(back_cash_fee),0)  backCashFee,
    IFNULL(SUM(back_cash_charge_num),0)  backCashChargeNum,
    IFNULL(SUM(back_balance_fee),0)  backBalanceFee,
    IFNULL(SUM(back_balance_charge_num),0)  backBalanceChargeNum,
    IFNULL(SUM(pre_total_fee),0)  preTotalFee,
    IFNULL(SUM(recharge_total_fee),0)  rechargeTotalFee
    FROM income_statistic_day
    where data_state = 1
    <if test="plNos != null and plNos.size >0">
      AND pl_no IN
      <foreach collection="plNos" open="(" close=")" item="plNo" separator=",">
        #{plNo}
      </foreach>
    </if>
    <if test="startDate != null">
      AND static_date &gt;= #{startDate}
    </if>
    <if test="endDate != null">
      AND static_date &lt; #{endDate}
    </if>
    GROUP BY staticDate ,pl_no
  </select>
</mapper>