<select id="getEmployeeBasicInformationList" resultType="org.springblade.entity.AllEmployeeBasicInformation">
select a.*,b.* from blade_employee_basic_information a left join blade_user b on a.id=b.id where a.tenant_id=#{tenantId} and a.is_deleted=0
<if test="department !=null and department !='' ">
and a.department like '%%${department}%%'
</if>
<if test="realName !=null and realName !='' ">
and b.real_name like '%%${realName}%%'
</if>
<if test="entryDate !=null and entryDate !='' ">
and a.entry_date=#{entryDate}
</if>
<if test="dimissionType !=null and dimissionType !='' ">
and a.dimission_type=#{dimissionType}
</if>
<if test="lastWorkingDay !=null and lastWorkingDay !='' ">
and a.last_working_day=#{lastWorkingDay}
</if>
<if test="workingState !=null and workingState !='' ">
and a.working_state=#{workingState}
</if> <if test="isSing =='1'">
and (a.contract_start_date is not null) or a.contract_start_date!=''
</if>
<if test="isSing =='0'">
and a.contract_start_date is not null or ifnull(a.contract_start_date,'')=''
</if>
<if test="dateStartTime !=null and dateStartTime !='' ">
and a.contract_start_date &gt;= {dateStartTime}
</if>
<if test="dateEndTime !=null and dateEndTime !='' ">
and a.contract_start_date &lt;= {dateEndTime}
</if>
<if test="endDateStart !=null and endDateStart !='' ">
and a.contract_end_date &gt;= {endDateStart}
</if>
<if test="endDateEnd !=null and endDateEnd !='' ">
and a.contract_end_date &lt;= {endDateEnd}
</if>
order by a.id desc

process_instance_id is null or ifnull(process_instance_id,'')=''

select * from blade_process_should_pay_invoice
where is_deleted = 0
and process_instance_id is null or ifnull(process_instance_id,'')=''
and create_user = '1273086723649093633'
order by create_time desc

sql中筛选条件为空值的更多相关文章

  1. jqgrid 表格中筛选条件的多选下拉,树形下拉 ;文本框清除插件;高级查询多条件动态筛选插件[自主开发]

    /** * @@desc 文本框清除按钮,如果isAutoWrap为false当前文本框父级必须是relative定位,boostrap参考input-group * @@author Bear.Ti ...

  2. 【SQL】SQL中on条件与where条件的区别

     #前言 数据库在通过连接两张或多张表来返回记录时,都会生成一张中间的临时表,然后再将这张临时表返回给用户. 在使用left jion时,on和where条件的区别如下: 1.on条件是在生成临时表时 ...

  3. SQL中on条件与where条件的区别(转载)

    数据库在通过连接两张或多张表来返回记录时,都会生成一张中间的临时表,然后再将这张临时表返回给用户. 在使用left jion时,on和where条件的区别如下: 1. on条件是在生成临时表时使用的条 ...

  4. SQL中多条件查询括号的用途

    界面: 代码 0 posted @ 2009-12-15 13:28 唔愛吃蘋果 阅读(8640) 评论(0)  编辑 收藏

  5. SQL中on条件与where条件的区别

    数据库在通过连接两张或多张表来返回记录时,都会生成一张中间的临时表,然后再将这张临时表返回给用户.  在使用left jion时,on和where条件的区别如下:   1.on条件是在生成临时表时使用 ...

  6. mybatis sql中的条件语句

    1.mybatis判断是否为空或null <if test="type!=null and type!=''"> AND type = #{type} </if& ...

  7. sql通配符+sql中查询条件包含下划线等通配符的写法

    一.SQL 通配符 在搜索数据库中的数据时,SQL 通配符可以替代一个或多个字符. SQL 通配符必须与 LIKE 运算符一起使用. 在 SQL 中,可使用以下通配符: 通配符 描述 % 替代一个或多 ...

  8. 二十五、sql中where条件在数据库中提取与应用浅析

    问题描述 一条SQL,在数据库中是如何执行的呢?相信很多人都会对这个问题比较感兴趣.当然,要完整描述一条SQL在数据库中的生命周期,这是一个非常巨大的问题,涵盖了SQL的词法解析.语法解析.权限检查. ...

  9. SQL中的条件判断语句(case when zhen if,ifnull)用法

    简介: case具有两种格式.简单case函数和case搜索函数.这两种方式,可以实现相同的功能.简单case函数的写法相对比较简洁,但是和case搜索函数相比,功能方面会有些限制,比如写判定式.还有 ...

随机推荐

  1. LinuxKernel(一)

    首先,回顾一下基础的宏操作: C语言宏 #与## #的作用是字符串化:在一个宏中的参数前面使用一个#,预处理器会把这个参数转换为一个字符数组 #define ERROR_LOG(info) fprin ...

  2. LaTeX中的插图

    插图代码及注释: 显示效果: 更多命令可以看相关文档,通过在命令行终端输入 texdoc graphicx 命令打开文档.

  3. CentOS下搭建禅道Bug反馈系统

    禅道 下载集成版本(apache\php\mysql) wget http://sourceforge.net/projects/zentao/files/8.2.5/ZenTaoPMS.8.2.5. ...

  4. JAVA在最新版Windows10_1909版本环境下的环境变量配置

    1.配置 1.1新建 JAVA_HOME C:\Program Files\Java\jdk-13.0.2 1.2新建 CLASSPATH .;%JAVA_HOME%\bin;%JAVA_HOME%\ ...

  5. 再也不担心写出臃肿的Flink流处理程序啦,发现一款将Flink与Spring生态完美融合的脚手架工程-懒松鼠Flink-Boot

    目录 你可能面临如下苦恼: 接口缓存 重试机制 Bean校验 等等...... 它为流计算开发工程师解决了 有了它你的代码就像这样子: 仓库地址:懒松鼠Flink-Boot 1. 组织结构 2. 技术 ...

  6. 20200509_设置笔记本使用有线访问外网同时wifi访问外网

    1. 控制面板\所有控制面板项\网络连接 2. wifi的使用的手机热点, dhcp分配的, 不用做配置 3. 笔记本获取到的内网静态地址是192.168.3.11, 网关是192.168.3.254 ...

  7. 解决 win7 win10 等 64位 支持access数据库问题

    好多年不写ASP+ACCESS了,这两天帮朋友做个网站,碰到这个问题: ADODB.Connection 错误 '800a0e78' 对象关闭时,不允许操作. 记录一下. 以下内容转载自:https: ...

  8. node-sass版本问题

    node-sass sass-loader的问题 出现了版本的问题 版本太高 版本不兼容解决方法: cnpm i node-sass@4.14.1 cnpm i sass-loader@7.3.1 - ...

  9. PyQt(Python+Qt)学习随笔:Model/View中的枚举类 Qt.MatchFlag的取值及含义

    老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 枚举类 Qt.MatchFlag描述在模型中搜索项时可以使用的匹配类型,它可以在QStandardI ...

  10. PyQt(Python+Qt)学习随笔:信号签名中的万能Python类型PyQt_PyObject

    老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 信号在定义时参数如果使用字符串'PyQt_PyObject'表示参数可以是任何Python类型,这通 ...