|
|
|
@ -848,6 +848,53 @@
|
|
|
|
|
</foreach>
|
|
|
|
|
AND (COALESCE ( wms_ods_procure_out_order.Out_Number, 0 ) - COALESCE ( wms_ods_procure_out_order.Sap_Number, 0 ))>0
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectWmsOdsProcureOutOrderByIDsTS" resultMap="OdsProcureOutOrderResult">
|
|
|
|
|
SELECT DISTINCT
|
|
|
|
|
wms_ods_procure_out_order_special.Site_code,
|
|
|
|
|
wms_ods_procure_out_order_special.ID,
|
|
|
|
|
wms_ods_procure_out_order_special.Produce_Code,
|
|
|
|
|
wms_ods_procure_out_order_special.Material_Code,
|
|
|
|
|
wms_ods_procure_out_order_special.Material_Desc,
|
|
|
|
|
wms_ods_procure_out_order_special.Plan_Date,
|
|
|
|
|
wms_ods_procure_out_order_special.Plan_Number,
|
|
|
|
|
wms_ods_procure_out_order_special.Unit,
|
|
|
|
|
COALESCE ( wms_ods_procure_out_order_special.Out_Number, 0 ) - COALESCE ( wms_ods_procure_out_order_special.Sap_Number, 0 ) AS Out_Number,
|
|
|
|
|
wms_raw_mission_out.user_defined2 Loc_Code,
|
|
|
|
|
wms_ods_procure_out_order_special.Loc_Desc,
|
|
|
|
|
wms_ods_procure_out_order_special.Production_Line_Desc,
|
|
|
|
|
wms_ods_procure_out_order_special.Production_Line_Code,
|
|
|
|
|
wms_ods_procure_out_order_special.Order_Status,
|
|
|
|
|
wms_ods_procure_out_order_special.User_Defined1,
|
|
|
|
|
wms_ods_procure_out_order_special.User_Defined2,
|
|
|
|
|
wms_ods_procure_out_order_special.User_Defined3,
|
|
|
|
|
wms_ods_procure_out_order_special.User_Defined4,
|
|
|
|
|
wms_ods_procure_out_order_special.User_Defined5,
|
|
|
|
|
wms_ods_procure_out_order_special.User_Defined6,
|
|
|
|
|
wms_ods_procure_out_order_special.User_Defined7,
|
|
|
|
|
wms_ods_procure_out_order_special.User_Defined8,
|
|
|
|
|
wms_ods_procure_out_order_special.User_Defined9,
|
|
|
|
|
wms_ods_procure_out_order_special.User_Defined10,
|
|
|
|
|
wms_ods_procure_out_order_special.User_Defined11,
|
|
|
|
|
wms_ods_procure_out_order_special.Supplier_Code,
|
|
|
|
|
wms_ods_procure_out_order_special.Supplier_Name,
|
|
|
|
|
wms_ods_procure_out_order_special.Create_By,
|
|
|
|
|
wms_ods_procure_out_order_special.Create_Date,
|
|
|
|
|
wms_ods_procure_out_order_special.Last_Update_By,
|
|
|
|
|
wms_ods_procure_out_order_special.Last_Update_Date,
|
|
|
|
|
wms_ods_procure_out_order_special.Active,
|
|
|
|
|
wms_ods_procure_out_order_special.Enterprise_Id,
|
|
|
|
|
COALESCE ( wms_ods_procure_out_order_special.Sap_Number, 0 ) AS Sap_Number,
|
|
|
|
|
wms_ods_procure_out_order_special.Enterprise_Code
|
|
|
|
|
FROM
|
|
|
|
|
wms_ods_procure_out_order_special
|
|
|
|
|
LEFT JOIN wms_raw_mission_out ON wms_raw_mission_out.prd_order = wms_ods_procure_out_order_special.Produce_Code
|
|
|
|
|
AND wms_raw_mission_out.material_code = wms_ods_procure_out_order_special.Material_Code
|
|
|
|
|
WHERE wms_ods_procure_out_order_special.ID IN
|
|
|
|
|
<foreach item="odsProcureOutOrder" collection="list" open="(" separator="," close=")">
|
|
|
|
|
#{odsProcureOutOrder.ID}
|
|
|
|
|
</foreach>
|
|
|
|
|
AND (COALESCE ( wms_ods_procure_out_order_special.Out_Number, 0 ) - COALESCE ( wms_ods_procure_out_order_special.Sap_Number, 0 ))>0
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectWmsOdsProcureReturnOrderByID" resultMap="OdsProcureOutOrderResult">
|
|
|
|
|
SELECT DISTINCT
|
|
|
|
|
wms_ods_procure_return_order.Site_code,
|
|
|
|
|