谷丰维他奶oms流程修改
This commit is contained in:
@@ -25,80 +25,67 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
<sql id="selectExecuteOrderPo">
|
||||
select * from execute_order
|
||||
SELECT
|
||||
eo.*,
|
||||
bdo.main_order_num
|
||||
FROM
|
||||
execute_order eo
|
||||
LEFT JOIN
|
||||
BUSINESS_DOCUMENT_ORDER bdo
|
||||
ON
|
||||
eo.BUSINESS_DOCUMENT_NUMBER = bdo.goods_number
|
||||
</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 >= #{createStartTime}
|
||||
and eo.CREATE_TIME >= #{createStartTime}
|
||||
</if>
|
||||
<if test="createEndTime != null">
|
||||
and CREATE_TIME <= #{createEndTime} + 1 - 1/86400
|
||||
and eo.CREATE_TIME <= #{createEndTime} + 1 - 1/86400
|
||||
</if>
|
||||
<if test="issueStartTime != null">
|
||||
and ISSUE_TIME >= #{issueStartTime}
|
||||
and eo.ISSUE_TIME >= #{issueStartTime}
|
||||
</if>
|
||||
<if test="issueEndTime != null">
|
||||
and ISSUE_TIME <= #{issueEndTime} + 1 - 1/86400
|
||||
and eo.ISSUE_TIME <= #{issueEndTime} + 1 - 1/86400
|
||||
</if>
|
||||
<if test="goodsNumber != null and goodsNumber != ''">
|
||||
and GOODS_NUMBER like concat('%', #{goodsNumber}, '%')
|
||||
</if>
|
||||
<if test="businessUnit != null and businessUnit != ''">
|
||||
and BUSINESS_UNIT like concat('%', #{businessUnit}, '%')
|
||||
<if test="goodsNumber != null and goodsNumber != ''">
|
||||
and eo.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 test="businessUnit != null and businessUnit != ''">
|
||||
and eo.BUSINESS_UNIT like concat('%', #{businessUnit}, '%')
|
||||
</if>
|
||||
<if test="orderStatus != null and orderStatus != ''">
|
||||
and order_status = #{orderStatus}
|
||||
<if test="orgName != null and orgName != ''">
|
||||
and eo.ORG_NAME like concat('%', #{orgName}, '%')
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and eo.ORGANIZATION_ID = #{organizationId}
|
||||
</if>
|
||||
<if test="businessDocumentId != null ">
|
||||
and eo.BUSINESS_DOCUMENT_ID = #{businessDocumentId}
|
||||
</if>
|
||||
|
||||
<!-- 已修复:支持 单据号 OR 主订单号 模糊查询 -->
|
||||
<if test="businessDocumentNumber != null and businessDocumentNumber != ''">
|
||||
and (
|
||||
eo.BUSINESS_DOCUMENT_NUMBER like concat('%', #{businessDocumentNumber}, '%')
|
||||
or bdo.main_order_num like concat('%', #{businessDocumentNumber}, '%')
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test="appointShipper != null and appointShipper != ''">
|
||||
and eo.appoint_shipper like concat('%', #{appointShipper}, '%')
|
||||
</if>
|
||||
<if test="orderStatus != null and orderStatus != ''">
|
||||
and eo.order_status = #{orderStatus}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and eo.ORGANIZATION_NAME like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and eo.TOP_ORGANIZATION_ID = #{topOrganizationId}
|
||||
</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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user