12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?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.dgtly.order.mapper.MetaHanaSalesOrderMapper">
- <resultMap type="MetaHanaSalesOrder" id="MetaHanaSalesResult">
- <result property="docNumber" column="DOC_NUMBER" />
- <result property="docItem" column="DOC_ITEM" />
- <result property="salesOrg" column="SALES_ORG" />
- <result property="salesOrgName" column="SALES_ORG_NAME" />
- <result property="distributionChannel" column="DISTRIBUTION_CHANNEL" />
- <result property="customerCode" column="CUSTOMER_CODE" />
- <result property="customerName" column="CUSTOMER_NAME" />
- <result property="route" column="ROUTE" />
- <result property="division" column="DIVISION" />
- <result property="salesGroup" column="SALES_GROUP" />
- <result property="plant" column="PLANT" />
- <result property="docType" column="DOC_TYPE" />
- <result property="createDate" column="CREATE_DATE" />
- <result property="createDateItem" column="CREATE_DATE_ITEM" />
- <result property="deliverStatus" column="DELIVER_STATUS" />
- <result property="materialCode" column="MATERIAL_CODE" />
- <result property="materialName" column="MATERIAL_NAME" />
- <result property="sizeDim" column="SIZE_DIM" />
- <result property="creditDate" column="CREDIT_DATE" />
- <result property="creditStatus" column="CREDIT_STATUS" />
- <result property="rejectReason" column="REJECT_REASON" />
- <result property="noDeliverQty" column="NO_DELIVER_QTY" />
- <result property="noDeliverWt" column="NO_DELIVER_WT" />
- <result property="noDeliverAmt" column="NO_DELIVER_AMT" />
- <result property="deliverQty" column="DELIVER_QTY" />
- <result property="deliverWt" column="DELIVER_WT" />
- <result property="deliverAmt" column="DELIVER_AMT" />
- </resultMap>
- <sql id="selectMetaHanaSalesOrderVo">
- select DOC_NUMBER, DOC_ITEM, SALES_ORG, SALES_ORG_NAME, DISTRIBUTION_CHANNEL, CUSTOMER_CODE, CUSTOMER_NAME, ROUTE,
- DIVISION, SALES_GROUP, PLANT, DOC_TYPE, CREATE_DATE, CREATE_DATE_ITEM, DELIVER_STATUS, MATERIAL_CODE, MATERIAL_NAME, SIZE_DIM
- , CREDIT_DATE, CREDIT_STATUS, REJECT_REASON, NO_DELIVER_QTY, NO_DELIVER_WT, NO_DELIVER_AMT, DELIVER_QTY, DELIVER_WT, DELIVER_AMT from meta_hana_sales_order
- </sql>
- <select id="selectDistinctMetaHanaSalesOrder" parameterType="MetaHanaSalesOrder" resultMap="MetaHanaSalesResult">
- select distinct mhso.DOC_NUMBER, mhso.CUSTOMER_CODE, mhso.CUSTOMER_NAME,
- mhso.CREATE_DATE, mhso.CREDIT_DATE, mhso.CREDIT_STATUS, mhso.REJECT_REASON
- from meta_hana_sales_order mhso
- <where>
- <if test="docNumber != null and docNumber != ''"> and mhso.DOC_NUMBER like concat('%', #{docNumber}, '%')</if>
- <if test="salesOrg != null and salesOrg != ''"> and mhso.SALES_ORG =#{salesOrg}</if>
- <if test="salesOrgName != null and salesOrgName != ''"> and mhso.SALES_ORG_NAME like concat('%', #{salesOrgName}, '%')</if>
- <if test="customerCode != null and customerCode != ''"> and mhso.CUSTOMER_CODE like concat('%', #{customerCode}, '%')</if>
- <if test="customerName != null and customerName != ''"> and mhso.CUSTOMER_NAME like concat('%', #{customerName}, '%')</if>
- <if test="docType != null and docType != ''"> and mhso.DOC_TYPE = #{docType}</if>
- <if test="creditStatus != null and creditStatus != ''"> and mhso.CREDIT_STATUS = #{creditStatus}</if>
- </where>
- </select>
- <select id="selectOrderExcepTimeByList" parameterType="String" resultType="Map">
- select order_number ,expected_time
- from sales_order_base
- where order_number in
- <foreach collection="list" item="orderNumber" open="(" separator="," close=")">
- #{orderNumber}
- </foreach>
- </select>
- </mapper>
|