EvaluationStatisticsMapper.xml 2.4 KB
Newer Older
苗卫卫 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
<?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.boco.nbd.wios.flow.mapper.def.EvaluationStatisticsMapper">



    <select id="getNormalOrderFiled" parameterType="com.boco.nbd.wios.flow.entity.qo.EvaluationStatisticsQo" resultType="com.boco.nbd.wios.flow.entity.po.OrderPO">

        select  *
        from  t_order
        where  type=1 and process_ins_id is not null  and (node_flag!=199 and status=64)=false
        <if test="startTime != null and startTime != ''">
            and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
        </if>
        <if test="endTime != null and endTime != ''">
            and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
        </if>
        <if test="installSupplierId != null and installSupplierId != ''" >
            and install_supplier_id = #{installSupplierId}
        </if>
        <if test="areaId != null and areaId != ''" >
            and area_id = #{areaId}
        </if>
        <if test="electricExpand != null and electricExpand != ''">
            and electric_expand = #{electricExpand}
        </if>
        <if test="nodeFlag != null ">
            and node_flag in
            <foreach collection="nodeFlag" item="nodeFlag" open="(" separator="," close=")">
                #{nodeFlag}
            </foreach>
        </if>

    </select>


    <select id="getOrderFiled" parameterType="com.boco.nbd.wios.flow.entity.qo.EvaluationStatisticsQo" resultType="com.boco.nbd.wios.flow.entity.po.OrderPO">

        select  *
        from  t_order
        where  type=1 and process_ins_id is not null  and node_flag = '199'

        <if test='timeType == "1"'>
            and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
            and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
        </if>
        <if test='timeType == "2"'>
            and DATE_FORMAT(close_time,'%Y-%m-%d')&gt;= #{startTime}
            and DATE_FORMAT(close_time,'%Y-%m-%d')&lt;= #{endTime}

        </if>
        <if test="installSupplierId != null and installSupplierId != ''" >
            and install_supplier_id = #{installSupplierId}
        </if>
        <if test="areaId != null and areaId != ''" >
            and area_id = #{areaId}
        </if>
        <if test="electricExpand != null and electricExpand != ''">
            and electric_expand = #{electricExpand}
        </if>

    </select>


</mapper>