zoukankan      html  css  js  c++  java
  • 根据选择的关键字类型查询

    <select id="getDnOrder" resultType="com.shinho.dc3.order.dto.doOrder.DnOrderRes" parameterType="com.shinho.dc3.order.dto.doOrder.DnOrderSearch" >
    SELECT
    A.VBELN,
    A.VBELN VBELNCOPY,
    A.VBELN AS VBELN1,
    A.DO_VBELN,
    A.ERDAT,
    A.SHDAT,
    A.NAME,
    A.GROSS_BOX I_COUNT,
    A.GROSS_AMT G_PRICE,
    A.GROSS_AMT,
    A.ADDR,
    A.PERSON_NAME,
    A.SFA_CAR_NUM,
    SFA_NAME,
    A.INSDT,
    A.REMARK,
    A.KUNNR,
    A.LINKMAN,
    A.LINKTEL,
    A.SALE_TYPE,
    A.STATUS,
    A.SOURCE,
    A.GROSS_ZK_AMT,
    A.WAREHOUSE_ID,
    A.ATX,
    A.ZK_TYPE,
    A.ZK_AMT,
    A.UPDATEDT,
    A.DID,
    A.VL02N_DAT,
    A.SFA_STATUS,
    A.PRINT_COUNT,
    A.dn_type AS dnType,
    A.userid
    from dn_order A -- 交货单
    where A.fyfs in (60001,60003)
    <if test="did != null" >
    and A.did = #{did,jdbcType=VARCHAR}
    </if>
    <if test="dateStart != null and dateStart != ''" >
    and SUBSTR(A.erdat FROM 0 FOR 10) &gt; #{dateStart}
    </if>
    <if test="dateEnd != null and dateEnd!='' " >
    and SUBSTR(A.erdat FROM 0 FOR 10) &lt; #{dateEnd}
    </if>
    <if test="statusList != null" >
    and A.STATUS in
    <foreach collection="statusList" item="status" index="index" open="(" close=")" separator=",">
    #{status}
    </foreach>
    </if>
    <if test="wOrderType != null" >
    and A.dn_type =#{wOrderType}
    </if>
    <if test="key == '交货单号'" >
    AND A.vbeln like CONCAT('%',#{keyWord},'%')
    </if>
    <if test="key == '创建人'" >
    AND A.name like CONCAT('%',#{keyWord},'%')
    </if>
    <if test="key == '业务员'" >
    AND A.person_name like CONCAT('%',#{keyWord},'%')
    </if>
    <if test="key == '业务员'" >
    AND (A.vbeln like CONCAT('%',#{keyWord},'%')
    OR A.name like CONCAT('%',#{keyWord},'%')
    OR A.person_name like CONCAT('%',#{keyWord},'%')
    )
    </if>
    <if test="sfaStatus != null and sfaStatus!=''" >
    and A.SFA_STATUS=#{sfaStatus}
    </if>
    <if test="sfaStatus eq 'B'" >
    order by A.insdt,B.warehouse_name,BA.name
    </if>
    <if test="sfaStatus neq 'B'" >
    order by A.insdt desc
    </if>
    </select>
  • 相关阅读:
    android bluetooth 蓝牙4.0 +HC-08模块
    android 调用默认浏览器 打开指定网页
    checkSelfPermission 找不到 Android 动态权限问题
    C# 使用 USB转串 接收数据 问题
    Mysql 保留最新的10条数据
    Android Fragment 开发(一)
    python IP地址转16进制
    Android Socket 遇到的Soure Not Find 错误
    Linux 修改时区 不用重启
    XML Publisher 并发程序由于 输出提交处理程序提交失败
  • 原文地址:https://www.cnblogs.com/pan-my/p/10775330.html
Copyright © 2011-2022 走看看