|
|
|
@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
ods_procure_out_order
|
|
|
|
|
WHERE
|
|
|
|
|
Active = '1'
|
|
|
|
|
<if test="produceCode != null and produceCode != ''"> and Produce_Code = #{produceCode}</if>
|
|
|
|
|
<if test="produceCode != null and produceCode != ''"> and Produce_Code like concat('%', #{produceCode}, '%') </if>
|
|
|
|
|
<if test="userDefined1 != null and userDefined1 != ''"> and User_Defined1 = #{userDefined1}</if>
|
|
|
|
|
AND User_Defined3 !='x'
|
|
|
|
|
</select>
|
|
|
|
@ -76,12 +76,56 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
ods_procure_out_order
|
|
|
|
|
WHERE
|
|
|
|
|
Active = '1'
|
|
|
|
|
<if test="produceCode != null and produceCode != ''"> and Produce_Code = #{produceCode}</if>
|
|
|
|
|
<if test="produceCode != null and produceCode != ''"> and Produce_Code like concat('%', #{produceCode}, '%')</if>
|
|
|
|
|
<if test="userDefined1 != null and userDefined1 != ''"> and User_Defined1 = #{userDefined1}</if>
|
|
|
|
|
AND User_Defined3 ='x'
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectOdsProcureOutOrderListZUT" parameterType="OdsProcureOutOrder" resultMap="OdsProcureOutOrderResult">
|
|
|
|
|
<include refid="selectOdsProcureOutOrderVo"/>
|
|
|
|
|
SELECT
|
|
|
|
|
Site_code,
|
|
|
|
|
ID,
|
|
|
|
|
CASE
|
|
|
|
|
|
|
|
|
|
WHEN LEN( Produce_Code ) >= 3 THEN
|
|
|
|
|
SUBSTRING ( Produce_Code, 4, LEN( Produce_Code ) ) ELSE Produce_Code
|
|
|
|
|
END AS Produce_Code,
|
|
|
|
|
CASE
|
|
|
|
|
|
|
|
|
|
WHEN LEN( Material_Code ) >= 7 THEN
|
|
|
|
|
SUBSTRING ( Material_Code, 8, LEN( Material_Code ) ) ELSE Material_Code
|
|
|
|
|
END AS Material_Code,
|
|
|
|
|
Material_Desc,
|
|
|
|
|
Plan_Date,
|
|
|
|
|
Plan_Number,
|
|
|
|
|
Unit,
|
|
|
|
|
COALESCE ( Out_Number, 0 ) AS Out_Number,
|
|
|
|
|
Loc_Code,
|
|
|
|
|
Loc_Desc,
|
|
|
|
|
Production_Line_Desc,
|
|
|
|
|
Production_Line_Code,
|
|
|
|
|
Order_Status,
|
|
|
|
|
User_Defined1,
|
|
|
|
|
User_Defined2,
|
|
|
|
|
User_Defined3,
|
|
|
|
|
User_Defined4,
|
|
|
|
|
User_Defined5,
|
|
|
|
|
User_Defined6,
|
|
|
|
|
User_Defined7,
|
|
|
|
|
User_Defined8,
|
|
|
|
|
User_Defined9,
|
|
|
|
|
User_Defined10,
|
|
|
|
|
User_Defined11,
|
|
|
|
|
Supplier_Code,
|
|
|
|
|
Supplier_Name,
|
|
|
|
|
Create_By,
|
|
|
|
|
Create_Date,
|
|
|
|
|
Last_Update_By,
|
|
|
|
|
Last_Update_Date,
|
|
|
|
|
Active,
|
|
|
|
|
Enterprise_Id,
|
|
|
|
|
Enterprise_Code
|
|
|
|
|
FROM
|
|
|
|
|
ods_procure_out_order
|
|
|
|
|
<where>
|
|
|
|
|
<if test="produceCode != null and produceCode != ''"> and Produce_Code like concat('%', #{produceCode}, '%')</if>
|
|
|
|
|
<if test="userDefined1 != null and userDefined1 != ''"> and User_Defined1 = #{userDefined1}</if>
|
|
|
|
|