Files
nanguangszwlback/mhd_oms/src/main/resources/mapper/executeOrder/ExecuteOrderMapper.xml
T
2026-01-27 11:03:31 +08:00

88 lines
4.0 KiB
XML

<?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.mhd.oms.domain.executeOrder.repository.mapper.ExecuteOrderMapper">
<resultMap type="com.mhd.oms.domain.executeOrder.repository.po.ExecuteOrderPO" id="ExecuteOrderResult">
<result property="id" column="ID" />
<result property="realCreateBy" column="REAL_CREATE_BY" />
<result property="realCreateName" column="REAL_CREATE_NAME" />
<result property="createBy" column="CREATE_BY" />
<result property="createCompanyId" column="CREATE_COMPANY_ID" />
<result property="createTime" column="CREATE_TIME" />
<result property="updateBy" column="UPDATE_BY" />
<result property="updateTime" column="UPDATE_TIME" />
<result property="delFlag" column="DEL_FLAG" />
<result property="goodsNumber" column="GOODS_NUMBER" />
<result property="orgName" column="ORG_NAME" />
<result property="organizationId" column="ORGANIZATION_ID" />
<result property="businessDocumentId" column="BUSINESS_DOCUMENT_ID" />
<result property="businessDocumentNumber" column="BUSINESS_DOCUMENT_NUMBER" />
<result property="organizationName" column="ORGANIZATION_NAME" />
<result property="topOrganizationId" column="TOP_ORGANIZATION_ID" />
</resultMap>
<sql id="selectExecuteOrderPo">
select ID, REAL_CREATE_BY, REAL_CREATE_NAME, CREATE_BY, CREATE_COMPANY_ID, CREATE_TIME, UPDATE_BY, UPDATE_TIME, DEL_FLAG, GOODS_NUMBER, ORG_NAME, ORGANIZATION_ID, BUSINESS_DOCUMENT_ID, BUSINESS_DOCUMENT_NUMBER, ORGANIZATION_NAME, TOP_ORGANIZATION_ID from execute_order
</sql>
<sql id="selectExecuteOrderPo1">
<where>
<if test="id != null ">
and ID = #{id}
</if>
<if test="realCreateBy != null and realCreateBy != ''">
and REAL_CREATE_BY = #{realCreateBy}
</if>
<if test="realCreateName != null and realCreateName != ''">
and REAL_CREATE_NAME like concat('%', #{realCreateName}, '%')
</if>
<if test="createBy != null and createBy != ''">
and CREATE_BY = #{createBy}
</if>
<if test="createCompanyId != null and createCompanyId != ''">
and CREATE_COMPANY_ID = #{createCompanyId}
</if>
<if test="createTime != null ">
and CREATE_TIME = #{createTime}
</if>
<if test="updateBy != null and updateBy != ''">
and UPDATE_BY = #{updateBy}
</if>
<if test="updateTime != null ">
and UPDATE_TIME = #{updateTime}
</if>
<if test="delFlag != null ">
and DEL_FLAG = #{delFlag}
</if>
<if test="goodsNumber != null and goodsNumber != ''">
and GOODS_NUMBER = #{goodsNumber}
</if>
<if test="orgName != null and orgName != ''">
and ORG_NAME like concat('%', #{orgName}, '%')
</if>
<if test="organizationId != null ">
and ORGANIZATION_ID = #{organizationId}
</if>
<if test="businessDocumentId != null ">
and BUSINESS_DOCUMENT_ID = #{businessDocumentId}
</if>
<if test="businessDocumentNumber != null and businessDocumentNumber != ''">
and BUSINESS_DOCUMENT_NUMBER = #{businessDocumentNumber}
</if>
<if test="organizationName != null and organizationName != ''">
and ORGANIZATION_NAME like concat('%', #{organizationName}, '%')
</if>
<if test="topOrganizationId != null ">
and TOP_ORGANIZATION_ID = #{topOrganizationId}
</if>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.oms.domain.executeOrder.repository.todo.ExecuteOrderDO" resultMap="ExecuteOrderResult">
<include refid="selectExecuteOrderPo"/>
<include refid="selectExecuteOrderPo1"/>
</select>
</mapper>