diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml index b5555e43..261d852d 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml @@ -893,6 +893,7 @@ #{odsProcureOutOrder.ID} and wms_ods_procure_return_order.User_Defined10!='2' + and Order_Status='3' + SELECT DISTINCT + wms_ods_procure_return_order.Site_code, + wms_ods_procure_return_order.ID, + wms_ods_procure_return_order.Produce_Code, + wms_ods_procure_return_order.Material_Code, + wms_ods_procure_return_order.Material_Desc, + wms_ods_procure_return_order.Plan_Date, + wms_ods_procure_return_order.Plan_Number, + wms_ods_procure_return_order.Unit, + COALESCE ( wms_ods_procure_return_order.Return_Number, 0 ) AS Return_Number, + wms_raw_mission_out.user_defined2 Loc_Code, + wms_ods_procure_return_order.Loc_Desc, + wms_ods_procure_return_order.Production_Line_Desc, + wms_ods_procure_return_order.Production_Line_Code, + wms_ods_procure_return_order.Order_Status, + wms_ods_procure_return_order.User_Defined1, + wms_ods_procure_return_order.User_Defined2, + wms_ods_procure_return_order.User_Defined3, + wms_ods_procure_return_order.User_Defined4, + wms_ods_procure_return_order.User_Defined5, + wms_ods_procure_return_order.User_Defined6, + wms_ods_procure_return_order.User_Defined7, + wms_ods_procure_return_order.User_Defined8, + wms_ods_procure_return_order.User_Defined9, + wms_ods_procure_return_order.User_Defined10, + wms_ods_procure_return_order.User_Defined11, + wms_ods_procure_return_order.Supplier_Code, + wms_ods_procure_return_order.Supplier_Name, + wms_ods_procure_return_order.Create_By, + wms_ods_procure_return_order.Create_Date, + wms_ods_procure_return_order.Last_Update_By, + wms_ods_procure_return_order.Last_Update_Date, + wms_ods_procure_return_order.Active, + wms_ods_procure_return_order.Enterprise_Id, + wms_ods_procure_return_order.Enterprise_Code + FROM + wms_ods_procure_return_order + LEFT JOIN wms_raw_mission_out ON wms_raw_mission_out.prd_order = wms_ods_procure_return_order.Produce_Code + AND wms_raw_mission_out.material_code = wms_ods_procure_return_order.Material_Code + where wms_ods_procure_return_order.Produce_Code=#{order.produceCode} + and wms_ods_procure_return_order.User_Defined10!='2' +