Files
nanguangszwlback/mhd_oms/src/main/resources/mapper/executeOrder/ExecuteOrderMapper.xml
T
2026-04-20 20:51:52 +08:00

107 lines
4.8 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 * 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="createStartTime != null">
and CREATE_TIME &gt;= #{createStartTime}
</if>
<if test="createEndTime != null">
and CREATE_TIME &lt;= #{createEndTime} + 1 - 1/86400
</if>
<if test="issueStartTime != null">
and ISSUE_TIME &gt;= #{issueStartTime}
</if>
<if test="issueEndTime != null">
and ISSUE_TIME &lt;= #{issueEndTime} + 1 - 1/86400
</if>
<if test="goodsNumber != null and goodsNumber != ''">
and GOODS_NUMBER like concat('%', #{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 like concat('%', #{businessDocumentNumber}, '%')
</if>
<if test="appointShipper != null and appointShipper != ''">
and appoint_shipper like concat('%', #{appointShipper}, '%')
</if>
<if test="orderStatus != null and orderStatus != ''">
and order_status = #{orderStatus}
</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"/>
order by CREATE_TIME desc
</select>
</mapper>