<?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="org.jeecg.modules.jysso.socheck.mapper.DbSoCheckMapper">
<select id="pageByMaterial" parameterType="hashmap" resultType="org.jeecg.modules.jysso.socheck.entity.DbSoCheck">
select db_so_check.* from db_so_check db_so_check
left join db_so_cost_income db_so_cost_income on db_so_cost_income.so_check_pid = db_so_check.id
where 1 = 1
<if test="map.materialCode != null and map.materialCode != '' ">
and db_so_cost_income.material_code = #{materialCode}
</if>
<if test="map.materialName != null and map.materialName != '' ">
and db_so_cost_income.material_name like CONCAT('%',#{materialName},'%')
</if>
<if test="map.materialspec != null and map.materialspec != '' ">
and db_so_cost_income.materialspec like CONCAT('%',#{materialspec},'%')
</if>
<include refid="assembling"/>
</select>
<!--检索条件拼装-->
<sql id="assembling">
<if test=" map.createTime_begin != null and map.createTime_begin != '' ">
and pro_build_info.createTime >= #{createTime_begin}
</if>
<if test=" map.createTime_end != null and map.createTime_end != '' ">
and pro_build_info.createTime <= #{createTime_end}
</if>
<if test=" map.updateTime_begin != null and map.updateTime_begin != '' ">
and pro_build_info.updateTime >= #{updateTime_begin}
</if>
<if test=" map.updateTime_end != null and map.updateTime_end != '' ">
and pro_build_info.updateTime <= #{updateTime_end}
</if>
<if test=" map.contractNumber != null and map.contractNumber != '' ">
and pro_build_info.id = #{contractNumber}
</if>
<if test=" map.customerName != null and map.customerName != '' ">
and pro_build_info.id = #{customerName}
</if>
<if test=" map.jsfs != null and map.jsfs != '' ">
and pro_build_info.id = #{jsfs}
</if>
<if test=" map.sszq != null and map.sszq != '' ">
and pro_build_info.sszq = #{sszq}
</if>
<if test=" map.jyfs != null and map.jyfs != '' ">
and pro_build_info.jyfs = #{jyfs}
</if>
<if test=" map.customerType != null and map.jyfs != '' ">
and pro_build_info.customer_type = #{customerType}
</if>
<if test=" map.exportOrg != null and map.exportOrg != '' ">
and pro_build_info.export_org = #{exportOrg}
</if>
<if test=" map.originAddress != null and map.originAddress != '' ">
and pro_build_info.origin_address = #{originAddress}
</if>
<if test=" map.inlandDestinationPort != null and map.inlandDestinationPort != '' ">
and pro_build_info.inland_destination_port = #{inlandDestinationPort}
</if>
<if test=" map.inlandDestinationPort != null and map.inlandDestinationPort != '' ">
and pro_build_info.inland_destination_port = #{inlandDestinationPort}
</if>
</sql>
</mapper>
mybatis plus标签 参数 map. 取值 无map.
最新推荐文章于 2024-07-08 11:55:53 发布